From gerrit-no-reply at lists.osmocom.org Fri Dec 1 01:57:23 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 01:57:23 +0000 Subject: osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5098/2/src/host/layer23/src/mobile/gsm411_sms.c File src/host/layer23/src/mobile/gsm411_sms.c: Line 146: if (trans->sms.sms) { No other msg_ref than the one in trans->sms.sms -- To view, visit https://gerrit.osmocom.org/5098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 01:57:31 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 01:57:31 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: ms->shutdown was not converted properly to enum In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: ms->shutdown was not converted properly to enum ...................................................................... mobile: ms->shutdown was not converted properly to enum ms->shutdown is ms->shutdown != 0 which should have been converted to ms->shutdown != MS_SHUTDOWN_NONE. This is fixing sending SMS. This was introduced in Iee1140e4848923c7270495c381bf87b7e3fddee1. Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index 73fad84..f09d7a1 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -632,7 +632,7 @@ LOGP(DLSMS, LOGL_INFO, "..._sms_submit()\n"); /* no running, no transaction */ - if (!ms->started || ms->shutdown != MS_SHUTDOWN_COMPL) { + if (!ms->started || ms->shutdown != MS_SHUTDOWN_NONE) { LOGP(DLSMS, LOGL_ERROR, "Phone is down\n"); gsm411_sms_report(ms, sms, GSM411_RP_CAUSE_MO_TEMP_FAIL); sms_free(sms); -- To view, visit https://gerrit.osmocom.org/5097 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 01:57:32 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 01:57:32 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Speculative crash fix of the SI pointer In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Speculative crash fix of the SI pointer ...................................................................... mobile: Speculative crash fix of the SI pointer The SIs are kept per ARFCN and for the current cell the cs->si alias will be assigned[1]. On mobile_exit all SIs will be freed but the alias will not be set to NULL. This is a speculative fix but it doesn't seem to make things worse. Related: OS#2690 [1] cs->si = cs->list[cs->arfci].sysinfo; Change-Id: Icf20f9aa03dd26d4bee78772b7f3da034bb34b99 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 6de8bec..c3485b6 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -5141,6 +5141,7 @@ } cs->list[i].flags = 0; } + cs->si = NULL; /* store BA list */ ba_filename = talloc_asprintf(ms, "%s/%s.ba", config_dir, ms->name); -- To view, visit https://gerrit.osmocom.org/5112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf20f9aa03dd26d4bee78772b7f3da034bb34b99 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 02:05:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 02:05:44 +0000 Subject: osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Patch Set 7: (3 comments) https://gerrit.osmocom.org/#/c/4771/7//COMMIT_MSG Commit Message: Line 10: interface. This will allow to move it to a different thread or > I think you should mention that it is an interface. haha.. makkla makkla makkla.. hmm.. https://gerrit.osmocom.org/#/c/4771/7/src/host/layer23/src/mobile/primitives.c File src/host/layer23/src/mobile/primitives.c: Line 39: intf->ms = ms; > depends on the usage, but ... if the osmocom_ms gets freed, should there be True. For now it is getting freed when the lua state is being released. * It will be freed due talloc parent/child relationship * The primitive is mostly embedded/used somewhere else which should be freed/release too (and earlier than the MS) * Starting from the next commit we keep a list of primitives. The best might be to count how many primitive instances are still around and assert it is 0? Line 101: > (ws) Like two empty lines or some horribly disgusting spaces? Maybe even introduced by emacs? ;) -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 02:06:12 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 02:06:12 +0000 Subject: [ABANDON] osmocom-bb[master]: WIP: start/stop for the MS.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP: start/stop for the MS.. ...................................................................... Abandoned It was a WIP patch -- To view, visit https://gerrit.osmocom.org/5040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I7d52e5f61e77ef1ecf00aeecad85e56cbafb4379 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 02:06:20 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 02:06:20 +0000 Subject: [ABANDON] osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: mobile: Declare struct osmocom/vty to be self includeable ...................................................................... Abandoned WIP patch.. -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 11:22:37 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to... Message-ID: Review at https://gerrit.osmocom.org/5113 OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/13/5113/1 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 22d28dd..c46a23c 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -198,7 +198,16 @@ |lac|Location Area Code in which the MS was registered last |hlr|HLR of the subscriber |event|Possible events are explained below in <> -|pdp| +|=== + +If the _event_ field describes a pdp context related action (starts with +_pdp-_), then the following extra CSV fields are appended to the line: + +[[sgsn-cdr-pdp]] +.Description of extra CSV fields for pdp context related events +[options="header",cols="15%,85%"] +|=== +|Field Name|Description |pdp_duration|duration of the PDP context so far |ggsn_addr|GGSN related to the PDP context |sgsn_addr|SGSN related to the PDP context -- To view, visit https://gerrit.osmocom.org/5113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:22:37 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 11:22:37 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event Message-ID: Review at https://gerrit.osmocom.org/5114 OsmoSGSN: configuration: Add missing pdp-periodic event Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/14/5114/1 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index c46a23c..f995bc7 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -231,6 +231,7 @@ |pdp-deact|GTP DELETE PDP CONTEXT CONFIRM received from GGSN |pdp-terminate|Forced PDP context termination during MM context release |pdp-free|Release of the PDP context memory +|pdp-periodic|Triggered by periodic timer, see VTY cmd _cdr interval_ |=== -- To view, visit https://gerrit.osmocom.org/5114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:22:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 11:22:38 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface Message-ID: Review at https://gerrit.osmocom.org/5115 OsmoSGSN: configuration: Document CDR CTRL interface Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/15/5115/1 diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index f995bc7..2828987 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -175,7 +175,7 @@ OsmoSGSN can write a text log file containing CDR (call data records), which are commonly used for accounting/billing purpose. -.Example: CDR configuration +.Example: CDR log file configuration ---- OsmoSGSN(config-sgsn)# cdr filename /var/log/osmosgsn.cdr OsmoSGSN(config-sgsn)# cdr interval 600 <1> @@ -185,6 +185,20 @@ The CDR file is a simple CSV file including a header line naming the individual fields of each CSV line. +==== CDR CTRL interface + +Independently of whether logging CDR to a file is enabled or not, OsmoSGSN can +also provide delivery of CDR through the CTRL interface. CDR are sent by means +of TRAP messages with variable name _cdr-v1_, and its value is filled using the +same CSV line format as in the log file, but without CSV header line. + +.Example: CDR delivery through CTRL TRAP messages +---- +OsmoSGSN(config-sgsn)# cdr trap +---- + +==== CDR Format + [[sgsn-cdr]] .Description of CSV fields in OsmoSGSN CDR file [options="header",cols="15%,85%"] -- To view, visit https://gerrit.osmocom.org/5115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:42:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:42:22 +0000 Subject: osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:42:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:42:30 +0000 Subject: osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:42:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:42:40 +0000 Subject: osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:43:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:43:53 +0000 Subject: osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:44:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:44:18 +0000 Subject: osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:44:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:44:29 +0000 Subject: osmocom-bb[master]: mobile: Use enum and not magic value in the VTY In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:46:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:46:32 +0000 Subject: osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5100/2/src/host/layer23/src/mobile/app_mobile.c File src/host/layer23/src/mobile/app_mobile.c: Line 262: "use the same layer2-socket.\nPlease shutdown " > sure about \n in the middle of a LOGP? Makes sense in VTY output but "corru the old code used VTY_NEWLINE instead of \n, which isn't any better either. I think OsmocomBB needs a thorough clean up of such invalid use of libosmocore logging, but that shouldn't be mixed with this completely unrelated patch which just moves code around in this case. -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:48:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:48:36 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 8 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:49:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:49:57 +0000 Subject: osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 might be a good idea to state a small example in the commit log how it would look like when used from the LUA side. -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 6 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:50:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:50:05 +0000 Subject: osmocom-bb[master]: mobile: Use new LOGPSRCC macro to print multiple values In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:51:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:51:48 +0000 Subject: osmo-mgw[master]: mgcp_client: add transaction cleanup In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:52:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:52:06 +0000 Subject: osmo-mgw[master]: mgcp_client_test makefile: add update_exp target In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:52:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:52:44 +0000 Subject: osmo-mgw[master]: mgcp_client_test makefile: add update_exp target In-Reply-To: References: Message-ID: Patch Set 1: would be nice to have this in a generic rule that would work for each of the autotest tests, avoiding the need to replicate it all over the place by copy+paste -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:53:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:53:39 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 11: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:53:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:53:56 +0000 Subject: libosmocore[master]: coding test: use OSMO_ASSERT In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:54:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:54:01 +0000 Subject: [MERGED] libosmocore[master]: coding test: use OSMO_ASSERT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: coding test: use OSMO_ASSERT ...................................................................... coding test: use OSMO_ASSERT Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe --- M tests/coding/coding_test.c 1 file changed, 10 insertions(+), 17 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c index 9a8cdb3..b77410f 100644 --- a/tests/coding/coding_test.c +++ b/tests/coding/coding_test.c @@ -30,13 +30,6 @@ #include -#define ASSERT_TRUE(rc) \ - if (!(rc)) { \ - printf("Assert failed in %s:%d.\n", \ - __FILE__, __LINE__); \ - abort(); \ - } - #define DUMP_U_AT(b, x, u) do { \ printf("%s %02x %02x ", osmo_ubit_dump(b + x, 57), b[57 + x], b[58 + x]); \ printf("%s\n", osmo_ubit_dump(b + 59 + x, 57)); \ @@ -103,8 +96,8 @@ printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float) n_errors / n_bits_total); - ASSERT_TRUE(n_bits_total == 456); - ASSERT_TRUE(!memcmp(l2, result, 23)); + OSMO_ASSERT(n_bits_total == 456); + OSMO_ASSERT(!memcmp(l2, result, 23)); printf("\n"); } @@ -133,7 +126,7 @@ gsm0503_rach_decode(&result, bursts_s, bsic); printf("Decoded: %02x\n", result); - ASSERT_TRUE(ra == result); + OSMO_ASSERT(ra == result); printf("\n"); } @@ -166,7 +159,7 @@ gsm0503_sch_decode(result, bursts_s); printf("Decoded: %s\n", osmo_hexdump(result, 4)); - ASSERT_TRUE(!memcmp(info, result, 4)); + OSMO_ASSERT(!memcmp(info, result, 4)); printf("\n"); } @@ -202,8 +195,8 @@ printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(speech, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(speech, result, len)); printf("\n"); } @@ -239,8 +232,8 @@ printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(speech, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(speech, result, len)); printf("\n"); } @@ -283,8 +276,8 @@ printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n", n_errors, n_bits_total, (float)n_errors/n_bits_total); - ASSERT_TRUE(rc == len); - ASSERT_TRUE(!memcmp(l2, result, len)); + OSMO_ASSERT(rc == len); + OSMO_ASSERT(!memcmp(l2, result, len)); printf("\n"); } -- To view, visit https://gerrit.osmocom.org/5078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:54:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:54:56 +0000 Subject: osmo-pcu[master]: TBF: log timer override In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5109/1/src/tbf.cpp File src/tbf.cpp: Line 538: LOGP(DRLCMAC, LOGL_ERROR, "%s restarting timer %u " shouldn't this only be an ERROR if T != tbf->T ? -- To view, visit https://gerrit.osmocom.org/5109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:55:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:55:20 +0000 Subject: osmo-mgw[master]: mgcp_client: don't configure "bts base" In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:55:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:55:22 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_client: don't configure "bts base" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp_client: don't configure "bts base" ...................................................................... mgcp_client: don't configure "bts base" There should not be any BTS base port to be configured at an MGCP client. Possibly this is related to the legacy behavior of libosmo-legacy-mgcp, and certainly has no place in libosmo-mgcp-client. Further changes may be needed to follow up on removal of the BTS base port concept, at least drop it from the VTY for now. Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_vty.c 3 files changed, 0 insertions(+), 31 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 1a6cbce..8a2c404 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -21,7 +21,6 @@ int remote_port; uint16_t first_endpoint; uint16_t last_endpoint; - uint16_t bts_base; }; typedef unsigned int mgcp_trans_id_t; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2047637..a35ad6f 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -45,7 +45,6 @@ .remote_port = -1, .first_endpoint = 0, .last_endpoint = 0, - .bts_base = 0, }; } @@ -383,7 +382,6 @@ mgcp->actual.first_endpoint = conf->first_endpoint > 0 ? (uint16_t)conf->first_endpoint : 0; mgcp->actual.last_endpoint = conf->last_endpoint > 0 ? (uint16_t)conf->last_endpoint : 0; - mgcp->actual.bts_base = conf->bts_base > 0 ? (uint16_t)conf->bts_base : 4000; return mgcp; } diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index f8129c0..1d58bb5 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -123,32 +123,12 @@ "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") -#define BTS_START_STR "First UDP port allocated for the BTS side\n" -#define UDP_PORT_STR "UDP Port number\n" -DEFUN(cfg_mgw_rtp_bts_base_port, - cfg_mgw_rtp_bts_base_port_cmd, - "mgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) -{ - global_mgcp_client_conf->bts_base = atoi(argv[0]); - return CMD_SUCCESS; -} -ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, - cfg_mgcpgw_rtp_bts_base_port_cmd, - "mgcpgw bts-base <0-65534>", - MGW_STR - BTS_START_STR - UDP_PORT_STR) - int mgcp_client_config_write(struct vty *vty, const char *indent) { const char *addr; int port; uint16_t first_endpoint; uint16_t last_endpoint; - uint16_t bts_base; addr = global_mgcp_client_conf->local_addr; if (addr) @@ -175,12 +155,6 @@ first_endpoint, last_endpoint, VTY_NEWLINE); } - bts_base = global_mgcp_client_conf->bts_base; - if (bts_base) { - vty_out(vty, "%smgw bts-base %u%s", indent, - bts_base, VTY_NEWLINE); - } - return CMD_SUCCESS; } @@ -194,7 +168,6 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); - install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -202,5 +175,4 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); - install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/4701 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:56:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:56:04 +0000 Subject: osmo-mgw[master]: conn: remove assertions In-Reply-To: References: Message-ID: Patch Set 1: would be good to have a rationale stated in the commit message -- To view, visit https://gerrit.osmocom.org/5107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:07 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:09 +0000 Subject: osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 8 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:24 +0000 Subject: [MERGED] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MGCP: Connection Identifiers are hex strings ...................................................................... MGCP: Connection Identifiers are hex strings The MGCP spec in RFC3435 is quite clear: Connection Identifiers are hexadecimal strings of up to 32 characters. We should not print and parse them as integers on either client or server. Change the internal uint32_t representation of connection identifiers to a string representation in the client and also in the server. Closes: OS#2649 Change-Id: I0531a1b670d00cec50078423a2868207135b2436 --- M TODO-RELEASE M include/osmocom/mgcp/mgcp_common.h M include/osmocom/mgcp/mgcp_conn.h M include/osmocom/mgcp/mgcp_internal.h M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c M tests/mgcp_client/mgcp_client_test.c 16 files changed, 106 insertions(+), 102 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index d198b97..917c995 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,4 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 0eb1388..29dc458 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -68,4 +68,8 @@ return 0; } +/* String length of Connection Identifiers + * (see also RFC3435 2.1.3.2 Names of Connections) */ +#define MGCP_CONN_ID_LENGTH 32+1 + #endif diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index e0ae021..982a311 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,12 +28,12 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name); -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id); +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, - uint32_t id); -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id); + const char *id); +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id); void mgcp_conn_free_oldest(struct mgcp_endpoint *endp); void mgcp_conn_free_all(struct mgcp_endpoint *endp); char *mgcp_conn_dump(struct mgcp_conn *conn); diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index b9c1731..c3f9ba1 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -30,8 +30,10 @@ #define CI_UNUSED 0 -#define CONN_ID_BTS 0 -#define CONN_ID_NET 1 +/* FIXME: This this is only needed to compile the currently + * broken OSMUX support. Remove when fixed */ +#define CONN_ID_BTS "0" +#define CONN_ID_NET "1" enum mgcp_trunk_type { MGCP_TRUNK_VIRTUAL, @@ -203,7 +205,7 @@ enum mgcp_connection_mode mode_orig; /*!< connection id to identify the conntion */ - uint32_t id; + char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ char name[256]; diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h index b7d52bb..7732865 100644 --- a/include/osmocom/mgcp/mgcp_msg.h +++ b/include/osmocom/mgcp/mgcp_msg.h @@ -43,7 +43,7 @@ int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid); -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci); +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id); char *mgcp_strline(char *str, char **saveptr); @@ -54,5 +54,3 @@ #define for_each_non_empty_line(line, save)\ for (line = strtok_r(NULL, "\r\n", &save); line;\ line = strtok_r(NULL, "\r\n", &save)) - -int mgcp_parse_ci(uint32_t *conn_id, const char *ci); diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 8a2c404..b649abd 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -29,6 +29,7 @@ int response_code; mgcp_trans_id_t trans_id; const char *comment; + char conn_id[MGCP_CONN_ID_LENGTH]; }; struct mgcp_response { @@ -62,7 +63,7 @@ uint32_t presence; char endpoint[MGCP_ENDPOINT_MAXLEN]; unsigned int call_id; - uint32_t conn_id; + char *conn_id; uint16_t audio_port; char *audio_ip; enum mgcp_connection_mode conn_mode; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index a35ad6f..a89da99 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -716,7 +716,7 @@ /* Add connection id */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) - rc += msgb_printf(msg, "I: %u\r\n", mgcp_msg->conn_id); + rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e07b766..31713cb 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -78,13 +78,21 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - uint32_t id, enum mgcp_conn_type type, + const char *id, enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; OSMO_ASSERT(endp); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); + + /* Id is a mandatory parameter */ + if (!id) + return NULL; + + /* Prevent over long id strings */ + if (strlen(id) >= MGCP_CONN_ID_LENGTH) + return NULL; /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) @@ -102,9 +110,9 @@ conn->type = type; conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; - conn->id = id; conn->u.rtp.conn = conn; strcpy(conn->name, name); + osmo_strlcpy(conn->id, id, sizeof(conn->id)); switch (type) { case MGCP_CONN_TYPE_RTP: @@ -126,15 +134,17 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { - if (conn->id == id) + if (strncmp(conn->id, id, sizeof(conn->id)) == 0) return conn; } @@ -145,9 +155,12 @@ * \param[in] endp associated endpoint * \param[in] id identification number of the connection * \returns pointer to allocated connection, NULL if not found */ -struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, uint32_t id) +struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, + const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -165,9 +178,11 @@ /*! free a connection by its ID. * \param[in] endp associated endpoint * \param[in] id identification number of the connection */ -void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id) +void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { OSMO_ASSERT(endp); + OSMO_ASSERT(id); + OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); struct mgcp_conn *conn; @@ -235,7 +250,7 @@ * \returns human readble string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { - static char str[sizeof(conn->name)+256]; + static char str[sizeof(conn->name)+sizeof(conn->id)+256]; if (!conn) { snprintf(str, sizeof(str), "(null connection)"); @@ -245,7 +260,7 @@ switch (conn->type) { case MGCP_CONN_TYPE_RTP: /* Dump RTP connection */ - snprintf(str, sizeof(str), "(%s/rtp, id:%u, ip:%s, " + snprintf(str, sizeof(str), "(%s/rtp, id:0x%s, ip:%s, " "rtp:%u rtcp:%u)", conn->name, conn->id, diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 763a5a1..9803921 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -330,21 +330,39 @@ * \param[in] endp pointer to endpoint * \param{in] connection id to verify * \returns 1 when connection id seems plausible, 0 on error */ -int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci) +int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id) { - uint32_t id; - - if (!endp) + /* Check for null identifiers */ + if (!conn_id) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (missing)\n", + ENDPOINT_NUMBER(endp)); return -1; + } - id = strtoul(ci, NULL, 10); + /* Check for empty connection identifiers */ + if (strlen(conn_id) == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (empty)\n", + ENDPOINT_NUMBER(endp)); + return -1; + } - if (mgcp_conn_get(endp, id)) + /* Check for over long connection identifiers */ + if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { + LOGP(DLMGCP, LOGL_ERROR, + "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); + return -1; + } + + /* Check if connection exists */ + if (mgcp_conn_get(endp, conn_id)) return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x No connection found under ConnectionIdentifier %u\n", - ENDPOINT_NUMBER(endp), id); + "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -385,21 +403,4 @@ } return result; -} - -/*! Parse CI from a given string. - * \param[out] caller provided memory to store the result - * \param{in] string containing the connection id - * \returns 0 on success, -1 on error */ -int mgcp_parse_ci(uint32_t *conn_id, const char *ci) -{ - - OSMO_ASSERT(conn_id); - - if (!ci) - return -1; - - *conn_id = strtoul(ci, NULL, 10); - - return 0; } diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index d51b829..a02b0d1 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%i local interface auto detection failed, using configured addresses...\n", + "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using configured rtp bind ip as local bind ip %s\n", + "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%i using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -1217,7 +1217,7 @@ struct mgcp_rtp_end *end; char local_ip_addr[INET_ADDRSTRLEN]; - snprintf(name, sizeof(name), "%s-%u", conn->conn->name, conn->conn->id); + snprintf(name, sizeof(name), "%s-%s", conn->conn->name, conn->conn->id); end = &conn->end; if (end->rtp.fd != -1 || end->rtcp.fd != -1) { diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 09b2636..5030812 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -573,7 +573,7 @@ if (conn->osmux.state != OSMUX_STATE_ENABLED) return; - LOGP(DLMGCP, LOGL_INFO, "Releasing connection %u using Osmux CID %u\n", + LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index f542745..672a8d4 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -221,7 +221,7 @@ osmux_extension[0] = '\0'; } - rc = msgb_printf(sdp, "I: %u%s\n\n", conn->conn->id, osmux_extension); + rc = msgb_printf(sdp, "I: %s%s\n\n", conn->conn->id, osmux_extension); if (rc < 0) goto error; @@ -443,12 +443,11 @@ const char *local_options = NULL; const char *callid = NULL; - const char *ci = NULL; const char *mode = NULL; char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -469,7 +468,7 @@ callid = (const char *)line + 3; break; case 'I': - ci = (const char *)line + 3; + conn_id = (const char *)line + 3; break; case 'M': mode = (const char *)line + 3; @@ -511,7 +510,7 @@ return create_err_response(endp, 400, "CRCX", p->trans); } - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); @@ -561,13 +560,6 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - /* Only accept another connection when the connection ID is different. */ if (mgcp_conn_get_rtp(endp, conn_id)) { LOGP(DLMGCP, LOGL_ERROR, @@ -583,7 +575,7 @@ } } - snprintf(conn_name, sizeof(conn_name), "%s-%u", callid, conn_id); + snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, conn_name); conn = mgcp_conn_get_rtp(endp, conn_id); @@ -664,7 +656,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %u port: %u\n", + "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -695,11 +687,10 @@ int silent = 0; int have_sdp = 0; char *line; - const char *ci = NULL; const char *local_options = NULL; const char *mode = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; + const char *conn_id = NULL; LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); @@ -723,8 +714,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'L': @@ -749,7 +740,7 @@ } mgcp_header_done: - if (mgcp_parse_ci(&conn_id, ci)) { + if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); @@ -849,9 +840,8 @@ int silent = 0; char *line; char stats[1048]; - const char *ci = NULL; + const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - uint32_t conn_id; if (p->found != 0) return create_err_response(NULL, error_code, "DLCX", p->trans); @@ -877,8 +867,8 @@ goto error3; break; case 'I': - ci = (const char *)line + 3; - if (mgcp_verify_ci(endp, ci) != 0) + conn_id = (const char *)line + 3; + if (mgcp_verify_ci(endp, conn_id) != 0) goto error3; break; case 'Z': @@ -919,7 +909,7 @@ /* When no connection id is supplied, we will interpret this as a * wildcarded DLCX and drop all connections at once. (See also * RFC3435 Section F.7) */ - if (!ci) { + if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); @@ -930,14 +920,6 @@ * as we assume that the client is not interested in * this case. */ return create_ok_response(endp, 200, "DLCX", p->trans); - } - - /* Parse the connection id */ - if (mgcp_parse_ci(&conn_id, ci)) { - LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x insufficient parameters, invalid ci (connectionIdentifier)\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); } /* Find the connection */ diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index f45d6e7..666b8c2 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -365,7 +365,7 @@ rc = msgb_printf(sdp, "v=0\r\n" - "o=- %u 23 IN IP4 %s\r\n" + "o=- %s 23 IN IP4 %s\r\n" "s=-\r\n" "c=IN IP4 %s\r\n" "t=0 0\r\n", conn->conn->id, addr, addr); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 80396e0..e938391 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -970,7 +970,7 @@ struct mgcp_trunk_config *trunk; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn; - uint32_t conn_id; + const char *conn_id = NULL; trunk = find_trunk(g_cfg, atoi(argv[0])); if (!trunk) { @@ -994,11 +994,11 @@ endp = &trunk->endpoints[endp_no]; - conn_id = strtoul(argv[2], NULL, 10); + conn_id = argv[2]; conn = mgcp_conn_get_rtp(endp, conn_id); if (!conn) { - vty_out(vty, "Conn ID %s/%d is invalid.%s", - argv[2], conn_id, VTY_NEWLINE); + vty_out(vty, "Conn ID %s is invalid.%s", + conn_id, VTY_NEWLINE); return CMD_WARNING; } diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index f35dc93..7d976da 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -604,7 +604,7 @@ if (last_endpoint != -1) { endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 1); + conn = mgcp_conn_get_rtp(endp, "1"); if (conn) { OSMO_ASSERT(conn); @@ -1032,9 +1032,9 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(&endp, 4711); + conn = mgcp_conn_get_rtp(&endp, "4711"); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1110,7 +1110,7 @@ OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1124,7 +1124,7 @@ OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 90210); + conn = mgcp_conn_get_rtp(endp, "90210"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); @@ -1138,7 +1138,7 @@ OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 815); + conn = mgcp_conn_get_rtp(endp, "0815"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1152,7 +1152,7 @@ OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 32168); + conn = mgcp_conn_get_rtp(endp, "32168"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1169,7 +1169,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1181,7 +1181,7 @@ msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1198,7 +1198,7 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(!conn); last_endpoint = -1; @@ -1210,7 +1210,7 @@ OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, 3); + conn = mgcp_conn_get_rtp(endp, "3"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1232,9 +1232,9 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, 4711, MGCP_CONN_TYPE_RTP, + mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, "test-connection"); - conn = mgcp_conn_get_rtp(endp, 4711); + conn = mgcp_conn_get_rtp(endp, "4711"); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 513f345..5fd59e9 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -162,7 +162,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND }; -- To view, visit https://gerrit.osmocom.org/4906 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436 Gerrit-PatchSet: 9 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:25 +0000 Subject: [MERGED] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA ...................................................................... libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA The MGCP connection identifier is allocated by the MGW while processing the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2. So the MGW side must *reject* a CRCX message with 'I' parameter, and allocate a connection identifier which is subsequently returned in the response. Closes: OS#2648 Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c --- M TODO-RELEASE M configure.ac M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/Makefile.am M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 9 files changed, 970 insertions(+), 168 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 917c995..9d0e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -23,5 +23,7 @@ # If any interfaces have been added since the last public release, a++; # If any interfaces have been removed or changed since the last public release, a=0. # -#library what description / commit summary line -libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings \ No newline at end of file +#library what description / commit summary line +libosmo-mgcp API/ABI change parse and represent connection identifiers as hex strings +libosmo-mgcp API/ABI change connection identifiers are assigned by the server, not CA +libosmo-mgcp-client API/ABI change parse and store connection identifier in response \ No newline at end of file diff --git a/configure.ac b/configure.ac index f72b9e1..606f404 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index 982a311..e2a423f 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -28,8 +28,7 @@ #include struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name); + enum mgcp_conn_type type, char *name); struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id); struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id); diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index a89da99..7e83f95 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -257,6 +257,58 @@ return 0; } +/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */ +static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line) +{ + if (strlen(line) < 4) + goto response_parse_failure; + + if (memcmp("I: ", line, 3) != 0) + goto response_parse_failure; + + osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id)); + return 0; + +response_parse_failure: + LOGP(DLMGCP, LOGL_ERROR, + "Failed to parse MGCP response (connectionIdentifier)\n"); + return -EINVAL; +} + +/* Parse MGCP parameters of the response */ +static int parse_head_params(struct mgcp_response *r) +{ + char *line; + int rc = 0; + OSMO_ASSERT(r->body); + char *data = r->body; + char *data_end = strstr(r->body, "\n\n"); + + /* Protect SDP body, for_each_non_empty_line() will + * only parse until it hits \0 mark. */ + if (data_end) + *data_end = '\0'; + + for_each_non_empty_line(line, data) { + switch (line[0]) { + case 'I': + rc = mgcp_parse_conn_id(r, line); + if (rc) + goto exit; + break; + default: + /* skip unhandled parameters */ + break; + } + } +exit: + /* Restore original state */ + if (data_end) + *data_end = '\n'; + + return rc; +} + static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, struct mgcp_response *r) @@ -287,7 +339,13 @@ rc = mgcp_response_parse_head(&r, msg); if (rc) { - LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response\n"); + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head)\n"); + return -1; + } + + rc = parse_head_params(&r); + if (rc) { + LOGP(DLMGCP, LOGL_ERROR, "Cannot parse MGCP response (head parameters)\n"); return -1; } @@ -648,7 +706,6 @@ #define MGCP_CRCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CALL_ID | \ - MGCP_MSG_PRESENCE_CONN_ID | \ MGCP_MSG_PRESENCE_CONN_MODE) #define MGCP_MDCX_MANDATORY (MGCP_MSG_PRESENCE_ENDPOINT | \ MGCP_MSG_PRESENCE_CONN_ID) @@ -719,8 +776,7 @@ rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); /* Add local connection options */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID - && mgcp_msg->verb == MGCP_VERB_CRCX) + if (mgcp_msg->verb == MGCP_VERB_CRCX) rc += msgb_printf(msg, "L: p:20, a:AMR, nt:IN\r\n"); /* Add mode */ diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am index fce0e1b..a785d62 100644 --- a/src/libosmo-mgcp/Makefile.am +++ b/src/libosmo-mgcp/Makefile.am @@ -7,6 +7,7 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -14,6 +15,7 @@ AM_LDFLAGS = \ $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMONETIF_LIBS) \ $(COVERAGE_LDFLAGS) \ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 31713cb..e33596d 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -25,6 +25,46 @@ #include #include #include +#include +#include + +/* Allocate a new connection identifier. According to RFC3435, they must + * be unique only within the scope of the endpoint. */ +static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) +{ + int i; + int k; + int rc; + uint8_t id_bin[16]; + char *id_hex; + + /* Generate a connection id that is unique for the current endpoint. + * Technically a counter would be sufficient, but in order to + * be able to find a specific connection in large logfiles and to + * prevent unintentional connections we assign the connection + * identifiers randomly from a reasonable large number space */ + for (i = 0; i < 32; i++) { + rc = osmo_get_rand_id(id_bin, sizeof(id_bin)); + if (rc < 0) + return rc; + + id_hex = osmo_hexdump_nospc(id_bin, sizeof(id_bin)); + for (k = 0; k < strlen(id_hex); k++) + id_hex[k] = toupper(id_hex[k]); + + /* ensure that the generated conn_id is unique + * for this endpoint */ + if (!mgcp_conn_get_rtp(endp, id_hex)) { + osmo_strlcpy(id, id_hex, MGCP_CONN_ID_LENGTH); + return 0; + } + } + + LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + ENDPOINT_NUMBER(endp)); + + return -1; +} /* Reset codec state and free memory */ static void mgcp_rtp_codec_reset(struct mgcp_rtp_codec *codec) @@ -78,28 +118,17 @@ * \param[in] type connection type (e.g. MGCP_CONN_TYPE_RTP) * \returns pointer to allocated connection, NULL on error */ struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp, - const char *id, enum mgcp_conn_type type, - char *name) + enum mgcp_conn_type type, char *name) { struct mgcp_conn *conn; + int rc; + OSMO_ASSERT(endp); OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); OSMO_ASSERT(strlen(name) < sizeof(conn->name)); - /* Id is a mandatory parameter */ - if (!id) - return NULL; - - /* Prevent over long id strings */ - if (strlen(id) >= MGCP_CONN_ID_LENGTH) - return NULL; - /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) - return NULL; - - /* Prevent duplicate connection IDs */ - if (mgcp_conn_get(endp, id)) return NULL; /* Create new connection and add it to the list */ @@ -112,7 +141,11 @@ conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; strcpy(conn->name, name); - osmo_strlcpy(conn->id, id, sizeof(conn->id)); + rc = mgcp_alloc_id(endp, conn->id); + if (rc < 0) { + talloc_free(conn); + return NULL; + } switch (type) { case MGCP_CONN_TYPE_RTP: diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 672a8d4..feca8da 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -447,7 +447,7 @@ char *line; int have_sdp = 0, osmux_cid = -1; struct mgcp_conn_rtp *conn = NULL; - const char *conn_id = NULL; + struct mgcp_conn *_conn = NULL; char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); @@ -468,7 +468,10 @@ callid = (const char *)line + 3; break; case 'I': - conn_id = (const char *)line + 3; + /* It is illegal to send a connection identifier + * together with a CRCX, the MGW will assign the + * connection identifier by itself on CRCX */ + return create_err_response(NULL, 523, "CRCX", p->trans); break; case 'M': mode = (const char *)line + 3; @@ -506,13 +509,6 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", - ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); - } - - if (!conn_id) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x insufficient parameters, missing connection id\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "CRCX", p->trans); } @@ -560,32 +556,17 @@ set_local_cx_options(endp->tcfg->endpoints, &endp->local_options, local_options); - /* Only accept another connection when the connection ID is different. */ - if (mgcp_conn_get_rtp(endp, conn_id)) { - LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x there is already a connection with id %u present!\n", - conn_id, ENDPOINT_NUMBER(endp)); - if (tcfg->force_realloc) { - /* Ignore the existing connection by just freeing it */ - mgcp_conn_free(endp, conn_id); - } else { - /* There is already a connection with that ID present, - * leave everything as it is and return with an error. */ - return create_err_response(endp, 400, "CRCX", p->trans); - } - } - - snprintf(conn_name, sizeof(conn_name), "%s-%s", callid, conn_id); - mgcp_conn_alloc(NULL, endp, conn_id, MGCP_CONN_TYPE_RTP, - conn_name); - conn = mgcp_conn_get_rtp(endp, conn_id); - if (!conn) { + snprintf(conn_name, sizeof(conn_name), "%s", callid); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); + if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; } + conn = mgcp_conn_get_rtp(endp, _conn->id); + OSMO_ASSERT(conn); if (mgcp_parse_conn_mode(mode, endp, conn->conn) != 0) { error_code = 517; diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 7d976da..fb99911 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -82,27 +82,27 @@ #define MDCX3 \ "MDCX 18983215 1 at mgw MGCP 1.0\r\n" \ - "I: 1\n" + "I: %s\n" #define MDCX3_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16002 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16002 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n" #define MDCX3A_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -112,15 +112,15 @@ #define MDCX3_FMTP_RET \ "200 18983215 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ - "m=audio 16006 RTP/AVP 128\r\n" \ - "a=rtpmap:128 GSM-EFR/8000\r\n" \ + "m=audio 16006 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=fmtp:126 0/1/2\r\n" \ "a=ptime:40\r\n" @@ -128,11 +128,11 @@ "MDCX 18983216 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -141,10 +141,10 @@ #define MDCX4_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -154,10 +154,10 @@ #define MDCX4_RO_RET(Ident) \ "200 " Ident " OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -169,11 +169,11 @@ "MDCX 18983217 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-40, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -184,11 +184,11 @@ "MDCX 18983218 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20-20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -199,11 +199,11 @@ "MDCX 18983219 1 at mgw MGCP 1.0\r\n" \ "M: sendrecv\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -214,11 +214,11 @@ "MDCX 18983220 1 at mgw MGCP 1.0\r\n" \ "M: sendonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ "m=audio 4441 RTP/AVP 99\r\n" \ @@ -229,7 +229,7 @@ "MDCX 18983221 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "L: p:20, a:AMR, nt:IN\r\n" #define SHORT2 "CRCX 1" @@ -242,7 +242,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ - "I: 1\r\n" \ "L: p:20\r\n" \ "\r\n" \ "v=0\r\n" \ @@ -253,10 +252,10 @@ #define CRCX_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -266,10 +265,10 @@ #define CRCX_RET_NO_RTPMAP \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -278,10 +277,10 @@ #define CRCX_FMTP_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -294,7 +293,6 @@ "CRCX 2 1 at mgw MGCP 1.0\r" \ "M: recvonly\r" \ "C: 2\r\n" \ - "I: 1\n" \ "\n" \ "v=0\r" \ "c=IN IP4 123.12.12.123\r" \ @@ -303,10 +301,10 @@ #define CRCX_ZYN_RET \ "200 2 OK\r\n" \ - "I: 1\n" \ + "I: %s\n" \ "\n" \ "v=0\r\n" \ - "o=- 1 23 IN IP4 0.0.0.0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ "s=-\r\n" \ "c=IN IP4 0.0.0.0\r\n" \ "t=0 0\r\n" \ @@ -316,7 +314,7 @@ #define DLCX \ "DLCX 7 1 at mgw MGCP 1.0\r\n" \ - "I: 1\r\n" \ + "I: %s\r\n" \ "C: 2\r\n" #define DLCX_RET \ @@ -343,7 +341,6 @@ #define CRCX_MULT_1 \ "CRCX 2 1 at mgw MGCP 1.0\r\n" \ - "I: 4711\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -358,7 +355,6 @@ #define CRCX_MULT_2 \ "CRCX 2 2 at mgw MGCP 1.0\r\n" \ - "I: 90210\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -374,7 +370,6 @@ #define CRCX_MULT_3 \ "CRCX 2 3 at mgw MGCP 1.0\r\n" \ - "I: 0815\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -390,7 +385,6 @@ #define CRCX_MULT_4 \ "CRCX 2 4 at mgw MGCP 1.0\r\n" \ - "I: 32168\r\n" \ "M: recvonly\r\n" \ "C: 2\r\n" \ "X\r\n" \ @@ -407,7 +401,6 @@ #define CRCX_MULT_GSM_EXACT \ "CRCX 259260421 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ "L: p:20, a:GSM, nt:IN\r\n" \ "M: recvonly\r\n" \ "\r\n" \ @@ -432,7 +425,7 @@ #define MDCX_NAT_DUMMY \ "MDCX 23 5 at mgw MGCP 1.0\r\n" \ "C: 1355c6041e\r\n" \ - "I: 3\r\n" \ + "I: %s\r\n" \ "\r\n" \ "c=IN IP4 8.8.8.8\r\n" \ "m=audio 16434 RTP/AVP 255\r\n" @@ -482,12 +475,20 @@ {"DLCX", DLCX, DLCX_RET}, }; -static struct msgb *create_msg(const char *str) +static struct msgb *create_msg(const char *str, const char *conn_id) { struct msgb *msg; + int len; + + printf("creating message from statically defined input:\n"); + printf("---------8<---------\n%s\n---------8<---------\n", str); msg = msgb_alloc_headroom(4096, 128, "MGCP msg"); - int len = sprintf((char *)msg->data, "%s", str); + if (conn_id && strlen(conn_id)) + len = sprintf((char *)msg->data, str, conn_id, conn_id); + else + len = sprintf((char *)msg->data, "%s", str); + msg->l2h = msgb_put(msg, len); return msg; } @@ -554,18 +555,95 @@ MGCP_CONN_RECV_SEND); } +/* Extract a connection ID from a response (CRCX) */ +static int get_conn_id_from_response(uint8_t *resp, char *conn_id, + unsigned int conn_id_len) +{ + char *conn_id_ptr; + int i; + + conn_id_ptr = strstr((char *)resp, "I: "); + if (!conn_id_ptr) + return -EINVAL; + + memset(conn_id, 0, conn_id_len); + memcpy(conn_id, conn_id_ptr + 3, 32); + + for (i = 0; i < conn_id_len; i++) { + if (conn_id[i] == '\n' || conn_id[i] == '\r') + conn_id[i] = '\0'; + } + + /* A valid conn_id must at least contain one digit, and must + * not exceed a length of 32 digits */ + OSMO_ASSERT(strlen(conn_id) <= 32); + OSMO_ASSERT(strlen(conn_id) > 0); + + return 0; +} + +/* Check response, automatically patch connection ID if needed */ +static int check_response(uint8_t *resp, const char *exp_resp) +{ + char exp_resp_patched[4096]; + const char *exp_resp_ptr; + char conn_id[256]; + + printf("checking response:\n"); + + /* If the expected response is intened to be patched + * (%s placeholder inside) we will patch it with the + * connection identifier we just received from the + * real response. This is necessary because the CI + * is generated by the mgcp code on CRCX and we can + * not know it in advance */ + if (strstr(exp_resp, "%s")) { + if (get_conn_id_from_response(resp, conn_id, sizeof(conn_id)) == + 0) { + sprintf(exp_resp_patched, exp_resp, conn_id, conn_id); + exp_resp_ptr = exp_resp_patched; + printf + ("using message with patched conn_id for comparison\n"); + } else { + printf + ("patching conn_id failed, using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + } else { + printf("using message as statically defined for comparison\n"); + exp_resp_ptr = exp_resp; + } + + if (strcmp((char *)resp, exp_resp_ptr) != 0) { + printf("Unexpected response, please check!\n"); + printf + ("Got:\n---------8<---------\n%s\n---------8<---------\n\n", + resp); + printf + ("Expected:\n---------8<---------\n%s\n---------8<---------\n", + exp_resp_ptr); + return -EINVAL; + } + + printf("Response matches our expectations.\n"); + return 0; +} + static void test_messages(void) { struct mgcp_config *cfg; struct mgcp_endpoint *endp; int i; struct mgcp_conn_rtp *conn = NULL; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); cfg->policy_cb = mgcp_test_policy_cb; + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -574,6 +652,7 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); last_endpoint = -1; @@ -582,7 +661,7 @@ osmo_talloc_replace_string(cfg, &cfg->trunk.audio_fmtp_extra, t->extra_fmtp); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (!t->exp_resp) { @@ -591,11 +670,15 @@ (char *)msg->data); OSMO_ASSERT(false); } - } else if (strcmp((char *)msg->data, t->exp_resp) != 0) { - printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", - t->name, t->exp_resp, (char *) msg->data); + } else if (check_response(msg->data, t->exp_resp) != 0) { + printf("%s failed.\n", t->name); OSMO_ASSERT(false); } + + if (msg) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); if (dummy_packets) @@ -656,7 +739,7 @@ } /* Check detected payload type */ - if (t->ptype != PTYPE_IGNORE) { + if (conn && t->ptype != PTYPE_IGNORE) { OSMO_ASSERT(last_endpoint != -1); endp = &cfg->trunk.endpoints[last_endpoint]; @@ -681,11 +764,14 @@ { struct mgcp_config *cfg; int i; + char last_conn_id[256]; cfg = mgcp_config_alloc(); cfg->trunk.vty_number_endpoints = 64; mgcp_endpoints_allocate(&cfg->trunk); + + memset(last_conn_id, 0, sizeof(last_conn_id)); mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); @@ -694,24 +780,30 @@ struct msgb *inp; struct msgb *msg; + printf("\n================================================\n"); printf("Testing %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } + + if (msg && strcmp(t->name, CRCX)) + get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); - inp = create_msg(t->req); + inp = create_msg(t->req, last_conn_id); msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (strcmp((char *)msg->data, t->exp_resp) != 0) { + if (check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -732,6 +824,7 @@ { struct mgcp_config *cfg; struct msgb *inp, *msg; + char conn_id[256]; cfg = mgcp_config_alloc(); cfg->rqnt_cb = rqnt_cb; @@ -741,12 +834,16 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); - msgb_free(mgcp_handle_message(cfg, inp)); + inp = create_msg(CRCX, NULL); + msg = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(msg); + OSMO_ASSERT(get_conn_id_from_response(msg->data, conn_id, + sizeof(conn_id)) == 0); + msgb_free(msg); msgb_free(inp); /* send the RQNT and check for the CB */ - inp = create_msg(RQNT); + inp = create_msg(RQNT, conn_id); msg = mgcp_handle_message(cfg, inp); if (strncmp((const char *)msg->l2h, "200", 3) != 0) { printf("FAILED: message is not 200. '%s'\n", msg->l2h); @@ -761,7 +858,7 @@ msgb_free(msg); msgb_free(inp); - inp = create_msg(DLCX); + inp = create_msg(DLCX, conn_id); msgb_free(mgcp_handle_message(cfg, inp)); msgb_free(inp); talloc_free(cfg); @@ -864,7 +961,7 @@ int loss; int rc; - msg = create_msg(DLCX_RET); + msg = create_msg(DLCX_RET, NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 0 || bos != 0 || pr != 0 || _or != 0 || loss != 0 @@ -874,7 +971,7 @@ msg = create_msg - ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n"); + ("250 7 OK\r\nP: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40\r\n", NULL); rc = mgcp_parse_stats(msg, &bps, &bos, &pr, &_or, &loss, &jitter); printf("Parsing result: %d\n", rc); if (bps != 10 || bos != 20 || pr != 30 || _or != 40 || loss != -3 @@ -1013,6 +1110,7 @@ int last_in_ts_err_cnt = 0; int last_out_ts_err_cnt = 0; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing packet error detection%s%s.\n", patch_ssrc ? ", patch SSRC" : "", @@ -1032,9 +1130,10 @@ endp.tcfg = &trunk; INIT_LLIST_HEAD(&endp.conns); - mgcp_conn_alloc(NULL, &endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(&endp, "4711"); + _conn = mgcp_conn_alloc(NULL, &endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(&endp, _conn->id); OSMO_ASSERT(conn); rtp = &conn->end; @@ -1092,6 +1191,7 @@ struct msgb *inp, *resp; struct in_addr addr; struct mgcp_conn_rtp *conn = NULL; + char conn_id[256]; printf("Testing multiple payload types\n"); @@ -1103,85 +1203,95 @@ /* Allocate endpoint 1 at mgw with two codecs */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_1); + inp = create_msg(CRCX_MULT_1, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 1); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "4711"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 2 at mgw with three codecs, last one ignored */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_2); + inp = create_msg(CRCX_MULT_2, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 2); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "90210"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == 97); /* Allocate 3 at mgw with no codecs, check for PT == -1 */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_3); + inp = create_msg(CRCX_MULT_3, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 3); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "0815"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == -1); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 4 at mgw with a single codec */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_4); + inp = create_msg(CRCX_MULT_4, NULL); resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 4); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "32168"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 18); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); /* Allocate 5 at mgw at select GSM.. */ last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); talloc_free(cfg->trunk.audio_name); cfg->trunk.audio_name = "GSM/8000"; cfg->trunk.no_audio_transcoding = 1; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); - inp = create_msg(MDCX_NAT_DUMMY); + inp = create_msg(MDCX_NAT_DUMMY, conn_id); last_endpoint = -1; resp = mgcp_handle_message(cfg, inp); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 3); OSMO_ASSERT(conn->end.alt_codec.payload_type == -1); @@ -1198,19 +1308,21 @@ talloc_free(endp->last_response); talloc_free(endp->last_trans); endp->last_response = endp->last_trans = NULL; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(!conn); last_endpoint = -1; - inp = create_msg(CRCX_MULT_GSM_EXACT); + inp = create_msg(CRCX_MULT_GSM_EXACT, NULL); cfg->trunk.no_audio_transcoding = 0; resp = mgcp_handle_message(cfg, inp); + OSMO_ASSERT(get_conn_id_from_response(resp->data, conn_id, + sizeof(conn_id)) == 0); msgb_free(inp); msgb_free(resp); OSMO_ASSERT(last_endpoint == 5); endp = &cfg->trunk.endpoints[last_endpoint]; - conn = mgcp_conn_get_rtp(endp, "3"); + conn = mgcp_conn_get_rtp(endp, conn_id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->end.codec.payload_type == 255); OSMO_ASSERT(conn->end.alt_codec.payload_type == 0); @@ -1223,6 +1335,7 @@ struct mgcp_config *cfg; struct mgcp_endpoint *endp; struct mgcp_conn_rtp *conn = NULL; + struct mgcp_conn *_conn = NULL; printf("Testing no sequence flow on initial packet\n"); @@ -1232,9 +1345,10 @@ endp = &cfg->trunk.endpoints[1]; - mgcp_conn_alloc(NULL, endp, "4711", MGCP_CONN_TYPE_RTP, - "test-connection"); - conn = mgcp_conn_get_rtp(endp, "4711"); + _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, + "test-connection"); + OSMO_ASSERT(_conn); + conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); OSMO_ASSERT(conn->state.stats_initialized == 0); @@ -1281,9 +1395,10 @@ mgcp_endpoints_allocate(mgcp_trunk_alloc(cfg, 1)); - inp = create_msg(CRCX); + inp = create_msg(CRCX, NULL); msg = mgcp_handle_message(cfg, inp); - if (strcmp((char *)msg->data, CRCX_RET_NO_RTPMAP) != 0) { + + if (check_response(msg->data, CRCX_RET_NO_RTPMAP) != 0) { printf("FAILED: there should not be a RTPMAP: %s\n", (char *)msg->data); OSMO_ASSERT(false); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 7376930..c764531 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -11,87 +11,550 @@ line: '' line: '' line: '' + +================================================ Testing AUEP1 +creating message from statically defined input: +---------8<--------- +AUEP 158663169 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing AUEP2 +creating message from statically defined input: +---------8<--------- +AUEP 18983213 ds/e1-2/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX1 +creating message from statically defined input: +---------8<--------- +MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX2 +creating message from statically defined input: +---------8<--------- +MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing MDCX4 +creating message from statically defined input: +---------8<--------- +MDCX 18983216 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT1 +creating message from statically defined input: +---------8<--------- +MDCX 18983217 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-40, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-40 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT2 +creating message from statically defined input: +---------8<--------- +MDCX 18983218 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: p:20-20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_PT3 +creating message from statically defined input: +---------8<--------- +MDCX 18983219 1 at mgw MGCP 1.0 +M: sendrecv C: 2 +I: %s +L: a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 3: SEND RECV + +================================================ Testing MDCX4_SO -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 2: SEND +creating message from statically defined input: +---------8<--------- +MDCX 18983220 1 at mgw MGCP 1.0 +M: sendonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +v=0 +o=- %s 23 IN IP4 0.0.0.0 +c=IN IP4 0.0.0.0 +t=0 0 +m=audio 4441 RTP/AVP 99 +a=rtpmap:99 AMR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing MDCX4_RO +creating message from statically defined input: +---------8<--------- +MDCX 18983221 1 at mgw MGCP 1.0 +M: recvonly C: 2 +I: %s +L: p:20, a:AMR, nt:IN + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX_ZYN +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 M: recvonly C: 2 + +v=0 c=IN IP4 123.12.12.123 m=audio 5904 RTP/AVP 97 a=rtpmap:97 GSM-EFR/8000 +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 20 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing EMPTY +creating message from statically defined input: +---------8<--------- + + +---------8<--------- + +================================================ Testing SHORT1 +creating message from statically defined input: +---------8<--------- +CRCX + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT2 +creating message from statically defined input: +---------8<--------- +CRCX 1 +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT3 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing SHORT4 +creating message from statically defined input: +---------8<--------- +CRCX 1 1 at mgw MGCP +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetetization period: 20-20 -Connection mode: 1: RECV + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Dummy packets: 2 -Detected packet duration: 40 -Requested packetization period not set -Connection mode: 1: RECV + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting CRCX +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT1 +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting RQNT2 +creating message from statically defined input: +---------8<--------- +RQNT 186908781 1 at mgw MGCP 1.0 +X: ADD4F26746F +R: D/[0-9#*](N), G/ft, fxr/t38 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. + +================================================ Testing MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Re-transmitting MDCX3 +creating message from statically defined input: +---------8<--------- +MDCX 18983215 1 at mgw MGCP 1.0 +I: %s + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. + +================================================ Testing DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Re-transmitting DLCX +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- +checking response: +using message as statically defined for comparison +Response matches our expectations. Testing packet loss calculation. +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +RQNT 186908780 1 at mgw MGCP 1.0 +X: B244F267488 +S: D/9 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +DLCX 7 1 at mgw MGCP 1.0 +I: %s +C: 2 + +---------8<--------- Testing stat parsing +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=0, OS=0, PR=0, OR=0, PL=0, JI=0 +X-Osmo-CP: EC TI=0, TO=0 + +---------8<--------- Parsing result: 0 +creating message from statically defined input: +---------8<--------- +250 7 OK +P: PS=10, OS=20, PR=30, OR=40, PL=-3, JI=40 + +---------8<--------- Parsing result: 0 Testing packet error detection, patch SSRC. Output SSRC changed to 11223344 @@ -466,6 +929,156 @@ Out TS change: 160, dTS: 160, Seq change: 1, TS Err change: in +0, out +0 Stats: Jitter = 0, Transit = -144000 Testing multiple payload types +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 2 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 97 101 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 3 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 2 4 at mgw MGCP 1.0 +M: recvonly +C: 2 +X +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 18 +a=rtpmap:18 G729/8000 +a=rtpmap:97 GSM-EFR/8000 +a=rtpmap:101 FOO/8000 +a=ptime:40 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- +creating message from statically defined input: +---------8<--------- +MDCX 23 5 at mgw MGCP 1.0 +C: 1355c6041e +I: %s + +c=IN IP4 8.8.8.8 +m=audio 16434 RTP/AVP 255 + +---------8<--------- +creating message from statically defined input: +---------8<--------- +CRCX 259260421 5 at mgw MGCP 1.0 +C: 1355c6041e +L: p:20, a:GSM, nt:IN +M: recvonly + +v=0 +o=- 1439038275 1439038275 IN IP4 192.168.181.247 +s=- +c=IN IP4 192.168.181.247 +t=0 0 +m=audio 29084 RTP/AVP 255 0 8 3 18 4 96 97 101 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:3 gsm/8000 +a=rtpmap:18 G729/8000 +a=fmtp:18 annexb=no +a=rtpmap:4 G723/8000 +a=rtpmap:96 iLBC/8000 +a=fmtp:96 mode=20 +a=rtpmap:97 iLBC/8000 +a=fmtp:97 mode=30 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +a=recvonly + +---------8<--------- Testing no sequence flow on initial packet Testing no rtpmap name +creating message from statically defined input: +---------8<--------- +CRCX 2 1 at mgw MGCP 1.0 +M: recvonly +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 5904 RTP/AVP 97 +a=rtpmap:97 GSM-EFR/8000 +a=ptime:40 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. Done -- To view, visit https://gerrit.osmocom.org/4905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c Gerrit-PatchSet: 9 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:25 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: clearly mark endpoint numbers as hex ...................................................................... cosmetic: clearly mark endpoint numbers as hex The log prints the endpoint numbers as hexadecimal numbers, but it does not prefix them with "0x". Add "0x" prefixes to all endpoint number outputs in the log Change-Id: I284627de02cd140a894445375e9152ff007a71e6 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_protocol.c 4 files changed, 83 insertions(+), 83 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index dcfc2ff..ae3f026 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -61,7 +61,7 @@ } } - LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique connectionIdentifier\n", + LOGP(DLMGCP, LOGL_ERROR, "endpoint:0x%x, unable to generate a unique connectionIdentifier\n", ENDPOINT_NUMBER(endp)); return -1; diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 9803921..17b1026 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -82,7 +82,7 @@ if (!mode) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x missing connection mode\n", + "endpoint:0x%x missing connection mode\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -101,7 +101,7 @@ conn->mode = MGCP_CONN_LOOPBACK; else { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x unknown connection mode: '%s'\n", + "endpoint:0x%x unknown connection mode: '%s'\n", ENDPOINT_NUMBER(endp), mode); ret = -1; } @@ -113,16 +113,16 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x conn:%s\n", + "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn)); LOGP(DLMGCP, LOGL_DEBUG, - "endpoint:%x connection mode '%s' %d\n", + "endpoint:0x%x connection mode '%s' %d\n", ENDPOINT_NUMBER(endp), mode, conn->mode); /* Special handling f?r RTP connections */ if (conn->type == MGCP_CONN_TYPE_RTP) { - LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x output_enabled %d\n", + LOGP(DLMGCP, LOGL_DEBUG, "endpoint:0x%x output_enabled %d\n", ENDPOINT_NUMBER(endp), conn->u.rtp.end.output_enabled); } @@ -318,7 +318,7 @@ if (strcmp(endp->callid, callid) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x CallIDs does not match '%s' != '%s'\n", + "endpoint:0x%x CallIDs does not match '%s' != '%s'\n", ENDPOINT_NUMBER(endp), endp->callid, callid); return -1; } @@ -335,7 +335,7 @@ /* Check for null identifiers */ if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (missing)\n", + "endpoint:0x%x invalid ConnectionIdentifier (missing)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -343,7 +343,7 @@ /* Check for empty connection identifiers */ if (strlen(conn_id) == 0) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (empty)\n", + "endpoint:0x%x invalid ConnectionIdentifier (empty)\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -351,7 +351,7 @@ /* Check for over long connection identifiers */ if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) { LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x invalid ConnectionIdentifier (too long) 0x%s\n", + "endpoint:0x%x invalid ConnectionIdentifier (too long) 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; } @@ -361,7 +361,7 @@ return 0; LOGP(DLMGCP, LOGL_ERROR, - "endpoint:%x no connection found under ConnectionIdentifier 0x%s\n", + "endpoint:0x%x no connection found under ConnectionIdentifier 0x%s\n", ENDPOINT_NUMBER(endp), conn_id); return -1; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 816f16b..eb44f9b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -73,11 +73,11 @@ rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr)); if (rc < 0) LOGP(DRTP, LOGL_ERROR, - "endpoint:%x CI:%s local interface auto detection failed, using configured addresses...\n", + "endpoint:0x%x CI:%s local interface auto detection failed, using configured addresses...\n", ENDPOINT_NUMBER(endp), conn->conn->id); else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", + "endpoint:0x%x CI:%s selected local rtp bind ip %s by probing using remote ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr, inet_ntoa(conn->end.addr)); return; @@ -90,7 +90,7 @@ * if so, use that IP-Address */ osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", + "endpoint:0x%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } else { /* No specific bind IP is configured for the RTP traffic, so @@ -98,7 +98,7 @@ * as bind IP */ osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", + "endpoint:0x%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); } } @@ -162,8 +162,8 @@ OSMO_ASSERT(conn); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", + "endpoint:0x%x sending dummy packet...\n", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr, @@ -184,7 +184,7 @@ failed: LOGP(DRTP, LOGL_ERROR, - "endpoint:%x Failed to send dummy %s packet.\n", + "endpoint:0x%x Failed to send dummy %s packet.\n", ENDPOINT_NUMBER(endp), was_rtcp ? "RTCP" : "RTP"); return -1; @@ -393,7 +393,7 @@ struct mgcp_rtp_end *dst_end, char *data, int *len, int buf_size) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -407,7 +407,7 @@ struct mgcp_rtp_end *dst_end, struct mgcp_rtp_end *src_end) { - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x transcoding disabled\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x transcoding disabled\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -419,7 +419,7 @@ struct mgcp_conn_rtp *conn) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x conn:%s using format defaults\n", + "endpoint:0x%x conn:%s using format defaults\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); *payload_type = conn->end.codec.payload_type; @@ -516,7 +516,7 @@ state->out_stream.last_timestamp = timestamp; state->out_stream.ssrc = ssrc - 1; /* force output SSRC change */ LOGP(DRTP, LOGL_INFO, - "endpoint:%x initializing stream, SSRC: %u timestamp: %u " + "endpoint:0x%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, state->seq_offset, state->packet_duration, @@ -525,14 +525,14 @@ state->packet_duration = rtp_end->codec.rate * 20 / 1000; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x fixed packet duration is not available, " + "endpoint:0x%x fixed packet duration is not available, " "using fixed 20ms instead: %d from %s:%d\n", ENDPOINT_NUMBER(endp), state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } } else if (state->in_stream.ssrc != ssrc) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC changed: %u -> %u " + "endpoint:0x%x SSRC changed: %u -> %u " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, rtp_hdr->ssrc, @@ -561,7 +561,7 @@ rtp_end->force_constant_ssrc -= 1; LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x SSRC patching enabled, SSRC: %u " + "endpoint:0x%x SSRC patching enabled, SSRC: %u " "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, @@ -619,7 +619,7 @@ #if 0 DEBUGP(DRTP, - "endpoint:%x payload hdr payload %u -> endp payload %u\n", + "endpoint:0x%x payload hdr payload %u -> endp payload %u\n", ENDPOINT_NUMBER(endp), rtp_hdr->payload_type, payload); rtp_hdr->payload_type = payload; #endif @@ -670,16 +670,16 @@ if (is_rtp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTP packet...\n", + "endpoint:0x%x delivering RTP packet...\n", ENDPOINT_NUMBER(endp)); } else { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x delivering RTCP packet...\n", + "endpoint:0x%x delivering RTCP packet...\n", ENDPOINT_NUMBER(endp)); } LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x loop:%d, mode:%d ", + "endpoint:0x%x loop:%d, mode:%d ", ENDPOINT_NUMBER(endp), tcfg->audio_loop, conn_src->conn->mode); if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) LOGPC(DRTP, LOGL_DEBUG, "(loopback)\n"); @@ -695,7 +695,7 @@ if (!rtp_end->output_enabled) { rtp_end->dropped_packets += 1; LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x output disabled, drop to %s %s " + "endpoint:0x%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, @@ -718,7 +718,7 @@ mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, buflen); LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x process/send to %s %s " + "endpoint:0x%x process/send to %s %s " "rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), ntohs(rtp_end->rtp_port), @@ -757,7 +757,7 @@ return nbytes; } else if (!tcfg->omit_rtcp) { LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x send to %s %s rtp_port:%u rtcp_port:%u\n", + "endpoint:0x%x send to %s %s rtp_port:%u rtcp_port:%u\n", ENDPOINT_NUMBER(endp), dest_name, inet_ntoa(rtp_end->addr), @@ -804,13 +804,13 @@ if (rc < 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to receive packet, errno: %d/%s\n", + "endpoint:0x%x failed to receive packet, errno: %d/%s\n", ENDPOINT_NUMBER(endp), errno, strerror(errno)); return -1; } if (tossed) { - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); } @@ -830,11 +830,11 @@ if (memcmp(&addr->sin_addr, &conn->end.addr, sizeof(addr->sin_addr)) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong address: %s, ", + "endpoint:0x%x data from wrong address: %s, ", ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr)); LOGPC(DRTP, LOGL_ERROR, "expected: %s\n", inet_ntoa(conn->end.addr)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -846,12 +846,12 @@ if (conn->end.rtp_port != addr->sin_port && conn->end.rtcp_port != addr->sin_port) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x data from wrong source port: %d, ", + "endpoint:0x%x data from wrong source port: %d, ", ENDPOINT_NUMBER(endp), ntohs(addr->sin_port)); LOGPC(DRTP, LOGL_ERROR, "expected: %d for RTP or %d for RTCP\n", ntohs(conn->end.rtp_port), ntohs(conn->end.rtcp_port)); - LOGP(DRTP, LOGL_ERROR, "endpoint:%x packet tossed\n", + LOGP(DRTP, LOGL_ERROR, "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -868,14 +868,14 @@ if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination IP-address is invalid\n", + "endpoint:0x%x destination IP-address is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } if (conn->end.rtp_port == 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x destination rtp port is invalid\n", + "endpoint:0x%x destination rtp port is invalid\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -897,7 +897,7 @@ endp = conn->conn->endp; tcfg = endp->tcfg; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x receiving RTP/RTCP packet...\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x receiving RTP/RTCP packet...\n", ENDPOINT_NUMBER(endp)); rc = receive_from(endp, fd->fd, addr, buf, buf_size); @@ -905,11 +905,11 @@ return -1; *proto = fd == &conn->end.rtp ? MGCP_PROTO_RTP : MGCP_PROTO_RTCP; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x ", ENDPOINT_NUMBER(endp)); + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x ", ENDPOINT_NUMBER(endp)); LOGPC(DRTP, LOGL_DEBUG, "receiveing from %s %s %d\n", conn->conn->name, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x conn:%s\n", ENDPOINT_NUMBER(endp), + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); /* Check if the origin of the RTP packet seems plausible */ @@ -921,10 +921,10 @@ /* Filter out dummy message */ if (rc == 1 && buf[0] == MGCP_DUMMY_LOAD) { LOGP(DRTP, LOGL_NOTICE, - "endpoint:%x dummy message received\n", + "endpoint:0x%x dummy message received\n", ENDPOINT_NUMBER(endp)); LOGP(DRTP, LOGL_ERROR, - "endpoint:%x packet tossed\n", ENDPOINT_NUMBER(endp)); + "endpoint:0x%x packet tossed\n", ENDPOINT_NUMBER(endp)); return 0; } @@ -948,7 +948,7 @@ struct mgcp_endpoint *endp; endp = conn_src->conn->endp; - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x destin conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x destin conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_dst->conn)); /* Before we try to deliver the packet, we check if the destination @@ -962,7 +962,7 @@ switch (conn_dst->type) { case MGCP_RTP_DEFAULT: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_RTP_DEFAULT, " + "endpoint:0x%x endpoint type is MGCP_RTP_DEFAULT, " "using mgcp_send() to forward data directly\n", ENDPOINT_NUMBER(endp)); return mgcp_send(endp, proto == MGCP_PROTO_RTP, @@ -970,7 +970,7 @@ case MGCP_OSMUX_BSC_NAT: case MGCP_OSMUX_BSC: LOGP(DRTP, LOGL_DEBUG, - "endpoint:%x endpoint type is MGCP_OSMUX_BSC_NAT, " + "endpoint:0x%x endpoint type is MGCP_OSMUX_BSC_NAT, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n", ENDPOINT_NUMBER(endp)); return osmux_xfrm_to_osmux(buf, buf_size, conn_dst); @@ -980,7 +980,7 @@ * be discarded, this should not happen, normally the MGCP type * should be properly set */ LOGP(DRTP, LOGL_ERROR, - "endpoint:%x bad MGCP type -- data discarded!\n", + "endpoint:0x%x bad MGCP type -- data discarded!\n", ENDPOINT_NUMBER(endp)); return -1; @@ -1025,7 +1025,7 @@ /* There is no destination conn, stop here */ if (!conn_dst) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find destination conn\n", + "endpoint:0x%x unable to find destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1033,7 +1033,7 @@ /* The destination conn is not an RTP connection */ if (conn_dst->type != MGCP_CONN_TYPE_RTP) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x unable to find suitable destination conn\n", + "endpoint:0x%x unable to find suitable destination conn\n", ENDPOINT_NUMBER(endp)); return -1; } @@ -1067,7 +1067,7 @@ endp = conn_src->conn->endp; OSMO_ASSERT(endp); - LOGP(DRTP, LOGL_DEBUG, "endpoint:%x source conn:%s\n", + LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x source conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ @@ -1158,7 +1158,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtp, rtp_end->local_port) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTP port: %s:%d\n", endpno, source_addr, rtp_end->local_port); goto cleanup0; } @@ -1166,7 +1166,7 @@ if (mgcp_create_bind(source_addr, &rtp_end->rtcp, rtp_end->local_port + 1) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to create RTCP port: %s:%d\n", endpno, + "endpoint:0x%x failed to create RTCP port: %s:%d\n", endpno, source_addr, rtp_end->local_port + 1); goto cleanup1; } @@ -1178,7 +1178,7 @@ rtp_end->rtp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTP port %d\n", endpno, + "endpoint:0x%x failed to register RTP port %d\n", endpno, rtp_end->local_port); goto cleanup2; } @@ -1186,7 +1186,7 @@ rtp_end->rtcp.when = BSC_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x failed to register RTCP port %d\n", endpno, + "endpoint:0x%x failed to register RTCP port %d\n", endpno, rtp_end->local_port + 1); goto cleanup3; } @@ -1222,7 +1222,7 @@ if (end->rtp.fd != -1 || end->rtcp.fd != -1) { LOGP(DRTP, LOGL_ERROR, - "endpoint:%x %u was already bound on conn:%s\n", + "endpoint:0x%x %u was already bound on conn:%s\n", ENDPOINT_NUMBER(endp), rtp_port, mgcp_conn_dump(conn->conn)); diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index feca8da..a1ecce2 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -534,7 +534,7 @@ * callids match up so that we are sure that this is our call */ if (endp->callid && mgcp_verify_call_id(endp, callid)) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x allready seized by other call (%s)\n", + "CRCX: endpoint:0x%x allready seized by other call (%s)\n", ENDPOINT_NUMBER(endp), endp->callid); if (tcfg->force_realloc) /* This is not our call, toss everything by releasing @@ -560,7 +560,7 @@ _conn = mgcp_conn_alloc(NULL, endp, MGCP_CONN_TYPE_RTP, conn_name); if (!_conn) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x unable to allocate RTP connection\n", + "CRCX: endpoint:0x%x unable to allocate RTP connection\n", ENDPOINT_NUMBER(endp)); goto error2; @@ -581,7 +581,7 @@ conn->osmux.state = OSMUX_STATE_NEGOTIATING; } else if (endp->cfg->osmux == OSMUX_USAGE_ONLY) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x osmux only and no osmux offered\n", + "CRCX: endpoint:0x%x osmux only and no osmux offered\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -608,7 +608,7 @@ if (setup_rtp_processing(endp, conn) != 0) { LOGP(DLMGCP, LOGL_ERROR, - "CRCX: endpoint:%x could not start RTP processing!\n", + "CRCX: endpoint:0x%x could not start RTP processing!\n", ENDPOINT_NUMBER(endp)); goto error2; } @@ -621,7 +621,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x CRCX rejected by policy\n", + "CRCX: endpoint:0x%x CRCX rejected by policy\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); return create_err_response(endp, 400, "CRCX", p->trans); @@ -637,7 +637,7 @@ } LOGP(DLMGCP, LOGL_DEBUG, - "CRCX: endpoint:%x Creating connection: CI: %s port: %u\n", + "CRCX: endpoint:0x%x Creating connection: CI: %s port: %u\n", ENDPOINT_NUMBER(endp), conn->conn->id, conn->end.local_port); if (p->cfg->change_cb) p->cfg->change_cb(tcfg, ENDPOINT_NUMBER(endp), MGCP_ENDP_CRCX); @@ -649,13 +649,13 @@ send_dummy(endp, conn); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x connection successfully created\n", + "CRCX: endpoint:0x%x connection successfully created\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "CRCX", p->trans); error2: mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_NOTICE, - "CRCX: endpoint:%x unable to create connection resource error\n", + "CRCX: endpoint:0x%x unable to create connection resource error\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, error_code, "CRCX", p->trans); } @@ -680,7 +680,7 @@ if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x endpoint is not holding a connection.\n", + "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -714,7 +714,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "MDCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -723,7 +723,7 @@ mgcp_header_done: if (!conn_id) { LOGP(DLMGCP, LOGL_ERROR, - "MDCX: endpoint:%x insufficient parameters, missing ci (connectionIdentifier)\n", + "MDCX: endpoint:0x%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "MDCX", p->trans); } @@ -762,7 +762,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x rejected by policy\n", + "MDCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -771,7 +771,7 @@ case MGCP_POLICY_DEFER: /* stop processing */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x defered by policy\n", + "MDCX: endpoint:0x%x defered by policy\n", ENDPOINT_NUMBER(endp)); return NULL; break; @@ -785,7 +785,7 @@ /* modify */ LOGP(DLMGCP, LOGL_DEBUG, - "MDCX: endpoint:%x modified conn:%s\n", + "MDCX: endpoint:0x%x modified conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); if (p->cfg->change_cb) p->cfg->change_cb(endp->tcfg, ENDPOINT_NUMBER(endp), @@ -801,14 +801,14 @@ goto out_silent; LOGP(DLMGCP, LOGL_NOTICE, - "MDCX: endpoint:%x connection successfully modified\n", + "MDCX: endpoint:0x%x connection successfully modified\n", ENDPOINT_NUMBER(endp)); return create_response_with_sdp(endp, conn, "MDCX", p->trans); error3: return create_err_response(endp, error_code, "MDCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "MDCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -828,12 +828,12 @@ return create_err_response(NULL, error_code, "DLCX", p->trans); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x deleting connection ...\n", + "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, - "DLCX: endpoint:%x endpoint is not holding a connection.\n", + "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); return create_err_response(endp, 400, "DLCX", p->trans); } @@ -857,7 +857,7 @@ break; default: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x Unhandled MGCP option: '%c'/%d\n", + "DLCX: endpoint:0x%x Unhandled MGCP option: '%c'/%d\n", ENDPOINT_NUMBER(endp), line[0], line[0]); break; } @@ -871,7 +871,7 @@ switch (rc) { case MGCP_POLICY_REJECT: LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x rejected by policy\n", + "DLCX: endpoint:0x%x rejected by policy\n", ENDPOINT_NUMBER(endp)); if (silent) goto out_silent; @@ -892,7 +892,7 @@ * RFC3435 Section F.7) */ if (!conn_id) { LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x missing ci (connectionIdentifier), will remove all connections at once\n", + "DLCX: endpoint:0x%x missing ci (connectionIdentifier), will remove all connections at once\n", ENDPOINT_NUMBER(endp)); mgcp_release_endp(endp); @@ -912,11 +912,11 @@ mgcp_format_stats(stats, sizeof(stats), conn->conn); /* delete connection */ - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x deleting conn:%s\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x deleting conn:%s\n", ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn->conn)); mgcp_conn_free(endp, conn_id); LOGP(DLMGCP, LOGL_NOTICE, - "DLCX: endpoint:%x connection successfully deleted\n", + "DLCX: endpoint:0x%x connection successfully deleted\n", ENDPOINT_NUMBER(endp)); /* When all connections are closed, the endpoint will be released @@ -924,7 +924,7 @@ if (llist_count(&endp->conns) <= 0) { mgcp_release_endp(endp); LOGP(DLMGCP, LOGL_DEBUG, - "DLCX: endpoint:%x endpoint released\n", + "DLCX: endpoint:0x%x endpoint released\n", ENDPOINT_NUMBER(endp)); } @@ -940,7 +940,7 @@ return create_err_response(endp, error_code, "DLCX", p->trans); out_silent: - LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:%x silent exit\n", + LOGP(DLMGCP, LOGL_DEBUG, "DLCX: endpoint:0x%x silent exit\n", ENDPOINT_NUMBER(endp)); return NULL; } @@ -1188,7 +1188,7 @@ * \param[in] endp endpoint to release */ void mgcp_release_endp(struct mgcp_endpoint *endp) { - LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:%x\n", + LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", ENDPOINT_NUMBER(endp)); /* Normally this function should only be called wehen -- To view, visit https://gerrit.osmocom.org/5060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I284627de02cd140a894445375e9152ff007a71e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:26 +0000 Subject: [MERGED] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: client: use osmo_strlcpy instead of strncpy ...................................................................... client: use osmo_strlcpy instead of strncpy simplify \nul termination of the ip_addr string Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 --- M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M tests/mgcp_client/mgcp_client_test.c 4 files changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 7e83f95..5cd14f7 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -200,8 +200,7 @@ goto response_parse_failure; /* Extract IP-Address */ - strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); - r->audio_ip[sizeof(r->audio_ip) - 1] = '\0'; + osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip)); /* Check IP-Address */ if (inet_aton(r->audio_ip, &ip_test) == 0) @@ -397,7 +396,7 @@ unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf); unsigned int i; - strncpy(strbuf, (const char*)msg->data, l); + osmo_strlcpy(strbuf, (const char*)msg->data, l); for (i = 0; i < sizeof(strbuf); i++) { if (strbuf[i] == '\n' || strbuf[i] == '\r') { strbuf[i] = '\0'; diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index e33596d..dcfc2ff 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -29,7 +29,8 @@ #include /* Allocate a new connection identifier. According to RFC3435, they must - * be unique only within the scope of the endpoint. */ + * be unique only within the scope of the endpoint. (Caller must provide + * memory for id) */ static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id) { int i; @@ -140,7 +141,7 @@ conn->mode = MGCP_CONN_NONE; conn->mode_orig = MGCP_CONN_NONE; conn->u.rtp.conn = conn; - strcpy(conn->name, name); + osmo_strlcpy(conn->name, name, sizeof(conn->name)); rc = mgcp_alloc_id(endp, conn->id); if (rc < 0) { talloc_free(conn); diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index a02b0d1..816f16b 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -88,7 +88,7 @@ if (endp->cfg->net_ports.bind_addr) { /* Check there is a bind IP for the RTP traffic configured, * if so, use that IP-Address */ - strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using configured rtp bind ip as local bind ip %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); @@ -96,7 +96,7 @@ /* No specific bind IP is configured for the RTP traffic, so * assume the IP where we listen for incoming MGCP messages * as bind IP */ - strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); + osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN); LOGP(DRTP, LOGL_DEBUG, "endpoint:%x CI:%s using mgcp bind ip as local rtp bind ip: %s\n", ENDPOINT_NUMBER(endp), conn->conn->id, addr); diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 5fd59e9..37fe0b8 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -46,14 +46,14 @@ l = strlen(head); msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, head, l); + osmo_strlcpy(data, head, l); data = (char*)msgb_put(msg, 1); *data = '\n'; l = strlen(params); data = (char*)msgb_put(msg, l); - strncpy(data, params, l); + osmo_strlcpy(data, params, l); return msg; } @@ -66,7 +66,7 @@ char *data; msg->l2h = msgb_put(msg, l); data = (char*)msgb_l2(msg); - strncpy(data, str, l); + osmo_strlcpy(data, str, l); return msg; } -- To view, visit https://gerrit.osmocom.org/5024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8 Gerrit-PatchSet: 7 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:58:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:58:26 +0000 Subject: [MERGED] osmo-mgw[master]: cosmetic: fix sourcecode formatting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: fix sourcecode formatting ...................................................................... cosmetic: fix sourcecode formatting Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 --- M include/osmocom/mgcp_client/mgcp_client.h 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index b649abd..19abaf3 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -26,9 +26,9 @@ typedef unsigned int mgcp_trans_id_t; struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - const char *comment; + int response_code; + mgcp_trans_id_t trans_id; + const char *comment; char conn_id[MGCP_CONN_ID_LENGTH]; }; -- To view, visit https://gerrit.osmocom.org/5034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149 Gerrit-PatchSet: 6 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 11:59:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 11:59:24 +0000 Subject: osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:00:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:00:48 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoSGSN: configuration: Document CDR CTRL interface ...................................................................... OsmoSGSN: configuration: Document CDR CTRL interface Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index f995bc7..2828987 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -175,7 +175,7 @@ OsmoSGSN can write a text log file containing CDR (call data records), which are commonly used for accounting/billing purpose. -.Example: CDR configuration +.Example: CDR log file configuration ---- OsmoSGSN(config-sgsn)# cdr filename /var/log/osmosgsn.cdr OsmoSGSN(config-sgsn)# cdr interval 600 <1> @@ -185,6 +185,20 @@ The CDR file is a simple CSV file including a header line naming the individual fields of each CSV line. +==== CDR CTRL interface + +Independently of whether logging CDR to a file is enabled or not, OsmoSGSN can +also provide delivery of CDR through the CTRL interface. CDR are sent by means +of TRAP messages with variable name _cdr-v1_, and its value is filled using the +same CSV line format as in the log file, but without CSV header line. + +.Example: CDR delivery through CTRL TRAP messages +---- +OsmoSGSN(config-sgsn)# cdr trap +---- + +==== CDR Format + [[sgsn-cdr]] .Description of CSV fields in OsmoSGSN CDR file [options="header",cols="15%,85%"] -- To view, visit https://gerrit.osmocom.org/5115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:00:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:00:48 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoSGSN: configuration: Add missing pdp-periodic event ...................................................................... OsmoSGSN: configuration: Add missing pdp-periodic event Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index c46a23c..f995bc7 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -231,6 +231,7 @@ |pdp-deact|GTP DELETE PDP CONTEXT CONFIRM received from GGSN |pdp-terminate|Forced PDP context termination during MM context release |pdp-free|Release of the PDP context memory +|pdp-periodic|Triggered by periodic timer, see VTY cmd _cdr interval_ |=== -- To view, visit https://gerrit.osmocom.org/5114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:00:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:00:49 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table ...................................................................... OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022 --- M OsmoSGSN/chapters/configuration.adoc 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 22d28dd..c46a23c 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -198,7 +198,16 @@ |lac|Location Area Code in which the MS was registered last |hlr|HLR of the subscriber |event|Possible events are explained below in <> -|pdp| +|=== + +If the _event_ field describes a pdp context related action (starts with +_pdp-_), then the following extra CSV fields are appended to the line: + +[[sgsn-cdr-pdp]] +.Description of extra CSV fields for pdp context related events +[options="header",cols="15%,85%"] +|=== +|Field Name|Description |pdp_duration|duration of the PDP context so far |ggsn_addr|GGSN related to the PDP context |sgsn_addr|SGSN related to the PDP context -- To view, visit https://gerrit.osmocom.org/5113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:01:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:01:20 +0000 Subject: osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 7 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:01:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:01:26 +0000 Subject: [MERGED] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test ...................................................................... sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 --- M tests/gtp/gtpie_test.c M tests/lib/in46a_test.c 2 files changed, 8 insertions(+), 6 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c index 8d87dcc..e3bc2e0 100644 --- a/tests/gtp/gtpie_test.c +++ b/tests/gtp/gtpie_test.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "../../lib/syserr.h" #include "../../gtp/gtpie.h" @@ -27,7 +28,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == sizeof(in) + 3); OSMO_ASSERT(buf[0] == 23); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in)); + OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in)); OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in))); /* overflow */ @@ -73,7 +74,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 3); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD); + OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD); } static void test_gtpie_tv4() @@ -87,7 +88,7 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 5); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123); } static void test_gtpie_tv8() @@ -101,8 +102,8 @@ OSMO_ASSERT(rc == 0); OSMO_ASSERT(len == 9); OSMO_ASSERT(buf[0] == 42); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203); - OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607); + OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203); + OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607); } int main(int argc, char **argv) diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index ab7156f..d4a5dbc 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "../../lib/in46_addr.h" #include "../../lib/syserr.h" @@ -171,7 +172,7 @@ OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); - OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); -- To view, visit https://gerrit.osmocom.org/4915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842 Gerrit-PatchSet: 7 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:01:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:01:38 +0000 Subject: [MERGED] libosmocore[master]: logging: Extend the LOGPSRC macro to put cont in it as well In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: logging: Extend the LOGPSRC macro to put cont in it as well ...................................................................... logging: Extend the LOGPSRC macro to put cont in it as well For the lua console printing I need to print several values with continuation but also specify the filename. Add a "C" for continue and forward arguments. Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e --- M include/osmocom/core/logging.h 1 file changed, 18 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 86a6977..922cbf6 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -71,12 +71,28 @@ * \param[in] args variable argument list */ #define LOGPSRC(ss, level, caller_file, caller_line, fmt, args...) \ + LOGPSRCC(ss, level, caller_file, caller_line, 0, fmt, ##args) + +/*! Log through the Osmocom logging framework with explicit source. + * If caller_file is passed as NULL, __BASE_FILE__ and __LINE__ are used + * instead of caller_file and caller_line (so that this macro here defines + * both cases in the same place, and to catch cases where callers fail to pass + * a non-null filename string). + * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) + * \param[in] level logging level (e.g. \ref LOGL_NOTICE) + * \param[in] caller_file caller's source file string (e.g. __BASE_FILE__) + * \param[in] caller_line caller's source line nr (e.g. __LINE__) + * \param[in] cont continuation (1) or new line (0) + * \param[in] fmt format string + * \param[in] args variable argument list + */ +#define LOGPSRCC(ss, level, caller_file, caller_line, cont, fmt, args...) \ do { \ if (log_check_level(ss, level)) {\ if (caller_file) \ - logp2(ss, level, caller_file, caller_line, 0, fmt, ##args); \ + logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ else \ - logp2(ss, level, __BASE_FILE__, __LINE__, 0, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ }\ } while(0) -- To view, visit https://gerrit.osmocom.org/5080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:01:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:01:59 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: remove duplicate logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: remove duplicate logging ...................................................................... cosmetic: remove duplicate logging The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02 --- M src/libcommon-cs/a_reset.c 1 file changed, 2 insertions(+), 24 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 32c00ae..3ee0058 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -38,23 +38,10 @@ ST_CONN, /* We have a confirmed connection */ }; -static const struct value_string fsm_state_names[] = { - {ST_DISC, "ST_DISC (disconnected)"}, - {ST_CONN, "ST_CONN (connected)"}, - {0, NULL}, -}; - enum fsm_evt { EV_RESET_ACK, /* got reset acknowlegement from remote end */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ -}; - -static const struct value_string fsm_evt_names[] = { - {EV_RESET_ACK, "EV_RESET_ACK"}, - {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, - {EV_N_CONNECT, "EV_N_CONNECT"}, - {0, NULL}, }; /* Disconnected state */ @@ -63,9 +50,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); OSMO_ASSERT(reset->fsm); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n"); reset->conn_loss_counter = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); @@ -76,9 +61,6 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: @@ -100,8 +82,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; OSMO_ASSERT(reset->fsm); - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET message...\n"); reset->cb(reset->priv); @@ -153,7 +134,6 @@ reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,8 +152,6 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/5031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:04:01 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 looks fine to me, but I'm not the python guru. Pau? Neels? -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:04:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:04:15 +0000 Subject: python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:05:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:05:49 +0000 Subject: osmo-hlr[master]: Remove unused ipa.py In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 Gerrit-PatchSet: 2 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 12:05:51 +0000 Subject: [MERGED] osmo-hlr[master]: Remove unused ipa.py In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unused ipa.py ...................................................................... Remove unused ipa.py Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 --- D contrib/ipa.py 1 file changed, 0 insertions(+), 278 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) -- To view, visit https://gerrit.osmocom.org/4994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42 Gerrit-PatchSet: 3 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:24:50 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 12:24:50 +0000 Subject: [ABANDON] osmocom-bb[master]: mobile: Pass the msg_ref from outside In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: mobile: Pass the msg_ref from outside ...................................................................... Abandoned I squashed this into another patch. -- To view, visit https://gerrit.osmocom.org/4910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:27:05 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 12:27:05 +0000 Subject: osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Patch Set 6: > might be a good idea to state a small example in the commit log how > it would look like when used from the LUA side. chicken/egg. I do have a table+examples in the OsmocomBB manual (commit pending). Maybe I should just point to the manual in the commit message? And later of course put examples into into the contrib directory. -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 6 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:41:14 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 1 Dec 2017 12:41:14 +0000 Subject: [PATCH] osmo-mgw[master]: conn: remove assertions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5107 to look at the new patch set (#2). conn: remove assertions the assertions in the code that handles the connection lists introduce a lot of unnecessary bloat. Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 0 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/07/5107/2 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index ae3f026..4090a9f 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -124,10 +124,6 @@ struct mgcp_conn *conn; int rc; - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - OSMO_ASSERT(strlen(name) < sizeof(conn->name)); - /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) return NULL; @@ -170,11 +166,6 @@ * \returns pointer to allocated connection, NULL if not found */ struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { @@ -192,11 +183,6 @@ struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -214,11 +200,6 @@ * \param[in] id identification number of the connection */ void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -246,9 +227,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_oldest(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; if (llist_empty(&endp->conns)) @@ -265,9 +243,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_all(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; struct mgcp_conn *conn_tmp; -- To view, visit https://gerrit.osmocom.org/5107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 12:50:28 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Re-introduce msg_ref in struct gsm_sms ...................................................................... mobile: Re-introduce msg_ref in struct gsm_sms In I4bac5f06921b5fd85a98d97770d42d4858ca1c42 I have removed the msg_ref field. But in case we delete a transaction with a pending SMS we need to get the msg_ref from somewhere. This is a partial revert but for RX SMS it makes sure that msg_ref will be set (it wasn't set before). Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/src/mobile/gsm411_sms.c 2 files changed, 10 insertions(+), 7 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index 0d0578a..a94d1aa 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -11,6 +11,7 @@ uint8_t ud_hdr_ind; uint8_t protocol_id; uint8_t data_coding_scheme; + uint8_t msg_ref; char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes * BCD == 20 bytes string */ time_t time; diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index f09d7a1..eb09854 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -232,6 +232,7 @@ int rc = 0; gsms = sms_alloc(); + gsms->msg_ref = msg_ref; /* invert those fields where 0 means active/present */ sms_mti = *smsp & 0x03; @@ -296,7 +297,7 @@ LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, " "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, " "UserDataLength: 0x%02x, UserData: \"%s\"\n", - sms_mti, msg_ref, + sms_mti, gsms->msg_ref, gsms->protocol_id, gsms->data_coding_scheme, gsms->address, gsms->user_data_len, sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text : @@ -528,7 +529,7 @@ /* generate a msgb containing a TPDU derived from struct gsm_sms, * returns total size of TPDU */ -static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t msg_ref) +static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms) { uint8_t *smsp; uint8_t da[12]; /* max len per 03.40 */ @@ -559,7 +560,7 @@ /* generate message ref */ smsp = msgb_put(msg, 1); - *smsp = msg_ref; + *smsp = sms->msg_ref; /* generate destination address */ if (sms->address[0] == '+') @@ -620,7 +621,7 @@ /* Take a SMS in gsm_sms structure and send it. */ static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, - struct gsm_sms *sms, uint8_t msg_ref) + struct gsm_sms *sms) { struct msgb *msg; struct gsm_trans *trans; @@ -688,14 +689,14 @@ rp_ud_len = (uint8_t *)msgb_put(msg, 1); /* generate the 03.40 TPDU */ - rc = gsm340_gen_tpdu(msg, sms, msg_ref); + rc = gsm340_gen_tpdu(msg, sms); if (rc < 0) goto error; *rp_ud_len = rc; LOGP(DLSMS, LOGL_INFO, "TX: SMS DELIVER\n"); - gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, msg_ref); + gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, sms->msg_ref); return gsm411_smr_send(&trans->sms.smr_inst, GSM411_SM_RL_DATA_REQ, msg); } @@ -709,7 +710,8 @@ if (!sms) return -ENOMEM; - return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref); + sms->msg_ref = msg_ref; + return gsm411_tx_sms_submit(ms, sms_sca, sms); } /* -- To view, visit https://gerrit.osmocom.org/5098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 12:50:46 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 1 Dec 2017 12:50:46 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Use enum and not magic value in the VTY In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Use enum and not magic value in the VTY ...................................................................... mobile: Use enum and not magic value in the VTY Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 5a47736..eafed6e 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2703,7 +2703,7 @@ return CMD_SUCCESS; llist_for_each_entry(tmp, &ms_list, entity) { - if (tmp->shutdown == 3) + if (tmp->shutdown == MS_SHUTDOWN_COMPL) continue; if (!strcmp(ms->settings.layer2_socket_path, tmp->settings.layer2_socket_path)) { -- To view, visit https://gerrit.osmocom.org/5099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 13:02:32 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 1 Dec 2017 13:02:32 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#8). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c 12 files changed, 1,087 insertions(+), 309 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/8 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..2f3905e 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -5,3 +5,5 @@ struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +struct gsm_trans; +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..907e303 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,47 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer + * needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..438b7cf 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + osmo_strlcpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..881a81c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -78,6 +78,7 @@ #include #include +#include #include @@ -1328,8 +1329,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teadown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1386,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1418,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1761,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1803,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2687,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2728,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2744,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2771,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2787,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = rtp->ip; + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..60e2b1b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -187,3 +187,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..250b4ec 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,6 +29,8 @@ #include #include #include +#include + #include "../../bscconfig.h" @@ -140,287 +142,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..8b0b704 --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,951 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* Note: If the logic that controls the RAN is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Note: Under normal conditions, the MSC logic should + * always command to release the call at some point. + * However, the release may be missing due to errors + * in the MSC logic and we may have reached ST_HALT + * because of cascading errors and timeouts. In this + * and only in this case we will allow ST_HALT to + * free all context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: connection context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 8 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 1 15:28:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 15:28:22 +0000 Subject: [PATCH] osmo-ggsn[master]: tun_setaddr6: Fix log typo Message-ID: Review at https://gerrit.osmocom.org/5116 tun_setaddr6: Fix log typo Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 --- M lib/tun.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5116/1 diff --git a/lib/tun.c b/lib/tun.c index fcd04f3..5960197 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -401,7 +401,7 @@ if (errno != EEXIST) { SYS_ERR(DTUN, LOGL_ERROR, 0, "ioctl(SIOCSIFADDR) failed"); } else { - SYS_ERR(DTUN, LOGL_NOTICE, 0, "ioctl(SIOCSIFADDR): Address alreadsy exists"); + SYS_ERR(DTUN, LOGL_NOTICE, 0, "ioctl(SIOCSIFADDR): Address already exists"); } close(fd); return -1; -- To view, visit https://gerrit.osmocom.org/5116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 15:28:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 15:28:22 +0000 Subject: [PATCH] osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta... Message-ID: Review at https://gerrit.osmocom.org/5117 cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4 In any case, if we add support for ipv6 in tun_addaddr we will need tun_setaddr (and also change the API of tun_addaddr to use in46_addr). Change-Id: Iadf51379455174a642b477040ec96f28022c24c7 --- M lib/tun.c 1 file changed, 169 insertions(+), 172 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/17/5117/1 diff --git a/lib/tun.c b/lib/tun.c index 5960197..d8e4b62 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -60,9 +60,6 @@ #include "tun.h" #include "syserr.h" -static int tun_setaddr4(struct tun_t *this, struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask); - #if defined(__linux__) #include @@ -103,175 +100,6 @@ } close(fd); return 0; -} - -int tun_addaddr(struct tun_t *this, - struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask) -{ - -#if defined(__linux__) - struct { - struct nlmsghdr n; - struct ifaddrmsg i; - char buf[TUN_NLBUFSIZE]; - } req; - - struct sockaddr_nl local; - socklen_t addr_len; - int fd; - int status; - - struct sockaddr_nl nladdr; - struct iovec iov; - struct msghdr msg; - - if (!this->addrs) /* Use ioctl for first addr to make ping work */ - return tun_setaddr4(this, addr, dstaddr, netmask); - - memset(&req, 0, sizeof(req)); - req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); - req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; - req.n.nlmsg_type = RTM_NEWADDR; - req.i.ifa_family = AF_INET; - req.i.ifa_prefixlen = 32; /* 32 FOR IPv4 */ - req.i.ifa_flags = 0; - req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ - req.i.ifa_index = if_nametoindex(this->devname); - if (!req.i.ifa_index) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); - return -1; - } - - tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); - tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); - - if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); - return -1; - } - - memset(&local, 0, sizeof(local)); - local.nl_family = AF_NETLINK; - local.nl_groups = 0; - - if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); - close(fd); - return -1; - } - - addr_len = sizeof(local); - if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, - "getsockname() failed"); - close(fd); - return -1; - } - - if (addr_len != sizeof(local)) { - SYS_ERR(DTUN, LOGL_ERROR, 0, - "Wrong address length %d", addr_len); - close(fd); - return -1; - } - - if (local.nl_family != AF_NETLINK) { - SYS_ERR(DTUN, LOGL_ERROR, 0, - "Wrong address family %d", local.nl_family); - close(fd); - return -1; - } - - iov.iov_base = (void *)&req.n; - iov.iov_len = req.n.nlmsg_len; - - msg.msg_name = (void *)&nladdr; - msg.msg_namelen = sizeof(nladdr); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_flags = 0; - - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - nladdr.nl_pid = 0; - nladdr.nl_groups = 0; - - req.n.nlmsg_seq = 0; - req.n.nlmsg_flags |= NLM_F_ACK; - - status = sendmsg(fd, &msg, 0); - if (status != req.n.nlmsg_len) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); - close(fd); - return -1; - } - - status = tun_sifflags(this, IFF_UP | IFF_RUNNING); - if (status == -1) { - close(fd); - return -1; - } - - - close(fd); - this->addrs++; - return 0; - -#elif defined (__FreeBSD__) || defined (__APPLE__) - - int fd; - struct ifaliasreq areq; - - /* TODO: Is this needed on FreeBSD? */ - if (!this->addrs) /* Use ioctl for first addr to make ping work */ - return tun_setaddr4(this, addr, dstaddr, netmask); /* TODO dstaddr */ - - memset(&areq, 0, sizeof(areq)); - - /* Set up interface name */ - strncpy(areq.ifra_name, this->devname, IFNAMSIZ); - areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ - - ((struct sockaddr_in *)&areq.ifra_addr)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_addr)->sin_len = - sizeof(areq.ifra_addr); - ((struct sockaddr_in *)&areq.ifra_addr)->sin_addr.s_addr = addr->s_addr; - - ((struct sockaddr_in *)&areq.ifra_mask)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_mask)->sin_len = - sizeof(areq.ifra_mask); - ((struct sockaddr_in *)&areq.ifra_mask)->sin_addr.s_addr = - netmask->s_addr; - - /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_len = - sizeof(areq.ifra_broadaddr); - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_addr.s_addr = - dstaddr->s_addr; - - /* Create a channel to the NET kernel. */ - if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); - return -1; - } - - if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, - "ioctl(SIOCAIFADDR) failed"); - close(fd); - return -1; - } - - close(fd); - this->addrs++; - return 0; - -#endif - } static int tun_setaddr4(struct tun_t *this, struct in_addr *addr, @@ -467,6 +295,175 @@ } } +int tun_addaddr(struct tun_t *this, + struct in_addr *addr, + struct in_addr *dstaddr, struct in_addr *netmask) +{ + +#if defined(__linux__) + struct { + struct nlmsghdr n; + struct ifaddrmsg i; + char buf[TUN_NLBUFSIZE]; + } req; + + struct sockaddr_nl local; + socklen_t addr_len; + int fd; + int status; + + struct sockaddr_nl nladdr; + struct iovec iov; + struct msghdr msg; + + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr4(this, addr, dstaddr, netmask); + + memset(&req, 0, sizeof(req)); + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; + req.n.nlmsg_type = RTM_NEWADDR; + req.i.ifa_family = AF_INET; + req.i.ifa_prefixlen = 32; /* 32 FOR IPv4 */ + req.i.ifa_flags = 0; + req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ + req.i.ifa_index = if_nametoindex(this->devname); + if (!req.i.ifa_index) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); + return -1; + } + + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + memset(&local, 0, sizeof(local)); + local.nl_family = AF_NETLINK; + local.nl_groups = 0; + + if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); + close(fd); + return -1; + } + + addr_len = sizeof(local); + if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "getsockname() failed"); + close(fd); + return -1; + } + + if (addr_len != sizeof(local)) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address length %d", addr_len); + close(fd); + return -1; + } + + if (local.nl_family != AF_NETLINK) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address family %d", local.nl_family); + close(fd); + return -1; + } + + iov.iov_base = (void *)&req.n; + iov.iov_len = req.n.nlmsg_len; + + msg.msg_name = (void *)&nladdr; + msg.msg_namelen = sizeof(nladdr); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + + memset(&nladdr, 0, sizeof(nladdr)); + nladdr.nl_family = AF_NETLINK; + nladdr.nl_pid = 0; + nladdr.nl_groups = 0; + + req.n.nlmsg_seq = 0; + req.n.nlmsg_flags |= NLM_F_ACK; + + status = sendmsg(fd, &msg, 0); + if (status != req.n.nlmsg_len) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); + close(fd); + return -1; + } + + status = tun_sifflags(this, IFF_UP | IFF_RUNNING); + if (status == -1) { + close(fd); + return -1; + } + + + close(fd); + this->addrs++; + return 0; + +#elif defined (__FreeBSD__) || defined (__APPLE__) + + int fd; + struct ifaliasreq areq; + + /* TODO: Is this needed on FreeBSD? */ + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr4(this, addr, dstaddr, netmask); /* TODO dstaddr */ + + memset(&areq, 0, sizeof(areq)); + + /* Set up interface name */ + strncpy(areq.ifra_name, this->devname, IFNAMSIZ); + areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ + + ((struct sockaddr_in *)&areq.ifra_addr)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_addr)->sin_len = + sizeof(areq.ifra_addr); + ((struct sockaddr_in *)&areq.ifra_addr)->sin_addr.s_addr = addr->s_addr; + + ((struct sockaddr_in *)&areq.ifra_mask)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_mask)->sin_len = + sizeof(areq.ifra_mask); + ((struct sockaddr_in *)&areq.ifra_mask)->sin_addr.s_addr = + netmask->s_addr; + + /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_len = + sizeof(areq.ifra_broadaddr); + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_addr.s_addr = + dstaddr->s_addr; + + /* Create a channel to the NET kernel. */ + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "ioctl(SIOCAIFADDR) failed"); + close(fd); + return -1; + } + + close(fd); + this->addrs++; + return 0; + +#endif + +} + static int tun_route(struct tun_t *this, struct in_addr *dst, struct in_addr *gateway, struct in_addr *mask, int delete) -- To view, visit https://gerrit.osmocom.org/5117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadf51379455174a642b477040ec96f28022c24c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 15:44:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 15:44:46 +0000 Subject: osmo-ggsn[master]: tun_setaddr6: Fix log typo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:04 +0000 Subject: osmo-ggsn[master]: tun_setaddr6: Fix log typo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:31 +0000 Subject: osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iadf51379455174a642b477040ec96f28022c24c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:34 +0000 Subject: [MERGED] osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4 ...................................................................... cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4 In any case, if we add support for ipv6 in tun_addaddr we will need tun_setaddr (and also change the API of tun_addaddr to use in46_addr). Change-Id: Iadf51379455174a642b477040ec96f28022c24c7 --- M lib/tun.c 1 file changed, 169 insertions(+), 172 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index 5960197..d8e4b62 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -60,9 +60,6 @@ #include "tun.h" #include "syserr.h" -static int tun_setaddr4(struct tun_t *this, struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask); - #if defined(__linux__) #include @@ -103,175 +100,6 @@ } close(fd); return 0; -} - -int tun_addaddr(struct tun_t *this, - struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask) -{ - -#if defined(__linux__) - struct { - struct nlmsghdr n; - struct ifaddrmsg i; - char buf[TUN_NLBUFSIZE]; - } req; - - struct sockaddr_nl local; - socklen_t addr_len; - int fd; - int status; - - struct sockaddr_nl nladdr; - struct iovec iov; - struct msghdr msg; - - if (!this->addrs) /* Use ioctl for first addr to make ping work */ - return tun_setaddr4(this, addr, dstaddr, netmask); - - memset(&req, 0, sizeof(req)); - req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); - req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; - req.n.nlmsg_type = RTM_NEWADDR; - req.i.ifa_family = AF_INET; - req.i.ifa_prefixlen = 32; /* 32 FOR IPv4 */ - req.i.ifa_flags = 0; - req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ - req.i.ifa_index = if_nametoindex(this->devname); - if (!req.i.ifa_index) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); - return -1; - } - - tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); - tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); - - if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); - return -1; - } - - memset(&local, 0, sizeof(local)); - local.nl_family = AF_NETLINK; - local.nl_groups = 0; - - if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); - close(fd); - return -1; - } - - addr_len = sizeof(local); - if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, - "getsockname() failed"); - close(fd); - return -1; - } - - if (addr_len != sizeof(local)) { - SYS_ERR(DTUN, LOGL_ERROR, 0, - "Wrong address length %d", addr_len); - close(fd); - return -1; - } - - if (local.nl_family != AF_NETLINK) { - SYS_ERR(DTUN, LOGL_ERROR, 0, - "Wrong address family %d", local.nl_family); - close(fd); - return -1; - } - - iov.iov_base = (void *)&req.n; - iov.iov_len = req.n.nlmsg_len; - - msg.msg_name = (void *)&nladdr; - msg.msg_namelen = sizeof(nladdr); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_flags = 0; - - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - nladdr.nl_pid = 0; - nladdr.nl_groups = 0; - - req.n.nlmsg_seq = 0; - req.n.nlmsg_flags |= NLM_F_ACK; - - status = sendmsg(fd, &msg, 0); - if (status != req.n.nlmsg_len) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); - close(fd); - return -1; - } - - status = tun_sifflags(this, IFF_UP | IFF_RUNNING); - if (status == -1) { - close(fd); - return -1; - } - - - close(fd); - this->addrs++; - return 0; - -#elif defined (__FreeBSD__) || defined (__APPLE__) - - int fd; - struct ifaliasreq areq; - - /* TODO: Is this needed on FreeBSD? */ - if (!this->addrs) /* Use ioctl for first addr to make ping work */ - return tun_setaddr4(this, addr, dstaddr, netmask); /* TODO dstaddr */ - - memset(&areq, 0, sizeof(areq)); - - /* Set up interface name */ - strncpy(areq.ifra_name, this->devname, IFNAMSIZ); - areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ - - ((struct sockaddr_in *)&areq.ifra_addr)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_addr)->sin_len = - sizeof(areq.ifra_addr); - ((struct sockaddr_in *)&areq.ifra_addr)->sin_addr.s_addr = addr->s_addr; - - ((struct sockaddr_in *)&areq.ifra_mask)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_mask)->sin_len = - sizeof(areq.ifra_mask); - ((struct sockaddr_in *)&areq.ifra_mask)->sin_addr.s_addr = - netmask->s_addr; - - /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_family = AF_INET; - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_len = - sizeof(areq.ifra_broadaddr); - ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_addr.s_addr = - dstaddr->s_addr; - - /* Create a channel to the NET kernel. */ - if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); - return -1; - } - - if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { - SYS_ERR(DTUN, LOGL_ERROR, errno, - "ioctl(SIOCAIFADDR) failed"); - close(fd); - return -1; - } - - close(fd); - this->addrs++; - return 0; - -#endif - } static int tun_setaddr4(struct tun_t *this, struct in_addr *addr, @@ -467,6 +295,175 @@ } } +int tun_addaddr(struct tun_t *this, + struct in_addr *addr, + struct in_addr *dstaddr, struct in_addr *netmask) +{ + +#if defined(__linux__) + struct { + struct nlmsghdr n; + struct ifaddrmsg i; + char buf[TUN_NLBUFSIZE]; + } req; + + struct sockaddr_nl local; + socklen_t addr_len; + int fd; + int status; + + struct sockaddr_nl nladdr; + struct iovec iov; + struct msghdr msg; + + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr4(this, addr, dstaddr, netmask); + + memset(&req, 0, sizeof(req)); + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; + req.n.nlmsg_type = RTM_NEWADDR; + req.i.ifa_family = AF_INET; + req.i.ifa_prefixlen = 32; /* 32 FOR IPv4 */ + req.i.ifa_flags = 0; + req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ + req.i.ifa_index = if_nametoindex(this->devname); + if (!req.i.ifa_index) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); + return -1; + } + + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + memset(&local, 0, sizeof(local)); + local.nl_family = AF_NETLINK; + local.nl_groups = 0; + + if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); + close(fd); + return -1; + } + + addr_len = sizeof(local); + if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "getsockname() failed"); + close(fd); + return -1; + } + + if (addr_len != sizeof(local)) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address length %d", addr_len); + close(fd); + return -1; + } + + if (local.nl_family != AF_NETLINK) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address family %d", local.nl_family); + close(fd); + return -1; + } + + iov.iov_base = (void *)&req.n; + iov.iov_len = req.n.nlmsg_len; + + msg.msg_name = (void *)&nladdr; + msg.msg_namelen = sizeof(nladdr); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + + memset(&nladdr, 0, sizeof(nladdr)); + nladdr.nl_family = AF_NETLINK; + nladdr.nl_pid = 0; + nladdr.nl_groups = 0; + + req.n.nlmsg_seq = 0; + req.n.nlmsg_flags |= NLM_F_ACK; + + status = sendmsg(fd, &msg, 0); + if (status != req.n.nlmsg_len) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); + close(fd); + return -1; + } + + status = tun_sifflags(this, IFF_UP | IFF_RUNNING); + if (status == -1) { + close(fd); + return -1; + } + + + close(fd); + this->addrs++; + return 0; + +#elif defined (__FreeBSD__) || defined (__APPLE__) + + int fd; + struct ifaliasreq areq; + + /* TODO: Is this needed on FreeBSD? */ + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr4(this, addr, dstaddr, netmask); /* TODO dstaddr */ + + memset(&areq, 0, sizeof(areq)); + + /* Set up interface name */ + strncpy(areq.ifra_name, this->devname, IFNAMSIZ); + areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ + + ((struct sockaddr_in *)&areq.ifra_addr)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_addr)->sin_len = + sizeof(areq.ifra_addr); + ((struct sockaddr_in *)&areq.ifra_addr)->sin_addr.s_addr = addr->s_addr; + + ((struct sockaddr_in *)&areq.ifra_mask)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_mask)->sin_len = + sizeof(areq.ifra_mask); + ((struct sockaddr_in *)&areq.ifra_mask)->sin_addr.s_addr = + netmask->s_addr; + + /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_family = AF_INET; + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_len = + sizeof(areq.ifra_broadaddr); + ((struct sockaddr_in *)&areq.ifra_broadaddr)->sin_addr.s_addr = + dstaddr->s_addr; + + /* Create a channel to the NET kernel. */ + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "ioctl(SIOCAIFADDR) failed"); + close(fd); + return -1; + } + + close(fd); + this->addrs++; + return 0; + +#endif + +} + static int tun_route(struct tun_t *this, struct in_addr *dst, struct in_addr *gateway, struct in_addr *mask, int delete) -- To view, visit https://gerrit.osmocom.org/5117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadf51379455174a642b477040ec96f28022c24c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:34 +0000 Subject: [MERGED] osmo-ggsn[master]: tun_setaddr6: Fix log typo In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: tun_setaddr6: Fix log typo ...................................................................... tun_setaddr6: Fix log typo Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 --- M lib/tun.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index fcd04f3..5960197 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -401,7 +401,7 @@ if (errno != EEXIST) { SYS_ERR(DTUN, LOGL_ERROR, 0, "ioctl(SIOCSIFADDR) failed"); } else { - SYS_ERR(DTUN, LOGL_NOTICE, 0, "ioctl(SIOCSIFADDR): Address alreadsy exists"); + SYS_ERR(DTUN, LOGL_NOTICE, 0, "ioctl(SIOCSIFADDR): Address already exists"); } close(fd); return -1; -- To view, visit https://gerrit.osmocom.org/5116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:55 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: use hexadecimal digits in endpoint names In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: use hexadecimal digits in endpoint names ...................................................................... mgcp: use hexadecimal digits in endpoint names The current implementation of osmo-mgw parses the numerical digit inside the endpoint name as hexadecimal number. also use hexadecimal numbers in endpoint names. Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f0c31df..0f35a46 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -39,7 +39,7 @@ #define MGCP_BSS_TIMEOUT 4 /* in seconds */ #define MGCP_BSS_TIMEOUT_TIMER_NR 2 -#define MGCP_ENDPOINT_FORMAT "%i at mgw" +#define MGCP_ENDPOINT_FORMAT "%x at mgw" /* Some internal cause codes to indicate fault * condition inside the FSM */ -- To view, visit https://gerrit.osmocom.org/5072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:55 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: add missing switch case In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: add missing switch case ...................................................................... mgcp: add missing switch case In the beginning of the CRCX phase for the network does not distinguish between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error could be misinterpreted as a successful MGW response. Add missing case statement to distinguish CV_MDCX_BTS_RES from EV_TEARDOWN. Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index a7d1f94..be6c7de 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -456,6 +456,14 @@ "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); + switch (event) { + case EV_MDCX_BTS_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, -- To view, visit https://gerrit.osmocom.org/4983 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:56 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: remove duplicate logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: remove duplicate logging ...................................................................... cosmetic: remove duplicate logging The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06 --- M src/libcommon-cs/a_reset.c 1 file changed, 2 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c index 5e45b09..797f8e5 100644 --- a/src/libcommon-cs/a_reset.c +++ b/src/libcommon-cs/a_reset.c @@ -38,23 +38,10 @@ ST_CONN, /* We have a confirmed connection */ }; -static const struct value_string fsm_state_names[] = { - {ST_DISC, "ST_DISC (disconnected)"}, - {ST_CONN, "ST_CONN (connected)"}, - {0, NULL}, -}; - enum fsm_evt { EV_RESET_ACK, /* got reset acknowlegement from remote end */ EV_N_DISCONNECT, /* lost a connection */ EV_N_CONNECT, /* made a successful connection */ -}; - -static const struct value_string fsm_evt_names[] = { - {EV_RESET_ACK, "EV_RESET_ACK"}, - {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, - {EV_N_CONNECT, "EV_N_CONNECT"}, - {0, NULL}, }; /* Disconnected state */ @@ -63,9 +50,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); OSMO_ASSERT(reset->fsm); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n"); reset->conn_loss_counter = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); @@ -76,9 +61,6 @@ { struct a_reset_ctx *reset = (struct a_reset_ctx *)data; OSMO_ASSERT(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s\n", - get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event)); switch (event) { case EV_N_DISCONNECT: @@ -100,8 +82,7 @@ struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv; OSMO_ASSERT(reset->fsm); - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, resending...\n", fi->T, - get_value_string(fsm_state_names, fi->state)); + LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET message...\n"); reset->cb(reset->priv); @@ -153,7 +134,6 @@ reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name); OSMO_ASSERT(reset->fsm); reset->fsm->priv = reset; - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n"); /* kick off reset-ack sending mechanism */ osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, RESET_RESEND_TIMER_NO); @@ -172,8 +152,6 @@ memset(reset, 0, sizeof(*reset)); talloc_free(reset); - - LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n"); } /* Confirm that we sucessfully received a reset acknowlege message */ -- To view, visit https://gerrit.osmocom.org/5074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:56 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: use mgw assigned connection identifiers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: use mgw assigned connection identifiers ...................................................................... mgcp: use mgw assigned connection identifiers osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2648 Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 20 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index dd26d40..df18524 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -20,6 +20,8 @@ #pragma once +#include + /* MGCP state handler context (fsm etc..) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ @@ -28,6 +30,10 @@ /* RTP endpoint number */ uint16_t rtp_endpoint; + /* RTP connection identifiers */ + char conn_id_bts[MGCP_CONN_ID_LENGTH]; + char conn_id_net[MGCP_CONN_ID_LENGTH]; + /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 0f35a46..a7d1f94 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,9 +31,6 @@ #include #include -#define CONN_ID_BTS 1 -#define CONN_ID_NET 2 - #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -201,10 +198,8 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, .conn_mode = MGCP_CONN_LOOPBACK }; if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >= @@ -249,6 +244,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_bts, r->head.conn_id, sizeof(mgcp_ctx->conn_id_bts)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with CI: %s\n", mgcp_ctx->conn_id_bts); rc = mgcp_response_parse_params(r); if (rc) { @@ -364,7 +363,7 @@ .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_BTS, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = lchan->abis_ip.bound_port @@ -484,10 +483,9 @@ /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { .verb = MGCP_VERB_CRCX, - .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | - MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE | + MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT), .call_id = conn->conn_id, - .conn_id = CONN_ID_NET, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = addr, .audio_port = port @@ -538,6 +536,10 @@ handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); return; } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_net, r->head.conn_id, sizeof(mgcp_ctx->conn_id_net)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with CI: %s\n", mgcp_ctx->conn_id_net); rc = mgcp_response_parse_params(r); if (rc) { @@ -683,7 +685,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id,.conn_id = CONN_ID_BTS, + MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), .audio_port = ho_lchan->abis_ip.bound_port}; -- To view, visit https://gerrit.osmocom.org/4964 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:08:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 1 Dec 2017 16:08:57 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: do not fail silently on snprintf() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: do not fail silently on snprintf() ...................................................................... mgcp: do not fail silently on snprintf() The snprintf() that is used to compose the fsm name on an assignment request may cause a silent failure. The buffer is large enough to take the string under all circumstances. If snprintf() fails, this would mean we have some other serious problem. use OSMO_ASSERT in case the snprintf() fails, so the failure gets noticed. Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index be6c7de..81a4093 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -1015,8 +1015,7 @@ OSMO_ASSERT(mgcp); OSMO_ASSERT(conn); - if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= sizeof(name)) - return NULL; + OSMO_ASSERT(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) < sizeof(name)); /* Register the fsm description (if not already done) */ if (fsm_registered == false) { -- To view, visit https://gerrit.osmocom.org/5073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:56:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 16:56:00 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log timer override In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5109 to look at the new patch set (#2). TBF: log timer override Currently TBF support only single Txxxx timer so scheduling another timer will cancel out the one which is already running. Until the proper fix is in place, let's at least log this situation as error. Note: cosmetic adjustement to test output is required - we do not report restart of the same timer twice because "restarting" assumes it anyway. Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Related: OS#2407 --- M src/tbf.cpp M tests/tbf/TbfTest.err 2 files changed, 218 insertions(+), 218 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/5109/2 diff --git a/src/tbf.cpp b/src/tbf.cpp index 8e54157..831cd97 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -531,13 +531,13 @@ void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, unsigned int seconds, unsigned int microseconds) { - if (!osmo_timer_pending(&tbf->timer)) - LOGP(DRLCMAC, LOGL_DEBUG, "%s starting timer %u.\n", - tbf_name(tbf), T); - else - LOGP(DRLCMAC, LOGL_DEBUG, "%s restarting timer %u " - "while old timer %u pending \n", - tbf_name(tbf), T, tbf->T); + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.", + tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T); + + if (T != tbf->T && osmo_timer_pending(&tbf->timer)) + LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T); + + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); tbf->T = T; tbf->num_T_exp = 0; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 602e35b..31ab608 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1566,7 +1566,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1661,7 +1661,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1745,7 +1745,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1883,7 +1883,7 @@ UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1953,7 +1953,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2067,7 +2067,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2128,7 +2128,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2200,7 +2200,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2281,7 +2281,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3457,7 +3457,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3551,7 +3551,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3565,7 +3565,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3575,7 +3575,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3593,7 +3593,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3603,7 +3603,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3622,7 +3622,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=1, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(1) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3632,7 +3632,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3642,7 +3642,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3661,7 +3661,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3671,7 +3671,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3680,7 +3680,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3699,7 +3699,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3709,7 +3709,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (5), TFI(0). @@ -6466,7 +6466,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6480,7 +6480,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6497,7 +6497,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (2..65) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6642,7 +6642,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6656,7 +6656,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=0, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -7102,7 +7102,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7116,7 +7116,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7126,7 +7126,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7136,7 +7136,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7146,7 +7146,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7156,7 +7156,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7166,7 +7166,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7176,7 +7176,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7186,7 +7186,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7196,7 +7196,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7206,7 +7206,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7216,7 +7216,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7226,7 +7226,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7236,7 +7236,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7246,7 +7246,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7256,7 +7256,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7266,7 +7266,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7276,7 +7276,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7286,7 +7286,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7296,7 +7296,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7307,7 +7307,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 40 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7317,7 +7317,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 42 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7327,7 +7327,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 44 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7337,7 +7337,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 46 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7347,7 +7347,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 48 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7357,7 +7357,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 50 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7367,7 +7367,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 52 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7377,7 +7377,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 54 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7387,7 +7387,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 56 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7397,7 +7397,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 58 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7407,7 +7407,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 60 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7417,7 +7417,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 62 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7427,7 +7427,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7437,7 +7437,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 66 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7447,7 +7447,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 68 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7457,7 +7457,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 70 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7467,7 +7467,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 72 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7477,7 +7477,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 74 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7487,7 +7487,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 76 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7497,7 +7497,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 78 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7509,7 +7509,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7519,7 +7519,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7529,7 +7529,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7539,7 +7539,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7549,7 +7549,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7559,7 +7559,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7569,7 +7569,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7579,7 +7579,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7589,7 +7589,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7599,7 +7599,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7609,7 +7609,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7619,7 +7619,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7629,7 +7629,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7639,7 +7639,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7649,7 +7649,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7659,7 +7659,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7669,7 +7669,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7679,7 +7679,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7689,7 +7689,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7699,7 +7699,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7711,7 +7711,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7721,7 +7721,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7731,7 +7731,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7741,7 +7741,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7751,7 +7751,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7761,7 +7761,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7771,7 +7771,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7781,7 +7781,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7791,7 +7791,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7801,7 +7801,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7811,7 +7811,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7821,7 +7821,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7831,7 +7831,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7841,7 +7841,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7851,7 +7851,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7861,7 +7861,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7871,7 +7871,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7881,7 +7881,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7891,7 +7891,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7901,7 +7901,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7918,7 +7918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 already received Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -7955,7 +7955,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7969,7 +7969,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7979,7 +7979,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7989,7 +7989,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7999,7 +7999,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8009,7 +8009,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8019,7 +8019,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8029,7 +8029,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8039,7 +8039,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8049,7 +8049,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8059,7 +8059,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8069,7 +8069,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8079,7 +8079,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8089,7 +8089,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8099,7 +8099,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8109,7 +8109,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8119,7 +8119,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8129,7 +8129,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8139,7 +8139,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8150,7 +8150,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8163,7 +8163,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8183,7 +8183,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8193,7 +8193,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 81 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8203,7 +8203,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8213,7 +8213,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 83 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8223,7 +8223,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8233,7 +8233,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 85 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8243,7 +8243,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8253,7 +8253,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 87 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8263,7 +8263,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8273,7 +8273,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 89 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8283,7 +8283,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8293,7 +8293,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 91 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8303,7 +8303,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8313,7 +8313,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 93 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8323,7 +8323,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8333,7 +8333,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 95 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8343,7 +8343,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8353,7 +8353,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 97 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8364,7 +8364,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8374,7 +8374,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 99 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8384,7 +8384,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8394,7 +8394,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 101 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8404,7 +8404,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8414,7 +8414,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 103 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8424,7 +8424,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8434,7 +8434,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 105 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8444,7 +8444,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8454,7 +8454,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 107 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8464,7 +8464,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8474,7 +8474,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 109 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8484,7 +8484,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8494,7 +8494,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 111 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8504,7 +8504,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8514,7 +8514,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 113 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8524,7 +8524,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8534,7 +8534,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 115 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8544,7 +8544,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8554,7 +8554,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 117 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8566,7 +8566,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8576,7 +8576,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 119 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8586,7 +8586,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8596,7 +8596,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 121 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8606,7 +8606,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8616,7 +8616,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 123 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8626,7 +8626,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8636,7 +8636,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 125 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8646,7 +8646,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8656,7 +8656,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 127 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8666,7 +8666,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8676,7 +8676,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 129 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8686,7 +8686,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8696,7 +8696,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 131 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8706,7 +8706,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8716,7 +8716,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 133 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8726,7 +8726,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8736,7 +8736,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 135 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8746,7 +8746,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8756,7 +8756,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 137 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8768,7 +8768,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8778,7 +8778,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 139 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8788,7 +8788,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8798,7 +8798,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 141 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8808,7 +8808,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8818,7 +8818,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 143 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8828,7 +8828,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8838,7 +8838,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 145 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8848,7 +8848,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8858,7 +8858,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 147 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8868,7 +8868,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8878,7 +8878,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 149 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8888,7 +8888,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8898,7 +8898,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 151 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8908,7 +8908,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8918,7 +8918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 153 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8928,7 +8928,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8938,7 +8938,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 155 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8948,7 +8948,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8958,7 +8958,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 157 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8970,7 +8970,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8980,7 +8980,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 159 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8997,7 +8997,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 -- To view, visit https://gerrit.osmocom.org/5109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:56:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 16:56:01 +0000 Subject: [PATCH] osmo-pcu[master]: Fix compiler warning Message-ID: Review at https://gerrit.osmocom.org/5118 Fix compiler warning Move function declarations which use gprs_rlcmac_ul_tbf into tbf.h to avoid compiler warning: In file included from pcu_vty.c:15:0: bts.h:166:27: warning: ?struct gprs_rlcmac_ul_tbf? declared inside parameter list will not be visible outside of this definition or declaration void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); ^~~~~~~~~~~~~~~~~~ bts.h:167:24: warning: ?struct gprs_rlcmac_ul_tbf? declared inside parameter list will not be visible outside of this definition or declaration void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); ^~~~~~~~~~~~~~~~~~ Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4 --- M src/bts.h M src/tbf.h 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/5118/1 diff --git a/src/bts.h b/src/bts.h index aaf81cf..a32e87d 100644 --- a/src/bts.h +++ b/src/bts.h @@ -163,8 +163,6 @@ extern "C" { #endif void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach); -void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); -void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); #ifdef __cplusplus } #endif diff --git a/src/tbf.h b/src/tbf.h index 95e1e89..e9d8df8 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -562,6 +562,15 @@ void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc); }; +#ifdef __cplusplus +extern "C" { +#endif +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); +#ifdef __cplusplus +} +#endif + inline enum gprs_rlcmac_tbf_direction reverse(enum gprs_rlcmac_tbf_direction dir) { return (enum gprs_rlcmac_tbf_direction) -- To view, visit https://gerrit.osmocom.org/5118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:56:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 16:56:01 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: fix compiler warning in test Message-ID: Review at https://gerrit.osmocom.org/5119 TBF: fix compiler warning in test tbf/TbfTest.cpp: In function ?void egprs_spb_to_normal_validation(BTS*, unsigned int, unsigned int)?: tbf/TbfTest.cpp:2788:26: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2788:53: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:26: warning: ?<bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:53: warning: ?<bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:26: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:53: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 --- M tests/tbf/TbfTest.cpp 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/5119/1 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 195bec5..d4b51fe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2785,8 +2785,7 @@ == mcs); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; - bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) - || (egprs2->bsn1_lo); + bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); dl_tbf->m_window.m_v_b.mark_nacked(0); OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); OSMO_ASSERT(bsn1 == 0); @@ -2822,8 +2821,7 @@ egprs3 = (struct gprs_rlc_dl_header_egprs_3 *) msg->data; /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs3->spb == 3); - bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || - (egprs3->bsn1_lo); + bsn2 = (egprs3->bsn1_hi << 9) | (egprs3->bsn1_mid << 1) | (egprs3->bsn1_lo); OSMO_ASSERT(bsn2 == bsn1); /* Table 10.4.8a.3.1 of 44.060 */ @@ -2841,8 +2839,7 @@ /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs2->cps == 0); - bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || - (egprs2->bsn1_lo); + bsn3 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); OSMO_ASSERT(bsn3 == bsn2); tbf_cleanup(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 16:56:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 16:56:01 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: expand timer logging Message-ID: Review at https://gerrit.osmocom.org/5120 TBF: expand timer logging * log timer values * log start/stop cause * update test output as necessary This simplifies debugging issues with TBF timers. Related: OS#2407 Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 342 insertions(+), 341 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/20/5120/1 diff --git a/src/bts.cpp b/src/bts.cpp index c323101..341c9d4 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch); + tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); return 0; } @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0); + tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " @@ -1036,7 +1036,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer(); + new_tbf->stop_timer("control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index 831cd97..7b609c8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -394,7 +394,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0); + tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -464,7 +464,7 @@ tbf_name(tbf), get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer(); + tbf->stop_timer("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -529,13 +529,14 @@ }; void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds) + unsigned int seconds, unsigned int microseconds, const char *reason) { - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T); + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, + "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", + tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T); + LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); @@ -551,14 +552,14 @@ void gprs_rlcmac_tbf::stop_t3191() { - return stop_timer(); + return stop_timer("T3191"); } -void gprs_rlcmac_tbf::stop_timer() +void gprs_rlcmac_tbf::stop_timer(const char *reason) { if (osmo_timer_pending(&timer)) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %u.\n", - tbf_name(this), T); + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", + tbf_name(this), T, reason); osmo_timer_del(&timer); } } @@ -662,7 +663,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0); + tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); return; } /* reschedule UL ack */ @@ -684,7 +685,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -706,7 +707,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -732,7 +733,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0); + tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1192,7 +1193,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer(); + new_dl_tbf->stop_timer("assignment (DL-TBF)"); } @@ -1222,7 +1223,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch); + tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); return msg; diff --git a/src/tbf.h b/src/tbf.h index e9d8df8..80249df 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -174,7 +174,7 @@ int update(); void handle_timeout(); - void stop_timer(); + void stop_timer(const char *reason); void stop_t3191(); int establish_dl_tbf_on_pacch(); @@ -330,7 +330,7 @@ int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds); + unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 3d27883..73708f5 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -488,7 +488,7 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer(); + stop_timer("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -502,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch); + tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); @@ -861,7 +861,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0); + tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); clear_poll_timeout_flag(); @@ -1126,7 +1126,7 @@ /* start T3193 */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000); + (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 81d3b24..0bbb817 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0); + tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 31ab608..f534c54 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -91,7 +91,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -110,16 +110,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -180,7 +180,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -199,16 +199,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000001. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -530,10 +530,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xffeeddcc @@ -1556,7 +1556,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -1566,7 +1566,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1641,7 +1641,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1661,7 +1661,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1692,7 +1692,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -1725,7 +1725,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1745,7 +1745,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1775,7 +1775,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 1 Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -1791,7 +1791,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -1814,7 +1814,7 @@ - Copying data unit 0 (BSN 0) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654292, TS=7) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654292, TS=7 msg block (BSN 0, CS-4): 0f 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654279 block=10 data=08 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 @@ -1862,7 +1862,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf5667788, not yet confirmed Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1883,7 +1883,7 @@ UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1933,7 +1933,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1953,7 +1953,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1983,14 +1983,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2009,7 +2009,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Release pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2030,7 +2030,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN)s start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ @@ -2062,12 +2062,12 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2108,7 +2108,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2128,7 +2128,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2158,14 +2158,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2190,7 +2190,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654275 (17,31,13) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -2200,7 +2200,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2208,7 +2208,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 01, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2261,7 +2261,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2281,7 +2281,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2311,7 +2311,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append @@ -2366,7 +2366,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3046,7 +3046,7 @@ - V(B): (V(A)=28)""(V(S)-1=27) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid - Final ACK received. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=1/0 Slot Allocation (Algorithm A) for class 1 @@ -3065,7 +3065,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ @@ -3080,12 +3080,12 @@ TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 01, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3315,7 +3315,7 @@ - Copying data unit 0 (BSN 10) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654461, TS=7) -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654461, TS=7 msg block (BSN 10, CS-1): 0f 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654448 block=1 data=08 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 @@ -3435,7 +3435,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3457,7 +3457,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3491,7 +3491,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -3529,7 +3529,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3551,7 +3551,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3565,7 +3565,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3575,7 +3575,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3593,7 +3593,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3603,7 +3603,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3622,7 +3622,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=1, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(1) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3632,7 +3632,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3642,7 +3642,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3661,7 +3661,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3671,7 +3671,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3680,7 +3680,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3699,7 +3699,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3709,7 +3709,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3748,7 +3748,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -4101,10 +4101,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4400,10 +4400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4654,10 +4654,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4869,10 +4869,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5060,10 +5060,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5230,10 +5230,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5394,10 +5394,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5544,10 +5544,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5695,10 +5695,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5749,10 +5749,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5803,10 +5803,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5857,10 +5857,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5930,10 +5930,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6003,10 +6003,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6076,10 +6076,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6149,10 +6149,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6210,10 +6210,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6271,10 +6271,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6332,10 +6332,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6400,10 +6400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6444,7 +6444,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6466,7 +6466,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6480,7 +6480,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6497,7 +6497,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (2..65) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6530,7 +6530,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=11/11 @@ -6620,7 +6620,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6642,7 +6642,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6656,7 +6656,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=0, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6694,7 +6694,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -6866,7 +6866,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6891,7 +6891,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6916,7 +6916,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6941,7 +6941,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6966,7 +6966,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6991,7 +6991,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7016,7 +7016,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7080,7 +7080,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) ws(192) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -7102,7 +7102,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7116,7 +7116,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7126,7 +7126,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7136,7 +7136,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7146,7 +7146,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7156,7 +7156,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7166,7 +7166,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7176,7 +7176,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7186,7 +7186,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7196,7 +7196,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7206,7 +7206,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7216,7 +7216,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7226,7 +7226,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7236,7 +7236,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7246,7 +7246,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7256,7 +7256,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7266,7 +7266,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7276,7 +7276,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7286,7 +7286,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7296,7 +7296,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7307,7 +7307,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 40 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7317,7 +7317,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 42 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7327,7 +7327,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 44 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7337,7 +7337,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 46 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7347,7 +7347,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 48 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7357,7 +7357,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 50 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7367,7 +7367,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 52 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7377,7 +7377,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 54 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7387,7 +7387,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 56 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7397,7 +7397,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 58 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7407,7 +7407,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 60 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7417,7 +7417,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 62 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7427,7 +7427,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7437,7 +7437,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 66 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7447,7 +7447,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 68 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7457,7 +7457,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 70 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7467,7 +7467,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 72 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7477,7 +7477,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 74 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7487,7 +7487,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 76 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7497,7 +7497,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 78 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7509,7 +7509,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7519,7 +7519,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7529,7 +7529,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7539,7 +7539,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7549,7 +7549,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7559,7 +7559,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7569,7 +7569,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7579,7 +7579,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7589,7 +7589,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7599,7 +7599,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7609,7 +7609,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7619,7 +7619,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7629,7 +7629,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7639,7 +7639,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7649,7 +7649,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7659,7 +7659,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7669,7 +7669,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7679,7 +7679,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7689,7 +7689,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7699,7 +7699,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7711,7 +7711,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7721,7 +7721,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7731,7 +7731,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7741,7 +7741,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7751,7 +7751,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7761,7 +7761,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7771,7 +7771,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7781,7 +7781,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7791,7 +7791,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7801,7 +7801,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7811,7 +7811,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7821,7 +7821,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7831,7 +7831,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7841,7 +7841,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7851,7 +7851,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7861,7 +7861,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7871,7 +7871,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7881,7 +7881,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7891,7 +7891,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7901,7 +7901,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7918,7 +7918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 already received Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -7948,14 +7948,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Got RLC block, coding scheme: MCS-4, length: 49 (49)) UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7969,7 +7969,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7979,7 +7979,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7989,7 +7989,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7999,7 +7999,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8009,7 +8009,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8019,7 +8019,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8029,7 +8029,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8039,7 +8039,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8049,7 +8049,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8059,7 +8059,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8069,7 +8069,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8079,7 +8079,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8089,7 +8089,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8099,7 +8099,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8109,7 +8109,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8119,7 +8119,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8129,7 +8129,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8139,7 +8139,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8150,7 +8150,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8163,7 +8163,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8183,7 +8183,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8193,7 +8193,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 81 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8203,7 +8203,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8213,7 +8213,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 83 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8223,7 +8223,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8233,7 +8233,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 85 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8243,7 +8243,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8253,7 +8253,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 87 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8263,7 +8263,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8273,7 +8273,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 89 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8283,7 +8283,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8293,7 +8293,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 91 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8303,7 +8303,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8313,7 +8313,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 93 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8323,7 +8323,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8333,7 +8333,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 95 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8343,7 +8343,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8353,7 +8353,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 97 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8364,7 +8364,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8374,7 +8374,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 99 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8384,7 +8384,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8394,7 +8394,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 101 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8404,7 +8404,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8414,7 +8414,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 103 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8424,7 +8424,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8434,7 +8434,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 105 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8444,7 +8444,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8454,7 +8454,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 107 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8464,7 +8464,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8474,7 +8474,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 109 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8484,7 +8484,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8494,7 +8494,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 111 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8504,7 +8504,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8514,7 +8514,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 113 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8524,7 +8524,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8534,7 +8534,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 115 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8544,7 +8544,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8554,7 +8554,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 117 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8566,7 +8566,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8576,7 +8576,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 119 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8586,7 +8586,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8596,7 +8596,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 121 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8606,7 +8606,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8616,7 +8616,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 123 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8626,7 +8626,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8636,7 +8636,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 125 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8646,7 +8646,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8656,7 +8656,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 127 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8666,7 +8666,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8676,7 +8676,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 129 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8686,7 +8686,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8696,7 +8696,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 131 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8706,7 +8706,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8716,7 +8716,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 133 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8726,7 +8726,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8736,7 +8736,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 135 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8746,7 +8746,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8756,7 +8756,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 137 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8768,7 +8768,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8778,7 +8778,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 139 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8788,7 +8788,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8798,7 +8798,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 141 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8808,7 +8808,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8818,7 +8818,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 143 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8828,7 +8828,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8838,7 +8838,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 145 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8848,7 +8848,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8858,7 +8858,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 147 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8868,7 +8868,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8878,7 +8878,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 149 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8888,7 +8888,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8898,7 +8898,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 151 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8908,7 +8908,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8918,7 +8918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 153 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8928,7 +8928,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8938,7 +8938,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 155 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8948,7 +8948,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8958,7 +8958,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 157 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8970,7 +8970,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8980,7 +8980,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 159 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8997,7 +8997,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -9049,7 +9049,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9074,7 +9074,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9099,7 +9099,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9124,7 +9124,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9149,7 +9149,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9174,7 +9174,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9199,7 +9199,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9232,7 +9232,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Received RTS for PDCH: TRX=0 TS=7 FN=2654218 block_nr=8 scheduling USF=0 for required uplink resource of UL TFI=0 -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Destroying MS object, TLLI = 0x00000000 @@ -9240,13 +9240,13 @@ Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) timer 0 expired. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) releasing due to PACCH assignment timeout. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer T0 [freeing TBF] Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** -- To view, visit https://gerrit.osmocom.org/5120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:02:29 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:02:29 +0000 Subject: [PATCH] osmo-ggsn[master]: Add configure flag to disable ipv6 support Message-ID: Review at https://gerrit.osmocom.org/5121 Add configure flag to disable ipv6 support Some users may want to disable ipv6 related features in case they are not needed. It can also be used as a workaround to build libgtp and osmo-ggsn in systems where ipv6 supports fails to build due to header struct definition conflicts between kernel and libc. Related: SYS#3815 Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 --- M configure.ac M ggsn/Makefile.am M ggsn/ggsn.c M ggsn/ggsn_vty.c M lib/in46_addr.c M lib/in46_addr.h M lib/ippool.c M lib/tun.c M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c 10 files changed, 189 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/5121/1 diff --git a/configure.ac b/configure.ac index 4fd0132..f4661b3 100644 --- a/configure.ac +++ b/configure.ac @@ -39,9 +39,9 @@ case "${host}" in - i*86-*-linux-gnu*) + i*86-*-linux-gnu*) EXEC_LDADD="" ;; - *solaris*) + *solaris*) EXEC_LDADD="-lresolv -lsocket -lnsl" ;; esac @@ -64,12 +64,19 @@ AC_ARG_ENABLE([gtp-linux], AS_HELP_STRING([--enable-gtp-linux], [Build GTP tunneling Linux kernel]), [enable_gtp_linux="$enableval"], [enable_gtp_linux="no"]) - AS_IF([test "x$enable_gtp_linux" = "xyes"], [ PKG_CHECK_MODULES([LIBGTPNL], [libgtpnl >= 1.0.0]) ]) - AM_CONDITIONAL([ENABLE_GTP_KERNEL], [test "$enable_gtp_linux" = "yes"]) + +# Enable/disable IPv6 support +AC_ARG_ENABLE([ipv6], [AS_HELP_STRING([--enable-ipv6], [Build IPv6 support])], + [enable_ipv6="$enableval"],[enable_ipv6="yes"]) +if test "x$enable_ipv6" = "xyes" ; then + AC_DEFINE(BUILD_IPv6, 1, [Define if we want to build IPv6 support]) +fi +AM_CONDITIONAL(BUILD_IPv6, test "x$enable_ipv6" = "xyes") +#AC_SUBST(enable_ipv6) # Checks for header files. AC_HEADER_STDC @@ -127,7 +134,7 @@ # Checks for library functions. AC_PROG_GCC_TRADITIONAL # AC_FUNC_MALLOC -# AC_FUNC_MEMCMP +# AC_FUNC_MEMCMP AC_CHECK_FUNCS([gethostbyname inet_ntoa memset select socket strdup strerror strtol]) AC_CHECK_FUNCS(inet_aton inet_addr, break) @@ -170,4 +177,5 @@ echo " osmo-ggsn Configuration: - GTP Linux kernel support: ${enable_gtp_linux}" + GTP Linux kernel support: ${enable_gtp_linux} + IPv6 support: ${enable_ipv6}" diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am index 8a468a9..07adf80 100644 --- a/ggsn/Makefile.am +++ b/ggsn/Makefile.am @@ -12,7 +12,10 @@ endif osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a -osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h +osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h checksum.c checksum.h +if BUILD_IPv6 +osmo_ggsn_SOURCES += icmpv6.c icmpv6.h +endif if ENABLE_GTP_KERNEL osmo_ggsn_SOURCES += gtp-kernel.c diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 0beaef7..3018af4 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -65,7 +65,9 @@ #include "../gtp/pdp.h" #include "../gtp/gtp.h" #include "gtp-kernel.h" +#if defined(BUILD_IPv6) #include "icmpv6.h" +#endif #include "ggsn.h" void *tall_ggsn_ctx; @@ -115,7 +117,9 @@ LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : ""); /* check if pools have any active PDP contexts and bail out */ pool_close_all_pdp(apn->v4.pool); +#if defined(BUILD_IPv6) pool_close_all_pdp(apn->v6.pool); +#endif /* shutdown whatever old state might be left */ if (apn->tun.tun) { @@ -137,12 +141,13 @@ ippool_free(apn->v4.pool); apn->v4.pool = NULL; } +#if defined(BUILD_IPv6) if (apn->v6.pool) { LOGPAPN(LOGL_INFO, apn, "Releasing IPv6 pool\n"); ippool_free(apn->v6.pool); apn->v6.pool = NULL; } - +#endif apn->started = false; return 0; } @@ -155,9 +160,11 @@ *blacklist = NULL; +#if defined(BUILD_IPv6) if (ipv6) flags = IP_TYPE_IPv6_NONLINK; else +#endif flags = IP_TYPE_IPv4; while (1) { @@ -191,7 +198,9 @@ int apn_start(struct apn_ctx *apn) { int ippool_flags = IPPOOL_NONETWORK | IPPOOL_NOBROADCAST; +#if defined(BUILD_IPv6) struct in46_prefix ipv6_tun_linklocal_ip; +#endif struct in46_prefix *blacklist; int blacklist_size; @@ -226,7 +235,7 @@ return -1; } } - +#if defined(BUILD_IPv6) if (apn->v6.cfg.ifconfig_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Setting tun IPv6 address %s\n", in46p_ntoa(&apn->v6.cfg.ifconfig_prefix)); @@ -239,13 +248,13 @@ return -1; } } - +#endif if (apn->tun.cfg.ipup_script) { LOGPAPN(LOGL_INFO, apn, "Running ip-up script %s\n", apn->tun.cfg.ipup_script); tun_runscript(apn->tun.tun, apn->tun.cfg.ipup_script); } - +#if defined(BUILD_IPv6) if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { if (tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK) < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of " @@ -255,17 +264,20 @@ } apn->v6_lladdr = ipv6_tun_linklocal_ip.addr.v6; } +#endif /* set back-pointer from TUN device to APN */ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); +#if defined(BUILD_IPv6) if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); apn_stop(apn, false); return -1; } +#endif /* use GTP kernel module for data packet encapsulation */ if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { @@ -294,6 +306,7 @@ talloc_free(blacklist); } +#if defined(BUILD_IPv6) /* Create IPv6 pool */ if (apn->v6.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv6 pool %s\n", @@ -310,6 +323,7 @@ } talloc_free(blacklist); } +#endif LOGPAPN(LOGL_NOTICE, apn, "Successfully started\n"); apn->started = true; @@ -468,6 +482,7 @@ build_ipcp_pco(msg, 0, &apn->v4.cfg.dns[0], &apn->v4.cfg.dns[1]); } +#if defined(BUILD_IPv6) if (pco_contains_proto(&pdp->pco_req, PCO_P_DNS_IPv6_ADDR)) { for (i = 0; i < ARRAY_SIZE(apn->v6.cfg.dns); i++) { struct in46_addr *i46a = &apn->v6.cfg.dns[i]; @@ -476,6 +491,7 @@ msgb_t16lv_put(msg, PCO_P_DNS_IPv6_ADDR, i46a->len, i46a->v6.s6_addr); } } +#endif if (pco_contains_proto(&pdp->pco_req, PCO_P_DNS_IPv4_ADDR)) { for (i = 0; i < ARRAY_SIZE(apn->v4.cfg.dns); i++) { @@ -502,12 +518,14 @@ return false; } +#if defined(BUILD_IPv6) static bool apn_supports_ipv6(const struct apn_ctx *apn) { if (apn->v6.cfg.static_prefix.addr.len || apn->v6.cfg.dynamic_prefix.addr.len) return true; return false; } +#endif int create_context_ind(struct pdp_t *pdp) { @@ -575,6 +593,7 @@ gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } +#if defined(BUILD_IPv6) } else if (addr.len == sizeof(struct in6_addr)) { struct in46_addr tmp; @@ -594,6 +613,7 @@ /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); in46a_to_eua(&tmp, &pdp->eua); +#endif } else OSMO_ASSERT(0); @@ -635,7 +655,9 @@ struct ippoolm_t *ipm; struct in46_addr dst; struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif struct ippool_t *pool; if (iph->version == 4) { @@ -644,6 +666,7 @@ dst.len = 4; dst.v4.s_addr = iph->daddr; pool = apn->v4.pool; +#if defined(BUILD_IPv6) } else if (iph->version == 6) { /* Due to the fact that 3GPP requires an allocation of a * /64 prefix to each MS, we must instruct @@ -652,6 +675,7 @@ dst.len = 8; dst.v6 = ip6h->ip6_dst; pool = apn->v6.pool; +#endif } else { LOGP(DTUN, LOGL_NOTICE, "non-IPv packet received from tun\n"); return -1; @@ -673,16 +697,20 @@ return 0; } +#if defined(BUILD_IPv6) /* RFC3307 link-local scope multicast address */ static const struct in6_addr all_router_mcast_addr = { .s6_addr = { 0xff,0x02,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,2 } }; +#endif /* MS-originated GTP1-U packet, needs to be sent via TUN device */ static int encaps_tun(struct pdp_t *pdp, void *pack, unsigned len) { struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif struct tun_t *tun = (struct tun_t *)pdp->ipif; struct apn_ctx *apn = tun->priv; @@ -692,11 +720,13 @@ LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); switch (iph->version) { +#if defined(BUILD_IPv6) case 6: /* daddr: all-routers multicast addr */ if (IN6_ARE_ADDR_EQUAL(&ip6h->ip6_dst, &all_router_mcast_addr)) return handle_router_mcast(pdp->gsn, pdp, &apn->v6_lladdr, pack, len); break; +#endif case 4: break; default: diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 6e15ae4..4932c20 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -334,8 +334,10 @@ static const struct value_string pdp_type_names[] = { { APN_TYPE_IPv4, "v4" }, +#if defined(BUILD_IPv6) { APN_TYPE_IPv6, "v6" }, { APN_TYPE_IPv4v6, "v4v6" }, +#endif { 0, NULL } }; @@ -345,13 +347,17 @@ { 0, NULL } }; - +#if defined(BUILD_IPv6) +#define V4V6V46_ARGS "(v4|v6|v4v6)" #define V4V6V46_STRING "IPv4(-only) PDP Type\n" \ "IPv6(-only) PDP Type\n" \ "IPv4v6 (dual-stack) PDP Type\n" - +#else +#define V4V6V46_ARGS "(v4)" +#define V4V6V46_STRING "IPv4(-only) PDP Type\n" +#endif DEFUN(cfg_apn_type_support, cfg_apn_type_support_cmd, - "type-support (v4|v6|v4v6)", + "type-support " V4V6V46_ARGS, "Enable support for PDP Type\n" V4V6V46_STRING) { @@ -363,7 +369,7 @@ } DEFUN(cfg_apn_no_type_support, cfg_apn_no_type_support_cmd, - "no type-support (v4|v6|v4v6)", + "no type-support " V4V6V46_ARGS, NO_STR "Disable support for PDP Type\n" V4V6V46_STRING) { @@ -480,6 +486,7 @@ return CMD_SUCCESS; } +#if defined(BUILD_IPv6) DEFUN(cfg_apn_ipv6_prefix, cfg_apn_ipv6_prefix_cmd, "ipv6 prefix (static|dynamic) X:X::X:X/M", IP6_STR PREFIX_STR "IPv6 Address/Prefix-Length\n") @@ -512,6 +519,7 @@ memset(&apn->v6.cfg.ifconfig_prefix, 0, sizeof(apn->v6.cfg.ifconfig_prefix)); return CMD_SUCCESS; } +#endif #define DNS_STRINGS "Configure DNS Server\n" "primary/secondary DNS\n" "IP address of DNS Sever\n" @@ -528,6 +536,7 @@ return CMD_SUCCESS; } +#if defined(BUILD_IPv6) DEFUN(cfg_apn_ipv6_dns, cfg_apn_ipv6_dns_cmd, "ipv6 dns <0-1> X:X::X:X", IP6_STR DNS_STRINGS) @@ -540,20 +549,27 @@ return CMD_SUCCESS; } +#endif +#if defined(BUILD_IPv6) +#define IPV46_ARGS "(ip|ipv6)" +#else +#define IPV46_ARGS "(ip)" +#endif DEFUN(cfg_apn_no_dns, cfg_apn_no_dns_cmd, - "no (ip|ipv6) dns <0-1>", + "no " IPV46_ARGS " dns <0-1>", NO_STR IP_STR IP6_STR "Disable DNS Server\n" "primary/secondary DNS\n") { struct apn_ctx *apn = (struct apn_ctx *) vty->index; - struct in46_addr *a; + struct in46_addr *a = NULL; int idx = atoi(argv[1]); if (!strcmp(argv[0], "ip")) a = &apn->v4.cfg.dns[idx]; +#if defined(BUILD_IPv6) else a = &apn->v6.cfg.dns[idx]; - +#endif memset(a, 0, sizeof(*a)); return CMD_SUCCESS; @@ -656,6 +672,7 @@ if (apn->v4.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ip ifconfig", &apn->v4.cfg.ifconfig_prefix); +#if defined(BUILD_IPv6) /* IPv6 prefixes + DNS */ if (apn->v6.cfg.static_prefix.addr.len) vty_dump_prefix(vty, " ipv6 prefix static", &apn->v6.cfg.static_prefix); @@ -668,7 +685,7 @@ } if (apn->v6.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ipv6 ifconfig", &apn->v6.cfg.ifconfig_prefix); - +#endif /* must be last */ vty_out(vty, " %sshutdown%s", apn->cfg.shutdown ? "" : "no ", VTY_NEWLINE); } @@ -704,8 +721,12 @@ struct in46_addr in46; in46.len = in->l; +#if defined(BUILD_IPv6) OSMO_ASSERT(in->l <= sizeof(in46.v6)); - memcpy(&in46.v6, in->v, in->l); +#else + OSMO_ASSERT(in->l <= sizeof(in46.v4)); +#endif + memcpy(&in46.v4, in->v, in->l); return in46a_ntoa(&in46); } @@ -781,7 +802,9 @@ static void apn_show_pdp_contexts(struct vty *vty, struct apn_ctx *apn) { ippool_show_pdp_contexts(vty, apn->v4.pool); +#if defined(BUILD_IPv6) ippool_show_pdp_contexts(vty, apn->v6.pool); +#endif } DEFUN(show_pdpctx, show_pdpctx_cmd, @@ -885,14 +908,16 @@ install_element(APN_NODE, &cfg_apn_ipdown_script_cmd); install_element(APN_NODE, &cfg_apn_no_ipdown_script_cmd); install_element(APN_NODE, &cfg_apn_ip_prefix_cmd); - install_element(APN_NODE, &cfg_apn_ipv6_prefix_cmd); install_element(APN_NODE, &cfg_apn_ip_dns_cmd); - install_element(APN_NODE, &cfg_apn_ipv6_dns_cmd); install_element(APN_NODE, &cfg_apn_no_dns_cmd); install_element(APN_NODE, &cfg_apn_ip_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ip_ifconfig_cmd); +#if defined(BUILD_IPv6) + install_element(APN_NODE, &cfg_apn_ipv6_prefix_cmd); + install_element(APN_NODE, &cfg_apn_ipv6_dns_cmd); install_element(APN_NODE, &cfg_apn_ipv6_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ipv6_ifconfig_cmd); +#endif install_element(APN_NODE, &cfg_apn_gpdu_seq_cmd); install_element(APN_NODE, &cfg_apn_no_gpdu_seq_cmd); diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..79123b5 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -28,9 +28,11 @@ switch (in->len) { case 4: return AF_INET; +#if defined(BUILD_IPv6) case 8: case 16: return AF_INET6; +#endif default: OSMO_ASSERT(0); return -1; @@ -41,17 +43,21 @@ int in46a_to_sas(struct sockaddr_storage *out, const struct in46_addr *in) { struct sockaddr_in *sin = (struct sockaddr_in *)out; +#if defined(BUILD_IPv6) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)out; +#endif switch (in->len) { case 4: sin->sin_family = AF_INET; sin->sin_addr = in->v4; break; +#if defined(BUILD_IPv6) case 16: sin6->sin6_family = AF_INET6; sin6->sin6_addr = in->v6; break; +#endif default: OSMO_ASSERT(0); return -1; @@ -98,7 +104,7 @@ * \returns 1 in case they are equal; 0 otherwise */ int in46a_equal(const struct in46_addr *a, const struct in46_addr *b) { - if (a->len == b->len && !memcmp(&a->v6, &b->v6, a->len)) + if (a->len == b->len && !memcmp(&a->v4, &b->v4, a->len)) return 1; else return 0; @@ -115,12 +121,13 @@ else len = a->len; - if (!memcmp(&a->v6, &b->v6, len)) + if (!memcmp(&a->v4, &b->v4, len)) return 1; else return 0; } +#if defined(BUILD_IPv6) /*! Match if IPv6 addr1 + addr2 are within same \a mask */ static int ipv6_within_mask(const struct in6_addr *addr1, const struct in6_addr *addr2, const struct in6_addr *mask) @@ -167,6 +174,7 @@ *p_netmask = htonl(0xFFFFFFFF << (32 - prefixlen)); } } +#endif /*! Determine if given \a addr is within given \a net + \a prefixlen * Builds the netmask from \a net + \a prefixlen and matches it to \a addr @@ -174,7 +182,9 @@ int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen) { struct in_addr netmask; +#if defined(BUILD_IPv6) struct in6_addr netmask6; +#endif if (addr->len != net->len) return 0; @@ -186,9 +196,11 @@ return 1; else return 0; +#if defined(BUILD_IPv6) case 16: create_ipv6_netmask(&netmask6, prefixlen); return ipv6_within_mask(&addr->v6, &net->v6, &netmask6); +#endif default: OSMO_ASSERT(0); return 0; @@ -210,6 +222,7 @@ return prefix; } +#if defined(BUILD_IPv6) static unsigned int ipv6_netmasklen(const struct in6_addr *netmask) { #if defined(__linux__) @@ -235,6 +248,7 @@ return prefix; } +#endif /*! Convert netmask to prefix length representation * \param[in] netmask in46_addr containing a netmask (consecutive list of 1-bit followed by consecutive list of 0-bit) @@ -245,8 +259,10 @@ switch (netmask->len) { case 4: return ipv4_netmasklen(&netmask->v4); +#if defined(BUILD_IPv6) case 16: return ipv6_netmasklen(&netmask->v6); +#endif default: OSMO_ASSERT(0); return 0; @@ -264,6 +280,7 @@ eua->v[1] = PDP_EUA_TYPE_v4; memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ break; +#if defined(BUILD_IPv6) case 8: case 16: eua->l = 18; @@ -271,6 +288,7 @@ eua->v[1] = PDP_EUA_TYPE_v6; memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ break; +#endif default: OSMO_ASSERT(0); return -1; @@ -296,6 +314,7 @@ else dst->v4.s_addr = 0; break; +#if defined(BUILD_IPv6) case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) @@ -303,6 +322,7 @@ else memset(&dst->v6, 0, 16); break; +#endif default: return -1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..2b3755b 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -4,13 +4,17 @@ #include "../gtp/pdp.h" +#include "config.h" + /* a simple wrapper around an in6_addr to also contain the length of the address, * thereby implicitly indicating the address family of the address */ struct in46_addr { uint8_t len; union { struct in_addr v4; +#if defined(BUILD_IPv6) struct in6_addr v6; +#endif }; }; diff --git a/lib/ippool.c b/lib/ippool.c index a9a64be..ffc4388 100644 --- a/lib/ippool.c +++ b/lib/ippool.c @@ -22,6 +22,8 @@ #include "ippool.h" #include "lookup.h" +#include "config.h" + int ippool_printaddr(struct ippool_t *this) { unsigned int n; @@ -96,18 +98,24 @@ return lookup((unsigned char *)&addr->s_addr, sizeof(addr->s_addr), 0); } +#if defined(BUILD_IPv6) static unsigned long int ippool_hash6(struct in6_addr *addr, unsigned int len) { /* TODO: Review hash spread for IPv6 */ return lookup((unsigned char *)addr->s6_addr, len, 0); } +#endif unsigned long int ippool_hash(struct in46_addr *addr) { +#if defined(BUILD_IPv6) if (addr->len == 4) return ippool_hash4(&addr->v4); else return ippool_hash6(&addr->v6, addr->len); +#else + return ippool_hash4(&addr->v4); +#endif } /* Get IP address and mask */ @@ -148,11 +156,14 @@ *prefixlen = 32; addr->len = sizeof(struct in_addr); addr->v4 = ((struct sockaddr_in*)ai->ai_addr)->sin_addr; - } else { + } +#if defined(BUILD_IPv6) + else { *prefixlen = 128; addr->len = sizeof(struct in6_addr); addr->v6 = ((struct sockaddr_in6*)ai->ai_addr)->sin6_addr; } +#endif freeaddrinfo(ai); /* parse prefixlen */ @@ -177,7 +188,7 @@ void in46a_inc(struct in46_addr *addr) { size_t addrlen; - uint8_t *a = (uint8_t *)&addr->v6; + uint8_t *a = (uint8_t *)&addr->v4; for (addrlen = addr->len; addrlen > 0; addrlen--) { if (++a[addrlen-1]) break; @@ -215,11 +226,12 @@ } else { addr = dyn->addr; addrprefixlen = dyn->prefixlen; +#if defined(BUILD_IPv6) /* we want to work with /64 prefixes, i.e. allocate /64 prefixes rather * than /128 (single IPv6 addresses) */ if (addr.len == sizeof(struct in6_addr)) addr.len = 64/8; - +#endif dynsize = (1 << (addr.len*8 - addrprefixlen)); if (flags & IPPOOL_NONETWORK) /* Exclude network address from pool */ dynsize--; @@ -404,8 +416,10 @@ if (addr) { if (addr->len == 4 && addr->v4.s_addr) specified = 1; +#if defined(BUILD_IPv6) if (addr->len == 16 && !IN6_IS_ADDR_UNSPECIFIED(&addr->v6)) specified = 1; +#endif } /* First check to see if this type of address is allowed */ diff --git a/lib/tun.c b/lib/tun.c index d8e4b62..ce3eced 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -62,7 +62,9 @@ #if defined(__linux__) +#if defined(BUILD_IPv6) #include +#endif static int tun_nlattr(struct nlmsghdr *n, int nsize, int type, void *d, int dlen) { @@ -197,6 +199,7 @@ return 0; } +#if defined(BUILD_IPv6) static int tun_setaddr6(struct tun_t *this, struct in6_addr *addr, struct in6_addr *dstaddr, size_t prefixlen) { @@ -280,6 +283,7 @@ return 0; } +#endif /* BUILD_IPv6 */ int tun_setaddr(struct tun_t *this, struct in46_addr *addr, struct in46_addr *dstaddr, size_t prefixlen) { @@ -288,8 +292,10 @@ case 4: netmask.s_addr = htonl(0xffffffff << (32 - prefixlen)); return tun_setaddr4(this, &addr->v4, dstaddr ? &dstaddr->v4 : NULL, &netmask); +#if defined(BUILD_IPv6) case 16: return tun_setaddr6(this, &addr->v6, dstaddr ? &dstaddr->v6 : NULL, prefixlen); +#endif default: return -1; } @@ -762,11 +768,13 @@ */ int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, size_t prefix_size, int flags) { +#if defined(BUILD_IPv6) static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; + bool is_ipv6_ll; +#endif struct ifaddrs *ifaddr, *ifa; struct in46_addr netmask; size_t count = 0; - bool is_ipv6_ll; if (getifaddrs(&ifaddr) == -1) { return -1; @@ -792,7 +800,7 @@ } count++; } - +#if defined(BUILD_IPv6) if (ifa->ifa_addr->sa_family == AF_INET6 && (flags & IP_TYPE_IPv6)) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) ifa->ifa_addr; struct sockaddr_in6 *netmask6 = (struct sockaddr_in6 *) ifa->ifa_netmask; @@ -812,6 +820,7 @@ } count++; } +#endif } freeifaddrs(ifaddr); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..402f18a 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1,13 +1,13 @@ -/* +/* * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * Copyright (C) 2017 Harald Welte - * + * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright * notice and this permission notice is included in all copies or * substantial portions of the software. - * + * */ /* @@ -372,10 +372,10 @@ /* foreground */ /* If fg flag not given run as a daemon */ - /* Do not allow sgsnemu to run as deamon + /* Do not allow sgsnemu to run as deamon if (!args_info.fg_flag) { - closelog(); + closelog(); freopen("/dev/null", "w", stdout); freopen("/dev/null", "w", stderr); freopen("/dev/null", "r", stdin); @@ -936,10 +936,12 @@ options.tx_gpdu_seq = 1; /* PDP Type */ - if (!strcmp(args_info.pdp_type_arg, "v6")) - options.pdp_type = PDP_EUA_TYPE_v6; - else if (!strcmp(args_info.pdp_type_arg, "v4")) + if (!strcmp(args_info.pdp_type_arg, "v4")) options.pdp_type = PDP_EUA_TYPE_v4; +#if defined(BUILD_IPv6) + else if (!strcmp(args_info.pdp_type_arg, "v6")) + options.pdp_type = PDP_EUA_TYPE_v6; +#endif else { SYS_ERR(DSGSN, LOGL_ERROR, 0, "Unsupported/unknown PDP Type '%s'\n", args_info.pdp_type_arg); @@ -955,6 +957,7 @@ } +#if defined(BUILD_IPv6) /* read a single value from a /procc file, up to 255 bytes, callee-allocated */ static char *proc_read(const char *path) { @@ -989,6 +992,7 @@ snprintf(path, sizeof(path), fmt, dev, file); return proc_read(path); } +#endif static char *print_ipprot(int t) { @@ -1323,8 +1327,10 @@ return 0; } +#if defined(BUILD_IPv6) /* Link-Local address prefix fe80::/64 */ static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; +#endif /* Callback for receiving messages from tun */ static int cb_tun_ind(struct tun_t *tun, void *pack, unsigned len) @@ -1332,7 +1338,9 @@ struct iphash_t *ipm; struct in46_addr src; struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif if (iph->version == 4) { if (len < sizeof(*iph) || len < 4*iph->ihl) { @@ -1341,6 +1349,7 @@ } src.len = 4; src.v4.s_addr = iph->saddr; +#if defined(BUILD_IPv6) } else if (iph->version == 6) { /* We only have a single entry in the hash table, and it consists of the link-local * address "fe80::prefix". So we need to make sure to convert non-link-local source @@ -1355,6 +1364,7 @@ memcpy(&src.v6.s6_addr[0], ll_prefix, sizeof(ll_prefix)); memcpy(&src.v6.s6_addr[sizeof(ll_prefix)], ip6h->ip6_src.s6_addr, 16-sizeof(ll_prefix)); } +#endif } else { printf("Dropping packet with invalid IP version %u\n", iph->version); return 0; @@ -1416,6 +1426,7 @@ in46a_ntoa(&addr)); switch (addr.len) { +#if defined(BUILD_IPv6) case 16: /* IPv6 */ /* we have to enable the kernel to perform stateless autoconfiguration, * i.e. send a router solicitation using the lover 64bits of the allocated @@ -1423,6 +1434,7 @@ memcpy(addr.v6.s6_addr, ll_prefix, sizeof(ll_prefix)); printf("Derived IPv6 link-local address: %s\n", in46a_ntoa(&addr)); break; +#endif case 4: /* IPv4 */ break; } @@ -1443,6 +1455,7 @@ tun_runscript(tun, options.ipup); } +#if defined(BUILD_IPv6) /* now that ip-up has been executed, check if we are configured to * accept router advertisements */ if (options.createif && options.pdp_type == PDP_EUA_TYPE_v6) { @@ -1463,6 +1476,7 @@ free(accept_ra); free(forwarding); } +#endif ipset((struct iphash_t *)pdp->peer, &addr); @@ -1700,7 +1714,7 @@ pdp->hisaddr0 = options.remote; pdp->hisaddr1 = options.remote; - pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, + pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, 512 = Flat rate, 256 = Hot billing */ pdp->tx_gpdu_seq = options.tx_gpdu_seq; diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index d4a5dbc..06813bb 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -20,29 +20,37 @@ .v4.s_addr = 0x0d0c0b0a, }; +#if defined(BUILD_IPv6) static const struct in46_addr g_ia6 = { .len = 16, .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; +#endif static void test_in46a_to_af(void) { +#if defined(BUILD_IPv6) struct in46_addr ia; +#endif printf("Testing in46a_to_af()\n"); OSMO_ASSERT(in46a_to_af(&g_ia4) == AF_INET); +#if defined(BUILD_IPv6) OSMO_ASSERT(in46a_to_af(&g_ia6) == AF_INET6); ia.len = 8; OSMO_ASSERT(in46a_to_af(&ia) == AF_INET6); +#endif } static void test_in46a_to_sas(void) { struct sockaddr_storage ss; struct sockaddr_in *sin = (struct sockaddr_in *) &ss; +#if defined(BUILD_IPv6) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss; +#endif printf("Testing in46a_to_sas()\n"); @@ -51,10 +59,12 @@ OSMO_ASSERT(sin->sin_family == AF_INET); OSMO_ASSERT(sin->sin_addr.s_addr == g_ia4.v4.s_addr); +#if defined(BUILD_IPv6) memset(&ss, 0, sizeof(ss)); OSMO_ASSERT(in46a_to_sas(&ss, &g_ia6) == 0); OSMO_ASSERT(sin6->sin6_family == AF_INET6); OSMO_ASSERT(!memcmp(&sin6->sin6_addr, &g_ia6.v6, sizeof(sin6->sin6_addr))); +#endif } static void test_in46a_ntop(void) @@ -79,10 +89,11 @@ res = in46a_ntop(&ia, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "1.2.3.4")); printf("res = %s\n", res); - +#if defined(BUILD_IPv6) res = in46a_ntop(&g_ia6, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "102:304:506:708:90a:b0c:d0e:f10")); printf("res = %s\n", res); +#endif } static void test_in46p_ntoa(void) @@ -108,11 +119,12 @@ b.v4.s_addr = g_ia4.v4.s_addr; OSMO_ASSERT(in46a_equal(&g_ia4, &b)); +#if defined(BUILD_IPv6) memset(&b, 0xff, sizeof(b)); b.len = g_ia6.len; b.v6 = g_ia6.v6; OSMO_ASSERT(in46a_equal(&g_ia6, &b)); - +#endif } @@ -155,10 +167,12 @@ static void test_in46a_to_eua(void) { +#if defined(BUILD_IPv6) const struct in46_addr ia_v6_8 = { .len = 8, .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, }; +#endif struct ul66_t eua; printf("testing in46a_to_eua()\n"); @@ -174,6 +188,7 @@ OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); +#if defined(BUILD_IPv6) /* IPv6 address */ OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); @@ -185,6 +200,7 @@ OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +#endif } static void test_in46a_from_eua(void) @@ -193,10 +209,11 @@ struct ul66_t eua; const uint8_t v4_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4 }; const uint8_t v4_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4, 1,2,3,4 }; +#if defined(BUILD_IPv6) const uint8_t v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6 }; const uint8_t v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; - +#endif memset(&eua, 0, sizeof(eua)); printf("Testing in46a_from_eua()\n"); @@ -232,6 +249,7 @@ OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); +#if defined(BUILD_IPv6) /* unspecified V6 */ memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); eua.l = sizeof(v6_unspec); @@ -245,6 +263,7 @@ OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +#endif } static void test_in46a_netmasklen(void) @@ -275,6 +294,7 @@ len = in46a_netmasklen(&netmask); OSMO_ASSERT(len == 0); +#if defined(BUILD_IPv6) printf("Testing in46a_netmasklen() with IPv6 addresses\n"); const struct in46_addr netmaskA = { .len = 16, @@ -303,6 +323,7 @@ }; len = in46a_netmasklen(&netmaskD); OSMO_ASSERT(len == 0); +#endif } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:04:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:04:53 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 1: WIP, submited for early comments (RFC). Works: - building with IPv6 support and building without TODO: - Tests don't pass with IPv6 disabled, probably because the output doesn't match. I need to see how to fix it. I'll probably move IPv6 specific tests to their own testsuite and run it only if IPv6 is enabled. - Check that everything's fine running osmo-ggsn in my laptop. -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:05:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:05:03 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:05:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:05:38 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 1: I forgot to add to the TODO list: - Modify osmo-ggsn gerrit job to build with and without ipv6 support. -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:13:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:13:08 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5121/1/ggsn/ggsn_vty.c File ggsn/ggsn_vty.c: Line 729: memcpy(&in46.v4, in->v, in->l); I'm not entirely sure if this change is fine. I think it is, as v4 and v6 are fields in the same union, and so its address should be the same. -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:14:04 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 1 Dec 2017 17:14:04 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 11: Code-Review-1 (2 comments) Hi Max! I like this change very much, and wish to move it forward. But I insist to keep the API as similar and easy to use as possible. https://gerrit.osmocom.org/#/c/5062/11/include/osmocom/coding/gsm0503_coding.h File include/osmocom/coding/gsm0503_coding.h: Line 72: int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t bsic); I don't like the mix of both '_encode_ext' and '_ext_decode'. Let's use the common 'gsm0503_CODE_(en/de)code' style. https://gerrit.osmocom.org/#/c/5062/11/utils/conv_codes_gsm.py File utils/conv_codes_gsm.py: Line 57: name = "ext_rach", Here we have 'ext_rach', while the coding API provides 'rach_ext'. It may cause potential API users to confuse between different names. I suggest to use 'rach_ext' everywhere. -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 11 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:15:14 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 1 Dec 2017 17:15:14 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 1: Another TODO: Check following fields from structure apn, as I think they can be disabled in case we build without ipv6 support: apn->v6_lladdr apn->v6.* -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:16:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 17:16:21 +0000 Subject: [PATCH] libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5103 to look at the new patch set (#3). Add function to estimate elapsed time It uses monotonic clock for proper time estimation. Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Related: OS#2586 --- M TODO-RELEASE M include/osmocom/core/timer.h M src/timer.c 3 files changed, 69 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/3 diff --git a/TODO-RELEASE b/TODO-RELEASE index 99865c6..5861956 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h +core osmo_time_elapsed() add function to estimate elapsed time diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h index 4958efb..7df01ce 100644 --- a/include/osmocom/core/timer.h +++ b/include/osmocom/core/timer.h @@ -50,6 +50,18 @@ #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60)) #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* we ignore leap year for simplicity */ +#define OSMO_SEC2MS(sec) (sec * 1000) +#define OSMO_SEC2CS(sec) (sec * 100) + +#define OSMO_NSEC2MS(ns) (ns / 1000000) +#define OSMO_NSEC2CS(ns) (ns / 10000000) + +enum osmo_elapsed { + T_SECS, + T_MILLIS, + T_CENTIS, +}; + /*! A structure representing a single instance of a timer */ struct osmo_timer_list { struct rb_node node; /*!< rb-tree node header */ @@ -61,6 +73,8 @@ void *data; /*!< user data for callback */ }; +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind); + /* * timer management */ diff --git a/src/timer.c b/src/timer.c index 9ec7a00..a504d79 100644 --- a/src/timer.c +++ b/src/timer.c @@ -35,6 +35,10 @@ #include #include #include +#include +#include + +#include #include #include #include @@ -168,6 +172,56 @@ return 0; } +#ifndef EMBEDDED + +/* isolated nanoseconds clock difference */ +static inline long t_diff_nsec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_nsec - to->tv_nsec; +} + +/* isolated seconds clock difference */ +static inline time_t t_diff_sec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_sec - to->tv_sec; +} + +/*! Determine the time difference between now and the given time point + * \returns time difference + * + * \param[in] from timespec of a reference time point + * \param[in] kind expected return value type: milliseconds, centiseconds etc. + */ +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind) +{ + struct timespec t_now; + long ns; + time_t sec; + + if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed computation: %s\n", strerror(errno)); + return 0; + } + + ns = t_diff_nsec(from, &t_now); + sec = t_diff_sec(from, &t_now); + + switch (kind) { + case T_SECS: + return sec; + case T_MILLIS: + return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns); + case T_CENTIS: + return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns); + default: + LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time computation: %u\n", kind); + } + + return 0; +} + +#endif /* !EMBEDDED */ + /*! Determine time between now and the nearest timer * \returns pointer to timeval of nearest timer, NULL if there is none * -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:22:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 17:22:34 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#12). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/12 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 12 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:29:46 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 1 Dec 2017 17:29:46 +0000 Subject: libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5103/3/src/timer.c File src/timer.c: Line 203: return 0; Would it possible to distinguish between a result or error? For example, when kind == T_SECS and at the moment only 500 ms elapsed, the result will be 0. And on error it could be 0. -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:38:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 17:38:11 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#13). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/13 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 13 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:43:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 17:43:24 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#14). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/14 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Fri Dec 1 17:51:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 17:51:14 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#15). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/15 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 15 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 18:18:25 +0000 Subject: [PATCH] libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5103 to look at the new patch set (#4). Add function to estimate elapsed time It uses monotonic clock for proper time estimation. Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Related: OS#2586 --- M TODO-RELEASE M include/osmocom/core/timer.h M src/timer.c 3 files changed, 70 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/4 diff --git a/TODO-RELEASE b/TODO-RELEASE index 99865c6..5861956 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h +core osmo_time_elapsed() add function to estimate elapsed time diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h index 4958efb..7df01ce 100644 --- a/include/osmocom/core/timer.h +++ b/include/osmocom/core/timer.h @@ -50,6 +50,18 @@ #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60)) #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* we ignore leap year for simplicity */ +#define OSMO_SEC2MS(sec) (sec * 1000) +#define OSMO_SEC2CS(sec) (sec * 100) + +#define OSMO_NSEC2MS(ns) (ns / 1000000) +#define OSMO_NSEC2CS(ns) (ns / 10000000) + +enum osmo_elapsed { + T_SECS, + T_MILLIS, + T_CENTIS, +}; + /*! A structure representing a single instance of a timer */ struct osmo_timer_list { struct rb_node node; /*!< rb-tree node header */ @@ -61,6 +73,8 @@ void *data; /*!< user data for callback */ }; +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind); + /* * timer management */ diff --git a/src/timer.c b/src/timer.c index 9ec7a00..2b4e100 100644 --- a/src/timer.c +++ b/src/timer.c @@ -25,6 +25,7 @@ * */ +#include "config.h" /*! \addtogroup timer * @{ @@ -35,6 +36,10 @@ #include #include #include +#include +#include + +#include #include #include #include @@ -168,6 +173,56 @@ return 0; } +#if !defined(EMBEDDED) + +/* isolated nanoseconds clock difference */ +static inline long t_diff_nsec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_nsec - to->tv_nsec; +} + +/* isolated seconds clock difference */ +static inline time_t t_diff_sec(const struct timespec *from, const struct timespec *to) +{ + return from->tv_sec - to->tv_sec; +} + +/*! Determine the time difference between now and the given time point + * \returns time difference + * + * \param[in] from timespec of a reference time point + * \param[in] kind expected return value type: milliseconds, centiseconds etc. + */ +time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind) +{ + struct timespec t_now; + long ns; + time_t sec; + + if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed computation: %s\n", strerror(errno)); + return 0; + } + + ns = t_diff_nsec(from, &t_now); + sec = t_diff_sec(from, &t_now); + + switch (kind) { + case T_SECS: + return sec; + case T_MILLIS: + return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns); + case T_CENTIS: + return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns); + default: + LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time computation: %u\n", kind); + } + + return 0; +} + +#endif /* !EMBEDDED */ + /*! Determine time between now and the nearest timer * \returns pointer to timeval of nearest timer, NULL if there is none * -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 18:18:25 +0000 Subject: [PATCH] libosmocore[master]: Fix embedded build Message-ID: Review at https://gerrit.osmocom.org/5122 Fix embedded build Do not attempt to load auth plugins - this does not make sense on embedded target anyway. Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0 --- M src/gsm/auth_core.c M src/gsm/gprs_cipher_core.c 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/5122/1 diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 9e3b2c0..400708f 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -20,6 +20,8 @@ * */ +#include "config.h" + #include #include #include @@ -71,7 +73,11 @@ int osmo_auth_load(const char *path) { /* load all plugins available from path */ +#if !defined(EMBEDDED) return osmo_plugin_load_all(path); +#else + return -1; +#endif } /*! Determine if a given authentication algorithm is supported diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index 6fa25d6..7f2b1a5 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -23,6 +23,8 @@ * */ +#include "config.h" + #include #include @@ -68,9 +70,11 @@ /* load all available GPRS cipher plugins */ int gprs_cipher_load(const char *path) { +#if !defined(EMBEDDED) /* load all plugins available from path */ if (path) return osmo_plugin_load_all(path); +#endif return 0; } -- To view, visit https://gerrit.osmocom.org/5122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:21:46 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 1 Dec 2017 18:21:46 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 15: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/5062/15/include/osmocom/coding/gsm0503_coding.h File include/osmocom/coding/gsm0503_coding.h: Line 69: int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic) OSMO_DEPRECATED("Use gsm0503_rach_encode_ext() instead"); > Use gsm0503_rach_encode_ext() instead Now gsm0503_rach_ext_encode(). -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 15 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:25:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 18:25:31 +0000 Subject: [PATCH] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5062 to look at the new patch set (#16). Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/16 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:42:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 18:42:38 +0000 Subject: [PATCH] libosmocore[master]: embedded: fix tests Message-ID: Review at https://gerrit.osmocom.org/5123 embedded: fix tests In case of embedded build some tests are failing to link properly. Fix it: * do not run fsm_test unless CTRL is enabled * do not run fr_test unless GB is enabled * do not link loggingrb_test with libosmovty Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/5123/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index c609d6a..78542b2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,12 +8,12 @@ conv/conv_test auth/milenage_test lapd/lapd_test \ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gprs/gprs_test kasumi/kasumi_test gea/gea_test \ - logging/logging_test fr/fr_test codec/codec_test \ + logging/logging_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ comp128/comp128_test smscb/gsm0341_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ bits/bitfield_test \ - tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ + tlv/tlv_test gsup/gsup_test oap/oap_test \ write_queue/wqueue_test socket/socket_test \ coding/coding_test conv/conv_gsm0503_test \ abis/abis_test endian/endian_test sercomm/sercomm_test \ @@ -36,11 +36,11 @@ endif if ENABLE_CTRL -check_PROGRAMS += ctrl/ctrl_test +check_PROGRAMS += ctrl/ctrl_test fsm/fsm_test endif if ENABLE_GB -check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test +check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test fr/fr_test endif utils_utils_test_SOURCES = utils/utils_test.c @@ -137,7 +137,7 @@ codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c -loggingrb_loggingrb_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la +loggingrb_loggingrb_test_LDADD = $(LDADD) strrb_strrb_test_SOURCES = strrb/strrb_test.c -- To view, visit https://gerrit.osmocom.org/5123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:48:43 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 1 Dec 2017 18:48:43 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 16: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 1 18:51:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 1 Dec 2017 18:51:34 +0000 Subject: [PATCH] osmo-msc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4991 to look at the new patch set (#3). Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not MSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 8 files changed, 2 insertions(+), 863 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/91/4991/3 diff --git a/Makefile.am b/Makefile.am index 690deae..2f0a786 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) BUILT_SOURCES = $(top_srcdir)/.version diff --git a/configure.ac b/configure.ac index 5766fd0..6434869 100644 --- a/configure.ac +++ b/configure.ac @@ -196,5 +196,4 @@ tests/msc_vlr/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 9a976a5..05d3e30 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 8989f24..de1997c 100644 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/4991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Fri Dec 1 20:13:33 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:13:33 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a21b7fafc19_1d317e0f5495245e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 102s] msc_ifaces.c:417:2: warning: 'mgcp_msg_dlcx' is deprecated (declared at /usr/include/osmocom/mgcp_client/mgcp_client.h:108): Use mgcp_msg_gen() instead [-Wdeprecated-declarations] [ 102s] msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, [ 102s] ^ [ 102s] Makefile:496: recipe for target 'msc_ifaces.o' failed [ 102s] make[4]: *** [msc_ifaces.o] Error 1 [ 102s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 102s] Makefile:412: recipe for target 'all-recursive' failed [ 102s] make[3]: *** [all-recursive] Error 1 [ 102s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 102s] Makefile:448: recipe for target 'all-recursive' failed [ 102s] make[2]: *** [all-recursive] Error 1 [ 102s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 102s] Makefile:379: recipe for target 'all' failed [ 102s] make[1]: *** [all] Error 2 [ 102s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 102s] dh_auto_build: make -j1 returned exit code 2 [ 102s] debian/rules:45: recipe for target 'build' failed [ 102s] make: *** [build] Error 2 [ 102s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 102s] [ 102s] lamb58 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:13:18 UTC 2017. [ 102s] [ 102s] ### VM INTERACTION START ### [ 104s] Powering off. [ 104s] [ 95.950347] reboot: Power down [ 104s] ### VM INTERACTION END ### [ 104s] [ 104s] lamb58 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:13:20 UTC 2017. [ 104s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:14:43 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:14:43 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a21b83694645_1d317e0f549528f9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-msc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 111s] msc_ifaces.c:417:2: warning: 'mgcp_msg_dlcx' is deprecated (declared at /usr/include/osmocom/mgcp_client/mgcp_client.h:108): Use mgcp_msg_gen() instead [-Wdeprecated-declarations] [ 111s] msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, [ 111s] ^ [ 111s] Makefile:496: recipe for target 'msc_ifaces.o' failed [ 111s] make[4]: *** [msc_ifaces.o] Error 1 [ 111s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 111s] Makefile:412: recipe for target 'all-recursive' failed [ 111s] make[3]: *** [all-recursive] Error 1 [ 111s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 111s] Makefile:448: recipe for target 'all-recursive' failed [ 111s] make[2]: *** [all-recursive] Error 1 [ 111s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 111s] Makefile:379: recipe for target 'all' failed [ 111s] make[1]: *** [all] Error 2 [ 111s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 111s] dh_auto_build: make -j1 returned exit code 2 [ 111s] debian/rules:45: recipe for target 'build' failed [ 111s] make: *** [build] Error 2 [ 111s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 111s] [ 111s] lamb61 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:14:33 UTC 2017. [ 111s] [ 111s] ### VM INTERACTION START ### [ 112s] Powering off. [ 112s] [ 104.303299] reboot: Power down [ 112s] ### VM INTERACTION END ### [ 112s] [ 112s] lamb61 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:14:35 UTC 2017. [ 112s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:17:16 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:17:16 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a21b8e9430ee_1d317e0f549548d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 56s] from msc_ifaces.c:24: [ 56s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 56s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 56s] ^~~~~~~~~~~~~ [ 56s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 56s] make[4]: *** [msc_ifaces.o] Error 1 [ 56s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 56s] Makefile:424: recipe for target 'all-recursive' failed [ 56s] make[3]: *** [all-recursive] Error 1 [ 56s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 56s] Makefile:460: recipe for target 'all-recursive' failed [ 56s] make[2]: *** [all-recursive] Error 1 [ 56s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 56s] Makefile:392: recipe for target 'all' failed [ 56s] make[1]: *** [all] Error 2 [ 56s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 56s] dh_auto_build: make -j1 returned exit code 2 [ 56s] debian/rules:45: recipe for target 'build' failed [ 56s] make: *** [build] Error 2 [ 56s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 56s] [ 56s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:17:08 UTC 2017. [ 56s] [ 56s] ### VM INTERACTION START ### [ 60s] [ 53.436831] reboot: Power down [ 60s] ### VM INTERACTION END ### [ 60s] [ 60s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:17:12 UTC 2017. [ 60s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:19:16 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:19:16 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a21b95fe07b6_1d317e0f5495558@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 136s] from msc_ifaces.c:24: [ 136s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 136s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 136s] ^~~~~~~~~~~~~ [ 136s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 136s] make[4]: *** [msc_ifaces.o] Error 1 [ 136s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 136s] Makefile:424: recipe for target 'all-recursive' failed [ 136s] make[3]: *** [all-recursive] Error 1 [ 136s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 136s] Makefile:460: recipe for target 'all-recursive' failed [ 136s] make[2]: *** [all-recursive] Error 1 [ 136s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 136s] Makefile:392: recipe for target 'all' failed [ 136s] make[1]: *** [all] Error 2 [ 136s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 136s] dh_auto_build: make -j1 returned exit code 2 [ 136s] debian/rules:45: recipe for target 'build' failed [ 136s] make: *** [build] Error 2 [ 136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 136s] [ 136s] cloud120 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:19:10 UTC 2017. [ 136s] [ 136s] ### VM INTERACTION START ### [ 140s] [ 111.258730] reboot: Power down [ 141s] ### VM INTERACTION END ### [ 141s] [ 141s] cloud120 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:19:14 UTC 2017. [ 141s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:20:07 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:20:07 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a21b980f0445_1d317e0f549559e3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 171s] from msc_ifaces.c:24: [ 171s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 171s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 171s] ^~~~~~~~~~~~~ [ 171s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 171s] make[4]: *** [msc_ifaces.o] Error 1 [ 171s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 171s] Makefile:424: recipe for target 'all-recursive' failed [ 171s] make[3]: *** [all-recursive] Error 1 [ 171s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 171s] Makefile:460: recipe for target 'all-recursive' failed [ 171s] make[2]: *** [all-recursive] Error 1 [ 171s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 171s] Makefile:392: recipe for target 'all' failed [ 171s] make[1]: *** [all] Error 2 [ 171s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 171s] dh_auto_build: make -j1 returned exit code 2 [ 171s] debian/rules:45: recipe for target 'build' failed [ 171s] make: *** [build] Error 2 [ 171s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 171s] [ 171s] lamb22 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:19:51 UTC 2017. [ 171s] [ 171s] ### VM INTERACTION START ### [ 174s] [ 148.102880] reboot: Power down [ 174s] ### VM INTERACTION END ### [ 174s] [ 174s] lamb22 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:19:55 UTC 2017. [ 174s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:20:43 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:20:43 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a21b9ba27ccf_1d317e0f549561f9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 124s] from msc_ifaces.c:24: [ 124s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 124s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 124s] ^~~~~~~~~~~~~ [ 124s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 124s] make[4]: *** [msc_ifaces.o] Error 1 [ 124s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 124s] Makefile:424: recipe for target 'all-recursive' failed [ 124s] make[3]: *** [all-recursive] Error 1 [ 124s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 124s] Makefile:460: recipe for target 'all-recursive' failed [ 124s] make[2]: *** [all-recursive] Error 1 [ 124s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 124s] Makefile:392: recipe for target 'all' failed [ 124s] make[1]: *** [all] Error 2 [ 124s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 124s] dh_auto_build: make -j1 returned exit code 2 [ 124s] debian/rules:45: recipe for target 'build' failed [ 124s] make: *** [build] Error 2 [ 124s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 124s] [ 124s] cloud107 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:20:29 UTC 2017. [ 124s] [ 124s] ### VM INTERACTION START ### [ 127s] [ 103.788655] reboot: Power down [ 130s] ### VM INTERACTION END ### [ 132s] [ 132s] cloud107 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:20:37 UTC 2017. [ 132s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:23:17 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:23:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a21ba56a67fa_1d317e0f549569af@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 124s] from msc_ifaces.c:24: [ 124s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 124s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 124s] ^~~~~~~~~~~~~ [ 124s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 124s] make[4]: *** [msc_ifaces.o] Error 1 [ 124s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 124s] Makefile:424: recipe for target 'all-recursive' failed [ 124s] make[3]: *** [all-recursive] Error 1 [ 124s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 124s] Makefile:460: recipe for target 'all-recursive' failed [ 124s] make[2]: *** [all-recursive] Error 1 [ 124s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 124s] Makefile:392: recipe for target 'all' failed [ 124s] make[1]: *** [all] Error 2 [ 124s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 124s] dh_auto_build: make -j1 returned exit code 2 [ 124s] debian/rules:45: recipe for target 'build' failed [ 124s] make: *** [build] Error 2 [ 124s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 124s] [ 124s] cloud112 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:02 UTC 2017. [ 124s] [ 124s] ### VM INTERACTION START ### [ 127s] [ 107.108360] reboot: Power down [ 128s] ### VM INTERACTION END ### [ 128s] [ 128s] cloud112 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:07 UTC 2017. [ 128s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:23:34 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:23:34 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a21ba5771e83_1d317e0f549570fa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 82s] from msc_ifaces.c:24: [ 82s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 82s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 82s] ^~~~~~~~~~~~~ [ 82s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 82s] make[4]: *** [msc_ifaces.o] Error 1 [ 82s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 82s] Makefile:424: recipe for target 'all-recursive' failed [ 82s] make[3]: *** [all-recursive] Error 1 [ 82s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 82s] Makefile:460: recipe for target 'all-recursive' failed [ 82s] make[2]: *** [all-recursive] Error 1 [ 82s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 82s] Makefile:392: recipe for target 'all' failed [ 82s] make[1]: *** [all] Error 2 [ 82s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 82s] dh_auto_build: make -j1 returned exit code 2 [ 82s] debian/rules:45: recipe for target 'build' failed [ 82s] make: *** [build] Error 2 [ 82s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 82s] [ 82s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:18 UTC 2017. [ 82s] [ 82s] ### VM INTERACTION START ### [ 85s] [ 75.760318] reboot: Power down [ 85s] ### VM INTERACTION END ### [ 85s] [ 85s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:21 UTC 2017. [ 85s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:23:51 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:23:51 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a21ba6d6583a_1d317e0f549571cf@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 204s] from msc_ifaces.c:24: [ 204s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 204s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 204s] ^ [ 204s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 204s] make[4]: *** [msc_ifaces.o] Error 1 [ 204s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 204s] Makefile:424: recipe for target 'all-recursive' failed [ 204s] make[3]: *** [all-recursive] Error 1 [ 204s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 204s] Makefile:460: recipe for target 'all-recursive' failed [ 204s] make[2]: *** [all-recursive] Error 1 [ 204s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 204s] Makefile:392: recipe for target 'all' failed [ 204s] make[1]: *** [all] Error 2 [ 204s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 204s] dh_auto_build: make -j1 returned exit code 2 [ 204s] debian/rules:45: recipe for target 'build' failed [ 204s] make: *** [build] Error 2 [ 204s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 204s] [ 204s] lamb14 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:43 UTC 2017. [ 204s] [ 204s] ### VM INTERACTION START ### [ 208s] [ 194.340213] reboot: Power down [ 208s] ### VM INTERACTION END ### [ 208s] [ 208s] lamb14 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:23:47 UTC 2017. [ 208s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:25:34 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:25:34 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a21bac956e7e_1d317e0f549574d6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 86s] from msc_ifaces.c:24: [ 86s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 86s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 86s] ^~~~~~~~~~~~~ [ 86s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 86s] make[4]: *** [msc_ifaces.o] Error 1 [ 86s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 86s] Makefile:424: recipe for target 'all-recursive' failed [ 86s] make[3]: *** [all-recursive] Error 1 [ 86s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 86s] Makefile:460: recipe for target 'all-recursive' failed [ 86s] make[2]: *** [all-recursive] Error 1 [ 86s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 86s] Makefile:392: recipe for target 'all' failed [ 86s] make[1]: *** [all] Error 2 [ 86s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 86s] dh_auto_build: make -j1 returned exit code 2 [ 86s] debian/rules:45: recipe for target 'build' failed [ 86s] make: *** [build] Error 2 [ 86s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 86s] [ 86s] lamb06 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:25:28 UTC 2017. [ 86s] [ 86s] ### VM INTERACTION START ### [ 89s] [ 81.544327] reboot: Power down [ 89s] ### VM INTERACTION END ### [ 89s] [ 89s] lamb06 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:25:31 UTC 2017. [ 89s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 20:26:43 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 20:26:43 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a21bb053b93f_1d317e0f5495769a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 141s] from msc_ifaces.c:24: [ 141s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 141s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 141s] ^ [ 141s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 141s] make[4]: *** [msc_ifaces.o] Error 1 [ 141s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 141s] Makefile:424: recipe for target 'all-recursive' failed [ 141s] make[3]: *** [all-recursive] Error 1 [ 141s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 141s] Makefile:460: recipe for target 'all-recursive' failed [ 141s] make[2]: *** [all-recursive] Error 1 [ 141s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 141s] Makefile:392: recipe for target 'all' failed [ 141s] make[1]: *** [all] Error 2 [ 141s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 141s] dh_auto_build: make -j1 returned exit code 2 [ 141s] debian/rules:45: recipe for target 'build' failed [ 141s] make: *** [build] Error 2 [ 141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 141s] [ 141s] lamb26 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:26:28 UTC 2017. [ 141s] [ 141s] ### VM INTERACTION START ### [ 145s] [ 138.463474] reboot: Power down [ 145s] ### VM INTERACTION END ### [ 145s] [ 145s] lamb26 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 20:26:31 UTC 2017. [ 145s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 1 21:34:24 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Dec 2017 21:34:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a21caf72ad12_1d317e0f5498237a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 619s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 619s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 619s] ^~~~~~~~~~~~~ [ 619s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 619s] make[4]: *** [msc_ifaces.o] Error 1 [ 619s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 619s] Makefile:424: recipe for target 'all-recursive' failed [ 619s] make[3]: *** [all-recursive] Error 1 [ 619s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 619s] Makefile:460: recipe for target 'all-recursive' failed [ 619s] make[2]: *** [all-recursive] Error 1 [ 619s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 619s] Makefile:392: recipe for target 'all' failed [ 619s] make[1]: *** [all] Error 2 [ 619s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 619s] dh_auto_build: make -j1 returned exit code 2 [ 619s] debian/rules:45: recipe for target 'build' failed [ 619s] make: *** [build] Error 2 [ 619s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 619s] [ 619s] obs-arm-1 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 21:34:09 UTC 2017. [ 619s] [ 619s] ### VM INTERACTION START ### [ 622s] [ 570.332968] sysrq: SysRq : Power Off [ 623s] [ 570.357059] reboot: Power down [ 623s] ### VM INTERACTION END ### [ 623s] [ 623s] obs-arm-1 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec 1 21:34:12 UTC 2017. [ 623s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 2 00:30:32 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 02 Dec 2017 00:30:32 +0000 Subject: Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a21f44569093_1d317e0f54110706c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-msc Last lines of build log: [ 874s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared here [ 874s] struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t rtp_endpoint, [ 874s] ^~~~~~~~~~~~~ [ 874s] Makefile:508: recipe for target 'msc_ifaces.o' failed [ 874s] make[4]: *** [msc_ifaces.o] Error 1 [ 874s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc' [ 874s] Makefile:424: recipe for target 'all-recursive' failed [ 874s] make[3]: *** [all-recursive] Error 1 [ 874s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 874s] Makefile:460: recipe for target 'all-recursive' failed [ 874s] make[2]: *** [all-recursive] Error 1 [ 874s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 874s] Makefile:392: recipe for target 'all' failed [ 874s] make[1]: *** [all] Error 2 [ 874s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 874s] dh_auto_build: make -j1 returned exit code 2 [ 874s] debian/rules:45: recipe for target 'build' failed [ 874s] make: *** [build] Error 2 [ 874s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 874s] [ 874s] armbuild22 failed "build osmo-msc_1.1.2.20171201.dsc" at Sat Dec 2 00:30:12 UTC 2017. [ 874s] [ 874s] ### VM INTERACTION START ### [ 877s] [ 820.383096] SysRq : Power Off [ 878s] [ 820.459759] reboot: Power down [ 878s] ### VM INTERACTION END ### [ 878s] [ 878s] armbuild22 failed "build osmo-msc_1.1.2.20171201.dsc" at Sat Dec 2 00:30:16 UTC 2017. [ 878s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Dec 2 15:30:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 15:30:24 +0000 Subject: [PATCH] osmo-bts[master]: Comments on individual members of struct gsm_abis_mo Message-ID: Review at https://gerrit.osmocom.org/5124 Comments on individual members of struct gsm_abis_mo Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 --- M include/osmo-bts/gsm_data_shared.h 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/5124/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index c19b125..82c8243 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -107,12 +107,19 @@ }; struct gsm_abis_mo { + /* A-bis OML Object Class */ uint8_t obj_class; + /* is there still some procedure pending? */ uint8_t procedure_pending; + /* A-bist OML Object Instance */ struct abis_om_obj_inst obj_inst; + /* human-readable name */ const char *name; + /* NM State */ struct gsm_nm_state nm_state; + /* Attributes configured in this MO */ struct tlv_parsed *nm_attr; + /* BTS to which this MO belongs */ struct gsm_bts *bts; }; -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 15:30:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 15:30:26 +0000 Subject: [PATCH] osmo-bts[master]: scheduler: Harmonize log line format; Always print TS name +... Message-ID: Review at https://gerrit.osmocom.org/5125 scheduler: Harmonize log line format; Always print TS name + decoded FN Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 93 insertions(+), 144 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/5125/1 diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index af1cfbf..5e077ef 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -1,5 +1,11 @@ #pragma once +#define LOGL1S(subsys, level, l1t, tn, chan, fn, fmt, args ...) \ + LOGP(subsys, level, "%s %s %s: " fmt, \ + gsm_fn_as_gsmtime_str(fn), \ + gsm_ts_name(&(l1t)->trx->ts[tn]), \ + chan >=0 ? trx_chan_desc[chan].name : "", ## args) + typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan); diff --git a/src/common/scheduler.c b/src/common/scheduler.c index f6cb07e..21232d5 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -282,8 +282,7 @@ l1sap = msgb_l1sap_prim(msg); if (l1sap->oph.operation != PRIM_OP_REQUEST) { wrong_type: - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has " - "wrong type.\n", tn, fn); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong type.\n"); free_msg: /* unlink and free message */ llist_del(&msg->list); @@ -305,14 +304,12 @@ goto wrong_type; } if (prim_fn > 100) { - LOGP(DL1P, LOGL_NOTICE, "Prim %u for trx=%u ts=%u at " - "fn=%u is out of range (100), or channel %s with " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, + "Prim %u for is out of range (100), or channel %s with " "type %s is already disabled. If this happens in " - "conjunction with PCU, increase 'rts-advance' by 5." - " (current fn=%u)\n", prim_fn, l1t->trx->nr, tn, - l1sap->u.data.fn, - get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, - get_value_string(trx_chan_type_names, chan), fn); + "conjunction with PCU, increase 'rts-advance' by 5.", + prim_fn, get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, + get_value_string(trx_chan_type_names, chan)); /* unlink and free message */ llist_del(&msg->list); msgb_free(msg); @@ -329,11 +326,9 @@ found_msg: if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn)) || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) { - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has wrong " - "chan_nr=%02x link_id=%02x, expecting chan_nr=%02x " - "link_id=%02x.\n", tn, fn, chan_nr, link_id, - trx_chan_desc[chan].chan_nr | tn, - trx_chan_desc[chan].link_id); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=%02x link_id=%02x, " + "expecting chan_nr=%02x link_id=%02x.\n", chan_nr, link_id, + trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id); goto free_msg; } @@ -418,9 +413,9 @@ uint8_t tn = l1sap->u.data.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.data.chan_nr, - l1sap->u.data.link_id, l1sap->u.data.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.data.fn, + "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x\n", + l1sap->u.data.chan_nr, l1sap->u.data.link_id); if (!l1sap->oph.msg) abort(); @@ -441,9 +436,8 @@ uint8_t tn = l1sap->u.tch.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "TCH.req: chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.tch.chan_nr, - l1sap->u.tch.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.tch.fn, "TCH.req: chan_nr=0x%02x\n", + l1sap->u.tch.chan_nr); if (!l1sap->oph.msg) abort(); @@ -477,14 +471,13 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "PH-RTS.ind: chan=%s chan_nr=0x%02x " - "link_id=0x%02x fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, link_id, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, + "PH-RTS.ind: chan_nr=0x%02x link_id=0x%02x\n", chan_nr, link_id); /* generate prim */ msg = l1sap_msgb_alloc(200); @@ -514,14 +507,12 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "TCH RTS.ind: chan=%s chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "TCH RTS.ind: chan_nr=0x%02x\n", chan_nr); /* only send, if FACCH is selected */ if (facch) { diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index c849dd5..cb06426 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -75,8 +75,7 @@ ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -88,8 +87,7 @@ ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -108,8 +106,7 @@ struct gsm_time t; uint8_t t3p, bsic; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); /* BURST BYPASS */ @@ -173,9 +170,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -188,7 +183,7 @@ got_msg: /* check validity of message */ if (msgb_l2len(msg) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); @@ -239,8 +234,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -269,9 +263,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -299,7 +291,7 @@ /* check validity of message */ if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "Prim invalid length, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " "(len=%ld)\n", msg->tail - msg->l2h); /* free message */ msgb_free(msg); @@ -337,8 +329,7 @@ *nbits = GSM_BURST_LEN; } - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -367,8 +358,8 @@ uint8_t tch_data[GSM_FR_BYTES]; int len; - LOGP(DL1C, LOGL_NOTICE, "Missing TCH bursts detected, sending " - "BFI for %s\n", trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Missing TCH bursts detected, sending BFI\n"); /* indicate bad frame */ switch (tch_mode) { @@ -399,8 +390,7 @@ break; default: inval_mode1: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn,"TCH mode invalid, please fix!\n"); len = 0; } if (len) @@ -417,8 +407,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive == PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "TCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "TCH twice, please FIX!\n"); msgb_free(msg2); } else msg_facch = msg2; @@ -428,8 +418,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive != PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "FACCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "FACCH twice, please FIX!\n"); msgb_free(msg2); } else msg_tch = msg2; @@ -445,7 +435,7 @@ /* check validity of message */ if (msg_facch && msgb_l2len(msg_facch) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg_facch)); /* free message */ msgb_free(msg_facch); @@ -462,10 +452,8 @@ int8_t sti, cmi; if (rsl_cmode != RSL_CMOD_SPD_SPEECH) { - LOGP(DL1C, LOGL_NOTICE, "%s Dropping speech frame, " - "because we are not in speech mode trx=%u " - "ts=%u at fn=%u.\n", trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " + "because we are not in speech mode\n"); goto free_bad_msg; } @@ -502,43 +490,33 @@ trx_loop_amr_set(chan_state, 1); } if (ft < 0) { - LOGP(DL1C, LOGL_ERROR, "%s Codec (FT = %d) " - " of RTP frame not in list. " - "trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "Codec (FT = %d) of RTP frame not in list\n", ft_codec); goto free_bad_msg; } if (fn_is_codec_mode_request(fn) && chan_state->dl_ft != ft) { - LOGP(DL1C, LOGL_NOTICE, "%s Codec (FT = %d) " - " of RTP cannot be changed now, but in " - "next frame. trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " + " of RTP cannot be changed now, but in next frame\n", ft_codec); goto free_bad_msg; } chan_state->dl_ft = ft; if (bfi == AMR_BAD) { - LOGP(DL1C, LOGL_NOTICE, "%s Transmitting 'bad " - "AMR frame' trx=%u ts=%u at fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Transmitting 'bad AMR frame'\n"); goto free_bad_msg; } break; default: inval_mode2: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); goto free_bad_msg; } if (len < 0) { - LOGP(DL1C, LOGL_ERROR, "Cannot send invalid AMR " - "payload\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); goto free_bad_msg; } if (msgb_l2len(msg_tch) != len) { - LOGP(DL1C, LOGL_ERROR, "Cannot send payload with " + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " "invalid length! (expecting %d, received %d)\n", len, msgb_l2len(msg_tch)); free_bad_msg: @@ -590,9 +568,7 @@ /* no message at all */ if (!msg_tch && !msg_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -630,8 +606,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -660,9 +635,8 @@ /* check for FACCH alignment */ if (msg_facch && ((((fn + 4) % 26) >> 2) & 1)) { - LOGP(DL1C, LOGL_ERROR, "%s Cannot transmit FACCH starting on " - "even frames, please fix RTS!\n", - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " + "even frames, please fix RTS!\n"); msgb_free(msg_facch); msg_facch = NULL; } @@ -687,9 +661,7 @@ /* no message at all */ if (!msg_tch && !msg_facch && !chan_state->dl_ongoing_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -729,8 +701,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -751,14 +722,12 @@ chan_nr = trx_chan_desc[chan].chan_nr | tn; - LOGP(DL1C, LOGL_DEBUG, "Received Access Burst on %s fn=%u toa=%.2f\n", - trx_chan_desc[chan].name, fn, toa); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad AB frame at fn=%u " - "(%u/51)\n", fn, fn % 51); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; } @@ -809,8 +778,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "Data received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -854,10 +822,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete data frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); /* we require first burst to have correct FN */ if (!(*mask & 0x1)) { @@ -870,10 +836,8 @@ /* decode */ rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad data frame at fn=%u " - "(%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); l2_len = 0; } else l2_len = GSM_MACBLOCK_LEN; @@ -906,8 +870,7 @@ uint16_t ber10k; int rc; - LOGP(DL1C, LOGL_DEBUG, "PDTCH received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -953,10 +916,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_DEBUG, "Received incomplete PDTCH block " - "ending at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -980,9 +941,8 @@ n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { - LOGP(DL1C, LOGL_DEBUG, "Received bad PDTCH block ending at " - "fn=%u (%u/%u) for %s\n", fn, fn % l1ts->mf_period, - l1ts->mf_period, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); return 0; } ber10k = compute_ber10k(n_bits_total, n_errors); @@ -1012,8 +972,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/F received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1042,10 +1001,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1083,7 +1040,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1095,14 +1052,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1138,8 +1094,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } @@ -1179,8 +1135,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/H received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1209,10 +1164,8 @@ /* check for complete set of bursts */ if ((*mask & 0x3) != 0x3) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1260,7 +1213,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1273,14 +1226,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1313,8 +1265,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:31:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:31:35 +0000 Subject: [PATCH] osmo-mgw[master]: Revert "mgcp_client: don't configure "bts base"" until osmo-... Message-ID: Review at https://gerrit.osmocom.org/5126 Revert "mgcp_client: don't configure "bts base"" until osmo-msc is ready OsmoMSC is in the odd situation that it is already using the new libosmo-mgcp-client, which is targeted at osmo-mgw, to configure talking to the old osmo-bsc_mgcp. By removing the bts_base, we break current OsmoMSC. Removing bts_base makes sense, but let's revert this until OsmoMSC is ready after merging Ieea9630358b3963261fa1993cf1f3b563ff23538 (which moves the osmo-msc over to osmo-mgw). This reverts commit 0be3ce66c058f39e07f7a1c93a9bf632fb936edf. Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_vty.c 3 files changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/26/5126/1 diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 8a2c404..1a6cbce 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -21,6 +21,7 @@ int remote_port; uint16_t first_endpoint; uint16_t last_endpoint; + uint16_t bts_base; }; typedef unsigned int mgcp_trans_id_t; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index a35ad6f..2047637 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -45,6 +45,7 @@ .remote_port = -1, .first_endpoint = 0, .last_endpoint = 0, + .bts_base = 0, }; } @@ -382,6 +383,7 @@ mgcp->actual.first_endpoint = conf->first_endpoint > 0 ? (uint16_t)conf->first_endpoint : 0; mgcp->actual.last_endpoint = conf->last_endpoint > 0 ? (uint16_t)conf->last_endpoint : 0; + mgcp->actual.bts_base = conf->bts_base > 0 ? (uint16_t)conf->bts_base : 4000; return mgcp; } diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index 1d58bb5..f8129c0 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -123,12 +123,32 @@ "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") +#define BTS_START_STR "First UDP port allocated for the BTS side\n" +#define UDP_PORT_STR "UDP Port number\n" +DEFUN(cfg_mgw_rtp_bts_base_port, + cfg_mgw_rtp_bts_base_port_cmd, + "mgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) +{ + global_mgcp_client_conf->bts_base = atoi(argv[0]); + return CMD_SUCCESS; +} +ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, + cfg_mgcpgw_rtp_bts_base_port_cmd, + "mgcpgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) + int mgcp_client_config_write(struct vty *vty, const char *indent) { const char *addr; int port; uint16_t first_endpoint; uint16_t last_endpoint; + uint16_t bts_base; addr = global_mgcp_client_conf->local_addr; if (addr) @@ -155,6 +175,12 @@ first_endpoint, last_endpoint, VTY_NEWLINE); } + bts_base = global_mgcp_client_conf->bts_base; + if (bts_base) { + vty_out(vty, "%smgw bts-base %u%s", indent, + bts_base, VTY_NEWLINE); + } + return CMD_SUCCESS; } @@ -168,6 +194,7 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); + install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -175,4 +202,5 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); + install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/5126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:31:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:31:34 +0000 Subject: osmo-mgw[master]: Revert "mgcp_client: don't configure "bts base"" until osmo-... In-Reply-To: References: Message-ID: Neels Hofmeyr has reverted this change. Change subject: Revert "mgcp_client: don't configure "bts base"" until osmo-msc is ready ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/5126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:32:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:32:08 +0000 Subject: osmo-mgw[master]: Revert "mgcp_client: don't configure "bts base"" until osmo-... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:37:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:37:18 +0000 Subject: [MERGED] osmo-mgw[master]: Revert "mgcp_client: don't configure "bts base"" until osmo-... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Revert "mgcp_client: don't configure "bts base"" until osmo-msc is ready ...................................................................... Revert "mgcp_client: don't configure "bts base"" until osmo-msc is ready OsmoMSC is in the odd situation that it is already using the new libosmo-mgcp-client, which is targeted at osmo-mgw, to configure talking to the old osmo-bsc_mgcp. By removing the bts_base, we break current OsmoMSC. Removing bts_base makes sense, but let's revert this until OsmoMSC is ready after merging Ieea9630358b3963261fa1993cf1f3b563ff23538 (which moves the osmo-msc over to osmo-mgw). This reverts commit 0be3ce66c058f39e07f7a1c93a9bf632fb936edf. Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_vty.c 3 files changed, 31 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 19abaf3..cf5e8c4 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -21,6 +21,7 @@ int remote_port; uint16_t first_endpoint; uint16_t last_endpoint; + uint16_t bts_base; }; typedef unsigned int mgcp_trans_id_t; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 5cd14f7..ee8d267 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -45,6 +45,7 @@ .remote_port = -1, .first_endpoint = 0, .last_endpoint = 0, + .bts_base = 0, }; } @@ -439,6 +440,7 @@ mgcp->actual.first_endpoint = conf->first_endpoint > 0 ? (uint16_t)conf->first_endpoint : 0; mgcp->actual.last_endpoint = conf->last_endpoint > 0 ? (uint16_t)conf->last_endpoint : 0; + mgcp->actual.bts_base = conf->bts_base > 0 ? (uint16_t)conf->bts_base : 4000; return mgcp; } diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c b/src/libosmo-mgcp-client/mgcp_client_vty.c index 1d58bb5..f8129c0 100644 --- a/src/libosmo-mgcp-client/mgcp_client_vty.c +++ b/src/libosmo-mgcp-client/mgcp_client_vty.c @@ -123,12 +123,32 @@ "set first useable endpoint identifier\n" "set the last useable endpoint identifier\n") +#define BTS_START_STR "First UDP port allocated for the BTS side\n" +#define UDP_PORT_STR "UDP Port number\n" +DEFUN(cfg_mgw_rtp_bts_base_port, + cfg_mgw_rtp_bts_base_port_cmd, + "mgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) +{ + global_mgcp_client_conf->bts_base = atoi(argv[0]); + return CMD_SUCCESS; +} +ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port, + cfg_mgcpgw_rtp_bts_base_port_cmd, + "mgcpgw bts-base <0-65534>", + MGW_STR + BTS_START_STR + UDP_PORT_STR) + int mgcp_client_config_write(struct vty *vty, const char *indent) { const char *addr; int port; uint16_t first_endpoint; uint16_t last_endpoint; + uint16_t bts_base; addr = global_mgcp_client_conf->local_addr; if (addr) @@ -155,6 +175,12 @@ first_endpoint, last_endpoint, VTY_NEWLINE); } + bts_base = global_mgcp_client_conf->bts_base; + if (bts_base) { + vty_out(vty, "%smgw bts-base %u%s", indent, + bts_base, VTY_NEWLINE); + } + return CMD_SUCCESS; } @@ -168,6 +194,7 @@ install_element(node, &cfg_mgw_remote_ip_cmd); install_element(node, &cfg_mgw_remote_port_cmd); install_element(node, &cfg_mgw_endpoint_range_cmd); + install_element(node, &cfg_mgw_rtp_bts_base_port_cmd); /* deprecated 'mgcpgw' commands */ install_element(node, &cfg_mgcpgw_local_ip_cmd); @@ -175,4 +202,5 @@ install_element(node, &cfg_mgcpgw_remote_ip_cmd); install_element(node, &cfg_mgcpgw_remote_port_cmd); install_element(node, &cfg_mgcpgw_endpoint_range_cmd); + install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd); } -- To view, visit https://gerrit.osmocom.org/5126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibce214c2bfc35623097abbb647619426ef3dcc94 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:53:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:53:39 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 2: elsewhere it seems we are confirming the hex nature of endpoint IDs (or was that a connection identifier?) ... Possibly this needs to be fixed the other way, by libosmo-mgcp-client translating the number-of-endpoints to a hex representation? -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:57:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:57:20 +0000 Subject: osmo-bts[master]: Comments on individual members of struct gsm_abis_mo In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5124/1/include/osmo-bts/gsm_data_shared.h File include/osmo-bts/gsm_data_shared.h: Line 114: /* A-bist OML Object Instance */ 'bis' -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:57:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:57:50 +0000 Subject: [PATCH] osmo-bts[master]: Comments on individual members of struct gsm_abis_mo In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5124 to look at the new patch set (#2). Comments on individual members of struct gsm_abis_mo Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 --- M include/osmo-bts/gsm_data_shared.h 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/5124/2 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index c19b125..4c0fe5c 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -107,12 +107,19 @@ }; struct gsm_abis_mo { + /* A-bis OML Object Class */ uint8_t obj_class; + /* is there still some procedure pending? */ uint8_t procedure_pending; + /* A-bis OML Object Instance */ struct abis_om_obj_inst obj_inst; + /* human-readable name */ const char *name; + /* NM State */ struct gsm_nm_state nm_state; + /* Attributes configured in this MO */ struct tlv_parsed *nm_attr; + /* BTS to which this MO belongs */ struct gsm_bts *bts; }; -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 18:58:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 18:58:04 +0000 Subject: osmo-bts[master]: Comments on individual members of struct gsm_abis_mo In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 19:09:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 19:09:29 +0000 Subject: osmo-bts[master]: scheduler: Harmonize log line format; Always print TS name +... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (8 comments) just -1ing to indicate that there are comments... nothing critical. https://gerrit.osmocom.org/#/c/5125/1/src/common/scheduler.c File src/common/scheduler.c: Line 308: "Prim %u for is out of range (100), or channel %s with " I guess drop 'for' Line 329: LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=%02x link_id=%02x, " maybe log prim_fn like above? I might be mistaken, am confused by prim_fn vs. fn... https://gerrit.osmocom.org/#/c/5125/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: Line 173: LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); "to transmit"? Line 266: LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); "to transmit" Line 294: LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " ("has invalid length"?) Line 393: LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn,"TCH mode invalid, please fix!\n"); (space after comma) Line 571: LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); to Line 664: LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); hmm there seems to be a scheme here. It is "for transmission" or "to transmit" ... admittedly not that awfully important either. -- To view, visit https://gerrit.osmocom.org/5125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:05:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:05:36 +0000 Subject: [PATCH] osmo-bts[master]: scheduler: Harmonize log line format; Always print TS name +... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5125 to look at the new patch set (#2). scheduler: Harmonize log line format; Always print TS name + decoded FN Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 93 insertions(+), 144 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/5125/2 diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index af1cfbf..5e077ef 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -1,5 +1,11 @@ #pragma once +#define LOGL1S(subsys, level, l1t, tn, chan, fn, fmt, args ...) \ + LOGP(subsys, level, "%s %s %s: " fmt, \ + gsm_fn_as_gsmtime_str(fn), \ + gsm_ts_name(&(l1t)->trx->ts[tn]), \ + chan >=0 ? trx_chan_desc[chan].name : "", ## args) + typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan); diff --git a/src/common/scheduler.c b/src/common/scheduler.c index f6cb07e..efd7666 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -282,8 +282,7 @@ l1sap = msgb_l1sap_prim(msg); if (l1sap->oph.operation != PRIM_OP_REQUEST) { wrong_type: - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has " - "wrong type.\n", tn, fn); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong type.\n"); free_msg: /* unlink and free message */ llist_del(&msg->list); @@ -305,14 +304,12 @@ goto wrong_type; } if (prim_fn > 100) { - LOGP(DL1P, LOGL_NOTICE, "Prim %u for trx=%u ts=%u at " - "fn=%u is out of range (100), or channel %s with " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, + "Prim %u is out of range (100), or channel %s with " "type %s is already disabled. If this happens in " - "conjunction with PCU, increase 'rts-advance' by 5." - " (current fn=%u)\n", prim_fn, l1t->trx->nr, tn, - l1sap->u.data.fn, - get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, - get_value_string(trx_chan_type_names, chan), fn); + "conjunction with PCU, increase 'rts-advance' by 5.", + prim_fn, get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, + get_value_string(trx_chan_type_names, chan)); /* unlink and free message */ llist_del(&msg->list); msgb_free(msg); @@ -329,11 +326,9 @@ found_msg: if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn)) || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) { - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has wrong " - "chan_nr=%02x link_id=%02x, expecting chan_nr=%02x " - "link_id=%02x.\n", tn, fn, chan_nr, link_id, - trx_chan_desc[chan].chan_nr | tn, - trx_chan_desc[chan].link_id); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=%02x link_id=%02x, " + "expecting chan_nr=%02x link_id=%02x.\n", chan_nr, link_id, + trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id); goto free_msg; } @@ -418,9 +413,9 @@ uint8_t tn = l1sap->u.data.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.data.chan_nr, - l1sap->u.data.link_id, l1sap->u.data.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.data.fn, + "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x\n", + l1sap->u.data.chan_nr, l1sap->u.data.link_id); if (!l1sap->oph.msg) abort(); @@ -441,9 +436,8 @@ uint8_t tn = l1sap->u.tch.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "TCH.req: chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.tch.chan_nr, - l1sap->u.tch.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.tch.fn, "TCH.req: chan_nr=0x%02x\n", + l1sap->u.tch.chan_nr); if (!l1sap->oph.msg) abort(); @@ -477,14 +471,13 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "PH-RTS.ind: chan=%s chan_nr=0x%02x " - "link_id=0x%02x fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, link_id, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, + "PH-RTS.ind: chan_nr=0x%02x link_id=0x%02x\n", chan_nr, link_id); /* generate prim */ msg = l1sap_msgb_alloc(200); @@ -514,14 +507,12 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "TCH RTS.ind: chan=%s chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "TCH RTS.ind: chan_nr=0x%02x\n", chan_nr); /* only send, if FACCH is selected */ if (facch) { diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index c849dd5..81984c2 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -75,8 +75,7 @@ ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -88,8 +87,7 @@ ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -108,8 +106,7 @@ struct gsm_time t; uint8_t t3p, bsic; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); /* BURST BYPASS */ @@ -173,9 +170,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -188,7 +183,7 @@ got_msg: /* check validity of message */ if (msgb_l2len(msg) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); @@ -239,8 +234,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -269,9 +263,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -299,7 +291,7 @@ /* check validity of message */ if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "Prim invalid length, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " "(len=%ld)\n", msg->tail - msg->l2h); /* free message */ msgb_free(msg); @@ -337,8 +329,7 @@ *nbits = GSM_BURST_LEN; } - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -367,8 +358,8 @@ uint8_t tch_data[GSM_FR_BYTES]; int len; - LOGP(DL1C, LOGL_NOTICE, "Missing TCH bursts detected, sending " - "BFI for %s\n", trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Missing TCH bursts detected, sending BFI\n"); /* indicate bad frame */ switch (tch_mode) { @@ -399,8 +390,7 @@ break; default: inval_mode1: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); len = 0; } if (len) @@ -417,8 +407,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive == PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "TCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "TCH twice, please FIX!\n"); msgb_free(msg2); } else msg_facch = msg2; @@ -428,8 +418,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive != PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "FACCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "FACCH twice, please FIX!\n"); msgb_free(msg2); } else msg_tch = msg2; @@ -445,7 +435,7 @@ /* check validity of message */ if (msg_facch && msgb_l2len(msg_facch) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg_facch)); /* free message */ msgb_free(msg_facch); @@ -462,10 +452,8 @@ int8_t sti, cmi; if (rsl_cmode != RSL_CMOD_SPD_SPEECH) { - LOGP(DL1C, LOGL_NOTICE, "%s Dropping speech frame, " - "because we are not in speech mode trx=%u " - "ts=%u at fn=%u.\n", trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " + "because we are not in speech mode\n"); goto free_bad_msg; } @@ -502,43 +490,33 @@ trx_loop_amr_set(chan_state, 1); } if (ft < 0) { - LOGP(DL1C, LOGL_ERROR, "%s Codec (FT = %d) " - " of RTP frame not in list. " - "trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "Codec (FT = %d) of RTP frame not in list\n", ft_codec); goto free_bad_msg; } if (fn_is_codec_mode_request(fn) && chan_state->dl_ft != ft) { - LOGP(DL1C, LOGL_NOTICE, "%s Codec (FT = %d) " - " of RTP cannot be changed now, but in " - "next frame. trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " + " of RTP cannot be changed now, but in next frame\n", ft_codec); goto free_bad_msg; } chan_state->dl_ft = ft; if (bfi == AMR_BAD) { - LOGP(DL1C, LOGL_NOTICE, "%s Transmitting 'bad " - "AMR frame' trx=%u ts=%u at fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Transmitting 'bad AMR frame'\n"); goto free_bad_msg; } break; default: inval_mode2: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); goto free_bad_msg; } if (len < 0) { - LOGP(DL1C, LOGL_ERROR, "Cannot send invalid AMR " - "payload\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); goto free_bad_msg; } if (msgb_l2len(msg_tch) != len) { - LOGP(DL1C, LOGL_ERROR, "Cannot send payload with " + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " "invalid length! (expecting %d, received %d)\n", len, msgb_l2len(msg_tch)); free_bad_msg: @@ -590,9 +568,7 @@ /* no message at all */ if (!msg_tch && !msg_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -630,8 +606,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -660,9 +635,8 @@ /* check for FACCH alignment */ if (msg_facch && ((((fn + 4) % 26) >> 2) & 1)) { - LOGP(DL1C, LOGL_ERROR, "%s Cannot transmit FACCH starting on " - "even frames, please fix RTS!\n", - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " + "even frames, please fix RTS!\n"); msgb_free(msg_facch); msg_facch = NULL; } @@ -687,9 +661,7 @@ /* no message at all */ if (!msg_tch && !msg_facch && !chan_state->dl_ongoing_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -729,8 +701,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -751,14 +722,12 @@ chan_nr = trx_chan_desc[chan].chan_nr | tn; - LOGP(DL1C, LOGL_DEBUG, "Received Access Burst on %s fn=%u toa=%.2f\n", - trx_chan_desc[chan].name, fn, toa); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad AB frame at fn=%u " - "(%u/51)\n", fn, fn % 51); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; } @@ -809,8 +778,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "Data received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -854,10 +822,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete data frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); /* we require first burst to have correct FN */ if (!(*mask & 0x1)) { @@ -870,10 +836,8 @@ /* decode */ rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad data frame at fn=%u " - "(%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); l2_len = 0; } else l2_len = GSM_MACBLOCK_LEN; @@ -906,8 +870,7 @@ uint16_t ber10k; int rc; - LOGP(DL1C, LOGL_DEBUG, "PDTCH received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -953,10 +916,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_DEBUG, "Received incomplete PDTCH block " - "ending at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -980,9 +941,8 @@ n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { - LOGP(DL1C, LOGL_DEBUG, "Received bad PDTCH block ending at " - "fn=%u (%u/%u) for %s\n", fn, fn % l1ts->mf_period, - l1ts->mf_period, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); return 0; } ber10k = compute_ber10k(n_bits_total, n_errors); @@ -1012,8 +972,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/F received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1042,10 +1001,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1083,7 +1040,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1095,14 +1052,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1138,8 +1094,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } @@ -1179,8 +1135,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/H received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1209,10 +1164,8 @@ /* check for complete set of bursts */ if ((*mask & 0x3) != 0x3) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1260,7 +1213,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1273,14 +1226,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1313,8 +1265,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:05:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:05:38 +0000 Subject: [PATCH] osmo-bts[master]: measurement.c: Fix various typos in comments Message-ID: Review at https://gerrit.osmocom.org/5133 measurement.c: Fix various typos in comments Change-Id: Ief208045664769406cd60a92a12c4b44988a98b4 --- M src/common/measurement.c 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/5133/1 diff --git a/src/common/measurement.c b/src/common/measurement.c index 3b32bf2..36120c0 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -8,8 +8,8 @@ #include #include -/* Measurment reporting period and mapping of SACCH message block for TCHF - * and TCHH chan As per in 3GPP TS 45.008, secton 8.4.1. +/* Measurement reporting period and mapping of SACCH message block for TCHF + * and TCHH chan As per in 3GPP TS 45.008, section 8.4.1. * * Timeslot number (TN) TDMA frame number (FN) modulo 104 * Half rate, Half rate, Reporting SACCH @@ -54,7 +54,7 @@ [7] = 77, }; -/* Measurment reporting period for SDCCH8 and SDCCH4 chan +/* Measurement reporting period for SDCCH8 and SDCCH4 chan * As per in 3GPP TS 45.008, section 8.4.2. * * Logical Chan TDMA frame number @@ -64,7 +64,7 @@ * SDCCH/4 37 to 36 */ -/* Added interleve offset to Meas period end Fn which +/* Added interleave offset to Meas period end Fn which * would reduce the Meas Res msg load at Abis */ static const uint8_t sdcch8_meas_rep_fn102[] = { @@ -86,14 +86,14 @@ }; /* Note: The reporting of the measurement results is done via the SACCH channel. - * The measurement interval is not alligned with the interval in which the - * SACCH is tranmitted. When we receive the measurement indication with the - * SACCH block, the coresponding measurement interval will already have ended + * The measurement interval is not aligned with the interval in which the + * SACCH is transmitted. When we receive the measurement indication with the + * SACCH block, the corresponding measurement interval will already have ended * and we will get the results late, but on spot with the beginning of the * next measurement interval. * * For example: We get a measurement indication on FN%104=38 in TS=2. Then we - * will have to look at 3GPP TS 45.008, secton 8.4.1 (or 3GPP TS 05.02 Clause 7 + * will have to look at 3GPP TS 45.008, section 8.4.1 (or 3GPP TS 05.02 Clause 7 * Table 1 of 9) what value we need to feed into the lookup tables in order to * detect the measurement period ending. In this example the "real" ending * was on FN%104=12. This is the value we have to look for in -- To view, visit https://gerrit.osmocom.org/5133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief208045664769406cd60a92a12c4b44988a98b4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:05:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:05:38 +0000 Subject: [PATCH] osmo-bts[master]: scheduler_trx: L1P is for PH (data), L1M for MPH (control) Message-ID: Review at https://gerrit.osmocom.org/5134 scheduler_trx: L1P is for PH (data), L1M for MPH (control) Almost all log statements in scheduler_trx.c were using the wrong logging subsystem. Let's fix this. Also, make it more obvious from the log subsystem help text Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14 --- M src/common/logging.c M src/osmo-bts-trx/scheduler_trx.c M src/osmo-bts-virtual/scheduler_virtbts.c 3 files changed, 50 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/34/5134/1 diff --git a/src/common/logging.c b/src/common/logging.c index 2911692..a4d30e6 100644 --- a/src/common/logging.c +++ b/src/common/logging.c @@ -68,13 +68,13 @@ }, [DL1C] = { .name = "DL1C", - .description = "Layer 1", + .description = "Layer 1 Control (MPH)", .loglevel = LOGL_INFO, .enabled = 1, }, [DL1P] = { .name = "DL1P", - .description = "Layer 1 Primitives", + .description = "Layer 1 Primitives (PH)", .loglevel = LOGL_INFO, .enabled = 0, }, diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 81984c2..0549156 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -75,7 +75,7 @@ ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -87,7 +87,7 @@ ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -106,7 +106,7 @@ struct gsm_time t; uint8_t t3p, bsic; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); /* BURST BYPASS */ @@ -170,7 +170,7 @@ if (msg) goto got_msg; - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -183,7 +183,7 @@ got_msg: /* check validity of message */ if (msgb_l2len(msg) != GSM_MACBLOCK_LEN) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); @@ -234,7 +234,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -263,7 +263,7 @@ if (msg) goto got_msg; - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -291,7 +291,7 @@ /* check validity of message */ if (rc < 0) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " "(len=%ld)\n", msg->tail - msg->l2h); /* free message */ msgb_free(msg); @@ -329,7 +329,7 @@ *nbits = GSM_BURST_LEN; } - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -358,7 +358,7 @@ uint8_t tch_data[GSM_FR_BYTES]; int len; - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Missing TCH bursts detected, sending BFI\n"); /* indicate bad frame */ @@ -390,7 +390,7 @@ break; default: inval_mode1: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); len = 0; } if (len) @@ -407,7 +407,7 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive == PRIM_TCH) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "TCH twice, please FIX!\n"); msgb_free(msg2); } else @@ -418,7 +418,7 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive != PRIM_TCH) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "FACCH twice, please FIX!\n"); msgb_free(msg2); } else @@ -435,7 +435,7 @@ /* check validity of message */ if (msg_facch && msgb_l2len(msg_facch) != GSM_MACBLOCK_LEN) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg_facch)); /* free message */ msgb_free(msg_facch); @@ -452,7 +452,7 @@ int8_t sti, cmi; if (rsl_cmode != RSL_CMOD_SPD_SPEECH) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " "because we are not in speech mode\n"); goto free_bad_msg; } @@ -490,33 +490,33 @@ trx_loop_amr_set(chan_state, 1); } if (ft < 0) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Codec (FT = %d) of RTP frame not in list\n", ft_codec); goto free_bad_msg; } if (fn_is_codec_mode_request(fn) && chan_state->dl_ft != ft) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " " of RTP cannot be changed now, but in next frame\n", ft_codec); goto free_bad_msg; } chan_state->dl_ft = ft; if (bfi == AMR_BAD) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Transmitting 'bad AMR frame'\n"); goto free_bad_msg; } break; default: inval_mode2: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); goto free_bad_msg; } if (len < 0) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); goto free_bad_msg; } if (msgb_l2len(msg_tch) != len) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " "invalid length! (expecting %d, received %d)\n", len, msgb_l2len(msg_tch)); free_bad_msg: @@ -568,7 +568,7 @@ /* no message at all */ if (!msg_tch && !msg_facch) { - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -606,7 +606,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -635,7 +635,7 @@ /* check for FACCH alignment */ if (msg_facch && ((((fn + 4) % 26) >> 2) & 1)) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " "even frames, please fix RTS!\n"); msgb_free(msg_facch); msg_facch = NULL; @@ -661,7 +661,7 @@ /* no message at all */ if (!msg_tch && !msg_facch && !chan_state->dl_ongoing_facch) { - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -701,7 +701,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -722,12 +722,12 @@ chan_nr = trx_chan_desc[chan].chan_nr | tn; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); if (rc) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; } @@ -778,7 +778,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -822,7 +822,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", *first_fn, (*first_fn) % l1ts->mf_period); /* we require first burst to have correct FN */ @@ -836,7 +836,7 @@ /* decode */ rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); if (rc) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", *first_fn, (*first_fn) % l1ts->mf_period); l2_len = 0; } else @@ -870,7 +870,7 @@ uint16_t ber10k; int rc; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -916,7 +916,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -941,7 +941,7 @@ n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); return 0; } @@ -972,7 +972,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1001,7 +1001,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1040,7 +1040,7 @@ } break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1052,12 +1052,12 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1094,7 +1094,7 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1135,7 +1135,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1164,7 +1164,7 @@ /* check for complete set of bursts */ if ((*mask & 0x3) != 0x3) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1213,7 +1213,7 @@ } break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1226,12 +1226,12 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1265,7 +1265,7 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index 1338ce5..22ec037 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -102,9 +102,9 @@ else if (rc == 0) bts_shutdown(l1t->trx->bts, "VirtPHY write socket died\n"); else - DEBUGP(DL1C, "%s Sending GSMTAP message to virtual Um\n", gsmtap_hdr_stringify(gh)); + DEBUGP(DL1P, "%s Sending GSMTAP message to virtual Um\n", gsmtap_hdr_stringify(gh)); } else - LOGP(DL1C, LOGL_ERROR, "GSMTAP msg could not be created!\n"); + LOGP(DL1P, LOGL_ERROR, "GSMTAP msg could not be created!\n"); /* free incoming message */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:05:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:05:38 +0000 Subject: [PATCH] osmo-bts[master]: l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C... Message-ID: Review at https://gerrit.osmocom.org/5135 l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C for MPH Change-Id: Icc0325f41a1d80535d33e123083e220ee47df129 --- M src/common/l1sap.c 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/35/5135/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c388c82..d294110 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -91,7 +91,7 @@ r -= r % GSM_RTP_DURATION; if (r != GSM_RTP_DURATION) - LOGP(DL1P, LOGL_ERROR, "RTP clock out of sync with lower layer:" + LOGP(DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); } @@ -573,7 +573,7 @@ { struct gsm_lchan *lchan; - LOGP(DL1P, LOGL_INFO, "activate confirm chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "activate confirm chan_nr=0x%02x trx=%d\n", info_act_cnf->chan_nr, trx->nr); lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); @@ -598,7 +598,7 @@ { struct gsm_lchan *lchan; - LOGP(DL1P, LOGL_INFO, "deactivate confirm chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivate confirm chan_nr=0x%02x trx=%d\n", info_act_cnf->chan_nr, trx->nr); lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); @@ -629,7 +629,7 @@ rc = l1sap_info_rel_cnf(trx, l1sap, &info->u.act_cnf); break; default: - LOGP(DL1P, LOGL_NOTICE, "unknown MPH_INFO cnf type %d\n", + LOGP(DL1C, LOGL_NOTICE, "unknown MPH_INFO cnf type %d\n", info->type); break; } @@ -1101,7 +1101,7 @@ gsm_fn2gsmtime(&g_time, fn); - DEBUGP(DL1P, "Rx TCH.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr); + LOGP(DL1P, LOGL_INFO, "Rx TCH.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr); lchan = get_active_lchan_by_chan_nr(trx, chan_nr); if (!lchan) { @@ -1132,7 +1132,7 @@ /* Only clear the marker bit once we have sent a RTP packet with it */ lchan->rtp_tx_marker = false; } else { - DEBUGP(DL1P, "Skipping RTP frame with lost payload\n"); + DEBUGP(DRTP, "Skipping RTP frame with lost payload\n"); if (lchan->abis_ip.rtp_socket) osmo_rtp_skipped_frame(lchan->abis_ip.rtp_socket, fn_ms_adj(fn, lchan)); lchan->rtp_tx_marker = true; @@ -1326,7 +1326,7 @@ struct gsm48_chan_desc *cd; int rc; - LOGP(DL1P, LOGL_INFO, "activating channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "activating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); /* osmo-pcu calls this without a valid 'tp' parameter, so we @@ -1340,7 +1340,7 @@ * one one TRX, so we need to make sure not to activate * channels with a different TSC!! */ if (cd->h0.tsc != (lchan->ts->trx->bts->bsic & 7)) { - LOGP(DRSL, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", + LOGP(DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); return -RSL_ERR_SERV_OPT_UNIMPL; } @@ -1366,7 +1366,7 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); if (lchan->tch.dtx.dl_amr_fsm) { @@ -1382,7 +1382,7 @@ { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1P, LOGL_INFO, "deactivating sacch chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivating sacch chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); lchan->sacch_deact = 1; @@ -1393,7 +1393,7 @@ int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr) { - LOGP(DL1P, LOGL_INFO, "modifying channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "modifying channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_MODIFY, 0); -- To view, visit https://gerrit.osmocom.org/5135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc0325f41a1d80535d33e123083e220ee47df129 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:06:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:06:00 +0000 Subject: osmo-bts[master]: measurement.c: Fix various typos in comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief208045664769406cd60a92a12c4b44988a98b4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:06:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:06:13 +0000 Subject: osmo-bts[master]: Comments on individual members of struct gsm_abis_mo In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:06:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:06:20 +0000 Subject: osmo-bts[master]: scheduler: Harmonize log line format; Always print TS name +... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:06:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:06:25 +0000 Subject: osmo-bts[master]: scheduler_trx: L1P is for PH (data), L1M for MPH (control) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:06:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:06:30 +0000 Subject: osmo-bts[master]: l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc0325f41a1d80535d33e123083e220ee47df129 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 20:42:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 20:42:21 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS Message-ID: Review at https://gerrit.osmocom.org/5136 osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS The upper layers (L1SAP, the common part of L1) *always* require frame numbers in the uplink direction to be reported as the frame number of the *first* burst, not the last burst of a given block. This is particularly important in the case of passing up measurement information, as we use this frame number to detect if the measurement interval for that specific timeslot has just ended (and hence we must process the measurements and send an uplink measurement report to the BSC. Before this patch, the measurement results were reported with the *last* frame number, which caused the common/measurement.c code never detect the end of a measurement window. On TS2, tons of the following log messages were observed: <0004> measurement.c:199 (bts=0,trx=0,ts=2,ss=0) no space for uplink measurement, num_ul_meas=104 With this patch, it behves as expected: the measurements of 25 blocks (= 100 bursts) are aggregated, after which point the report is computed and sent. Subsequently, num_ul_meas is reset to 0 and the cycle restarts. Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/5136/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 0549156..d3928f1 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -843,7 +843,7 @@ l2_len = GSM_MACBLOCK_LEN; /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); ber10k = compute_ber10k(n_bits_total, n_errors); return _sched_compose_ph_data_ind(l1t, tn, *first_fn, chan, l2, l2_len, @@ -860,6 +860,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; float *rssi_sum = &chan_state->rssi_sum; uint8_t *rssi_num = &chan_state->rssi_num; @@ -884,6 +885,7 @@ if (bid == 0) { memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS); *mask = 0x0; + *first_fn = fn; *rssi_sum = 0; *rssi_num = 0; *toa_sum = 0; @@ -937,7 +939,7 @@ /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { @@ -959,6 +961,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -985,6 +988,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 464); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1047,7 +1051,7 @@ memcpy(*bursts_p, *bursts_p + 464, 464); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ @@ -1117,6 +1121,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1148,6 +1153,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 232); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1221,7 +1227,7 @@ memcpy(*bursts_p + 232, *bursts_p + 464, 232); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:42 +0000 Subject: [PATCH] osmo-bts[master]: measurment.c: Introduce INFO category for DMEAS logging Message-ID: Review at https://gerrit.osmocom.org/5137 measurment.c: Introduce INFO category for DMEAS logging There's no point in either having full verbosity in DEBUG level and not logging any measurement related information in INFO. Let's at least print the results at the end of each measurement period in INFO level. Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99 --- M src/common/measurement.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/37/5137/1 diff --git a/src/common/measurement.c b/src/common/measurement.c index 36120c0..e4b8720 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -333,7 +333,7 @@ irssi_sub_sum = irssi_full_sum; } - DEBUGP(DMEAS, "%s Computed TA(% 4dqb) BER-FULL(%2u.%02u%%), RSSI-FULL(-%3udBm), " + LOGP(DMEAS, LOGL_INFO, "%s Computed TA(% 4dqb) BER-FULL(%2u.%02u%%), RSSI-FULL(-%3udBm), " "BER-SUB(%2u.%02u%%), RSSI-SUB(-%3udBm)\n", gsm_lchan_name(lchan), taqb_sum, ber_full_sum/100, ber_full_sum%100, irssi_full_sum, ber_sub_sum/100, ber_sub_sum%100, @@ -349,7 +349,7 @@ mru->full.rx_qual = ber10k_to_rxqual(ber_full_sum); mru->sub.rx_qual = ber10k_to_rxqual(ber_sub_sum); - DEBUGP(DMEAS, "%s UL MEAS RXLEV_FULL(%u), RXLEV_SUB(%u)," + LOGP(DMEAS, LOGL_INFO, "%s UL MEAS RXLEV_FULL(%u), RXLEV_SUB(%u)," "RXQUAL_FULL(%u), RXQUAL_SUB(%u), num_meas_sub(%u), num_ul_meas(%u) \n", gsm_lchan_name(lchan), mru->full.rx_lev, -- To view, visit https://gerrit.osmocom.org/5137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:57 +0000 Subject: [MERGED] osmo-bts[master]: l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C for MPH ...................................................................... l1sap: Fix log subsystem: Use DRTP for RTP related bits, L1C for MPH Change-Id: Icc0325f41a1d80535d33e123083e220ee47df129 --- M src/common/l1sap.c 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c388c82..d294110 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -91,7 +91,7 @@ r -= r % GSM_RTP_DURATION; if (r != GSM_RTP_DURATION) - LOGP(DL1P, LOGL_ERROR, "RTP clock out of sync with lower layer:" + LOGP(DRTP, LOGL_ERROR, "RTP clock out of sync with lower layer:" " %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n", r, GSM_RTP_DURATION, lchan->tch.last_fn, fn); } @@ -573,7 +573,7 @@ { struct gsm_lchan *lchan; - LOGP(DL1P, LOGL_INFO, "activate confirm chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "activate confirm chan_nr=0x%02x trx=%d\n", info_act_cnf->chan_nr, trx->nr); lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); @@ -598,7 +598,7 @@ { struct gsm_lchan *lchan; - LOGP(DL1P, LOGL_INFO, "deactivate confirm chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivate confirm chan_nr=0x%02x trx=%d\n", info_act_cnf->chan_nr, trx->nr); lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr); @@ -629,7 +629,7 @@ rc = l1sap_info_rel_cnf(trx, l1sap, &info->u.act_cnf); break; default: - LOGP(DL1P, LOGL_NOTICE, "unknown MPH_INFO cnf type %d\n", + LOGP(DL1C, LOGL_NOTICE, "unknown MPH_INFO cnf type %d\n", info->type); break; } @@ -1101,7 +1101,7 @@ gsm_fn2gsmtime(&g_time, fn); - DEBUGP(DL1P, "Rx TCH.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr); + LOGP(DL1P, LOGL_INFO, "Rx TCH.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr); lchan = get_active_lchan_by_chan_nr(trx, chan_nr); if (!lchan) { @@ -1132,7 +1132,7 @@ /* Only clear the marker bit once we have sent a RTP packet with it */ lchan->rtp_tx_marker = false; } else { - DEBUGP(DL1P, "Skipping RTP frame with lost payload\n"); + DEBUGP(DRTP, "Skipping RTP frame with lost payload\n"); if (lchan->abis_ip.rtp_socket) osmo_rtp_skipped_frame(lchan->abis_ip.rtp_socket, fn_ms_adj(fn, lchan)); lchan->rtp_tx_marker = true; @@ -1326,7 +1326,7 @@ struct gsm48_chan_desc *cd; int rc; - LOGP(DL1P, LOGL_INFO, "activating channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "activating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); /* osmo-pcu calls this without a valid 'tp' parameter, so we @@ -1340,7 +1340,7 @@ * one one TRX, so we need to make sure not to activate * channels with a different TSC!! */ if (cd->h0.tsc != (lchan->ts->trx->bts->bsic & 7)) { - LOGP(DRSL, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", + LOGP(DL1C, LOGL_ERROR, "lchan TSC %u != BSIC-TSC %u\n", cd->h0.tsc, lchan->ts->trx->bts->bsic & 7); return -RSL_ERR_SERV_OPT_UNIMPL; } @@ -1366,7 +1366,7 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); if (lchan->tch.dtx.dl_amr_fsm) { @@ -1382,7 +1382,7 @@ { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - LOGP(DL1P, LOGL_INFO, "deactivating sacch chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "deactivating sacch chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); lchan->sacch_deact = 1; @@ -1393,7 +1393,7 @@ int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr) { - LOGP(DL1P, LOGL_INFO, "modifying channel chan_nr=0x%02x trx=%d\n", + LOGP(DL1C, LOGL_INFO, "modifying channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_MODIFY, 0); -- To view, visit https://gerrit.osmocom.org/5135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc0325f41a1d80535d33e123083e220ee47df129 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:58 +0000 Subject: [MERGED] osmo-bts[master]: scheduler: Harmonize log line format; Always print TS name +... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: scheduler: Harmonize log line format; Always print TS name + decoded FN ...................................................................... scheduler: Harmonize log line format; Always print TS name + decoded FN Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 93 insertions(+), 144 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index af1cfbf..5e077ef 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -1,5 +1,11 @@ #pragma once +#define LOGL1S(subsys, level, l1t, tn, chan, fn, fmt, args ...) \ + LOGP(subsys, level, "%s %s %s: " fmt, \ + gsm_fn_as_gsmtime_str(fn), \ + gsm_ts_name(&(l1t)->trx->ts[tn]), \ + chan >=0 ? trx_chan_desc[chan].name : "", ## args) + typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan); diff --git a/src/common/scheduler.c b/src/common/scheduler.c index f6cb07e..efd7666 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -282,8 +282,7 @@ l1sap = msgb_l1sap_prim(msg); if (l1sap->oph.operation != PRIM_OP_REQUEST) { wrong_type: - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has " - "wrong type.\n", tn, fn); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong type.\n"); free_msg: /* unlink and free message */ llist_del(&msg->list); @@ -305,14 +304,12 @@ goto wrong_type; } if (prim_fn > 100) { - LOGP(DL1P, LOGL_NOTICE, "Prim %u for trx=%u ts=%u at " - "fn=%u is out of range (100), or channel %s with " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, + "Prim %u is out of range (100), or channel %s with " "type %s is already disabled. If this happens in " - "conjunction with PCU, increase 'rts-advance' by 5." - " (current fn=%u)\n", prim_fn, l1t->trx->nr, tn, - l1sap->u.data.fn, - get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, - get_value_string(trx_chan_type_names, chan), fn); + "conjunction with PCU, increase 'rts-advance' by 5.", + prim_fn, get_lchan_by_chan_nr(l1t->trx, chan_nr)->name, + get_value_string(trx_chan_type_names, chan)); /* unlink and free message */ llist_del(&msg->list); msgb_free(msg); @@ -329,11 +326,9 @@ found_msg: if ((chan_nr ^ (trx_chan_desc[chan].chan_nr | tn)) || ((link_id & 0xc0) ^ trx_chan_desc[chan].link_id)) { - LOGP(DL1P, LOGL_ERROR, "Prim for ts=%u at fn=%u has wrong " - "chan_nr=%02x link_id=%02x, expecting chan_nr=%02x " - "link_id=%02x.\n", tn, fn, chan_nr, link_id, - trx_chan_desc[chan].chan_nr | tn, - trx_chan_desc[chan].link_id); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Prim has wrong chan_nr=%02x link_id=%02x, " + "expecting chan_nr=%02x link_id=%02x.\n", chan_nr, link_id, + trx_chan_desc[chan].chan_nr | tn, trx_chan_desc[chan].link_id); goto free_msg; } @@ -418,9 +413,9 @@ uint8_t tn = l1sap->u.data.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.data.chan_nr, - l1sap->u.data.link_id, l1sap->u.data.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.data.fn, + "PH-DATA.req: chan_nr=0x%02x link_id=0x%02x\n", + l1sap->u.data.chan_nr, l1sap->u.data.link_id); if (!l1sap->oph.msg) abort(); @@ -441,9 +436,8 @@ uint8_t tn = l1sap->u.tch.chan_nr & 7; struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); - LOGP(DL1P, LOGL_INFO, "TCH.req: chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", l1sap->u.tch.chan_nr, - l1sap->u.tch.fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, -1, l1sap->u.tch.fn, "TCH.req: chan_nr=0x%02x\n", + l1sap->u.tch.chan_nr); if (!l1sap->oph.msg) abort(); @@ -477,14 +471,13 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "PH-RTS.ind: chan=%s chan_nr=0x%02x " - "link_id=0x%02x fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, link_id, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, + "PH-RTS.ind: chan_nr=0x%02x link_id=0x%02x\n", chan_nr, link_id); /* generate prim */ msg = l1sap_msgb_alloc(200); @@ -514,14 +507,12 @@ link_id = trx_chan_desc[chan].link_id; if (!chan_nr) { - LOGP(DL1P, LOGL_FATAL, "RTS func for %s with non-existing " - "chan_nr %d\n", trx_chan_desc[chan].name, chan_nr); + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, + "RTS func with non-existing chan_nr %d\n", chan_nr); return -ENODEV; } - LOGP(DL1P, LOGL_INFO, "TCH RTS.ind: chan=%s chan_nr=0x%02x " - "fn=%u ts=%u trx=%u\n", trx_chan_desc[chan].name, - chan_nr, fn, tn, l1t->trx->nr); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "TCH RTS.ind: chan_nr=0x%02x\n", chan_nr); /* only send, if FACCH is selected */ if (facch) { diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index c849dd5..81984c2 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -75,8 +75,7 @@ ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -88,8 +87,7 @@ ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -108,8 +106,7 @@ struct gsm_time t; uint8_t t3p, bsic; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); /* BURST BYPASS */ @@ -173,9 +170,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -188,7 +183,7 @@ got_msg: /* check validity of message */ if (msgb_l2len(msg) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); @@ -239,8 +234,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -269,9 +263,7 @@ if (msg) goto got_msg; - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -299,7 +291,7 @@ /* check validity of message */ if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "Prim invalid length, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " "(len=%ld)\n", msg->tail - msg->l2h); /* free message */ msgb_free(msg); @@ -337,8 +329,7 @@ *nbits = GSM_BURST_LEN; } - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -367,8 +358,8 @@ uint8_t tch_data[GSM_FR_BYTES]; int len; - LOGP(DL1C, LOGL_NOTICE, "Missing TCH bursts detected, sending " - "BFI for %s\n", trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Missing TCH bursts detected, sending BFI\n"); /* indicate bad frame */ switch (tch_mode) { @@ -399,8 +390,7 @@ break; default: inval_mode1: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); len = 0; } if (len) @@ -417,8 +407,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive == PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "TCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "TCH twice, please FIX!\n"); msgb_free(msg2); } else msg_facch = msg2; @@ -428,8 +418,8 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive != PRIM_TCH) { - LOGP(DL1C, LOGL_FATAL, "FACCH twice, " - "please FIX! "); + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + "FACCH twice, please FIX!\n"); msgb_free(msg2); } else msg_tch = msg2; @@ -445,7 +435,7 @@ /* check validity of message */ if (msg_facch && msgb_l2len(msg_facch) != GSM_MACBLOCK_LEN) { - LOGP(DL1C, LOGL_FATAL, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg_facch)); /* free message */ msgb_free(msg_facch); @@ -462,10 +452,8 @@ int8_t sti, cmi; if (rsl_cmode != RSL_CMOD_SPD_SPEECH) { - LOGP(DL1C, LOGL_NOTICE, "%s Dropping speech frame, " - "because we are not in speech mode trx=%u " - "ts=%u at fn=%u.\n", trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " + "because we are not in speech mode\n"); goto free_bad_msg; } @@ -502,43 +490,33 @@ trx_loop_amr_set(chan_state, 1); } if (ft < 0) { - LOGP(DL1C, LOGL_ERROR, "%s Codec (FT = %d) " - " of RTP frame not in list. " - "trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "Codec (FT = %d) of RTP frame not in list\n", ft_codec); goto free_bad_msg; } if (fn_is_codec_mode_request(fn) && chan_state->dl_ft != ft) { - LOGP(DL1C, LOGL_NOTICE, "%s Codec (FT = %d) " - " of RTP cannot be changed now, but in " - "next frame. trx=%u ts=%u\n", - trx_chan_desc[chan].name, ft_codec, - l1t->trx->nr, tn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " + " of RTP cannot be changed now, but in next frame\n", ft_codec); goto free_bad_msg; } chan_state->dl_ft = ft; if (bfi == AMR_BAD) { - LOGP(DL1C, LOGL_NOTICE, "%s Transmitting 'bad " - "AMR frame' trx=%u ts=%u at fn=%u.\n", - trx_chan_desc[chan].name, - l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + "Transmitting 'bad AMR frame'\n"); goto free_bad_msg; } break; default: inval_mode2: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, please " - "fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); goto free_bad_msg; } if (len < 0) { - LOGP(DL1C, LOGL_ERROR, "Cannot send invalid AMR " - "payload\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); goto free_bad_msg; } if (msgb_l2len(msg_tch) != len) { - LOGP(DL1C, LOGL_ERROR, "Cannot send payload with " + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " "invalid length! (expecting %d, received %d)\n", len, msgb_l2len(msg_tch)); free_bad_msg: @@ -590,9 +568,7 @@ /* no message at all */ if (!msg_tch && !msg_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -630,8 +606,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -660,9 +635,8 @@ /* check for FACCH alignment */ if (msg_facch && ((((fn + 4) % 26) >> 2) & 1)) { - LOGP(DL1C, LOGL_ERROR, "%s Cannot transmit FACCH starting on " - "even frames, please fix RTS!\n", - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " + "even frames, please fix RTS!\n"); msgb_free(msg_facch); msg_facch = NULL; } @@ -687,9 +661,7 @@ /* no message at all */ if (!msg_tch && !msg_facch && !chan_state->dl_ongoing_facch) { - LOGP(DL1C, LOGL_INFO, "%s has not been served !! No prim for " - "trx=%u ts=%u at fn=%u to transmit.\n", - trx_chan_desc[chan].name, l1t->trx->nr, tn, fn); + LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -729,8 +701,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGP(DL1C, LOGL_DEBUG, "Transmitting %s fn=%u ts=%u trx=%u burst=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -751,14 +722,12 @@ chan_nr = trx_chan_desc[chan].chan_nr | tn; - LOGP(DL1C, LOGL_DEBUG, "Received Access Burst on %s fn=%u toa=%.2f\n", - trx_chan_desc[chan].name, fn, toa); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad AB frame at fn=%u " - "(%u/51)\n", fn, fn % 51); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; } @@ -809,8 +778,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "Data received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -854,10 +822,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete data frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); /* we require first burst to have correct FN */ if (!(*mask & 0x1)) { @@ -870,10 +836,8 @@ /* decode */ rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); if (rc) { - LOGP(DL1C, LOGL_DEBUG, "Received bad data frame at fn=%u " - "(%u/%u) for %s\n", *first_fn, - (*first_fn) % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + *first_fn, (*first_fn) % l1ts->mf_period); l2_len = 0; } else l2_len = GSM_MACBLOCK_LEN; @@ -906,8 +870,7 @@ uint16_t ber10k; int rc; - LOGP(DL1C, LOGL_DEBUG, "PDTCH received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -953,10 +916,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_DEBUG, "Received incomplete PDTCH block " - "ending at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -980,9 +941,8 @@ n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { - LOGP(DL1C, LOGL_DEBUG, "Received bad PDTCH block ending at " - "fn=%u (%u/%u) for %s\n", fn, fn % l1ts->mf_period, - l1ts->mf_period, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); return 0; } ber10k = compute_ber10k(n_bits_total, n_errors); @@ -1012,8 +972,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/F received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1042,10 +1001,8 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1083,7 +1040,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1095,14 +1052,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1138,8 +1094,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } @@ -1179,8 +1135,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGP(DL1C, LOGL_DEBUG, "TCH/H received %s fn=%u ts=%u trx=%u bid=%u\n", - trx_chan_desc[chan].name, fn, tn, l1t->trx->nr, bid); + LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1209,10 +1164,8 @@ /* check for complete set of bursts */ if ((*mask & 0x3) != 0x3) { - LOGP(DL1C, LOGL_NOTICE, "Received incomplete TCH frame ending " - "at fn=%u (%u/%u) for %s\n", fn, - fn % l1ts->mf_period, l1ts->mf_period, - trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1260,7 +1213,7 @@ } break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1273,14 +1226,13 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s\n", fn, trx_chan_desc[chan].name); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGP(DL1C, LOGL_NOTICE, "Received bad TCH frame ending at " - "fn=%u for %s with codec mode %d (out of range)\n", - fn, trx_chan_desc[chan].name, rc); + LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1313,8 +1265,8 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGP(DL1C, LOGL_ERROR, "TCH mode invalid, " - "please fix!\n"); + LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:58 +0000 Subject: [MERGED] osmo-bts[master]: scheduler_trx: L1P is for PH (data), L1M for MPH (control) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: scheduler_trx: L1P is for PH (data), L1M for MPH (control) ...................................................................... scheduler_trx: L1P is for PH (data), L1M for MPH (control) Almost all log statements in scheduler_trx.c were using the wrong logging subsystem. Let's fix this. Also, make it more obvious from the log subsystem help text Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14 --- M src/common/logging.c M src/osmo-bts-trx/scheduler_trx.c M src/osmo-bts-virtual/scheduler_virtbts.c 3 files changed, 50 insertions(+), 50 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/logging.c b/src/common/logging.c index 2911692..a4d30e6 100644 --- a/src/common/logging.c +++ b/src/common/logging.c @@ -68,13 +68,13 @@ }, [DL1C] = { .name = "DL1C", - .description = "Layer 1", + .description = "Layer 1 Control (MPH)", .loglevel = LOGL_INFO, .enabled = 1, }, [DL1P] = { .name = "DL1P", - .description = "Layer 1 Primitives", + .description = "Layer 1 Primitives (PH)", .loglevel = LOGL_INFO, .enabled = 0, }, diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 81984c2..0549156 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -75,7 +75,7 @@ ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting IDLE\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -87,7 +87,7 @@ ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting FCCH\n"); if (nbits) *nbits = GSM_BURST_LEN; @@ -106,7 +106,7 @@ struct gsm_time t; uint8_t t3p, bsic; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting SCH\n"); /* BURST BYPASS */ @@ -170,7 +170,7 @@ if (msg) goto got_msg; - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -183,7 +183,7 @@ got_msg: /* check validity of message */ if (msgb_l2len(msg) != GSM_MACBLOCK_LEN) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg)); /* free message */ msgb_free(msg); @@ -234,7 +234,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -263,7 +263,7 @@ if (msg) goto got_msg; - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No prim for transmit.\n"); no_msg: /* free burst memory */ @@ -291,7 +291,7 @@ /* check validity of message */ if (rc < 0) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " "(len=%ld)\n", msg->tail - msg->l2h); /* free message */ msgb_free(msg); @@ -329,7 +329,7 @@ *nbits = GSM_BURST_LEN; } - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -358,7 +358,7 @@ uint8_t tch_data[GSM_FR_BYTES]; int len; - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Missing TCH bursts detected, sending BFI\n"); /* indicate bad frame */ @@ -390,7 +390,7 @@ break; default: inval_mode1: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); len = 0; } if (len) @@ -407,7 +407,7 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive == PRIM_TCH) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "TCH twice, please FIX!\n"); msgb_free(msg2); } else @@ -418,7 +418,7 @@ if (msg2) { l1sap = msgb_l1sap_prim(msg2); if (l1sap->oph.primitive != PRIM_TCH) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "FACCH twice, please FIX!\n"); msgb_free(msg2); } else @@ -435,7 +435,7 @@ /* check validity of message */ if (msg_facch && msgb_l2len(msg_facch) != GSM_MACBLOCK_LEN) { - LOGL1S(DL1C, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " + LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim not 23 bytes, please FIX! " "(len=%d)\n", msgb_l2len(msg_facch)); /* free message */ msgb_free(msg_facch); @@ -452,7 +452,7 @@ int8_t sti, cmi; if (rsl_cmode != RSL_CMOD_SPD_SPEECH) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Dropping speech frame, " "because we are not in speech mode\n"); goto free_bad_msg; } @@ -490,33 +490,33 @@ trx_loop_amr_set(chan_state, 1); } if (ft < 0) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Codec (FT = %d) of RTP frame not in list\n", ft_codec); goto free_bad_msg; } if (fn_is_codec_mode_request(fn) && chan_state->dl_ft != ft) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Codec (FT = %d) " " of RTP cannot be changed now, but in next frame\n", ft_codec); goto free_bad_msg; } chan_state->dl_ft = ft; if (bfi == AMR_BAD) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Transmitting 'bad AMR frame'\n"); goto free_bad_msg; } break; default: inval_mode2: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n"); goto free_bad_msg; } if (len < 0) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send invalid AMR payload\n"); goto free_bad_msg; } if (msgb_l2len(msg_tch) != len) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot send payload with " "invalid length! (expecting %d, received %d)\n", len, msgb_l2len(msg_tch)); free_bad_msg: @@ -568,7 +568,7 @@ /* no message at all */ if (!msg_tch && !msg_facch) { - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -606,7 +606,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -635,7 +635,7 @@ /* check for FACCH alignment */ if (msg_facch && ((((fn + 4) % 26) >> 2) & 1)) { - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "Cannot transmit FACCH starting on " "even frames, please fix RTS!\n"); msgb_free(msg_facch); msg_facch = NULL; @@ -661,7 +661,7 @@ /* no message at all */ if (!msg_tch && !msg_facch && !chan_state->dl_ongoing_facch) { - LOGL1S(DL1C, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); + LOGL1S(DL1P, LOGL_INFO, l1t, tn, chan, fn, "No TCH or FACCH prim for transmit.\n"); goto send_burst; } @@ -701,7 +701,7 @@ if (nbits) *nbits = GSM_BURST_LEN; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Transmitting burst=%u.\n", bid); return bits; } @@ -722,12 +722,12 @@ chan_nr = trx_chan_desc[chan].chan_nr | tn; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received RACH toa=%.2f\n", toa); /* decode */ rc = gsm0503_rach_decode(&ra, bits + 8 + 41, l1t->trx->bts->bsic); if (rc) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad AB frame\n"); return 0; } @@ -778,7 +778,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received Data, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -822,7 +822,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete data (%u/%u)\n", *first_fn, (*first_fn) % l1ts->mf_period); /* we require first burst to have correct FN */ @@ -836,7 +836,7 @@ /* decode */ rc = gsm0503_xcch_decode(l2, *bursts_p, &n_errors, &n_bits_total); if (rc) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", *first_fn, (*first_fn) % l1ts->mf_period); l2_len = 0; } else @@ -870,7 +870,7 @@ uint16_t ber10k; int rc; - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received PDTCH bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -916,7 +916,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -941,7 +941,7 @@ n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received bad PDTCH (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); return 0; } @@ -972,7 +972,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/F, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1001,7 +1001,7 @@ /* check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1040,7 +1040,7 @@ } break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1052,12 +1052,12 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1094,7 +1094,7 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1135,7 +1135,7 @@ if (chan_state->ho_rach_detect == 1) return rx_rach_fn(l1t, tn, fn, chan, bid, bits, GSM_BURST_LEN, rssi, toa); - LOGL1S(DL1C, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); + LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, "Received TCH/H, bid=%u\n", bid); /* allocate burst memory, if not already */ if (!*bursts_p) { @@ -1164,7 +1164,7 @@ /* check for complete set of bursts */ if ((*mask & 0x3) != 0x3) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received incomplete frame (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); } *mask = 0x0; @@ -1213,7 +1213,7 @@ } break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } @@ -1226,12 +1226,12 @@ /* Check if the frame is bad */ if (rc < 0) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); goto bfi; } if (rc < 4) { - LOGL1S(DL1C, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " + LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); goto bfi; } @@ -1265,7 +1265,7 @@ memset(tch_data + 2, 0, rc - 2); break; default: - LOGL1S(DL1C, LOGL_ERROR, l1t, tn, chan, fn, + LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode %u invalid, please fix!\n", tch_mode); return -EINVAL; } diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index 1338ce5..22ec037 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -102,9 +102,9 @@ else if (rc == 0) bts_shutdown(l1t->trx->bts, "VirtPHY write socket died\n"); else - DEBUGP(DL1C, "%s Sending GSMTAP message to virtual Um\n", gsmtap_hdr_stringify(gh)); + DEBUGP(DL1P, "%s Sending GSMTAP message to virtual Um\n", gsmtap_hdr_stringify(gh)); } else - LOGP(DL1C, LOGL_ERROR, "GSMTAP msg could not be created!\n"); + LOGP(DL1P, LOGL_ERROR, "GSMTAP msg could not be created!\n"); /* free incoming message */ msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:58 +0000 Subject: [MERGED] osmo-bts[master]: measurement.c: Fix various typos in comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: measurement.c: Fix various typos in comments ...................................................................... measurement.c: Fix various typos in comments Change-Id: Ief208045664769406cd60a92a12c4b44988a98b4 --- M src/common/measurement.c 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/measurement.c b/src/common/measurement.c index 3b32bf2..36120c0 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -8,8 +8,8 @@ #include #include -/* Measurment reporting period and mapping of SACCH message block for TCHF - * and TCHH chan As per in 3GPP TS 45.008, secton 8.4.1. +/* Measurement reporting period and mapping of SACCH message block for TCHF + * and TCHH chan As per in 3GPP TS 45.008, section 8.4.1. * * Timeslot number (TN) TDMA frame number (FN) modulo 104 * Half rate, Half rate, Reporting SACCH @@ -54,7 +54,7 @@ [7] = 77, }; -/* Measurment reporting period for SDCCH8 and SDCCH4 chan +/* Measurement reporting period for SDCCH8 and SDCCH4 chan * As per in 3GPP TS 45.008, section 8.4.2. * * Logical Chan TDMA frame number @@ -64,7 +64,7 @@ * SDCCH/4 37 to 36 */ -/* Added interleve offset to Meas period end Fn which +/* Added interleave offset to Meas period end Fn which * would reduce the Meas Res msg load at Abis */ static const uint8_t sdcch8_meas_rep_fn102[] = { @@ -86,14 +86,14 @@ }; /* Note: The reporting of the measurement results is done via the SACCH channel. - * The measurement interval is not alligned with the interval in which the - * SACCH is tranmitted. When we receive the measurement indication with the - * SACCH block, the coresponding measurement interval will already have ended + * The measurement interval is not aligned with the interval in which the + * SACCH is transmitted. When we receive the measurement indication with the + * SACCH block, the corresponding measurement interval will already have ended * and we will get the results late, but on spot with the beginning of the * next measurement interval. * * For example: We get a measurement indication on FN%104=38 in TS=2. Then we - * will have to look at 3GPP TS 45.008, secton 8.4.1 (or 3GPP TS 05.02 Clause 7 + * will have to look at 3GPP TS 45.008, section 8.4.1 (or 3GPP TS 05.02 Clause 7 * Table 1 of 9) what value we need to feed into the lookup tables in order to * detect the measurement period ending. In this example the "real" ending * was on FN%104=12. This is the value we have to look for in -- To view, visit https://gerrit.osmocom.org/5133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief208045664769406cd60a92a12c4b44988a98b4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:05:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:05:58 +0000 Subject: [MERGED] osmo-bts[master]: Comments on individual members of struct gsm_abis_mo In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Comments on individual members of struct gsm_abis_mo ...................................................................... Comments on individual members of struct gsm_abis_mo Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 --- M include/osmo-bts/gsm_data_shared.h 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index c19b125..4c0fe5c 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -107,12 +107,19 @@ }; struct gsm_abis_mo { + /* A-bis OML Object Class */ uint8_t obj_class; + /* is there still some procedure pending? */ uint8_t procedure_pending; + /* A-bis OML Object Instance */ struct abis_om_obj_inst obj_inst; + /* human-readable name */ const char *name; + /* NM State */ struct gsm_nm_state nm_state; + /* Attributes configured in this MO */ struct tlv_parsed *nm_attr; + /* BTS to which this MO belongs */ struct gsm_bts *bts; }; -- To view, visit https://gerrit.osmocom.org/5124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e005410080201746906b8a60e9f7957031d2e58 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:06:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:06:17 +0000 Subject: osmo-bts[master]: measurment.c: Introduce INFO category for DMEAS logging In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:09:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:09:12 +0000 Subject: osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex In-Reply-To: References: Message-ID: Patch Set 2: endpoints are *strings*. We should not treat them as numbers. So whatever this patch (or related patches do), it is only a very small incremental (and insignificant) step towards endpoints as names, which is what the MGCP spec has always stated. Sure, the endpoints within one given "class" can be numbered - but thta's an implementation detail of the MGW, and all code dealing with the MGCP protocol should not make any assumption about the endpoint names being something that's not a string. -- To view, visit https://gerrit.osmocom.org/4780 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:09:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:09:57 +0000 Subject: osmo-msc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:10:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:10:44 +0000 Subject: libosmocore[master]: Fix embedded build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:10:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:10:47 +0000 Subject: libosmocore[master]: embedded: fix tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:11:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:11:12 +0000 Subject: libosmocore[master]: embedded: fix tests In-Reply-To: References: Message-ID: Patch Set 1: what I'm wondering is: Why are we not catching this on jenkinks? Aren't we building an embedded libosmocore as part of build testing? -- To view, visit https://gerrit.osmocom.org/5123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:12:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:12:09 +0000 Subject: osmo-pcu[master]: TBF: log timer override In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:12:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:12:31 +0000 Subject: osmo-pcu[master]: Fix compiler warning In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:13:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 2 Dec 2017 21:13:33 +0000 Subject: osmo-pcu[master]: TBF: fix compiler warning in test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 I'm surprised the old code actually worked if it needs bit-or instead of logical-or. -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:41:28 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sat, 2 Dec 2017 21:41:28 +0000 Subject: [PATCH] osmo-msc[master]: Add missing CFLAGS Message-ID: Review at https://gerrit.osmocom.org/5138 Add missing CFLAGS Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 --- M src/libcommon-cs/Makefile.am M src/libcommon/Makefile.am M src/libmsc/Makefile.am M src/libvlr/Makefile.am M src/utils/Makefile.am 5 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/5138/1 diff --git a/src/libcommon-cs/Makefile.am b/src/libcommon-cs/Makefile.am index 21c2745..eada698 100644 --- a/src/libcommon-cs/Makefile.am +++ b/src/libcommon-cs/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 0b258c0..18272c5 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..998df26 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -15,6 +15,7 @@ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) noinst_HEADERS = \ diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 17ad411..511dfc0 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -1,6 +1,14 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) +AM_CFLAGS= \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(LIBCRYPTO_CFLAGS) \ + $(NULL) noinst_HEADERS = \ vlr_access_req_fsm.h \ diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index 07b30d9..56b9356 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -9,6 +9,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ @@ -123,5 +124,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:41:28 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sat, 2 Dec 2017 21:41:28 +0000 Subject: [PATCH] osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... Message-ID: Review at https://gerrit.osmocom.org/5139 Remove utils imported from openbsc, fix building remaining util smpp_mirror Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 --- M configure.ac M src/utils/Makefile.am D src/utils/meas_db.c D src/utils/meas_db.h D src/utils/meas_json.c D src/utils/meas_pcap2db.c D src/utils/meas_udp2db.c D src/utils/meas_vis.c 8 files changed, 6 insertions(+), 1,197 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/5139/1 diff --git a/configure.ac b/configure.ac index 5766fd0..6b6e9c7 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index 56b9356..14adcca 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -20,27 +20,10 @@ $(NULL) noinst_HEADERS = \ - meas_db.h \ $(NULL) bin_PROGRAMS = \ - meas_json \ $(NULL) -if HAVE_SQLITE3 -bin_PROGRAMS += \ - osmo-meas-udp2db \ - $(NULL) -if HAVE_PCAP -bin_PROGRAMS += \ - osmo-meas-pcap2db \ - $(NULL) -endif -endif -if HAVE_LIBCDK -bin_PROGRAMS += \ - meas_vis \ - $(NULL) -endif if BUILD_SMPP noinst_PROGRAMS = \ @@ -52,79 +35,15 @@ smpp_mirror.c \ $(NULL) +smpp_mirror_CFLAGS = \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBSMPP34_CFLAGS) \ + $(NULL) + smpp_mirror_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ - $(NULL) - -meas_vis_SOURCES = \ - meas_vis.c \ - $(NULL) - -meas_vis_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - -lcdk \ - -lncurses \ - $(NULL) - -meas_vis_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(NULL) - -osmo_meas_pcap2db_SOURCES = \ - meas_pcap2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_pcap2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - -lpcap \ - $(NULL) - -osmo_meas_pcap2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -osmo_meas_udp2db_SOURCES = \ - meas_udp2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_udp2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - $(NULL) - -osmo_meas_udp2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -meas_json_SOURCES = \ - meas_json.c \ - $(NULL) - -meas_json_LDADD = \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - -meas_json_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ - $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) diff --git a/src/utils/meas_db.c b/src/utils/meas_db.c deleted file mode 100644 index 8cf27df..0000000 --- a/src/utils/meas_db.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Routines for storing measurement reports in SQLite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "meas_db.h" - -#define INS_MR "INSERT INTO meas_rep (time, imsi, name, scenario, nr, bs_power, ms_timing_offset, fpc, ms_l1_pwr, ms_l1_ta) VALUES (?,?,?,?,?,?,?,?,?,?)" -#define INS_UD "INSERT INTO meas_rep_unidir (meas_id, rx_lev_full, rx_lev_sub, rx_qual_full, rx_qual_sub, dtx, uplink) VALUES (?,?,?,?,?,?,?)" -#define UPD_MR "UPDATE meas_rep SET ul_unidir=?, dl_unidir=? WHERE id=?" - -struct meas_db_state { - sqlite3 *db; - sqlite3_stmt *stmt_ins_ud; - sqlite3_stmt *stmt_ins_mr; - sqlite3_stmt *stmt_upd_mr; -}; - -/* macros to check for SQLite3 result codes */ -#define _SCK_OK(db, call, exp) \ - do { \ - int rc = call; \ - if (rc != exp) { \ - fprintf(stderr,"SQL Error in line %u: %s\n", \ - __LINE__, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) -#define SCK_OK(db, call) _SCK_OK(db, call, SQLITE_OK) -#define SCK_DONE(db, call) _SCK_OK(db, call, SQLITE_DONE) - -static int _insert_ud(struct meas_db_state *st, unsigned long meas_id, int dtx, - int uplink, const struct gsm_meas_rep_unidir *ud) -{ - unsigned long rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 1, meas_id)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 2, - rxlev2dbm(ud->full.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 3, - rxlev2dbm(ud->sub.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 4, ud->full.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 5, ud->sub.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 6, dtx)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 7, uplink)); - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_ud)); - - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_ud)); - - return sqlite3_last_insert_rowid(st->db); -err_io: - exit(1); -} - -/* insert a measurement report into the database */ -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr) -{ - int rc; - sqlite3_int64 rowid, ul_rowid, dl_rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 1, timestamp)); - - if (imsi) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 2, - imsi, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 2)); - - if (name) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 3, - name, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 3)); - - if (scenario) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 4, - scenario, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 4)); - - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 5, mr->nr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 6, mr->bs_power)); - - if (mr->flags & MEAS_REP_F_MS_TO) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 7, mr->ms_timing_offset)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 7)); - - if (mr->flags & MEAS_REP_F_FPC) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 1)); - else - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 0)); - - if (mr->flags & MEAS_REP_F_MS_L1) { - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 9, - mr->ms_l1.pwr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 10, - mr->ms_l1.ta)); - } - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_mr)); - - rowid = sqlite3_last_insert_rowid(st->db); - - /* insert uplink measurement */ - ul_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_UL_DTX, - 1, &mr->ul); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 1, ul_rowid)); - - /* insert downlink measurement, if present */ - if (mr->flags & MEAS_REP_F_DL_VALID) { - dl_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_DL_DTX, - 0, &mr->dl); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 2, dl_rowid)); - } else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_upd_mr, 2)); - - /* update meas_rep with the id's of the unidirectional - * measurements */ - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 3, rowid)); - SCK_DONE(st->db, sqlite3_step(st->stmt_upd_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_upd_mr)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_begin(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "BEGIN", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_commit(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "COMMIT", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -static const char *create_stmts[] = { - "CREATE TABLE IF NOT EXISTS meas_rep (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "time TIMESTAMP," - "imsi TEXT," - "name TEXT," - "scenario TEXT," - "nr INTEGER," - "bs_power INTEGER NOT NULL," - "ms_timing_offset INTEGER," - "fpc INTEGER NOT NULL DEFAULT 0," - "ul_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "dl_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "ms_l1_pwr INTEGER," - "ms_l1_ta INTEGER" - ")", - "CREATE TABLE IF NOT EXISTS meas_rep_unidir (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "meas_id INTEGER NOT NULL REFERENCES meas_rep(id)," - "rx_lev_full INTEGER NOT NULL," - "rx_lev_sub INTEGER NOT NULL," - "rx_qual_full INTEGER NOT NULL," - "rx_qual_sub INTEGER NOT NULL," - "dtx BOOLEAN NOT NULL DEFAULT 0," - "uplink BOOLEAN NOT NULL" - ")", - "CREATE VIEW IF NOT EXISTS path_loss AS " - "SELECT " - "meas_rep.id, " - "datetime(time,'unixepoch') AS timestamp, " - "imsi, " - "name, " - "scenario, " - "ms_timing_offset, " - "ms_l1_ta, " - "fpc, " - "ms_l1_pwr, " - "ud_ul.rx_lev_full AS ul_rx_lev_full, " - "ms_l1_pwr-ud_ul.rx_lev_full AS ul_path_loss_full, " - "ud_ul.rx_lev_sub ul_rx_lev_sub, " - "ms_l1_pwr-ud_ul.rx_lev_sub AS ul_path_loss_sub, " - "ud_ul.rx_qual_full AS ul_rx_qual_full, " - "ud_ul.rx_qual_sub AS ul_rx_qual_sub, " - "bs_power, " - "ud_dl.rx_lev_full AS dl_rx_lev_full, " - "bs_power-ud_dl.rx_lev_full AS dl_path_loss_full, " - "ud_dl.rx_lev_sub AS dl_rx_lev_sub, " - "bs_power-ud_dl.rx_lev_sub AS dl_path_loss_sub, " - "ud_dl.rx_qual_full AS dl_rx_qual_full, " - "ud_dl.rx_qual_sub AS dl_rx_qual_sub " - "FROM " - "meas_rep, " - "meas_rep_unidir AS ud_dl, " - "meas_rep_unidir AS ud_ul " - "WHERE " - "ud_ul.id = meas_rep.ul_unidir AND " - "ud_dl.id = meas_rep.dl_unidir", - "CREATE VIEW IF NOT EXISTS overview AS " - "SELECT " - "id," - "timestamp," - "imsi," - "name," - "scenario," - "ms_l1_pwr," - "ul_rx_lev_full," - "ul_path_loss_full," - "ul_rx_qual_full," - "bs_power," - "dl_rx_lev_full," - "dl_path_loss_full," - "dl_rx_qual_full " - "FROM path_loss", -}; - -static int check_create_tbl(struct meas_db_state *st) -{ - int i, rc; - - for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - SCK_OK(st->db, sqlite3_exec(st->db, create_stmts[i], - NULL, NULL, NULL)); - } - - return 0; -err_io: - return -EIO; -} - - -#define PREP_CHK(db, stmt, ptr) \ - do { \ - int rc; \ - rc = sqlite3_prepare_v2(db, stmt, strlen(stmt)+1, \ - ptr, NULL); \ - if (rc != SQLITE_OK) { \ - fprintf(stderr, "Error during prepare of '%s': %s\n", \ - stmt, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) - -struct meas_db_state *meas_db_open(void *ctx, const char *fname) -{ - int rc; - struct meas_db_state *st = talloc_zero(ctx, struct meas_db_state); - - if (!st) - return NULL; - - rc = sqlite3_open_v2(fname, &st->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, - NULL); - if (rc != SQLITE_OK) { - fprintf(stderr, "Unable to open DB: %s\n", - sqlite3_errmsg(st->db)); - goto err_io; - } - - rc = check_create_tbl(st); - - PREP_CHK(st->db, INS_MR, &st->stmt_ins_mr); - PREP_CHK(st->db, INS_UD, &st->stmt_ins_ud); - PREP_CHK(st->db, UPD_MR, &st->stmt_upd_mr); - - return st; -err_io: - talloc_free(st); - return NULL; -} - -void meas_db_close(struct meas_db_state *st) -{ - if (sqlite3_finalize(st->stmt_ins_mr) != SQLITE_OK) - fprintf(stderr, "DB insert measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_ins_ud) != SQLITE_OK) - fprintf(stderr, "DB insert unidir finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_upd_mr) != SQLITE_OK) - fprintf(stderr, "DB update measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_close(st->db) != SQLITE_OK) - fprintf(stderr, "Unable to close DB, abandoning.\n"); - - talloc_free(st); - -} diff --git a/src/utils/meas_db.h b/src/utils/meas_db.h deleted file mode 100644 index 889e902..0000000 --- a/src/utils/meas_db.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENBSC_MEAS_DB_H -#define OPENBSC_MEAS_DB_H - -struct meas_db_state; - -struct meas_db_state *meas_db_open(void *ctx, const char *fname); -void meas_db_close(struct meas_db_state *st); - -int meas_db_begin(struct meas_db_state *st); -int meas_db_commit(struct meas_db_state *st); - -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr); - -#endif diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c deleted file mode 100644 index 8db7791..0000000 --- a/src/utils/meas_json.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Convert measurement report feed into JSON feed printed to stdout. - * Each measurement report is printed as a separae JSON root entry. - * All measurement reports are separated by a new line. - */ - -/* (C) 2015 by Alexander Chemeris - * With parts of code adopted from different places in OpenBSC. - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -static void print_meas_rep_uni_json(struct gsm_meas_rep_unidir *mru) -{ - printf("\"RXL-FULL\":%d, \"RXL-SUB\":%d, ", - rxlev2dbm(mru->full.rx_lev), - rxlev2dbm(mru->sub.rx_lev)); - printf("\"RXQ-FULL\":%d, \"RXQ-SUB\":%d", - mru->full.rx_qual, mru->sub.rx_qual); -} - -static void print_meas_rep_json(struct gsm_meas_rep *mr) -{ - int i; - - printf("\"NR\":%d", mr->nr); - - if (mr->flags & MEAS_REP_F_DL_DTX) - printf(", \"DTXd\":true"); - - printf(", \"UL_MEAS\":{"); - print_meas_rep_uni_json(&mr->ul); - printf("}"); - printf(", \"BS_POWER\":%d", mr->bs_power); - if (mr->flags & MEAS_REP_F_MS_TO) - printf(", \"MS_TO\":%d", mr->ms_timing_offset); - - if (mr->flags & MEAS_REP_F_MS_L1) { - printf(", \"L1_MS_PWR\":%d", mr->ms_l1.pwr); - printf(", \"L1_FPC\":%s", - mr->flags & MEAS_REP_F_FPC ? "true" : "false"); - printf(", \"L1_TA\":%u", mr->ms_l1.ta); - } - - if (mr->flags & MEAS_REP_F_UL_DTX) - printf(", \"DTXu\":true"); - if (mr->flags & MEAS_REP_F_BA1) - printf(", \"BA1\":true"); - if (mr->flags & MEAS_REP_F_DL_VALID) { - printf(", \"DL_MEAS\":{"); - print_meas_rep_uni_json(&mr->dl); - printf("}"); - } - - if (mr->num_cell == 7) - return; - printf(", \"NUM_NEIGH\":%u, \"NEIGH\":[", mr->num_cell); - for (i = 0; i < mr->num_cell; i++) { - struct gsm_meas_rep_cell *mrc = &mr->cell[i]; - if (i!=0) printf(", "); - printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}", - mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev)); - } - printf("]"); -} - -static void print_chan_info_json(struct meas_feed_meas *mfm) -{ - printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " - "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), - mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); -} - -static void print_meas_feed_json(struct meas_feed_meas *mfm) -{ - time_t now = time(NULL); - - printf("{"); - printf("\"time\":%ld, \"imsi\":\"%s\", \"name\":\"%s\", \"scenario\":\"%s\", ", - now, mfm->imsi, mfm->name, mfm->scenario); - - switch (mfm->hdr.version) { - case 1: - printf("\"chan_info\":{"); - print_chan_info_json(mfm); - printf("}, "); - /* no break, fall to version 0 */ - case 0: - printf("\"meas_rep\":{"); - print_meas_rep_json(&mfm->mr); - printf("}"); - break; - } - - printf("}\n"); - -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - - print_meas_feed_json(mfm); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - int rc; - struct osmo_fd udp_ofd; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - }; - - exit(0); -} diff --git a/src/utils/meas_pcap2db.c b/src/utils/meas_pcap2db.c deleted file mode 100644 index 0644521..0000000 --- a/src/utils/meas_pcap2db.c +++ /dev/null @@ -1,138 +0,0 @@ -/* read PCAP file with meas_feed data and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include "meas_db.h" - -static struct meas_db_state *db; - -static void handle_mfm(const struct pcap_pkthdr *h, - const struct meas_feed_meas *mfm) -{ - const char *scenario; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, h->ts.tv_sec, - scenario, &mfm->mr); -} - -static void pcap_cb(u_char *user, const struct pcap_pkthdr *h, - const u_char *bytes) -{ - const char *cur = bytes; - const struct iphdr *ip; - const struct udphdr *udp; - const struct meas_feed_meas *mfm; - uint16_t udplen; - - if (h->caplen < 14+20+8) - return; - - /* Check if there is IPv4 in the Ethernet */ - if (cur[12] != 0x08 || cur[13] != 0x00) - return; - - cur += 14; /* ethernet header */ - ip = (struct iphdr *) cur; - - if (ip->version != 4) - return; - cur += ip->ihl * 4; - - if (ip->protocol != IPPROTO_UDP) - return; - - udp = (struct udphdr *) cur; - - if (udp->dest != htons(8888)) - return; - - udplen = ntohs(udp->len); - if (udplen != sizeof(*udp) + sizeof(*mfm)) - return; - cur += sizeof(*udp); - - mfm = (const struct meas_feed_meas *) cur; - - handle_mfm(h, mfm); -} - -int main(int argc, char **argv) -{ - char errbuf[PCAP_ERRBUF_SIZE+1]; - char *pcap_fname, *db_fname; - pcap_t *pc; - int rc; - - if (argc < 3) { - fprintf(stderr, "You need to specify PCAP and database file\n"); - exit(2); - } - - pcap_fname = argv[1]; - db_fname = argv[2]; - - pc = pcap_open_offline(pcap_fname, errbuf); - if (!pc) { - fprintf(stderr, "Cannot open %s: %s\n", pcap_fname, errbuf); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) - exit(0); - - rc = meas_db_begin(db); - if (rc < 0) { - fprintf(stderr, "Error during BEGIN\n"); - exit(1); - } - - pcap_loop(pc, 0 , pcap_cb, NULL); - - meas_db_commit(db); - - exit(0); -} diff --git a/src/utils/meas_udp2db.c b/src/utils/meas_udp2db.c deleted file mode 100644 index c2b5ace..0000000 --- a/src/utils/meas_udp2db.c +++ /dev/null @@ -1,126 +0,0 @@ -/* liesten to meas_feed on UDP and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include "meas_db.h" - -static struct osmo_fd udp_ofd; -static struct meas_db_state *db; - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - const char *scenario; - time_t now = time(NULL); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - if (mfh->msg_type != MEAS_FEED_MEAS) - return -EINVAL; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, now, - scenario, &mfm->mr); - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - char *db_fname; - int rc; - - msgb_talloc_ctx_init(NULL, 0); - - if (argc < 2) { - fprintf(stderr, "You have to specify the database file name\n"); - exit(2); - } - - db_fname = argv[1]; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, - IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) { - fprintf(stderr, "Unable to create UDP listen socket\n"); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) { - fprintf(stderr, "Unable to open database\n"); - exit(1); - } - - /* FIXME: timer-based BEGIN/COMMIT */ - - while (1) { - osmo_select_main(0); - }; - - meas_db_close(db); - - exit(0); -} - diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c deleted file mode 100644 index 5efb300..0000000 --- a/src/utils/meas_vis.c +++ /dev/null @@ -1,310 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -struct ms_state_uni { - CDKSLIDER *cdk; - CDKLABEL *cdk_label; - - time_t last_update; - char label[32]; - char *_lbl[1]; -}; - - -struct ms_state { - struct llist_head list; - - char name[31+1]; - char imsi[15+1]; - struct gsm_meas_rep mr; - - struct ms_state_uni ul; - struct ms_state_uni dl; -}; - -struct state { - struct osmo_fd udp_ofd; - struct llist_head ms_list; - - CDKSCREEN *cdkscreen; - WINDOW *curses_win; - - CDKLABEL *cdk_title; - char *title; - - CDKLABEL *cdk_header; - char header[256]; -}; - -static struct state g_st; - -struct ms_state *find_ms(const char *imsi) -{ - struct ms_state *ms; - - llist_for_each_entry(ms, &g_st.ms_list, list) { - if (!strcmp(ms->imsi, imsi)) - return ms; - } - return NULL; -} - -static struct ms_state *find_alloc_ms(const char *imsi) -{ - struct ms_state *ms; - - ms = find_ms(imsi); - if (!ms) { - ms = talloc_zero(NULL, struct ms_state); - osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); - ms->ul._lbl[0] = ms->ul.label; - ms->dl._lbl[0] = ms->dl.label; - llist_add_tail(&ms->list, &g_st.ms_list); - } - - return ms; -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - struct ms_state *ms = find_alloc_ms(mfm->imsi); - time_t now = time(NULL); - - osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); - memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); - ms->ul.last_update = now; - if (ms->mr.flags & MEAS_REP_F_DL_VALID) - ms->dl.last_update = now; - - /* move to head of list */ - llist_del(&ms->list); - llist_add(&ms->list, &g_st.ms_list); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - - -static void destroy_dir(struct ms_state_uni *uni) -{ - if (uni->cdk) { - destroyCDKSlider(uni->cdk); - uni->cdk = NULL; - } - if (uni->cdk_label) { - destroyCDKLabel(uni->cdk_label); - uni->cdk_label = NULL; - } -} - -#define DIR_UL 0 -#define DIR_DL 1 -static const char *dir_str[2] = { - [DIR_UL] = "UL", - [DIR_DL] = "DL", -}; - -static int colpair_by_qual(uint8_t rx_qual) -{ - if (rx_qual == 0) - return 24; - else if (rx_qual <= 4) - return 32; - else - return 16; -} - -static int colpair_by_lev(int rx_lev) -{ - if (rx_lev < -95) - return 16; - else if (rx_lev < -80) - return 32; - else - return 24; -} - - -void write_uni(struct ms_state *ms, struct ms_state_uni *msu, - struct gsm_rx_lev_qual *lq, int dir, int row) -{ - - char label[128]; - time_t now = time(NULL); - int qual_col = colpair_by_qual(lq->rx_qual); - int lev_col = colpair_by_lev(rxlev2dbm(lq->rx_lev)); - int color, pwr; - - if (dir == DIR_UL) { - pwr = ms->mr.ms_l1.pwr; - } else { - pwr = ms->mr.bs_power; - } - - color = A_REVERSE | COLOR_PAIR(lev_col) | ' '; - snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]); - msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color, - COLS-40, rxlev2dbm(lq->rx_lev), -110, -47, - 1, 2, FALSE, FALSE); - //IsVisibleObj(ms->ul.cdk) = FALSE; - snprintf(msu->label, sizeof(msu->label), "%1d %3d %2u %2d %4u", - qual_col, lq->rx_qual, qual_col, pwr, - ms->mr.ms_l1.ta, ms->mr.ms_timing_offset, - now - msu->last_update); - msu->cdk_label = newCDKLabel(g_st.cdkscreen, RIGHT, row, - msu->_lbl, 1, FALSE, FALSE); -} - -static void update_sliders(void) -{ - int num_vis_sliders = 0; - struct ms_state *ms; -#define HEADER_LINES 2 - - /* remove all sliders */ - llist_for_each_entry(ms, &g_st.ms_list, list) { - destroy_dir(&ms->ul); - destroy_dir(&ms->dl); - - } - - llist_for_each_entry(ms, &g_st.ms_list, list) { - struct gsm_rx_lev_qual *lq; - unsigned int row = HEADER_LINES + num_vis_sliders*3; - - if (ms->mr.flags & MEAS_REP_F_UL_DTX) - lq = &ms->mr.ul.sub; - else - lq = &ms->mr.ul.full; - write_uni(ms, &ms->ul, lq, DIR_UL, row); - - if (ms->mr.flags & MEAS_REP_F_DL_DTX) - lq = &ms->mr.dl.sub; - else - lq = &ms->mr.dl.full; - write_uni(ms, &ms->dl, lq, DIR_DL, row+1); - - num_vis_sliders++; - if (num_vis_sliders >= LINES/3) - break; - } - - refreshCDKScreen(g_st.cdkscreen); - -} - -const struct value_string col_strs[] = { - { COLOR_WHITE, "white" }, - { COLOR_RED, "red" }, - { COLOR_GREEN, "green" }, - { COLOR_YELLOW, "yellow" }, - { COLOR_BLUE, "blue" }, - { COLOR_MAGENTA,"magenta" }, - { COLOR_CYAN, "cyan" }, - { COLOR_BLACK, "black" }, - { 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc; - char *header[1]; - char *title[1]; - - msgb_talloc_ctx_init(NULL, 0); - - printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); - printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); - - INIT_LLIST_HEAD(&g_st.ms_list); - g_st.curses_win = initscr(); - g_st.cdkscreen = initCDKScreen(g_st.curses_win); - initCDKColor(); - - g_st.title = "OpenBSC link quality monitor"; - title[0] = g_st.title; - g_st.cdk_title = newCDKLabel(g_st.cdkscreen, CENTER, 0, title, 1, FALSE, FALSE); - - snprintf(g_st.header, sizeof(g_st.header), "Q Pwr TA TO Time"); - header[0] = g_st.header; - g_st.cdk_header = newCDKLabel(g_st.cdkscreen, RIGHT, 1, header, 1, FALSE, FALSE); - -#if 0 - int i; - for (i = 0; i < 64; i++) { - short f, b; - pair_content(i, &f, &b); - attron(COLOR_PAIR(i)); - printw("%u: %u (%s) ", i, f, get_value_string(col_strs, f)); - printw("%u (%s)\n\r", b, get_value_string(col_strs, b)); - } - refresh(); - getch(); - exit(0); -#endif - - g_st.udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - update_sliders(); - }; - - exit(0); -} -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:45:50 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sat, 2 Dec 2017 21:45:50 +0000 Subject: osmo-ci[master]: Use stow for dependency management In-Reply-To: References: Message-ID: Patch Set 3: > stow is now installed on all build slaves, wiki also lists stow > now. Is there anything I can do to move forward with change? -- To view, visit https://gerrit.osmocom.org/2691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Andr? Boddenberg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: blobb Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 21:59:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 21:59:37 +0000 Subject: osmo-ci[master]: Describe our normal (non-gerrit) build jobs in jenkins-job-b... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (6 comments) Looks good except for these ideas, but don't bother to edit, I have the tweaks ready in an additional patch. Let's then just merge and fix the jobs in subsequent commits? https://gerrit.osmocom.org/#/c/4827/2/jobs/normal-builds.yml File jobs/normal-builds.yml: Line 2: # One cane simply add a gerrit job by adding project's repository to repos list. comment still says "gerrit builds" Line 12: a1_name: a1 I wish there was a better way than these static numbered axes. Because even if a job doesn't use them, the workspace is cluttered by a1-default/a2-default/a3-default/a4-default subdirs. Need to try out alternatives... Line 70: - osmo-gsm-tester_build-osmo-stp technical detail: the osmo-gsm-tester builds are downstream builds, yes, but we configured that with the osmo-gsm-tester builds: instead of telling libosmo-sccp to build osmo-gsm-tester_build-osmo-stp when done, we configure the osmo-gsm-tester_osmo-stp to build after libosmo-sccp. So that the master branch builds don't need to have any knowledge of osmo-gsm-tester. (same with osmo-ggsn below) Line 209: - osmo-mgw should rather be post-build triggers of osmo-iuh and osmo-mgw, like the others. Then we can also drop the pollscm here, and use the pollscm that is common to all other builds. Line 264: - '{repos}' I'd humbly propose that we call these jobs 'master-*'. It more accurately says what they build, and also we can install the jobs from this file next to the current, old ones, without overwriting them and thus we'll have an easy rollback path. The new ones can co-exist with the old ones until the new ones are verified to work, at which point we can drop the old ones. Line 313: - '*/master' IIUC the safest setting here is 'refs/remotes/origin/master', I'll give it a try -- To view, visit https://gerrit.osmocom.org/4827 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:04:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 2 Dec 2017 22:04:22 +0000 Subject: osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Patch Set 1: Related task: https://osmocom.org/issues/2522 -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:07:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:07:08 +0000 Subject: [PATCH] osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml Message-ID: Review at https://gerrit.osmocom.org/5140 jobs: rename normal-builds.yml to master-builds.yml Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e --- R jobs/master-builds.yml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/40/5140/1 diff --git a/jobs/normal-builds.yml b/jobs/master-builds.yml similarity index 99% rename from jobs/normal-builds.yml rename to jobs/master-builds.yml index f61715a..f058b42 100644 --- a/jobs/normal-builds.yml +++ b/jobs/master-builds.yml @@ -2,7 +2,7 @@ # One cane simply add a gerrit job by adding project's repository to repos list. - project: - name: normal_build + name: master_build # following default values can be overridden by each repo disabled: false concurrent: false @@ -261,7 +261,7 @@ - osmocom-bb jobs: - - '{repos}' + - 'master-{repos}' - job-template: name: '{repos}' -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:07:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:07:08 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master-builds: apply various initial fixes Message-ID: Review at https://gerrit.osmocom.org/5141 jobs: master-builds: apply various initial fixes libosmo-sccp, osmo-ggsn: The osmo-gsm-tester builds are downstream builds, yes, but we configured that with the osmo-gsm-tester builds: instead of telling libosmo-sccp to build osmo-gsm-tester_build-osmo-stp when done, we configure the osmo-gsm-tester_osmo-stp to build after libosmo-sccp. So that the master branch builds don't need to have any knowledge of osmo-gsm-tester. osmo-msc build triggers should rather be post-build triggers of osmo-iuh and osmo-mgw, like the others. Then we can also drop the pollscm here, and use the pollscm that is common to all other builds. Call these jobs 'master-*'. It more accurately says what they build, and also we can install the jobs from this file next to the current, old ones, without overwriting them and thus we'll have an easy rollback path. The new ones can co-exist with the old ones until the new ones are verified to work, at which point we can drop the old ones. Line 313: IIUC the safest git branch is 'refs/remotes/origin/master'. This is still untested! Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 --- M jobs/master-builds.yml 1 file changed, 11 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/41/5141/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index f058b42..782b150 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -1,5 +1,4 @@ -# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. -# One cane simply add a gerrit job by adding project's repository to repos list. +# All master branch verification builds, https://jenkins.osmocom.org/jenkins/view/master/ - project: name: master_build @@ -67,7 +66,6 @@ downstream-ext: projects: - openbsc - - osmo-gsm-tester_build-osmo-stp - libosmocore: a1_name: arch @@ -160,7 +158,6 @@ publishers: downstream-ext: projects: - - osmo-gsm-tester_build-osmo-ggsn - osmo-sgsn - osmo-gmr @@ -183,7 +180,11 @@ - osmo-hlr: slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] - - osmo-iuh + - osmo-iuh: + publishers: + downstream-ext: + projects: + - osmo-msc - osmo-mgw: a1_name: MGCP @@ -195,18 +196,14 @@ -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh + publishers: + downstream-ext: + projects: + - osmo-msc - osmo-msc: a1_name: IU a1: !!python/tuple [--enable-iu, --disable-iu] - triggers: - - pollscm: - cron: "H/5 * * * *" - ignore-post-commit-hooks: false - - reverse: - jobs: - - osmo-iuh - - osmo-mgw concurrent: true cmd: > # keep first line with less indent to preserve newlines @@ -310,7 +307,7 @@ - git: url: git://git.osmocom.org/{repos} branches: - - '*/master' + - 'refs/remotes/origin/master' refspec: name: wipe-workspace: false -- To view, visit https://gerrit.osmocom.org/5141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:07:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:07:38 +0000 Subject: osmo-ci[master]: Describe our normal (non-gerrit) build jobs in jenkins-job-b... In-Reply-To: References: Message-ID: Patch Set 3: Verified+1 not verified yet, but it doesn't matter either -- To view, visit https://gerrit.osmocom.org/4827 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:07:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:07:50 +0000 Subject: osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 not verified yet, but it doesn't matter either -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:08:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:08:00 +0000 Subject: osmo-ci[master]: jobs: master-builds: apply various initial fixes In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 not verified yet, but it doesn't matter either -- To view, visit https://gerrit.osmocom.org/5141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:09:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:09:50 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master-builds: osmo-bsc is now also a downstream of os... Message-ID: Review at https://gerrit.osmocom.org/5142 jobs: master-builds: osmo-bsc is now also a downstream of osmo-mgw Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/42/5142/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 782b150..797b4bc 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -200,6 +200,7 @@ downstream-ext: projects: - osmo-msc + - osmo-bsc - osmo-msc: a1_name: IU -- To view, visit https://gerrit.osmocom.org/5142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:18:25 +0000 Subject: [PATCH] osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml In-Reply-To: References: Message-ID: jobs: rename normal-builds.yml to master-builds.yml Also apply the rename in the job names Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e --- R jobs/master-builds.yml 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/40/5140/2 diff --git a/jobs/normal-builds.yml b/jobs/master-builds.yml similarity index 99% rename from jobs/normal-builds.yml rename to jobs/master-builds.yml index f61715a..aa4edb3 100644 --- a/jobs/normal-builds.yml +++ b/jobs/master-builds.yml @@ -2,7 +2,7 @@ # One cane simply add a gerrit job by adding project's repository to repos list. - project: - name: normal_build + name: master_build # following default values can be overridden by each repo disabled: false concurrent: false @@ -261,10 +261,10 @@ - osmocom-bb jobs: - - '{repos}' + - 'master-{repos}' - job-template: - name: '{repos}' + name: 'master-{repos}' project-type: matrix node: '{node}' concurrent: '{obj:concurrent}' -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:18:25 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master-branches: trigger sgsn from iuh Message-ID: Review at https://gerrit.osmocom.org/5143 jobs: master-branches: trigger sgsn from iuh osmo-sgsn uses libosmo-ranap and hence should be triggered from osmo-iuh. This naturally "includes" a trigger for libosmo-sigtran. Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/43/5143/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index f862770..55e8458 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -185,6 +185,7 @@ downstream-ext: projects: - osmo-msc + - osmo-sgsn - osmo-mgw: a1_name: MGCP -- To view, visit https://gerrit.osmocom.org/5143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 2 22:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 2 Dec 2017 22:18:25 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master-builds: libosmo-sigtran should trigger bsc and iuh Message-ID: Review at https://gerrit.osmocom.org/5144 jobs: master-builds: libosmo-sigtran should trigger bsc and iuh osmo-iuh in turn triggers osmo-msc and osmo-sgsn, no explicit triggers needed here. Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a --- M jobs/master-builds.yml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/44/5144/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 55e8458..b127069 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -66,6 +66,8 @@ downstream-ext: projects: - openbsc + - osmo-iuh + - osmo-bsc - libosmocore: a1_name: arch -- To view, visit https://gerrit.osmocom.org/5144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:53:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:53:00 +0000 Subject: osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:54:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:54:03 +0000 Subject: osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Patch Set 1: are we sure that the individual programs each actually use all of the libraries you have listed in their CFLAGS now? We typically don't list all libraries' CFLAGS for each of the programs/libraries. We only do so, if they actually use definitions/symbols from that library. -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:55:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:55:40 +0000 Subject: osmo-ci[master]: jobs: master-builds: libosmo-sigtran should trigger bsc and iuh In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:55:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:55:43 +0000 Subject: osmo-ci[master]: jobs: master-branches: trigger sgsn from iuh In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:55:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:55:47 +0000 Subject: osmo-ci[master]: jobs: master-builds: osmo-bsc is now also a downstream of os... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:55:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:55:55 +0000 Subject: osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:57:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:57:23 +0000 Subject: osmo-ci[master]: jobs: master-builds: apply various initial fixes In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5141/2/jobs/master-builds.yml File jobs/master-builds.yml: Line 1: # All master branch verification builds, https://jenkins.osmocom.org/jenkins/view/master/ since you're referring to a master "view", it makes sense to also create that view in this JJB description, right? I think it can be created with a "master-*" regex so it automatically picks up all builds following the naming scheme here. -- To view, visit https://gerrit.osmocom.org/5141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:57:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 08:57:56 +0000 Subject: [MERGED] osmo-bts[master]: measurment.c: Introduce INFO category for DMEAS logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: measurment.c: Introduce INFO category for DMEAS logging ...................................................................... measurment.c: Introduce INFO category for DMEAS logging There's no point in either having full verbosity in DEBUG level and not logging any measurement related information in INFO. Let's at least print the results at the end of each measurement period in INFO level. Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99 --- M src/common/measurement.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/measurement.c b/src/common/measurement.c index 36120c0..e4b8720 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -333,7 +333,7 @@ irssi_sub_sum = irssi_full_sum; } - DEBUGP(DMEAS, "%s Computed TA(% 4dqb) BER-FULL(%2u.%02u%%), RSSI-FULL(-%3udBm), " + LOGP(DMEAS, LOGL_INFO, "%s Computed TA(% 4dqb) BER-FULL(%2u.%02u%%), RSSI-FULL(-%3udBm), " "BER-SUB(%2u.%02u%%), RSSI-SUB(-%3udBm)\n", gsm_lchan_name(lchan), taqb_sum, ber_full_sum/100, ber_full_sum%100, irssi_full_sum, ber_sub_sum/100, ber_sub_sum%100, @@ -349,7 +349,7 @@ mru->full.rx_qual = ber10k_to_rxqual(ber_full_sum); mru->sub.rx_qual = ber10k_to_rxqual(ber_sub_sum); - DEBUGP(DMEAS, "%s UL MEAS RXLEV_FULL(%u), RXLEV_SUB(%u)," + LOGP(DMEAS, LOGL_INFO, "%s UL MEAS RXLEV_FULL(%u), RXLEV_SUB(%u)," "RXQUAL_FULL(%u), RXQUAL_SUB(%u), num_meas_sub(%u), num_ul_meas(%u) \n", gsm_lchan_name(lchan), mru->full.rx_lev, -- To view, visit https://gerrit.osmocom.org/5137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 08:59:13 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sun, 3 Dec 2017 08:59:13 +0000 Subject: osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Patch Set 1: > are we sure that the individual programs each actually use all of > the libraries you have listed in their CFLAGS now? We typically > don't list all libraries' CFLAGS for each of the programs/libraries. > We only do so, if they actually use definitions/symbols from that > library. Yes, all additions are based on actual build failures in my environment in which libraries are installed in distinct directories and then symlinked to a common one with GNU stow. Please see also https://gerrit.osmocom.org/#/c/2691 which would help in detecting such missing entries. -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:01:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:01:37 +0000 Subject: [PATCH] libosmo-abis[master]: Add a new osmo_rtp_set_source_desc() function to set the RTC... Message-ID: Review at https://gerrit.osmocom.org/5145 Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items This allows the users of libosmotrau to set the content of the SDES items to something more useful than their compile-time defaults. Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Related: OS#2701 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/45/5145/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..b02e1eb 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmotrau addition New osmo_rtp_set_source_desc() wrapper around libortp diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 578b1cb..5fb2960 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -100,5 +100,8 @@ uint32_t *recv_packets, uint32_t *recv_octets, uint32_t *recv_lost, uint32_t *last_jitter); +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note); #endif /* _OSMO_ORTP_H */ diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fab020d..739e0c9 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -497,6 +497,9 @@ if (!mblk) return -ENOMEM; + LOGP(DLMIB, LOGL_DEBUG, "%s(rs=%p, len=%u, marker=%d, duration=%u, ts=%u\n", + __func__, rs, payload_len, marker, duration, rs->tx_timestamp); + rtp_set_markbit(mblk, marker); rc = rtp_session_sendm_with_ts(rs->sess, mblk, rs->tx_timestamp); @@ -655,3 +658,10 @@ if (jitter) *last_jitter = jitter->jitter; } + +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note) +{ + rtp_session_set_source_description(rs->sess, cname, name, email, phone, loc, tool, note); +} -- To view, visit https://gerrit.osmocom.org/5145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:32:15 +0000 Subject: [PATCH] osmo-bts[master]: rsl.c: Log RTP socket related errors as DRTP, not DRSL Message-ID: Review at https://gerrit.osmocom.org/5146 rsl.c: Log RTP socket related errors as DRTP, not DRSL The respective errors/events occur as a result of calling osmo_rtp_* API, and are clearly more fitting into the DRTP category than the DRSL, even though the respective actions are triggered by RSL. Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef --- M src/common/rsl.c 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/5146/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 1ebc8b2..461b21d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1061,7 +1061,7 @@ if (lchan->abis_ip.rtp_socket) { rsl_tx_ipac_dlcx_ind(lchan, RSL_ERR_NORMAL_UNSPEC); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on Channel Release "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; @@ -1682,7 +1682,7 @@ lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1697,11 +1697,11 @@ OSMO_RTP_P_JITBUF, btsb->rtp_jitter_buf_ms); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to set RTP socket parameters: %s\n", gsm_lchan_name(lchan), strerror(-rc)); else - LOGP(DRSL, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "%s IPAC set RTP socket parameters: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.rtp_socket->priv = lchan; @@ -1724,7 +1724,7 @@ rc = osmo_rtp_socket_bind(lchan->abis_ip.rtp_socket, ipstr, -1); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1761,7 +1761,7 @@ rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket, inet_ntoa(ia), ntohs(connect_port)); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s Failed to connect RTP/RTCP sockets\n", gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); @@ -1778,7 +1778,7 @@ &lchan->abis_ip.bound_ip, &port); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, "%s IPAC cannot obtain " + LOGP(DRTP, LOGL_ERROR, "%s IPAC cannot obtain " "locally bound IP/port: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.bound_port = port; @@ -1819,7 +1819,7 @@ inc_conn_id = 1; rc = rsl_tx_ipac_dlcx_ack(lchan, inc_conn_id); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on DLCX "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; -- To view, visit https://gerrit.osmocom.org/5146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:32:16 +0000 Subject: [PATCH] osmo-bts[master]: Put useful information in RTCP SDES. Message-ID: Review at https://gerrit.osmocom.org/5147 Put useful information in RTCP SDES. The RTCP Sender Description is supposed to contain useful information to identify the source of the RTP stream. So far, it only contained compile-time default data of libortp. Let's put the BTS UnitID, the lchan number and the OsmoBTS version in there. This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Related: OS#2701 --- M include/osmo-bts/gsm_data_shared.h M src/common/gsm_data_shared.c M src/common/rsl.c 3 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/5147/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 4c0fe5c..a05e4ca 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -1002,5 +1002,6 @@ enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts); uint8_t ts_subslots(struct gsm_bts_trx_ts *ts); bool ts_is_tch(struct gsm_bts_trx_ts *ts); +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx); #endif diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index c2d196b..f4fda55 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -851,3 +851,12 @@ { return pchan_is_tch(ts_pchan(ts)); } + +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx) +{ + static char buf[23]; + + snprintf(buf, sizeof(buf), "%u/%u/%u", trx->bts->ip_access.site_id, + trx->bts->ip_access.bts_id, trx->nr); + return buf; +} diff --git a/src/common/rsl.c b/src/common/rsl.c index 461b21d..60f964e 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -20,6 +20,8 @@ * */ +#include "btsconfig.h" /* for PACKAGE_VERSION */ + #include #include #include @@ -1668,6 +1670,7 @@ } if (dch->c.msg_type == RSL_MT_IPAC_CRCX) { + char cname[32]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, " @@ -1736,6 +1739,12 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } + /* Ensure RTCP SDES contains some useful information */ + snprintf(cname, sizeof(cname), "bts@%s", ipstr); + osmo_rtp_set_source_desc(lchan->abis_ip.rtp_socket, cname, + gsm_lchan_name(lchan), NULL, NULL, + gsm_trx_unit_id(lchan->ts->trx), + "OsmoBTS-" PACKAGE_VERSION, NULL); /* FIXME: multiplex connection, BSC proxy */ } else { /* MDCX */ -- To view, visit https://gerrit.osmocom.org/5147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:35:55 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5136 to look at the new patch set (#3). osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS The upper layers (L1SAP, the common part of L1) *always* require frame numbers in the uplink direction to be reported as the frame number of the *first* burst, not the last burst of a given block. This is particularly important in the case of passing up measurement information, as we use this frame number to detect if the measurement interval for that specific timeslot has just ended (and hence we must process the measurements and send an uplink measurement report to the BSC. Before this patch, the measurement results were reported with the *last* frame number, which caused the common/measurement.c code never detect the end of a measurement window. On TS2, tons of the following log messages were observed: <0004> measurement.c:199 (bts=0,trx=0,ts=2,ss=0) no space for uplink measurement, num_ul_meas=104 With this patch, it behves as expected: the measurements of 25 blocks (= 100 bursts) are aggregated, after which point the report is computed and sent. Subsequently, num_ul_meas is reset to 0 and the cycle restarts. Related: OS#2329 Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/5136/3 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 0549156..d3928f1 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -843,7 +843,7 @@ l2_len = GSM_MACBLOCK_LEN; /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); ber10k = compute_ber10k(n_bits_total, n_errors); return _sched_compose_ph_data_ind(l1t, tn, *first_fn, chan, l2, l2_len, @@ -860,6 +860,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; float *rssi_sum = &chan_state->rssi_sum; uint8_t *rssi_num = &chan_state->rssi_num; @@ -884,6 +885,7 @@ if (bid == 0) { memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS); *mask = 0x0; + *first_fn = fn; *rssi_sum = 0; *rssi_num = 0; *toa_sum = 0; @@ -937,7 +939,7 @@ /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { @@ -959,6 +961,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -985,6 +988,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 464); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1047,7 +1051,7 @@ memcpy(*bursts_p, *bursts_p + 464, 464); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ @@ -1117,6 +1121,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1148,6 +1153,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 232); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1221,7 +1227,7 @@ memcpy(*bursts_p + 232, *bursts_p + 464, 232); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:35:55 +0000 Subject: [PATCH] osmo-bts[master]: rsl.c: Log RTP socket related errors as DRTP, not DRSL In-Reply-To: References: Message-ID: rsl.c: Log RTP socket related errors as DRTP, not DRSL The respective errors/events occur as a result of calling osmo_rtp_* API, and are clearly more fitting into the DRTP category than the DRSL, even though the respective actions are triggered by RSL. Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef --- M src/common/rsl.c 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/5146/2 diff --git a/src/common/rsl.c b/src/common/rsl.c index 1ebc8b2..461b21d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1061,7 +1061,7 @@ if (lchan->abis_ip.rtp_socket) { rsl_tx_ipac_dlcx_ind(lchan, RSL_ERR_NORMAL_UNSPEC); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on Channel Release "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; @@ -1682,7 +1682,7 @@ lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1697,11 +1697,11 @@ OSMO_RTP_P_JITBUF, btsb->rtp_jitter_buf_ms); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to set RTP socket parameters: %s\n", gsm_lchan_name(lchan), strerror(-rc)); else - LOGP(DRSL, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "%s IPAC set RTP socket parameters: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.rtp_socket->priv = lchan; @@ -1724,7 +1724,7 @@ rc = osmo_rtp_socket_bind(lchan->abis_ip.rtp_socket, ipstr, -1); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1761,7 +1761,7 @@ rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket, inet_ntoa(ia), ntohs(connect_port)); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s Failed to connect RTP/RTCP sockets\n", gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); @@ -1778,7 +1778,7 @@ &lchan->abis_ip.bound_ip, &port); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, "%s IPAC cannot obtain " + LOGP(DRTP, LOGL_ERROR, "%s IPAC cannot obtain " "locally bound IP/port: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.bound_port = port; @@ -1819,7 +1819,7 @@ inc_conn_id = 1; rc = rsl_tx_ipac_dlcx_ack(lchan, inc_conn_id); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on DLCX "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; -- To view, visit https://gerrit.osmocom.org/5146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:35:55 +0000 Subject: [PATCH] osmo-bts[master]: Put useful information in RTCP SDES. In-Reply-To: References: Message-ID: Put useful information in RTCP SDES. The RTCP Sender Description is supposed to contain useful information to identify the source of the RTP stream. So far, it only contained compile-time default data of libortp. Let's put the BTS UnitID, the lchan number and the OsmoBTS version in there. This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Related: OS#2701 --- M include/osmo-bts/gsm_data_shared.h M src/common/gsm_data_shared.c M src/common/rsl.c 3 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/5147/2 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 4c0fe5c..a05e4ca 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -1002,5 +1002,6 @@ enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts); uint8_t ts_subslots(struct gsm_bts_trx_ts *ts); bool ts_is_tch(struct gsm_bts_trx_ts *ts); +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx); #endif diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index c2d196b..f4fda55 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -851,3 +851,12 @@ { return pchan_is_tch(ts_pchan(ts)); } + +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx) +{ + static char buf[23]; + + snprintf(buf, sizeof(buf), "%u/%u/%u", trx->bts->ip_access.site_id, + trx->bts->ip_access.bts_id, trx->nr); + return buf; +} diff --git a/src/common/rsl.c b/src/common/rsl.c index 461b21d..60f964e 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -20,6 +20,8 @@ * */ +#include "btsconfig.h" /* for PACKAGE_VERSION */ + #include #include #include @@ -1668,6 +1670,7 @@ } if (dch->c.msg_type == RSL_MT_IPAC_CRCX) { + char cname[32]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, " @@ -1736,6 +1739,12 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } + /* Ensure RTCP SDES contains some useful information */ + snprintf(cname, sizeof(cname), "bts@%s", ipstr); + osmo_rtp_set_source_desc(lchan->abis_ip.rtp_socket, cname, + gsm_lchan_name(lchan), NULL, NULL, + gsm_trx_unit_id(lchan->ts->trx), + "OsmoBTS-" PACKAGE_VERSION, NULL); /* FIXME: multiplex connection, BSC proxy */ } else { /* MDCX */ -- To view, visit https://gerrit.osmocom.org/5147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 09:57:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 09:57:13 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES Message-ID: Review at https://gerrit.osmocom.org/5148 osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES Contrary to osmo-bts-sysmo, the OCTPHY-2G does not have different L1 SAPI for AGCH and PCH. It uses cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH for both, and we convert that to the cbits=0x12 (Downlink CCCH) on the L1SAP. The code above L1SAP can hence freely decide if it wants to respond with an AGCH or PCH message, based on its knowledge of BS_AG_BLKS_RES, without the OCTPHY specific code having to do anything about it. Hence, there's nothing to do, and the warning can be removed Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41 Related: OS#1575 --- M src/osmo-bts-octphy/l1_if.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/5148/1 diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index e4ab538..fce3484 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -516,7 +516,6 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " -- To view, visit https://gerrit.osmocom.org/5148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:01:17 +0000 Subject: osmo-bts[master]: rsl.c: Log RTP socket related errors as DRTP, not DRSL In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:01:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:01:42 +0000 Subject: osmo-bts[master]: Put useful information in RTCP SDES. In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:02:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:02:00 +0000 Subject: osmo-bts[master]: osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:02:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:02:33 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:03:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:03:10 +0000 Subject: libosmo-abis[master]: Add a new osmo_rtp_set_source_desc() function to set the RTC... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5145/1/src/trau/osmo_ortp.c File src/trau/osmo_ortp.c: Line 500: LOGP(DLMIB, LOGL_DEBUG, "%s(rs=%p, len=%u, marker=%d, duration=%u, ts=%u\n", unrelated change slipped in -- To view, visit https://gerrit.osmocom.org/5145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:04:00 +0000 Subject: [PATCH] libosmo-abis[master]: Add a new osmo_rtp_set_source_desc() function to set the RTC... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5145 to look at the new patch set (#2). Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items This allows the users of libosmotrau to set the content of the SDES items to something more useful than their compile-time defaults. Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Related: OS#2701 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/45/5145/2 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..b02e1eb 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmotrau addition New osmo_rtp_set_source_desc() wrapper around libortp diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 578b1cb..5fb2960 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -100,5 +100,8 @@ uint32_t *recv_packets, uint32_t *recv_octets, uint32_t *recv_lost, uint32_t *last_jitter); +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note); #endif /* _OSMO_ORTP_H */ diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fab020d..8ea05e4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -655,3 +655,10 @@ if (jitter) *last_jitter = jitter->jitter; } + +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note) +{ + rtp_session_set_source_description(rs->sess, cname, name, email, phone, loc, tool, note); +} -- To view, visit https://gerrit.osmocom.org/5145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:04:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:04:21 +0000 Subject: libosmo-abis[master]: Add a new osmo_rtp_set_source_desc() function to set the RTC... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:11:23 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 3 Dec 2017 10:11:23 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:17:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:17:17 +0000 Subject: [PATCH] osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Hello Max, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5030 to look at the new patch set (#4). DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash Problem: lchan->tch.dtx.dl_amr_fsm struct failed to allocate in l1sap_chan_act routine in l1sap.c due to illegal characters contained in lchan->name which are passed to osmo_fsm_inst_alloc routine. As a result, lchan->tch.dtx.dl_amr_fsm is NULL causing BTS crashed (SEG FAULT) when trying to access this struct. Below is snapshot of crash log obtained by GDB: ... Fri Nov 24 18:13:55 2017 <0000> rsl.c:1653 payload type: 98 Fri Nov 24 18:13:55 2017 <0000> rsl.c:1463 (bts=0,trx=0,ts=2,ss=0) RSL Tx IPAC_MDCX_ACK (local 127.0.0.1:11538, remote 127.0.0.1:30012) Program received signal SIGSEGV, Segmentation fault. 0x00031930 in dtx_dl_amr_fsm_step (lchan=lchan at entry=0xb69592a8, rtp_pl=rtp_pl at entry=0x87ae8 " \024\351Y\363_\337\345\351f\177\373\300\210\201\200\210", rtp_pl_len=17, fn=1728481, l1_payload=0x10dd25 "", marker=marker at entry=true, len=len at entry=0x10ddc4 "\024", ft_out=0xbefff7d7 "\002", ft_out at entry=0xbefff7cf "\276\341_\032") at msg_utils.c:233 233 msg_utils.c: No such file or directory. ... Fix: * Use different formatting for lchan name passed to osmo_fsm_inst_alloc routine * Refuse channel activation if FSM could not be generated (as opposed to crash) Related: OS#2606 Reported-by: Minh-Quang Nguyen Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c --- M src/common/l1sap.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/5030/4 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index d294110..18aee93 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1354,12 +1354,20 @@ return -RSL_ERR_EQUIPMENT_FAIL; /* Init DTX DL FSM if necessary */ - if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) + if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) { + char name[32]; + snprintf(name, sizeof(name), "bts%u-trx%u-ts%u-ss%u", lchan->ts->trx->bts->nr, + lchan->ts->trx->nr, lchan->ts->nr, lchan->nr); lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, tall_bts_ctx, lchan, LOGL_DEBUG, - lchan->name); + name); + if (!lchan->tch.dtx.dl_amr_fsm) { + l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); + return -RSL_ERR_EQUIPMENT_FAIL; + } + } return 0; } -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:30:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:30:41 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 let's wait for Minh or somebody else to be able to re-test this. -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:44:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:44:35 +0000 Subject: [PATCH] osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5139 to look at the new patch set (#2). Remove utils imported from openbsc, fix building remaining util smpp_mirror Related: OS#2522 Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 --- M configure.ac M src/utils/Makefile.am D src/utils/meas_db.c D src/utils/meas_db.h D src/utils/meas_json.c D src/utils/meas_pcap2db.c D src/utils/meas_udp2db.c D src/utils/meas_vis.c 8 files changed, 6 insertions(+), 1,197 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/5139/2 diff --git a/configure.ac b/configure.ac index 5766fd0..6b6e9c7 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index 56b9356..14adcca 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -20,27 +20,10 @@ $(NULL) noinst_HEADERS = \ - meas_db.h \ $(NULL) bin_PROGRAMS = \ - meas_json \ $(NULL) -if HAVE_SQLITE3 -bin_PROGRAMS += \ - osmo-meas-udp2db \ - $(NULL) -if HAVE_PCAP -bin_PROGRAMS += \ - osmo-meas-pcap2db \ - $(NULL) -endif -endif -if HAVE_LIBCDK -bin_PROGRAMS += \ - meas_vis \ - $(NULL) -endif if BUILD_SMPP noinst_PROGRAMS = \ @@ -52,79 +35,15 @@ smpp_mirror.c \ $(NULL) +smpp_mirror_CFLAGS = \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBSMPP34_CFLAGS) \ + $(NULL) + smpp_mirror_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ - $(NULL) - -meas_vis_SOURCES = \ - meas_vis.c \ - $(NULL) - -meas_vis_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - -lcdk \ - -lncurses \ - $(NULL) - -meas_vis_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(NULL) - -osmo_meas_pcap2db_SOURCES = \ - meas_pcap2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_pcap2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - -lpcap \ - $(NULL) - -osmo_meas_pcap2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -osmo_meas_udp2db_SOURCES = \ - meas_udp2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_udp2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - $(NULL) - -osmo_meas_udp2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -meas_json_SOURCES = \ - meas_json.c \ - $(NULL) - -meas_json_LDADD = \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - -meas_json_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ - $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) diff --git a/src/utils/meas_db.c b/src/utils/meas_db.c deleted file mode 100644 index 8cf27df..0000000 --- a/src/utils/meas_db.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Routines for storing measurement reports in SQLite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "meas_db.h" - -#define INS_MR "INSERT INTO meas_rep (time, imsi, name, scenario, nr, bs_power, ms_timing_offset, fpc, ms_l1_pwr, ms_l1_ta) VALUES (?,?,?,?,?,?,?,?,?,?)" -#define INS_UD "INSERT INTO meas_rep_unidir (meas_id, rx_lev_full, rx_lev_sub, rx_qual_full, rx_qual_sub, dtx, uplink) VALUES (?,?,?,?,?,?,?)" -#define UPD_MR "UPDATE meas_rep SET ul_unidir=?, dl_unidir=? WHERE id=?" - -struct meas_db_state { - sqlite3 *db; - sqlite3_stmt *stmt_ins_ud; - sqlite3_stmt *stmt_ins_mr; - sqlite3_stmt *stmt_upd_mr; -}; - -/* macros to check for SQLite3 result codes */ -#define _SCK_OK(db, call, exp) \ - do { \ - int rc = call; \ - if (rc != exp) { \ - fprintf(stderr,"SQL Error in line %u: %s\n", \ - __LINE__, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) -#define SCK_OK(db, call) _SCK_OK(db, call, SQLITE_OK) -#define SCK_DONE(db, call) _SCK_OK(db, call, SQLITE_DONE) - -static int _insert_ud(struct meas_db_state *st, unsigned long meas_id, int dtx, - int uplink, const struct gsm_meas_rep_unidir *ud) -{ - unsigned long rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 1, meas_id)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 2, - rxlev2dbm(ud->full.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 3, - rxlev2dbm(ud->sub.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 4, ud->full.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 5, ud->sub.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 6, dtx)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 7, uplink)); - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_ud)); - - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_ud)); - - return sqlite3_last_insert_rowid(st->db); -err_io: - exit(1); -} - -/* insert a measurement report into the database */ -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr) -{ - int rc; - sqlite3_int64 rowid, ul_rowid, dl_rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 1, timestamp)); - - if (imsi) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 2, - imsi, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 2)); - - if (name) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 3, - name, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 3)); - - if (scenario) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 4, - scenario, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 4)); - - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 5, mr->nr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 6, mr->bs_power)); - - if (mr->flags & MEAS_REP_F_MS_TO) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 7, mr->ms_timing_offset)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 7)); - - if (mr->flags & MEAS_REP_F_FPC) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 1)); - else - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 0)); - - if (mr->flags & MEAS_REP_F_MS_L1) { - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 9, - mr->ms_l1.pwr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 10, - mr->ms_l1.ta)); - } - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_mr)); - - rowid = sqlite3_last_insert_rowid(st->db); - - /* insert uplink measurement */ - ul_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_UL_DTX, - 1, &mr->ul); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 1, ul_rowid)); - - /* insert downlink measurement, if present */ - if (mr->flags & MEAS_REP_F_DL_VALID) { - dl_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_DL_DTX, - 0, &mr->dl); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 2, dl_rowid)); - } else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_upd_mr, 2)); - - /* update meas_rep with the id's of the unidirectional - * measurements */ - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 3, rowid)); - SCK_DONE(st->db, sqlite3_step(st->stmt_upd_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_upd_mr)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_begin(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "BEGIN", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_commit(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "COMMIT", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -static const char *create_stmts[] = { - "CREATE TABLE IF NOT EXISTS meas_rep (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "time TIMESTAMP," - "imsi TEXT," - "name TEXT," - "scenario TEXT," - "nr INTEGER," - "bs_power INTEGER NOT NULL," - "ms_timing_offset INTEGER," - "fpc INTEGER NOT NULL DEFAULT 0," - "ul_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "dl_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "ms_l1_pwr INTEGER," - "ms_l1_ta INTEGER" - ")", - "CREATE TABLE IF NOT EXISTS meas_rep_unidir (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "meas_id INTEGER NOT NULL REFERENCES meas_rep(id)," - "rx_lev_full INTEGER NOT NULL," - "rx_lev_sub INTEGER NOT NULL," - "rx_qual_full INTEGER NOT NULL," - "rx_qual_sub INTEGER NOT NULL," - "dtx BOOLEAN NOT NULL DEFAULT 0," - "uplink BOOLEAN NOT NULL" - ")", - "CREATE VIEW IF NOT EXISTS path_loss AS " - "SELECT " - "meas_rep.id, " - "datetime(time,'unixepoch') AS timestamp, " - "imsi, " - "name, " - "scenario, " - "ms_timing_offset, " - "ms_l1_ta, " - "fpc, " - "ms_l1_pwr, " - "ud_ul.rx_lev_full AS ul_rx_lev_full, " - "ms_l1_pwr-ud_ul.rx_lev_full AS ul_path_loss_full, " - "ud_ul.rx_lev_sub ul_rx_lev_sub, " - "ms_l1_pwr-ud_ul.rx_lev_sub AS ul_path_loss_sub, " - "ud_ul.rx_qual_full AS ul_rx_qual_full, " - "ud_ul.rx_qual_sub AS ul_rx_qual_sub, " - "bs_power, " - "ud_dl.rx_lev_full AS dl_rx_lev_full, " - "bs_power-ud_dl.rx_lev_full AS dl_path_loss_full, " - "ud_dl.rx_lev_sub AS dl_rx_lev_sub, " - "bs_power-ud_dl.rx_lev_sub AS dl_path_loss_sub, " - "ud_dl.rx_qual_full AS dl_rx_qual_full, " - "ud_dl.rx_qual_sub AS dl_rx_qual_sub " - "FROM " - "meas_rep, " - "meas_rep_unidir AS ud_dl, " - "meas_rep_unidir AS ud_ul " - "WHERE " - "ud_ul.id = meas_rep.ul_unidir AND " - "ud_dl.id = meas_rep.dl_unidir", - "CREATE VIEW IF NOT EXISTS overview AS " - "SELECT " - "id," - "timestamp," - "imsi," - "name," - "scenario," - "ms_l1_pwr," - "ul_rx_lev_full," - "ul_path_loss_full," - "ul_rx_qual_full," - "bs_power," - "dl_rx_lev_full," - "dl_path_loss_full," - "dl_rx_qual_full " - "FROM path_loss", -}; - -static int check_create_tbl(struct meas_db_state *st) -{ - int i, rc; - - for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - SCK_OK(st->db, sqlite3_exec(st->db, create_stmts[i], - NULL, NULL, NULL)); - } - - return 0; -err_io: - return -EIO; -} - - -#define PREP_CHK(db, stmt, ptr) \ - do { \ - int rc; \ - rc = sqlite3_prepare_v2(db, stmt, strlen(stmt)+1, \ - ptr, NULL); \ - if (rc != SQLITE_OK) { \ - fprintf(stderr, "Error during prepare of '%s': %s\n", \ - stmt, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) - -struct meas_db_state *meas_db_open(void *ctx, const char *fname) -{ - int rc; - struct meas_db_state *st = talloc_zero(ctx, struct meas_db_state); - - if (!st) - return NULL; - - rc = sqlite3_open_v2(fname, &st->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, - NULL); - if (rc != SQLITE_OK) { - fprintf(stderr, "Unable to open DB: %s\n", - sqlite3_errmsg(st->db)); - goto err_io; - } - - rc = check_create_tbl(st); - - PREP_CHK(st->db, INS_MR, &st->stmt_ins_mr); - PREP_CHK(st->db, INS_UD, &st->stmt_ins_ud); - PREP_CHK(st->db, UPD_MR, &st->stmt_upd_mr); - - return st; -err_io: - talloc_free(st); - return NULL; -} - -void meas_db_close(struct meas_db_state *st) -{ - if (sqlite3_finalize(st->stmt_ins_mr) != SQLITE_OK) - fprintf(stderr, "DB insert measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_ins_ud) != SQLITE_OK) - fprintf(stderr, "DB insert unidir finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_upd_mr) != SQLITE_OK) - fprintf(stderr, "DB update measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_close(st->db) != SQLITE_OK) - fprintf(stderr, "Unable to close DB, abandoning.\n"); - - talloc_free(st); - -} diff --git a/src/utils/meas_db.h b/src/utils/meas_db.h deleted file mode 100644 index 889e902..0000000 --- a/src/utils/meas_db.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENBSC_MEAS_DB_H -#define OPENBSC_MEAS_DB_H - -struct meas_db_state; - -struct meas_db_state *meas_db_open(void *ctx, const char *fname); -void meas_db_close(struct meas_db_state *st); - -int meas_db_begin(struct meas_db_state *st); -int meas_db_commit(struct meas_db_state *st); - -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr); - -#endif diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c deleted file mode 100644 index 8db7791..0000000 --- a/src/utils/meas_json.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Convert measurement report feed into JSON feed printed to stdout. - * Each measurement report is printed as a separae JSON root entry. - * All measurement reports are separated by a new line. - */ - -/* (C) 2015 by Alexander Chemeris - * With parts of code adopted from different places in OpenBSC. - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -static void print_meas_rep_uni_json(struct gsm_meas_rep_unidir *mru) -{ - printf("\"RXL-FULL\":%d, \"RXL-SUB\":%d, ", - rxlev2dbm(mru->full.rx_lev), - rxlev2dbm(mru->sub.rx_lev)); - printf("\"RXQ-FULL\":%d, \"RXQ-SUB\":%d", - mru->full.rx_qual, mru->sub.rx_qual); -} - -static void print_meas_rep_json(struct gsm_meas_rep *mr) -{ - int i; - - printf("\"NR\":%d", mr->nr); - - if (mr->flags & MEAS_REP_F_DL_DTX) - printf(", \"DTXd\":true"); - - printf(", \"UL_MEAS\":{"); - print_meas_rep_uni_json(&mr->ul); - printf("}"); - printf(", \"BS_POWER\":%d", mr->bs_power); - if (mr->flags & MEAS_REP_F_MS_TO) - printf(", \"MS_TO\":%d", mr->ms_timing_offset); - - if (mr->flags & MEAS_REP_F_MS_L1) { - printf(", \"L1_MS_PWR\":%d", mr->ms_l1.pwr); - printf(", \"L1_FPC\":%s", - mr->flags & MEAS_REP_F_FPC ? "true" : "false"); - printf(", \"L1_TA\":%u", mr->ms_l1.ta); - } - - if (mr->flags & MEAS_REP_F_UL_DTX) - printf(", \"DTXu\":true"); - if (mr->flags & MEAS_REP_F_BA1) - printf(", \"BA1\":true"); - if (mr->flags & MEAS_REP_F_DL_VALID) { - printf(", \"DL_MEAS\":{"); - print_meas_rep_uni_json(&mr->dl); - printf("}"); - } - - if (mr->num_cell == 7) - return; - printf(", \"NUM_NEIGH\":%u, \"NEIGH\":[", mr->num_cell); - for (i = 0; i < mr->num_cell; i++) { - struct gsm_meas_rep_cell *mrc = &mr->cell[i]; - if (i!=0) printf(", "); - printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}", - mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev)); - } - printf("]"); -} - -static void print_chan_info_json(struct meas_feed_meas *mfm) -{ - printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " - "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), - mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); -} - -static void print_meas_feed_json(struct meas_feed_meas *mfm) -{ - time_t now = time(NULL); - - printf("{"); - printf("\"time\":%ld, \"imsi\":\"%s\", \"name\":\"%s\", \"scenario\":\"%s\", ", - now, mfm->imsi, mfm->name, mfm->scenario); - - switch (mfm->hdr.version) { - case 1: - printf("\"chan_info\":{"); - print_chan_info_json(mfm); - printf("}, "); - /* no break, fall to version 0 */ - case 0: - printf("\"meas_rep\":{"); - print_meas_rep_json(&mfm->mr); - printf("}"); - break; - } - - printf("}\n"); - -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - - print_meas_feed_json(mfm); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - int rc; - struct osmo_fd udp_ofd; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - }; - - exit(0); -} diff --git a/src/utils/meas_pcap2db.c b/src/utils/meas_pcap2db.c deleted file mode 100644 index 0644521..0000000 --- a/src/utils/meas_pcap2db.c +++ /dev/null @@ -1,138 +0,0 @@ -/* read PCAP file with meas_feed data and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include "meas_db.h" - -static struct meas_db_state *db; - -static void handle_mfm(const struct pcap_pkthdr *h, - const struct meas_feed_meas *mfm) -{ - const char *scenario; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, h->ts.tv_sec, - scenario, &mfm->mr); -} - -static void pcap_cb(u_char *user, const struct pcap_pkthdr *h, - const u_char *bytes) -{ - const char *cur = bytes; - const struct iphdr *ip; - const struct udphdr *udp; - const struct meas_feed_meas *mfm; - uint16_t udplen; - - if (h->caplen < 14+20+8) - return; - - /* Check if there is IPv4 in the Ethernet */ - if (cur[12] != 0x08 || cur[13] != 0x00) - return; - - cur += 14; /* ethernet header */ - ip = (struct iphdr *) cur; - - if (ip->version != 4) - return; - cur += ip->ihl * 4; - - if (ip->protocol != IPPROTO_UDP) - return; - - udp = (struct udphdr *) cur; - - if (udp->dest != htons(8888)) - return; - - udplen = ntohs(udp->len); - if (udplen != sizeof(*udp) + sizeof(*mfm)) - return; - cur += sizeof(*udp); - - mfm = (const struct meas_feed_meas *) cur; - - handle_mfm(h, mfm); -} - -int main(int argc, char **argv) -{ - char errbuf[PCAP_ERRBUF_SIZE+1]; - char *pcap_fname, *db_fname; - pcap_t *pc; - int rc; - - if (argc < 3) { - fprintf(stderr, "You need to specify PCAP and database file\n"); - exit(2); - } - - pcap_fname = argv[1]; - db_fname = argv[2]; - - pc = pcap_open_offline(pcap_fname, errbuf); - if (!pc) { - fprintf(stderr, "Cannot open %s: %s\n", pcap_fname, errbuf); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) - exit(0); - - rc = meas_db_begin(db); - if (rc < 0) { - fprintf(stderr, "Error during BEGIN\n"); - exit(1); - } - - pcap_loop(pc, 0 , pcap_cb, NULL); - - meas_db_commit(db); - - exit(0); -} diff --git a/src/utils/meas_udp2db.c b/src/utils/meas_udp2db.c deleted file mode 100644 index c2b5ace..0000000 --- a/src/utils/meas_udp2db.c +++ /dev/null @@ -1,126 +0,0 @@ -/* liesten to meas_feed on UDP and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include "meas_db.h" - -static struct osmo_fd udp_ofd; -static struct meas_db_state *db; - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - const char *scenario; - time_t now = time(NULL); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - if (mfh->msg_type != MEAS_FEED_MEAS) - return -EINVAL; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, now, - scenario, &mfm->mr); - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - char *db_fname; - int rc; - - msgb_talloc_ctx_init(NULL, 0); - - if (argc < 2) { - fprintf(stderr, "You have to specify the database file name\n"); - exit(2); - } - - db_fname = argv[1]; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, - IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) { - fprintf(stderr, "Unable to create UDP listen socket\n"); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) { - fprintf(stderr, "Unable to open database\n"); - exit(1); - } - - /* FIXME: timer-based BEGIN/COMMIT */ - - while (1) { - osmo_select_main(0); - }; - - meas_db_close(db); - - exit(0); -} - diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c deleted file mode 100644 index 5efb300..0000000 --- a/src/utils/meas_vis.c +++ /dev/null @@ -1,310 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -struct ms_state_uni { - CDKSLIDER *cdk; - CDKLABEL *cdk_label; - - time_t last_update; - char label[32]; - char *_lbl[1]; -}; - - -struct ms_state { - struct llist_head list; - - char name[31+1]; - char imsi[15+1]; - struct gsm_meas_rep mr; - - struct ms_state_uni ul; - struct ms_state_uni dl; -}; - -struct state { - struct osmo_fd udp_ofd; - struct llist_head ms_list; - - CDKSCREEN *cdkscreen; - WINDOW *curses_win; - - CDKLABEL *cdk_title; - char *title; - - CDKLABEL *cdk_header; - char header[256]; -}; - -static struct state g_st; - -struct ms_state *find_ms(const char *imsi) -{ - struct ms_state *ms; - - llist_for_each_entry(ms, &g_st.ms_list, list) { - if (!strcmp(ms->imsi, imsi)) - return ms; - } - return NULL; -} - -static struct ms_state *find_alloc_ms(const char *imsi) -{ - struct ms_state *ms; - - ms = find_ms(imsi); - if (!ms) { - ms = talloc_zero(NULL, struct ms_state); - osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); - ms->ul._lbl[0] = ms->ul.label; - ms->dl._lbl[0] = ms->dl.label; - llist_add_tail(&ms->list, &g_st.ms_list); - } - - return ms; -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - struct ms_state *ms = find_alloc_ms(mfm->imsi); - time_t now = time(NULL); - - osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); - memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); - ms->ul.last_update = now; - if (ms->mr.flags & MEAS_REP_F_DL_VALID) - ms->dl.last_update = now; - - /* move to head of list */ - llist_del(&ms->list); - llist_add(&ms->list, &g_st.ms_list); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - - -static void destroy_dir(struct ms_state_uni *uni) -{ - if (uni->cdk) { - destroyCDKSlider(uni->cdk); - uni->cdk = NULL; - } - if (uni->cdk_label) { - destroyCDKLabel(uni->cdk_label); - uni->cdk_label = NULL; - } -} - -#define DIR_UL 0 -#define DIR_DL 1 -static const char *dir_str[2] = { - [DIR_UL] = "UL", - [DIR_DL] = "DL", -}; - -static int colpair_by_qual(uint8_t rx_qual) -{ - if (rx_qual == 0) - return 24; - else if (rx_qual <= 4) - return 32; - else - return 16; -} - -static int colpair_by_lev(int rx_lev) -{ - if (rx_lev < -95) - return 16; - else if (rx_lev < -80) - return 32; - else - return 24; -} - - -void write_uni(struct ms_state *ms, struct ms_state_uni *msu, - struct gsm_rx_lev_qual *lq, int dir, int row) -{ - - char label[128]; - time_t now = time(NULL); - int qual_col = colpair_by_qual(lq->rx_qual); - int lev_col = colpair_by_lev(rxlev2dbm(lq->rx_lev)); - int color, pwr; - - if (dir == DIR_UL) { - pwr = ms->mr.ms_l1.pwr; - } else { - pwr = ms->mr.bs_power; - } - - color = A_REVERSE | COLOR_PAIR(lev_col) | ' '; - snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]); - msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color, - COLS-40, rxlev2dbm(lq->rx_lev), -110, -47, - 1, 2, FALSE, FALSE); - //IsVisibleObj(ms->ul.cdk) = FALSE; - snprintf(msu->label, sizeof(msu->label), "%1d %3d %2u %2d %4u", - qual_col, lq->rx_qual, qual_col, pwr, - ms->mr.ms_l1.ta, ms->mr.ms_timing_offset, - now - msu->last_update); - msu->cdk_label = newCDKLabel(g_st.cdkscreen, RIGHT, row, - msu->_lbl, 1, FALSE, FALSE); -} - -static void update_sliders(void) -{ - int num_vis_sliders = 0; - struct ms_state *ms; -#define HEADER_LINES 2 - - /* remove all sliders */ - llist_for_each_entry(ms, &g_st.ms_list, list) { - destroy_dir(&ms->ul); - destroy_dir(&ms->dl); - - } - - llist_for_each_entry(ms, &g_st.ms_list, list) { - struct gsm_rx_lev_qual *lq; - unsigned int row = HEADER_LINES + num_vis_sliders*3; - - if (ms->mr.flags & MEAS_REP_F_UL_DTX) - lq = &ms->mr.ul.sub; - else - lq = &ms->mr.ul.full; - write_uni(ms, &ms->ul, lq, DIR_UL, row); - - if (ms->mr.flags & MEAS_REP_F_DL_DTX) - lq = &ms->mr.dl.sub; - else - lq = &ms->mr.dl.full; - write_uni(ms, &ms->dl, lq, DIR_DL, row+1); - - num_vis_sliders++; - if (num_vis_sliders >= LINES/3) - break; - } - - refreshCDKScreen(g_st.cdkscreen); - -} - -const struct value_string col_strs[] = { - { COLOR_WHITE, "white" }, - { COLOR_RED, "red" }, - { COLOR_GREEN, "green" }, - { COLOR_YELLOW, "yellow" }, - { COLOR_BLUE, "blue" }, - { COLOR_MAGENTA,"magenta" }, - { COLOR_CYAN, "cyan" }, - { COLOR_BLACK, "black" }, - { 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc; - char *header[1]; - char *title[1]; - - msgb_talloc_ctx_init(NULL, 0); - - printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); - printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); - - INIT_LLIST_HEAD(&g_st.ms_list); - g_st.curses_win = initscr(); - g_st.cdkscreen = initCDKScreen(g_st.curses_win); - initCDKColor(); - - g_st.title = "OpenBSC link quality monitor"; - title[0] = g_st.title; - g_st.cdk_title = newCDKLabel(g_st.cdkscreen, CENTER, 0, title, 1, FALSE, FALSE); - - snprintf(g_st.header, sizeof(g_st.header), "Q Pwr TA TO Time"); - header[0] = g_st.header; - g_st.cdk_header = newCDKLabel(g_st.cdkscreen, RIGHT, 1, header, 1, FALSE, FALSE); - -#if 0 - int i; - for (i = 0; i < 64; i++) { - short f, b; - pair_content(i, &f, &b); - attron(COLOR_PAIR(i)); - printw("%u: %u (%s) ", i, f, get_value_string(col_strs, f)); - printw("%u (%s)\n\r", b, get_value_string(col_strs, b)); - } - refresh(); - getch(); - exit(0); -#endif - - g_st.udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - update_sliders(); - }; - - exit(0); -} -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:44:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:44:41 +0000 Subject: osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 10:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 10:45:58 +0000 Subject: osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5138/1/src/utils/Makefile.am File src/utils/Makefile.am: Line 12: $(LIBOSMOSCCP_CFLAGS) \ which of the utilities needs SCCP? Line 127: $(LIBOSMOSCCP_CFLAGS) \ for sure, meas_json doesn't need SCCP or MGCP, this is wrong. -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:41:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:41:10 +0000 Subject: osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Holger Freyther has restored this change. Change subject: mobile: Declare struct osmocom/vty to be self includeable ...................................................................... Restored Not a WIP patch ;) -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:10 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5041 to look at the new patch set (#4). mobile: Declare struct osmocom/vty to be self includeable In file included from settings.c:27:0: ../../include/osmocom/bb/mobile/app_mobile.h:10:42: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), ^~~~~~~~~~ ../../include/osmocom/bb/mobile/app_mobile.h:14:26: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int mobile_delete(struct osmocom_ms *ms, int force); Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/41/5041/4 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 83c07d6..704c972 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -5,6 +5,8 @@ extern char *config_dir; +struct osmocom_ms; + int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); int l23_app_exit(void); -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:10 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4737 to look at the new patch set (#9). mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 227 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/9 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 7a935f9..8f5cdc3 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -85,6 +85,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 7abfda1..c2ab3c8 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -6,6 +6,7 @@ extern char *config_dir; struct osmocom_ms; +struct vty; int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); @@ -20,6 +21,9 @@ void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct osmocom_ms *ms); + /* Internal code. Don't call directly */ int mobile_exit(struct osmocom_ms *ms, int force); diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 47870e5..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..b3b9c99 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *L) +{ + lua_getglobal(L, "_G"); + luaL_setfuncs(L, global_runtime, 0); + lua_pop(L, 1); +} + +static void add_runtime(lua_State *L, struct osmocom_ms *ms) +{ + add_globals(L); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..61466f7 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 2b51837..6d50c6b 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -143,6 +144,8 @@ talloc_free(abbrev); } + script_lua_close(ms); + return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 81c20fe..8767985 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1531,6 +1531,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2740,6 +2742,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2931,6 +2957,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 9 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:10 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4840 to look at the new patch set (#7). mobile: Create "ms" singleton for struct osmocom_ms Make the MS the script is associated with accessible to lua. Provide access to IMSI and IMEI. The IMSI might not be available at the given time and just return an empty string. Example lua usage: print(osmo.ms():imsi()); print(osmo.ms():imei()); print(osmo.ms():shutdown_state()) print(osmo.ms():started()) function ms_started_cb(started) print("MS started", started) end function ms_shutdown_cb(old_state, new_state) print("MS shutdown", old_state, "->", new_state) end function sms_cb(sms, cause, valid) print("SMS data cb", sms, cause, valid) for i, v in pairs(sms) do print(i, v) end end function mm_cb(new_state, new_substate, old_substate) if new_state == 19 and new_substate == 1 then osmo.ms():sms_send_simple("1234", "21321324", "fooooooo", 23) end end local cbs = { Started=ms_started_cb, Shutdown=ms_shutdown_cb, Sms=sms_cb, Mm=mm_cb } timer = osmo.timeout(20, function() print("Timeout occurred after 20s") end) osmo.ms():register(cbs) # Can fail. Best to wait for state changes... print(osmo.ms().start()) print(osmo.ms().stop(true)) Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/script_lua.c 2 files changed, 271 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/40/4840/7 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 8f5cdc3..486c36d 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -87,6 +87,7 @@ struct llist_head trans_list; void *lua_state; + int lua_cb_ref; char *lua_script; }; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index cd7e8bc..cbba070 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -94,6 +95,30 @@ { NULL, NULL }, }; +/* Push table and function. Stack+=2 */ +static bool load_cb(lua_State *L, int ref, const char *cb_name) +{ + lua_rawgeti(L, LUA_REGISTRYINDEX, ref); + lua_pushstring(L, cb_name); + lua_gettable(L, -2); + if (lua_isnil(L, -1)) { + LOGP(DLUA, LOGL_DEBUG, "No handler for %s\n", cb_name); + lua_pop(L, 2); + return false; + } + return true; +} + +/* Call callback. Stack-=func + args. func/args popped by lua_pcall */ +static void call_cb(lua_State *L, int args) +{ + int err = lua_pcall(L, args, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 2); + } +} + static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_userdata *timer = (void *)(intptr_t) param->timer_id; @@ -108,6 +133,109 @@ LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); lua_pop(L, 1); } +} + +static void handle_started(struct mobile_prim_intf *intf, struct mobile_started_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Started")) + return; + + lua_pushinteger(L, param->started); + + call_cb(L, 1); + lua_pop(L, 1); +} + +static void handle_shutdown(struct mobile_prim_intf *intf, struct mobile_shutdown_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Shutdown")) + return; + + lua_pushinteger(L, param->old_state); + lua_pushinteger(L, param->new_state); + + call_cb(L, 2); + lua_pop(L, 1); +} + +static void handle_sms(struct mobile_prim_intf *intf, struct mobile_sms_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Sms")) + return; + + lua_createtable(L, 0, 11); + + lua_pushinteger(L, param->sms.validity_minutes); + lua_setfield(L, -2, "validity_minutes"); + + lua_pushinteger(L, param->sms.reply_path_req); + lua_setfield(L, -2, "reply_path_req"); + + lua_pushinteger(L, param->sms.status_rep_req); + lua_setfield(L, -2, "status_rep_req"); + + lua_pushinteger(L, param->sms.ud_hdr_ind); + lua_setfield(L, -2, "ud_hdr_ind"); + + lua_pushinteger(L, param->sms.protocol_id); + lua_setfield(L, -2, "protocol_id"); + + lua_pushinteger(L, param->sms.data_coding_scheme); + lua_setfield(L, -2, "data_coding_scheme"); + + lua_pushinteger(L, param->sms.msg_ref); + lua_setfield(L, -2, "msg_ref"); + + lua_pushstring(L, param->sms.address); + lua_setfield(L, -2, "address"); + + lua_pushinteger(L, param->sms.time); + lua_setfield(L, -2, "time"); + + lua_pushlstring(L, (char *) param->sms.user_data, param->sms.user_data_len); + lua_setfield(L, -2, "user_data"); + + lua_pushstring(L, param->sms.text); + lua_setfield(L, -2, "text"); + + lua_pushinteger(L, param->cause_valid); + lua_pushinteger(L, param->cause); + + call_cb(L, 3); + lua_pop(L, 1); +} + +static void handle_mm(struct mobile_prim_intf *intf, struct mobile_mm_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Mm")) + return; + + lua_pushinteger(L, param->state); + lua_pushinteger(L, param->substate); + lua_pushinteger(L, param->prev_substate); + + call_cb(L, 3); + lua_pop(L, 1); } static int lua_osmo_timeout(lua_State *L) @@ -164,8 +292,125 @@ { NULL, NULL }, }; +static int lua_osmo_ms(lua_State *L) +{ + lua_pushlightuserdata(L, get_primitive(L)->ms); + luaL_getmetatable(L, "MS"); + lua_setmetatable(L, -2); + + return 1; +} + +static int lua_ms_imei(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->settings.imei); + return 1; +} +static int lua_ms_imsi(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->subscr.imsi); + return 1; +} + +static int lua_ms_shutdown_state(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->shutdown); + return 1; +} + +static int lua_ms_started(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->started); + return 1; +} + +static int lua_ms_register(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + /* callbacks must be a table */ + luaL_checktype(L, 2, LUA_TTABLE); + + if (ms->lua_cb_ref != LUA_REFNIL) + luaL_unref(L, LUA_REGISTRYINDEX, ms->lua_cb_ref); + ms->lua_cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + return 0; +} + +static int lua_ms_no_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + char *name; + int res; + + res = mobile_start(ms, &name); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + int argc = lua_gettop(L); + int force = 0; + int res; + + if (argc >= 1) { + luaL_argcheck(L, lua_isboolean(L, -1), 1, "Force"); + force = lua_toboolean(L, -1); + } + + res = mobile_stop(ms, force); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_sms_send_simple(lua_State *L) +{ + const char *sms_sca, *number, *text; + int msg_ref, rc; + + luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); + luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); + luaL_argcheck(L, lua_isstring(L, -3), 2, "number must be a string"); + luaL_argcheck(L, lua_isstring(L, -4), 1, "sms_sca must be a string"); + + msg_ref = (int) lua_tonumber(L, -1); + text = lua_tostring(L, -2); + number = lua_tostring(L, -3); + sms_sca = lua_tostring(L, -4); + + rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); + lua_pushinteger(L, rc); + return 1; +} + +static const struct luaL_Reg ms_funcs[] = { + { "imsi", lua_ms_imsi }, + { "imei", lua_ms_imei }, + { "shutdown_state", lua_ms_shutdown_state }, + { "started", lua_ms_started }, + { "register", lua_ms_register }, + { "start", lua_ms_no_shutdown }, + { "stop", lua_ms_shutdown }, + { "sms_send_simple", lua_ms_sms_send_simple }, + { NULL, NULL }, +}; + + static const struct luaL_Reg osmo_funcs[] = { { "timeout", lua_osmo_timeout }, + { "ms", lua_osmo_ms }, { NULL, NULL }, }; @@ -174,6 +419,18 @@ switch (OSMO_PRIM_HDR(&prim->hdr)) { case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): handle_timeout(intf, (struct mobile_timer_param *) &prim->u.timer); + break; + case OSMO_PRIM(PRIM_MOB_STARTED, PRIM_OP_INDICATION): + handle_started(intf, (struct mobile_started_param *) &prim->u.started); + break; + case OSMO_PRIM(PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION): + handle_shutdown(intf, (struct mobile_shutdown_param *) &prim->u.shutdown); + break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_INDICATION): + handle_sms(intf, (struct mobile_sms_param *) &prim->u.sms); + break; + case OSMO_PRIM(PRIM_MOB_MM, PRIM_OP_INDICATION): + handle_mm(intf, (struct mobile_mm_param *) &prim->u.mm); break; default: LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); @@ -196,6 +453,16 @@ lua_pop(L, 1); } +static void create_meta_table(lua_State *L, const char *name, const luaL_Reg *regs) +{ + luaL_newmetatable(L, name); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, regs, 0); + lua_pop(L, 1); +} + static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); @@ -206,13 +473,8 @@ lua_setglobal(L, "osmo"); /* Create metatables so we can GC objects... */ - luaL_newmetatable(L, "Timer"); - lua_pushliteral(L, "__index"); - lua_pushvalue(L, -2); - lua_rawset(L, -3); - luaL_setfuncs(L, timer_funcs, 0); - lua_pop(L, 1); - + create_meta_table(L, "Timer", timer_funcs); + create_meta_table(L, "MS", ms_funcs); /* Remember the primitive pointer... store it in the registry */ lua_pushlightuserdata(L, lua_prim_key); @@ -251,6 +513,7 @@ if (!ms->lua_state) return -1; + ms->lua_cb_ref = LUA_REFNIL; luaL_openlibs(ms->lua_state); intf = mobile_prim_intf_alloc(ms); -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:10 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5100 to look at the new patch set (#3). mobile: Move starting/stopping a MS into a separate function Move the check if within the mobile app there is no other active MS using the same L1 socket. This way we can call this function from the primitive code as well. Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 70 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/00/5100/3 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 704c972..7abfda1 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -13,12 +13,15 @@ int l23_app_work(int *quit); int mobile_delete(struct osmocom_ms *ms, int force); struct osmocom_ms *mobile_new(char *name); -int mobile_init(struct osmocom_ms *ms); -int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int mobile_start(struct osmocom_ms *ms, char **other_name); +int mobile_stop(struct osmocom_ms *ms, int force); void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); + +/* Internal code. Don't call directly */ +int mobile_exit(struct osmocom_ms *ms, int force); #endif diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index c5c84e6..b2900ad 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -181,7 +181,7 @@ } /* power-on ms instance */ -int mobile_init(struct osmocom_ms *ms) +static int mobile_init(struct osmocom_ms *ms) { int rc; @@ -245,6 +245,51 @@ return 0; } +int mobile_start(struct osmocom_ms *ms, char **other_name) +{ + struct osmocom_ms *tmp; + int rc; + + if (ms->shutdown != MS_SHUTDOWN_COMPL) + return 0; + + llist_for_each_entry(tmp, &ms_list, entity) { + if (tmp->shutdown == MS_SHUTDOWN_COMPL) + continue; + if (!strcmp(ms->settings.layer2_socket_path, + tmp->settings.layer2_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -1; + } + if (!strcmp(ms->settings.sap_socket_path, + tmp->settings.sap_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -2; + } + } + + rc = mobile_init(ms); + if (rc < 0) + return -3; + return 0; +} + +int mobile_stop(struct osmocom_ms *ms, int force) +{ + if (force && ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) + return mobile_exit(ms, 1); + if (!force && ms->shutdown == MS_SHUTDOWN_NONE) + return mobile_exit(ms, 0); + return 0; +} + + /* create ms instance */ struct osmocom_ms *mobile_new(char *name) { diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index eafed6e..81c20fe 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2696,35 +2696,25 @@ DEFUN(cfg_no_shutdown, cfg_ms_no_shutdown_cmd, "no shutdown", NO_STR "Activate and run MS") { - struct osmocom_ms *ms = vty->index, *tmp; + struct osmocom_ms *ms = vty->index; + char *other_name = NULL; int rc; - if (ms->shutdown != MS_SHUTDOWN_COMPL) - return CMD_SUCCESS; - - llist_for_each_entry(tmp, &ms_list, entity) { - if (tmp->shutdown == MS_SHUTDOWN_COMPL) - continue; - if (!strcmp(ms->settings.layer2_socket_path, - tmp->settings.layer2_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same layer2-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - if (!strcmp(ms->settings.sap_socket_path, - tmp->settings.sap_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same sap-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - } - - rc = mobile_init(ms); - if (rc < 0) { + rc = mobile_start(ms, &other_name); + switch (rc) { + case -1: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -2: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -3: vty_out(vty, "Connection to layer 1 failed!%s", VTY_NEWLINE); return CMD_WARNING; @@ -2737,10 +2727,7 @@ "Shut down and deactivate MS") { struct osmocom_ms *ms = vty->index; - - if (ms->shutdown == MS_SHUTDOWN_NONE) - mobile_exit(ms, 0); - + mobile_stop(ms, 0); return CMD_SUCCESS; } @@ -2749,9 +2736,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) - mobile_exit(ms, 1); - + mobile_stop(ms, 1); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:10 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:10 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5101 to look at the new patch set (#3). mobile: Notify MM status changes and generate primitive op ind Notify once the mm state has been changed. Unfortunaley one state transition can immediately trigger more transitions (recursively). In the mid-term it might be best to force all primitives to be async to avoid unpredictable behavior (e.g. make a shutdown while being a recursion down?) Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/01/5101/3 diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 6804fc0..39b4945 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -19,6 +19,7 @@ PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, PRIM_MOB_SMS, + PRIM_MOB_MM, }; struct mobile_prim_intf { @@ -65,6 +66,15 @@ int cause; }; +/** + * Mobility Management (MM) state changes. + */ +struct mobile_mm_param { + int state; /*!< The new MM state */ + int substate; /*!< The current substate */ + int prev_substate; /*!< The previous substate */ +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { @@ -72,6 +82,7 @@ struct mobile_started_param started; struct mobile_shutdown_param shutdown; struct mobile_sms_param sms; + struct mobile_mm_param mm; } u; }; @@ -86,3 +97,4 @@ void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int subs, int old_subs); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index f32d57a..a7af1f5 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -39,6 +39,7 @@ #include #include #include +#include #include extern void *l23_ctx; @@ -961,6 +962,7 @@ mm->state = state; mm->substate = substate; + mobile_prim_ntfy_mm_status(ms, mm->state, mm->substate, mm->mr_substate); /* resend detach event, if flag is set */ if (state == GSM48_MM_ST_MM_IDLE && mm->delay_detach) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index 0902139..fd486ea 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -144,6 +144,16 @@ dispatch(ms, prim); } +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int substate, int mr_substate) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_MM, PRIM_OP_INDICATION); + + prim->u.mm.state = state; + prim->u.mm.substate = substate; + prim->u.mm.prev_substate = mr_substate; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/5101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 12:59:12 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 12:59:12 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Fix compiler warning on printing ptrdiff_t Message-ID: Review at https://gerrit.osmocom.org/5149 mobile: Fix compiler warning on printing ptrdiff_t The "msg->tail - msg->l4h" subtract two unsigned char* pointers and should result in a ptrdiff_t. Fix the compiler warning by using "%ti" in the printf. Fixes: gsm411_sms.c: In function ?gsm411_rx_rp_ud?: gsm411_sms.c:382:25: warning: format ?%li? expects argument of type ?long int?, but argument 7 has type ?int? [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:93:54: note: in definition of macro ?LOGPSRCC? logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ?LOGPSRC? LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ?LOGP? LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^~~~ gsm411_sms.c:382:25: warning: format ?%li? expects argument of type ?long int?, but argument 7 has type ?int? [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:95:53: note: in definition of macro ?LOGPSRCC? logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ?LOGPSRC? LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ?LOGP? LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443 --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/49/5149/1 diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index eb09854..b635bb2 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -375,7 +375,7 @@ LOGP(DLSMS, LOGL_INFO, "DST(%u,%s)\n", src_len, osmo_hexdump(src, src_len)); - LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, + LOGP(DLSMS, LOGL_INFO, "TPDU(%ti,%s)\n", msg->tail-msg->l4h, osmo_hexdump(msg->l4h, msg->tail-msg->l4h)); rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); -- To view, visit https://gerrit.osmocom.org/5149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:03:50 +0000 Subject: osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:04:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:04:33 +0000 Subject: osmocom-bb[master]: mobile: Fix compiler warning on printing ptrdiff_t In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:04:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:04:52 +0000 Subject: osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:05:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:05:46 +0000 Subject: osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:06:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:06:04 +0000 Subject: osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:06:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:06:24 +0000 Subject: osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 9 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:06:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:06:49 +0000 Subject: osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:06:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:06:51 +0000 Subject: osmo-ci[master]: jobs: master-builds: apply various initial fixes In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:06:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:06:52 +0000 Subject: osmo-ci[master]: jobs: master-builds: osmo-bsc is now also a downstream of os... In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:22 +0000 Subject: osmo-ci[master]: jobs: master-builds: libosmo-sigtran should trigger bsc and iuh In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:25 +0000 Subject: osmo-ci[master]: jobs: master-branches: trigger sgsn from iuh In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:27 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master-branches: trigger sgsn from iuh In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jobs: master-branches: trigger sgsn from iuh ...................................................................... jobs: master-branches: trigger sgsn from iuh osmo-sgsn uses libosmo-ranap and hence should be triggered from osmo-iuh. This naturally "includes" a trigger for libosmo-sigtran. Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index f862770..55e8458 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -185,6 +185,7 @@ downstream-ext: projects: - osmo-msc + - osmo-sgsn - osmo-mgw: a1_name: MGCP -- To view, visit https://gerrit.osmocom.org/5143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia356dc2a8d5120f9d6262bf8eb25c32fe71e76c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:27 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master-builds: libosmo-sigtran should trigger bsc and iuh In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jobs: master-builds: libosmo-sigtran should trigger bsc and iuh ...................................................................... jobs: master-builds: libosmo-sigtran should trigger bsc and iuh osmo-iuh in turn triggers osmo-msc and osmo-sgsn, no explicit triggers needed here. Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a --- M jobs/master-builds.yml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 55e8458..b127069 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -66,6 +66,8 @@ downstream-ext: projects: - openbsc + - osmo-iuh + - osmo-bsc - libosmocore: a1_name: arch -- To view, visit https://gerrit.osmocom.org/5144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd950660cdc3417e82b0a8f4ce2b1efde880cb7a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:27 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master-builds: osmo-bsc is now also a downstream of os... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jobs: master-builds: osmo-bsc is now also a downstream of osmo-mgw ...................................................................... jobs: master-builds: osmo-bsc is now also a downstream of osmo-mgw Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index c626de5..f862770 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -200,6 +200,7 @@ downstream-ext: projects: - osmo-msc + - osmo-bsc - osmo-msc: a1_name: IU -- To view, visit https://gerrit.osmocom.org/5142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03c63108bd845ee723d565c3dddd4e930bb68bef Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:28 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master-builds: apply various initial fixes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jobs: master-builds: apply various initial fixes ...................................................................... jobs: master-builds: apply various initial fixes libosmo-sccp, osmo-ggsn: The osmo-gsm-tester builds are downstream builds, yes, but we configured that with the osmo-gsm-tester builds: instead of telling libosmo-sccp to build osmo-gsm-tester_build-osmo-stp when done, we configure the osmo-gsm-tester_osmo-stp to build after libosmo-sccp. So that the master branch builds don't need to have any knowledge of osmo-gsm-tester. osmo-msc build triggers should rather be post-build triggers of osmo-iuh and osmo-mgw, like the others. Then we can also drop the pollscm here, and use the pollscm that is common to all other builds. Call these jobs 'master-*'. It more accurately says what they build, and also we can install the jobs from this file next to the current, old ones, without overwriting them and thus we'll have an easy rollback path. The new ones can co-exist with the old ones until the new ones are verified to work, at which point we can drop the old ones. Line 313: IIUC the safest git branch is 'refs/remotes/origin/master'. This is still untested! Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 --- M jobs/master-builds.yml 1 file changed, 11 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index aa4edb3..c626de5 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -1,5 +1,4 @@ -# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. -# One cane simply add a gerrit job by adding project's repository to repos list. +# All master branch verification builds, https://jenkins.osmocom.org/jenkins/view/master/ - project: name: master_build @@ -67,7 +66,6 @@ downstream-ext: projects: - openbsc - - osmo-gsm-tester_build-osmo-stp - libosmocore: a1_name: arch @@ -160,7 +158,6 @@ publishers: downstream-ext: projects: - - osmo-gsm-tester_build-osmo-ggsn - osmo-sgsn - osmo-gmr @@ -183,7 +180,11 @@ - osmo-hlr: slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] - - osmo-iuh + - osmo-iuh: + publishers: + downstream-ext: + projects: + - osmo-msc - osmo-mgw: a1_name: MGCP @@ -195,18 +196,14 @@ -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh + publishers: + downstream-ext: + projects: + - osmo-msc - osmo-msc: a1_name: IU a1: !!python/tuple [--enable-iu, --disable-iu] - triggers: - - pollscm: - cron: "H/5 * * * *" - ignore-post-commit-hooks: false - - reverse: - jobs: - - osmo-iuh - - osmo-mgw concurrent: true cmd: > # keep first line with less indent to preserve newlines @@ -310,7 +307,7 @@ - git: url: git://git.osmocom.org/{repos} branches: - - '*/master' + - 'refs/remotes/origin/master' refspec: name: wipe-workspace: false -- To view, visit https://gerrit.osmocom.org/5141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2ad9c90a0986d1304cd53383d3df5b375f23ac8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:28 +0000 Subject: [MERGED] osmo-ci[master]: jobs: rename normal-builds.yml to master-builds.yml In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jobs: rename normal-builds.yml to master-builds.yml ...................................................................... jobs: rename normal-builds.yml to master-builds.yml Also apply the rename in the job names Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e --- R jobs/master-builds.yml 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/normal-builds.yml b/jobs/master-builds.yml similarity index 99% rename from jobs/normal-builds.yml rename to jobs/master-builds.yml index f61715a..aa4edb3 100644 --- a/jobs/normal-builds.yml +++ b/jobs/master-builds.yml @@ -2,7 +2,7 @@ # One cane simply add a gerrit job by adding project's repository to repos list. - project: - name: normal_build + name: master_build # following default values can be overridden by each repo disabled: false concurrent: false @@ -261,10 +261,10 @@ - osmocom-bb jobs: - - '{repos}' + - 'master-{repos}' - job-template: - name: '{repos}' + name: 'master-{repos}' project-type: matrix node: '{node}' concurrent: '{obj:concurrent}' -- To view, visit https://gerrit.osmocom.org/5140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If623e573e49d4f1a409139c112afbc34e4cc450e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:07:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:07:28 +0000 Subject: [MERGED] osmo-ci[master]: Describe our normal (non-gerrit) build jobs in jenkins-job-b... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Describe our normal (non-gerrit) build jobs in jenkins-job-builder ...................................................................... Describe our normal (non-gerrit) build jobs in jenkins-job-builder after the recent successful conversion from manual job definitions to jenkins-job-buildre of the gerrit jobs, this is an attempt to convert also the non-gerrit jobs for the common osmocom projects. WARNING: this file has not been tested yet, it's a WIP. Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 --- A jobs/normal-builds.yml 1 file changed, 333 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/normal-builds.yml b/jobs/normal-builds.yml new file mode 100644 index 0000000..f61715a --- /dev/null +++ b/jobs/normal-builds.yml @@ -0,0 +1,333 @@ +# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# One cane simply add a gerrit job by adding project's repository to repos list. + +- project: + name: normal_build + # following default values can be overridden by each repo + disabled: false + concurrent: false + node: linux_amd64_debian8 + # axes related defaults + slave_axis: !!python/tuple [linux_amd64_debian8] + a1_name: a1 + a1: !!python/tuple [default] + a2_name: a2 + a2: !!python/tuple [default] + a3_name: a3 + a3: !!python/tuple [default] + a4_name: a4 + a4: !!python/tuple [default] + combination_filter: '' + # most common build invocation + cmd: ./contrib/jenkins.sh + + # in alphabetical order + repos: + - asn1c + + - cellmgr-ng: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - libasn1c + - libgtpnl + - libosmo-abis: + publishers: + downstream-ext: + projects: + - openbsc + + - libosmo-dsp: + cmd: > + # keep first line with less indent to preserve newlines + autoreconf --install --force + ./configure + $MAKE $PARALLEL_MAKE + $MAKE distcheck + publishers: + downstream-ext: + projects: + - osmo-gmr + + - libosmo-netif: + publishers: + downstream-ext: + projects: + - libosmo-sccp + - openbsc + - osmo-mgw + + - libosmo-sccp: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-gsm-tester_build-osmo-stp + + - libosmocore: + a1_name: arch + a1: !!python/tuple [arm-none-eabi, amd64] + combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' + cmd: > + # keep first line with less indent to preserve newlines + if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]]; then + ./contrib/jenkins-arm.sh + else + ./contrib/jenkins.sh + fi + publishers: + downstream-ext: + projects: + - libosmo-sccp + - libosmo-abis + - openbsc + - osmo-pcap + - OsmoTETRA + - osmo-pcu + - SIMtrace + - osmo-gmr + - osmo-bts + - OsmocomBB + - xgoldmon + + - libsmpp34: + publishers: + downstream-ext: + projects: + - openbsc + - osmo-msc + + - libtelnet + + - openbsc: + a1_name: SMPP + a1: !!python/tuple [--enable-smpp] + a2_name: MGCP + a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + a3_name: IU + a3: !!python/tuple [--disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \ + -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - openggsn: + a1_name: GTP + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + + - osmo-bsc: + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-bts: + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15-next] + a2_name: BTS_MODEL + a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15] + combination_filter: > + FIRMWARE_VERSION == "master" || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") || + (FIRMWARE_VERSION == "origin/nrw/litecell15-next" && BTS_MODEL == "lc15") + cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' + + - osmo-ggsn: + a1_name: gtp-linux + a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + cmd: GTP="$GTP" ./contrib/jenkins.sh + publishers: + downstream-ext: + projects: + - osmo-gsm-tester_build-osmo-ggsn + - osmo-sgsn + + - osmo-gmr + + - osmo-gsm-manuals: + cmd: > + # keep first line with less indent to preserve newlines + git clean -dxf . + rm -rf libosmocore + git clone git://git.osmocom.org/libosmocore + make LIBOSMO_DIR=$PWD/libosmocore + mkdir out/ + cp */*.pdf out/ + rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ + publishers: + - archive: + artifacts: '*/*.pdf' + allow-empty: true + + - osmo-hlr: + slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] + + - osmo-iuh + + - osmo-mgw: + a1_name: MGCP + a1: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-msc: + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + - reverse: + jobs: + - osmo-iuh + - osmo-mgw + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" + mkdir -p "$ARTIFACT_STORE" + docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + -v "$ARTIFACT_STORE:/artifact_store" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-pcap + + - osmo-pcu: + scm: + - git: + branches: + - '*/master' + - '*/jerlbeck/master' + a1_name: FIRMWARE_VERSION + a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15-next] + a2_name: with_vty + a2: !!python/tuple [yes ,no] + a3_name: with_dsp + a3: !!python/tuple [sysmo, lc15, none] + combination_filter: > + (with_vty == "yes" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="master") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01") || + (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || + (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") + + - osmo-sgsn: + concurrent: true + a1_name: IU + a1: !!python/tuple [--enable-iu, --disable-iu] + concurrent: true + cmd: > + # keep first line with less indent to preserve newlines + docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ + -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh + + - osmo-sip-connector + - osmo-tetra + + - osmo-trx: + slave_axis: !!python/tuple [OsmocomBuild1] + + - osmocom-bb + + jobs: + - '{repos}' + +- job-template: + name: '{repos}' + project-type: matrix + node: '{node}' + concurrent: '{obj:concurrent}' + disabled: '{obj:disabled}' + retry-count: 3 # scm checkout + build-discarder: + daysToKeep: 30 + numToKeep: 120 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + description: | + Automatic jenkins test job of + {repos} +

+ Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + + execution-strategy: + combination-filter: | + {obj:combination_filter} + axes: + - axis: + type: slave + name: label + values: '{obj:slave_axis}' + - axis: + type: user-defined + name: '{obj:a1_name}' + values: '{obj:a1}' + - axis: + type: user-defined + name: '{obj:a2_name}' + values: '{obj:a2}' + - axis: + type: user-defined + name: '{obj:a3_name}' + values: '{obj:a3}' + - axis: + type: user-defined + name: '{obj:a4_name}' + values: '{obj:a4}' + + scm: + - git: + url: git://git.osmocom.org/{repos} + branches: + - '*/master' + refspec: + name: + wipe-workspace: false + skip-tag: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + + builders: + - shell: '{obj:cmd}' + + publishers: + - warnings: + console-log-parsers: + - 'GNU C Compiler 4 (gcc)' + resolve-relative-paths: true + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/4827 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib04707393264a845876659d7bee0cdc9f8b897b6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:08:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:08:00 +0000 Subject: osmo-bsc[master]: cosmetic: do not cast void pointer In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:08:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:08:22 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: do not cast void pointer In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: do not cast void pointer ...................................................................... cosmetic: do not cast void pointer remove the casting of void *data, just assign directly Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 81a4093..6753212 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -171,7 +171,7 @@ /* Callback for ST_CRCX_BTS: startup state machine send out CRCX for BTS side */ static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct msgb *msg; struct mgcp_msg mgcp_msg; @@ -272,7 +272,7 @@ * with the assignment request */ static void fsm_proc_assignmnent_req_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; enum gsm48_chan_mode chan_mode; bool full_rate; @@ -315,7 +315,7 @@ * proceed with updating the connection for the BTS side */ static void fsm_mdcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct gsm_lchan *lchan; struct msgb *msg; @@ -435,7 +435,7 @@ /* Callback for ST_CRCX_NET: An mgcp response has been received, proceed... */ static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct osmo_bsc_sccp_con *conn; struct msgb *msg; struct mgcp_msg mgcp_msg; @@ -571,7 +571,7 @@ /* Callback for ST_ASSIGN_COMPL: Send back assignment complete and wait until the call ends */ static void fsm_send_assignment_complete(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_ctx *mgcp_ctx = data; struct gsm_lchan *lchan; OSMO_ASSERT(mgcp_ctx); -- To view, visit https://gerrit.osmocom.org/4984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e37630e315b3602da2f14e2364bb76be9dd2894 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:08:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:08:23 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: correct sourcecode formatting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: correct sourcecode formatting ...................................................................... cosmetic: correct sourcecode formatting add missing line break Change-Id: Ia117e4099046fefcf35ccb94400554062e667869 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 0c5d86b..023a3dc 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -693,7 +693,8 @@ .verb = MGCP_VERB_MDCX, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | - MGCP_MSG_PRESENCE_AUDIO_PORT),.call_id = conn->conn_id, + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = conn->conn_id, .conn_id = mgcp_ctx->conn_id_bts, .conn_mode = MGCP_CONN_RECV_SEND, .audio_ip = inet_ntoa(addr), -- To view, visit https://gerrit.osmocom.org/4982 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia117e4099046fefcf35ccb94400554062e667869 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:08:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:08:23 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: add missing log prefix In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: add missing log prefix ...................................................................... cosmetic: add missing log prefix the log messages have prefixes that mark important phases (CRCX/BTS, etc...). Some lines lack the prefix. Add missing prefixes. Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 6753212..0c5d86b 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -193,7 +193,7 @@ mgcp_ctx->rtp_endpoint = rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -351,11 +351,11 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -467,7 +467,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE @@ -477,7 +477,7 @@ * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, - "endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", + "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); return; @@ -486,7 +486,7 @@ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MSC expects RTP input on address %s:%u\n", addr, port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { -- To view, visit https://gerrit.osmocom.org/4981 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea5ea9e54f4b5c998b1d5fe18a98a94abd7b728b Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:08:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:08:23 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: use fsm pointer from parameter list In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: use fsm pointer from parameter list ...................................................................... cosmetic: use fsm pointer from parameter list the parameter list of osmo-fsm callbacks contains a pointer to the fsm instance. Use this pointer instead of reaching out for mgcp_ctx->fsm. Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 31 insertions(+), 39 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 023a3dc..478d499 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -185,14 +185,13 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); rtp_endpoint = mgcp_client_next_endpoint(mgcp); mgcp_ctx->rtp_endpoint = rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Generate MGCP message string */ @@ -211,14 +210,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_ASSIGN_PROC, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for BTS associated CRCX */ @@ -282,8 +281,7 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -298,7 +296,7 @@ chan_mode = mgcp_ctx->chan_mode; full_rate = mgcp_ctx->full_rate; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW proceeding assignment request...\n"); + LOGPFSML(fi, LOGL_DEBUG, "MGW proceeding assignment request...\n"); rc = gsm0808_assign_req(conn->conn, chan_mode, full_rate); if (rc < 0) { @@ -329,8 +327,7 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -346,15 +343,15 @@ lchan = mgcp_ctx->lchan; OSMO_ASSERT(lchan); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); + LOGPFSML(fi, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ @@ -377,14 +374,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_CRCX_NET, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for BTS associated MDCX */ @@ -452,8 +449,7 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -466,7 +462,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the @@ -476,7 +472,7 @@ * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + LOGPFSML(fi, LOGL_ERROR, "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); handle_error(mgcp_ctx, MGCP_ERR_UNSUPP_ADDR_FMT); @@ -486,7 +482,7 @@ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -507,14 +503,14 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); + LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); return; } - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + osmo_fsm_inst_state_chg(fi, ST_ASSIGN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); } /* Callback for MGCP-Client: handle response for NET associated CRCX */ @@ -576,7 +572,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); @@ -596,9 +592,9 @@ * where the MGW expects the RTP input from the MSC side */ bssmap_send_aoip_ass_compl(lchan); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "call in progress, waiting for call end...\n"); + LOGPFSML(fi, LOGL_DEBUG, "call in progress, waiting for call end...\n"); - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); } static void dlcx_for_all_resp_cb(struct mgcp_response *r, void *priv); @@ -724,8 +720,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -770,8 +765,7 @@ OSMO_ASSERT(mgcp_ctx); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { @@ -780,8 +774,8 @@ * towards the BTS is now updated, so we now change back to * ST_CALL, where we will wait for the call-end (or another * handover) */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); - osmo_fsm_inst_state_chg(mgcp_ctx->fsm, ST_CALL, 0, 0); + LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS/HO: handover done, waiting for call end...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); break; case EV_HANDOVER: /* This handles the rare, but possible situation where another @@ -843,18 +837,17 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", + LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); /* Send pending sigtran message */ if (mgcp_ctx->resp) { - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "sending pending sigtran response message...\n"); + LOGPFSML(fi, LOGL_DEBUG, "sending pending sigtran response message...\n"); osmo_bsc_sigtran_send(conn, mgcp_ctx->resp); mgcp_ctx->resp = NULL; } - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "state machine halted\n"); + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); /* Destroy the state machine and all context information */ osmo_fsm_inst_free(mgcp_ctx->fsm); @@ -871,8 +864,7 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, - "timeout (T%i) in state %s, attempting graceful teardown...\n", + LOGPFSML(fi, LOGL_ERROR, "timeout (T%i) in state %s, attempting graceful teardown...\n", fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); /* Ensure that no sigtran response, is present. Otherwiese we might try @@ -883,14 +875,14 @@ /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); + LOGPFSML(fi, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); /* Initiate self destruction of the FSM */ osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); - osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) /* Note: If the logic that controls the BSS is unable to * negotiate a connection, we presumably still have a -- To view, visit https://gerrit.osmocom.org/4985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05ff62e7e2de64c2dbf5ea2736f5e58faf16df0b Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 13:09:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 13:09:18 +0000 Subject: [MERGED] osmo-bts[master]: osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES ...................................................................... osmo-bts-octphy: Remove bogus warning about BS_AG_BLKS_RES Contrary to osmo-bts-sysmo, the OCTPHY-2G does not have different L1 SAPI for AGCH and PCH. It uses cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH for both, and we convert that to the cbits=0x12 (Downlink CCCH) on the L1SAP. The code above L1SAP can hence freely decide if it wants to respond with an AGCH or PCH message, based on its knowledge of BS_AG_BLKS_RES, without the OCTPHY specific code having to do anything about it. Hence, there's nothing to do, and the warning can be removed Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41 Related: OS#1575 --- M src/osmo-bts-octphy/l1_if.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index e4ab538..fce3484 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -516,7 +516,6 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " -- To view, visit https://gerrit.osmocom.org/5148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 15:21:35 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Chemeris) Date: Sun, 3 Dec 2017 15:21:35 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 I don't have equipment right now to test this, but the code looks good on the first glance. Just one comment - is this requirement of sending the first frame number documented in the parameters of the relevant functions? That would be great to have it there to avoid mistakes in future. -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 17:33:16 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 3 Dec 2017 17:33:16 +0000 Subject: [PATCH] osmo-trx[master]: UHDDevice.cpp: add USRP B205mini support Message-ID: Review at https://gerrit.osmocom.org/5150 UHDDevice.cpp: add USRP B205mini support The B205mini is similar to the B200mini and runs OsmoTRX just fine, so let's make OsmoTRX recogonize and support it too. Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 --- M Transceiver52M/UHDDevice.cpp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/50/5150/1 diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 778c772..09317a9 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -519,6 +519,7 @@ { "B100", { B100, TX_WINDOW_USRP1 } }, { "B200", { B200, TX_WINDOW_USRP1 } }, { "B200mini", { B200, TX_WINDOW_USRP1 } }, + { "B205mini", { B200, TX_WINDOW_USRP1 } }, { "B210", { B210, TX_WINDOW_USRP1 } }, { "E100", { E1XX, TX_WINDOW_FIXED } }, { "E110", { E1XX, TX_WINDOW_FIXED } }, -- To view, visit https://gerrit.osmocom.org/5150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Dec 3 17:35:01 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Chemeris) Date: Sun, 3 Dec 2017 17:35:01 +0000 Subject: osmo-trx[master]: UHDDevice.cpp: add USRP B205mini support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 17:35:37 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 17:35:37 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Fix compiler warning on printing ptrdiff_t In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Fix compiler warning on printing ptrdiff_t ...................................................................... mobile: Fix compiler warning on printing ptrdiff_t The "msg->tail - msg->l4h" subtract two unsigned char* pointers and should result in a ptrdiff_t. Fix the compiler warning by using "%ti" in the printf. Fixes: gsm411_sms.c: In function ?gsm411_rx_rp_ud?: gsm411_sms.c:382:25: warning: format ?%li? expects argument of type ?long int?, but argument 7 has type ?int? [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:93:54: note: in definition of macro ?LOGPSRCC? logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ?LOGPSRC? LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ?LOGP? LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^~~~ gsm411_sms.c:382:25: warning: format ?%li? expects argument of type ?long int?, but argument 7 has type ?int? [-Wformat=] LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, ^ /home/ich/install/openbsc/include/osmocom/core/logging.h:95:53: note: in definition of macro ?LOGPSRCC? logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ ^~~ /home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ?LOGPSRC? LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~~~~~ gsm411_sms.c:382:2: note: in expansion of macro ?LOGP? LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443 --- M src/host/layer23/src/mobile/gsm411_sms.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index eb09854..b635bb2 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -375,7 +375,7 @@ LOGP(DLSMS, LOGL_INFO, "DST(%u,%s)\n", src_len, osmo_hexdump(src, src_len)); - LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h, + LOGP(DLSMS, LOGL_INFO, "TPDU(%ti,%s)\n", msg->tail-msg->l4h, osmo_hexdump(msg->l4h, msg->tail-msg->l4h)); rc = gsm340_rx_tpdu(trans, msg, rph->msg_ref); -- To view, visit https://gerrit.osmocom.org/5149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 17:35:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 17:35:38 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Declare struct osmocom/vty to be self includeable In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Declare struct osmocom/vty to be self includeable ...................................................................... mobile: Declare struct osmocom/vty to be self includeable In file included from settings.c:27:0: ../../include/osmocom/bb/mobile/app_mobile.h:10:42: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), ^~~~~~~~~~ ../../include/osmocom/bb/mobile/app_mobile.h:14:26: warning: ?struct osmocom_ms? declared inside parameter list will not be visible outside of this definition or declaration int mobile_delete(struct osmocom_ms *ms, int force); Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 83c07d6..704c972 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -5,6 +5,8 @@ extern char *config_dir; +struct osmocom_ms; + int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); int l23_app_exit(void); -- To view, visit https://gerrit.osmocom.org/5041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9348b3ed71a8490c03edda954402ab954f645b7c Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:40 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:40 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Add initial support for scripting support In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Add initial support for scripting support ...................................................................... mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 7 files changed, 227 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 7a935f9..8f5cdc3 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -85,6 +85,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 7abfda1..c2ab3c8 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -6,6 +6,7 @@ extern char *config_dir; struct osmocom_ms; +struct vty; int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), const char *config_file, const char *vty_ip, uint16_t vty_port); @@ -20,6 +21,9 @@ void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct osmocom_ms *ms); + /* Internal code. Don't call directly */ int mobile_exit(struct osmocom_ms *ms, int force); diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 47870e5..4e80e4e 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 0000000..b3b9c99 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *L) +{ + lua_getglobal(L, "_G"); + luaL_setfuncs(L, global_runtime, 0); + lua_pop(L, 1); +} + +static void add_runtime(lua_State *L, struct osmocom_ms *ms) +{ + add_globals(L); +} + +static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) +{ + if (nsize == 0) { + talloc_free(ptr); + return NULL; + } + return talloc_realloc_size(ctx, ptr, nsize); +} + +int script_lua_close(struct osmocom_ms *ms) +{ + if (!ms->lua_state) + return 0; + + lua_close(ms->lua_state); + ms->lua_state = NULL; + return 0; +} + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + int err; + + if (ms->lua_state) + lua_close(ms->lua_state); + ms->lua_state = lua_newstate(talloc_lua_alloc, ms); + if (!ms->lua_state) + return -1; + + luaL_openlibs(ms->lua_state); + err = luaL_loadfilex(ms->lua_state, filename, NULL); + if (err) { + vty_out(vty, "%% LUA load error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return -2; + } + + add_runtime(ms->lua_state, ms); + + err = lua_pcall(ms->lua_state, 0, 0, 0); + if (err) { + vty_out(vty, "%% LUA execute error: %s%s", + lua_tostring(ms->lua_state, -1), VTY_NEWLINE); + lua_pop(ms->lua_state, 1); + return 3; + } + + return 0; +} diff --git a/src/host/layer23/src/mobile/script_nolua.c b/src/host/layer23/src/mobile/script_nolua.c new file mode 100644 index 0000000..61466f7 --- /dev/null +++ b/src/host/layer23/src/mobile/script_nolua.c @@ -0,0 +1,36 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include + + +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) +{ + vty_out(vty, "%% No LUA support compiled into mobile!%s", VTY_NEWLINE); + return -1; +} + +int script_lua_close(struct osmocom_ms *ms) +{ + return 0; +} diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 2b51837..6d50c6b 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -143,6 +144,8 @@ talloc_free(abbrev); } + script_lua_close(ms); + return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 81c20fe..8767985 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1531,6 +1531,8 @@ /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); + if (ms->lua_script) + vty_out(vty, " lua-script %s%s", ms->lua_script, VTY_NEWLINE); vty_out(vty, "!%s", VTY_NEWLINE); } @@ -2740,6 +2742,30 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_script_load_run, cfg_ms_script_load_run_cmd, "lua-script FILENAME", + "Load and execute a LUA script\nFilename for lua script") +{ + struct osmocom_ms *ms = vty->index; + + osmo_talloc_replace_string(ms, &ms->lua_script, argv[0]); + if (!ms->lua_script) + return CMD_WARNING; + + script_lua_load(vty, ms, ms->lua_script); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_script_load_run, cfg_ms_no_script_load_run_cmd, "no lua-script", + NO_STR "Load and execute LUA script") +{ + struct osmocom_ms *ms = vty->index; + + script_lua_close(ms); + talloc_free(ms->lua_script); + ms->lua_script = NULL; + return CMD_SUCCESS; +} + int ms_vty_go_parent(struct vty *vty) { switch (vty->node) { @@ -2931,6 +2957,8 @@ install_element(MS_NODE, &cfg_ms_shutdown_cmd); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); + install_element(MS_NODE, &cfg_ms_script_load_run_cmd); + install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); /* Register the talloc context introspection command */ osmo_talloc_vty_add_cmds(); -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 9 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:42 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:42 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Notify MM status changes and generate primitive op ind ...................................................................... mobile: Notify MM status changes and generate primitive op ind Notify once the mm state has been changed. Unfortunaley one state transition can immediately trigger more transitions (recursively). In the mid-term it might be best to force all primitives to be async to avoid unpredictable behavior (e.g. make a shutdown while being a recursion down?) Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 24 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 6804fc0..39b4945 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -19,6 +19,7 @@ PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, PRIM_MOB_SMS, + PRIM_MOB_MM, }; struct mobile_prim_intf { @@ -65,6 +66,15 @@ int cause; }; +/** + * Mobility Management (MM) state changes. + */ +struct mobile_mm_param { + int state; /*!< The new MM state */ + int substate; /*!< The current substate */ + int prev_substate; /*!< The previous substate */ +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { @@ -72,6 +82,7 @@ struct mobile_started_param started; struct mobile_shutdown_param shutdown; struct mobile_sms_param sms; + struct mobile_mm_param mm; } u; }; @@ -86,3 +97,4 @@ void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int subs, int old_subs); diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index f32d57a..a7af1f5 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -39,6 +39,7 @@ #include #include #include +#include #include extern void *l23_ctx; @@ -961,6 +962,7 @@ mm->state = state; mm->substate = substate; + mobile_prim_ntfy_mm_status(ms, mm->state, mm->substate, mm->mr_substate); /* resend detach event, if flag is set */ if (state == GSM48_MM_ST_MM_IDLE && mm->delay_detach) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index 0902139..fd486ea 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -144,6 +144,16 @@ dispatch(ms, prim); } +void mobile_prim_ntfy_mm_status(struct osmocom_ms *ms, int state, int substate, int mr_substate) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_MM, PRIM_OP_INDICATION); + + prim->u.mm.state = state; + prim->u.mm.substate = substate; + prim->u.mm.prev_substate = mr_substate; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/5101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:42 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:42 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Move starting/stopping a MS into a separate function ...................................................................... mobile: Move starting/stopping a MS into a separate function Move the check if within the mobile app there is no other active MS using the same L1 socket. This way we can call this function from the primitive code as well. Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/vty_interface.c 3 files changed, 70 insertions(+), 37 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 704c972..7abfda1 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -13,12 +13,15 @@ int l23_app_work(int *quit); int mobile_delete(struct osmocom_ms *ms, int force); struct osmocom_ms *mobile_new(char *name); -int mobile_init(struct osmocom_ms *ms); -int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int mobile_start(struct osmocom_ms *ms, char **other_name); +int mobile_stop(struct osmocom_ms *ms, int force); void mobile_set_started(struct osmocom_ms *ms, bool state); void mobile_set_shutdown(struct osmocom_ms *ms, int state); + +/* Internal code. Don't call directly */ +int mobile_exit(struct osmocom_ms *ms, int force); #endif diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index c5c84e6..b2900ad 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -181,7 +181,7 @@ } /* power-on ms instance */ -int mobile_init(struct osmocom_ms *ms) +static int mobile_init(struct osmocom_ms *ms) { int rc; @@ -245,6 +245,51 @@ return 0; } +int mobile_start(struct osmocom_ms *ms, char **other_name) +{ + struct osmocom_ms *tmp; + int rc; + + if (ms->shutdown != MS_SHUTDOWN_COMPL) + return 0; + + llist_for_each_entry(tmp, &ms_list, entity) { + if (tmp->shutdown == MS_SHUTDOWN_COMPL) + continue; + if (!strcmp(ms->settings.layer2_socket_path, + tmp->settings.layer2_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -1; + } + if (!strcmp(ms->settings.sap_socket_path, + tmp->settings.sap_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -2; + } + } + + rc = mobile_init(ms); + if (rc < 0) + return -3; + return 0; +} + +int mobile_stop(struct osmocom_ms *ms, int force) +{ + if (force && ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) + return mobile_exit(ms, 1); + if (!force && ms->shutdown == MS_SHUTDOWN_NONE) + return mobile_exit(ms, 0); + return 0; +} + + /* create ms instance */ struct osmocom_ms *mobile_new(char *name) { diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index eafed6e..81c20fe 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2696,35 +2696,25 @@ DEFUN(cfg_no_shutdown, cfg_ms_no_shutdown_cmd, "no shutdown", NO_STR "Activate and run MS") { - struct osmocom_ms *ms = vty->index, *tmp; + struct osmocom_ms *ms = vty->index; + char *other_name = NULL; int rc; - if (ms->shutdown != MS_SHUTDOWN_COMPL) - return CMD_SUCCESS; - - llist_for_each_entry(tmp, &ms_list, entity) { - if (tmp->shutdown == MS_SHUTDOWN_COMPL) - continue; - if (!strcmp(ms->settings.layer2_socket_path, - tmp->settings.layer2_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same layer2-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - if (!strcmp(ms->settings.sap_socket_path, - tmp->settings.sap_socket_path)) { - vty_out(vty, "Cannot start MS '%s', because MS '%s' " - "use the same sap-socket.%sPlease shutdown " - "MS '%s' first.%s", ms->name, tmp->name, - VTY_NEWLINE, tmp->name, VTY_NEWLINE); - return CMD_WARNING; - } - } - - rc = mobile_init(ms); - if (rc < 0) { + rc = mobile_start(ms, &other_name); + switch (rc) { + case -1: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same layer2-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -2: + vty_out(vty, "Cannot start MS '%s', because MS '%s' " + "use the same sap-socket.%sPlease shutdown " + "MS '%s' first.%s", ms->name, other_name, + VTY_NEWLINE, other_name, VTY_NEWLINE); + return CMD_WARNING; + case -3: vty_out(vty, "Connection to layer 1 failed!%s", VTY_NEWLINE); return CMD_WARNING; @@ -2737,10 +2727,7 @@ "Shut down and deactivate MS") { struct osmocom_ms *ms = vty->index; - - if (ms->shutdown == MS_SHUTDOWN_NONE) - mobile_exit(ms, 0); - + mobile_stop(ms, 0); return CMD_SUCCESS; } @@ -2749,9 +2736,7 @@ { struct osmocom_ms *ms = vty->index; - if (ms->shutdown <= MS_SHUTDOWN_IMSI_DETACH) - mobile_exit(ms, 1); - + mobile_stop(ms, 1); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/5100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:43 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Search for lua5.3 and link to it In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Search for lua5.3 and link to it ...................................................................... mobile: Search for lua5.3 and link to it I will be adding a high-level async scripting interface to the mobile application. The initial implementation will use Lua 5.3. This version was released in January 2015 and is the latest version at the time the commit was made. Lua as extension and extensible language seems well suited for scripting. The plan is to attach a script to a ms and be able to trigger high level operations (send SMS, attach to network, detach). Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb --- M src/host/layer23/configure.ac M src/host/layer23/src/mobile/Makefile.am 2 files changed, 9 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index de26d23..a5938c7 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -21,6 +21,13 @@ AC_SUBST([LIBGPS_LIBS]) +dnl optional dependencies +PKG_CHECK_MODULES(LIBLUA, lua53, [ + WITH_LUA=1], [ + WITH_LUA=0]) +AC_SUBST([WITH_LUA]) +AM_CONDITIONAL([BUILD_LUA], test "x$WITH_LUA" = "x1") + dnl checks for header files AC_HEADER_STDC diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 90468c0..47870e5 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) -LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) $(LIBLUA_CFLAGS) +LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) $(LIBLUA_LIBS) noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ -- To view, visit https://gerrit.osmocom.org/4735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb Gerrit-PatchSet: 9 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:43 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Use new LOGPSRCC macro to print multiple values In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Use new LOGPSRCC macro to print multiple values ...................................................................... mobile: Use new LOGPSRCC macro to print multiple values We need continuation to avoid printing the logging category again. E.g. when print(one, two, three) is called. Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index cbba070..422f9e4 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -56,10 +56,11 @@ lua_getstack(L, 1, &ar); lua_getinfo(L, "nSl", &ar); + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, "%s", ""); for (i = 1; i <= argc; ++i) { if (!lua_isstring(L, i)) continue; - LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + LOGPSRCC(DLUA, loglevel, ar.source, ar.currentline, 1, "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); } LOGPC(DLUA, loglevel, "\n"); -- To view, visit https://gerrit.osmocom.org/5102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:43 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Create "ms" singleton for struct osmocom_ms ...................................................................... mobile: Create "ms" singleton for struct osmocom_ms Make the MS the script is associated with accessible to lua. Provide access to IMSI and IMEI. The IMSI might not be available at the given time and just return an empty string. Example lua usage: print(osmo.ms():imsi()); print(osmo.ms():imei()); print(osmo.ms():shutdown_state()) print(osmo.ms():started()) function ms_started_cb(started) print("MS started", started) end function ms_shutdown_cb(old_state, new_state) print("MS shutdown", old_state, "->", new_state) end function sms_cb(sms, cause, valid) print("SMS data cb", sms, cause, valid) for i, v in pairs(sms) do print(i, v) end end function mm_cb(new_state, new_substate, old_substate) if new_state == 19 and new_substate == 1 then osmo.ms():sms_send_simple("1234", "21321324", "fooooooo", 23) end end local cbs = { Started=ms_started_cb, Shutdown=ms_shutdown_cb, Sms=sms_cb, Mm=mm_cb } timer = osmo.timeout(20, function() print("Timeout occurred after 20s") end) osmo.ms():register(cbs) # Can fail. Best to wait for state changes... print(osmo.ms().start()) print(osmo.ms().stop(true)) Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/src/mobile/script_lua.c 2 files changed, 271 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 8f5cdc3..486c36d 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -87,6 +87,7 @@ struct llist_head trans_list; void *lua_state; + int lua_cb_ref; char *lua_script; }; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index cd7e8bc..cbba070 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -94,6 +95,30 @@ { NULL, NULL }, }; +/* Push table and function. Stack+=2 */ +static bool load_cb(lua_State *L, int ref, const char *cb_name) +{ + lua_rawgeti(L, LUA_REGISTRYINDEX, ref); + lua_pushstring(L, cb_name); + lua_gettable(L, -2); + if (lua_isnil(L, -1)) { + LOGP(DLUA, LOGL_DEBUG, "No handler for %s\n", cb_name); + lua_pop(L, 2); + return false; + } + return true; +} + +/* Call callback. Stack-=func + args. func/args popped by lua_pcall */ +static void call_cb(lua_State *L, int args) +{ + int err = lua_pcall(L, args, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 2); + } +} + static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_userdata *timer = (void *)(intptr_t) param->timer_id; @@ -108,6 +133,109 @@ LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); lua_pop(L, 1); } +} + +static void handle_started(struct mobile_prim_intf *intf, struct mobile_started_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Started")) + return; + + lua_pushinteger(L, param->started); + + call_cb(L, 1); + lua_pop(L, 1); +} + +static void handle_shutdown(struct mobile_prim_intf *intf, struct mobile_shutdown_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Shutdown")) + return; + + lua_pushinteger(L, param->old_state); + lua_pushinteger(L, param->new_state); + + call_cb(L, 2); + lua_pop(L, 1); +} + +static void handle_sms(struct mobile_prim_intf *intf, struct mobile_sms_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Sms")) + return; + + lua_createtable(L, 0, 11); + + lua_pushinteger(L, param->sms.validity_minutes); + lua_setfield(L, -2, "validity_minutes"); + + lua_pushinteger(L, param->sms.reply_path_req); + lua_setfield(L, -2, "reply_path_req"); + + lua_pushinteger(L, param->sms.status_rep_req); + lua_setfield(L, -2, "status_rep_req"); + + lua_pushinteger(L, param->sms.ud_hdr_ind); + lua_setfield(L, -2, "ud_hdr_ind"); + + lua_pushinteger(L, param->sms.protocol_id); + lua_setfield(L, -2, "protocol_id"); + + lua_pushinteger(L, param->sms.data_coding_scheme); + lua_setfield(L, -2, "data_coding_scheme"); + + lua_pushinteger(L, param->sms.msg_ref); + lua_setfield(L, -2, "msg_ref"); + + lua_pushstring(L, param->sms.address); + lua_setfield(L, -2, "address"); + + lua_pushinteger(L, param->sms.time); + lua_setfield(L, -2, "time"); + + lua_pushlstring(L, (char *) param->sms.user_data, param->sms.user_data_len); + lua_setfield(L, -2, "user_data"); + + lua_pushstring(L, param->sms.text); + lua_setfield(L, -2, "text"); + + lua_pushinteger(L, param->cause_valid); + lua_pushinteger(L, param->cause); + + call_cb(L, 3); + lua_pop(L, 1); +} + +static void handle_mm(struct mobile_prim_intf *intf, struct mobile_mm_param *param) +{ + lua_State *L = intf->ms->lua_state; + + if (intf->ms->lua_cb_ref == LUA_REFNIL) + return; + + if (!load_cb(L, intf->ms->lua_cb_ref, "Mm")) + return; + + lua_pushinteger(L, param->state); + lua_pushinteger(L, param->substate); + lua_pushinteger(L, param->prev_substate); + + call_cb(L, 3); + lua_pop(L, 1); } static int lua_osmo_timeout(lua_State *L) @@ -164,8 +292,125 @@ { NULL, NULL }, }; +static int lua_osmo_ms(lua_State *L) +{ + lua_pushlightuserdata(L, get_primitive(L)->ms); + luaL_getmetatable(L, "MS"); + lua_setmetatable(L, -2); + + return 1; +} + +static int lua_ms_imei(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->settings.imei); + return 1; +} +static int lua_ms_imsi(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + lua_pushstring(L, ms->subscr.imsi); + return 1; +} + +static int lua_ms_shutdown_state(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->shutdown); + return 1; +} + +static int lua_ms_started(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + lua_pushinteger(L, ms->started); + return 1; +} + +static int lua_ms_register(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + + /* callbacks must be a table */ + luaL_checktype(L, 2, LUA_TTABLE); + + if (ms->lua_cb_ref != LUA_REFNIL) + luaL_unref(L, LUA_REGISTRYINDEX, ms->lua_cb_ref); + ms->lua_cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + return 0; +} + +static int lua_ms_no_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + char *name; + int res; + + res = mobile_start(ms, &name); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_shutdown(lua_State *L) +{ + struct osmocom_ms *ms = get_primitive(L)->ms; + int argc = lua_gettop(L); + int force = 0; + int res; + + if (argc >= 1) { + luaL_argcheck(L, lua_isboolean(L, -1), 1, "Force"); + force = lua_toboolean(L, -1); + } + + res = mobile_stop(ms, force); + lua_pushinteger(L, res); + return 1; +} + +static int lua_ms_sms_send_simple(lua_State *L) +{ + const char *sms_sca, *number, *text; + int msg_ref, rc; + + luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); + luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); + luaL_argcheck(L, lua_isstring(L, -3), 2, "number must be a string"); + luaL_argcheck(L, lua_isstring(L, -4), 1, "sms_sca must be a string"); + + msg_ref = (int) lua_tonumber(L, -1); + text = lua_tostring(L, -2); + number = lua_tostring(L, -3); + sms_sca = lua_tostring(L, -4); + + rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); + lua_pushinteger(L, rc); + return 1; +} + +static const struct luaL_Reg ms_funcs[] = { + { "imsi", lua_ms_imsi }, + { "imei", lua_ms_imei }, + { "shutdown_state", lua_ms_shutdown_state }, + { "started", lua_ms_started }, + { "register", lua_ms_register }, + { "start", lua_ms_no_shutdown }, + { "stop", lua_ms_shutdown }, + { "sms_send_simple", lua_ms_sms_send_simple }, + { NULL, NULL }, +}; + + static const struct luaL_Reg osmo_funcs[] = { { "timeout", lua_osmo_timeout }, + { "ms", lua_osmo_ms }, { NULL, NULL }, }; @@ -174,6 +419,18 @@ switch (OSMO_PRIM_HDR(&prim->hdr)) { case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): handle_timeout(intf, (struct mobile_timer_param *) &prim->u.timer); + break; + case OSMO_PRIM(PRIM_MOB_STARTED, PRIM_OP_INDICATION): + handle_started(intf, (struct mobile_started_param *) &prim->u.started); + break; + case OSMO_PRIM(PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION): + handle_shutdown(intf, (struct mobile_shutdown_param *) &prim->u.shutdown); + break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_INDICATION): + handle_sms(intf, (struct mobile_sms_param *) &prim->u.sms); + break; + case OSMO_PRIM(PRIM_MOB_MM, PRIM_OP_INDICATION): + handle_mm(intf, (struct mobile_mm_param *) &prim->u.mm); break; default: LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); @@ -196,6 +453,16 @@ lua_pop(L, 1); } +static void create_meta_table(lua_State *L, const char *name, const luaL_Reg *regs) +{ + luaL_newmetatable(L, name); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, regs, 0); + lua_pop(L, 1); +} + static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); @@ -206,13 +473,8 @@ lua_setglobal(L, "osmo"); /* Create metatables so we can GC objects... */ - luaL_newmetatable(L, "Timer"); - lua_pushliteral(L, "__index"); - lua_pushvalue(L, -2); - lua_rawset(L, -3); - luaL_setfuncs(L, timer_funcs, 0); - lua_pop(L, 1); - + create_meta_table(L, "Timer", timer_funcs); + create_meta_table(L, "MS", ms_funcs); /* Remember the primitive pointer... store it in the registry */ lua_pushlightuserdata(L, lua_prim_key); @@ -251,6 +513,7 @@ if (!ms->lua_state) return -1; + ms->lua_cb_ref = LUA_REFNIL; luaL_openlibs(ms->lua_state); intf = mobile_prim_intf_alloc(ms); -- To view, visit https://gerrit.osmocom.org/4840 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d67777334a58 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:43 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:43 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Inform the primitive layer about status and new sms In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Inform the primitive layer about status and new sms ...................................................................... mobile: Inform the primitive layer about status and new sms Inform the layer about new SMS and inform about the cause of it. In both cases pass the SMS. Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c 4 files changed, 46 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index a94d1aa..d3074fb 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -4,6 +4,12 @@ #define SMS_HDR_SIZE 128 #define SMS_TEXT_SIZE 256 +#include +#include + +struct osmocom_ms; +struct msgb; + struct gsm_sms { unsigned long validity_minutes; uint8_t reply_path_req; diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 4d81ba1..6804fc0 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -1,5 +1,7 @@ #pragma once +#include + #include struct mobile_prim; @@ -16,6 +18,7 @@ PRIM_MOB_TIMER_CANCEL, PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, + PRIM_MOB_SMS, }; struct mobile_prim_intf { @@ -52,14 +55,26 @@ int new_state; }; +/** + * SMS related configs. + */ +struct mobile_sms_param { + struct gsm_sms sms; + + bool cause_valid; + int cause; +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { struct mobile_timer_param timer; struct mobile_started_param started; struct mobile_shutdown_param shutdown; + struct mobile_sms_param sms; } u; }; + struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); @@ -68,4 +83,6 @@ struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); -void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); \ No newline at end of file +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms); +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause); diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c index b635bb2..6d9d56e 100644 --- a/src/host/layer23/src/mobile/gsm411_sms.c +++ b/src/host/layer23/src/mobile/gsm411_sms.c @@ -40,6 +40,7 @@ #include #include #include +#include #define UM_SAPI_SMS 3 @@ -129,6 +130,7 @@ vty_notify(ms, "SMS to %s failed: %s\n", sms->address, get_value_string(gsm411_rp_cause_strs, cause)); + mobile_prim_ntfy_sms_status(ms, sms, cause); return 0; } /* @@ -186,6 +188,8 @@ char vty_text[sizeof(gsms->text)], *p; FILE *fp; + mobile_prim_ntfy_sms_new(ms, gsms); + /* remove linefeeds and show at VTY */ strcpy(vty_text, gsms->text); for (p = vty_text; *p; p++) { diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index dde34bc..0902139 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -126,6 +126,24 @@ dispatch(ms, prim); } +void mobile_prim_ntfy_sms_new(struct osmocom_ms *ms, struct gsm_sms *sms) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION); + + prim->u.sms.sms = *sms; + dispatch(ms, prim); +} + +void mobile_prim_ntfy_sms_status(struct osmocom_ms *ms, struct gsm_sms *sms, uint8_t cause) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_INDICATION); + + prim->u.sms.sms = *sms; + prim->u.sms.cause_valid = true; + prim->u.sms.cause = cause; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4932 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161 Gerrit-PatchSet: 6 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:44 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Directly inform the primitive layer about an event In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Directly inform the primitive layer about an event ...................................................................... mobile: Directly inform the primitive layer about an event Forward started/shutdown changes to the primitive layer which will turn them into indications. The other option might be to use the signals but it seems primitives are a superset of the signals. The notify will be done per MS and then the right primitive instance will be searched and the indication be sent. The approach will be applied to other systems as well. The signal framework might be seen as a subset of the primitives A signal mostly being a different form of an indication. Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d --- M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/primitives.c 3 files changed, 61 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index a3168b2..4d81ba1 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -14,6 +14,8 @@ enum mobile_prims { PRIM_MOB_TIMER, PRIM_MOB_TIMER_CANCEL, + PRIM_MOB_STARTED, + PRIM_MOB_SHUTDOWN, }; struct mobile_prim_intf { @@ -21,6 +23,7 @@ void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim); /* Internal state */ + struct llist_head entry; struct llist_head timers; }; @@ -33,16 +36,36 @@ int seconds; /*!< Seconds the timer should fire in */ }; +/** + * Primitive to indicate starting of the mobile. + */ +struct mobile_started_param { + bool started; +}; + +/** + * Primitive to indicate shutdown of the mobile. It will go through + * various states. + */ +struct mobile_shutdown_param { + int old_state; + int new_state; +}; + struct mobile_prim { struct osmo_prim_hdr hdr; /*!< Primitive base class */ union { struct mobile_timer_param timer; + struct mobile_started_param started; + struct mobile_shutdown_param shutdown; } u; }; - struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); void mobile_prim_intf_free(struct mobile_prim_intf *intf); struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started); +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state); \ No newline at end of file diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index b2900ad..6e1fffb 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -492,9 +493,14 @@ void mobile_set_started(struct osmocom_ms *ms, bool state) { ms->started = state; + + mobile_prim_ntfy_started(ms, state); } void mobile_set_shutdown(struct osmocom_ms *ms, int state) { + int old_state = ms->shutdown; ms->shutdown = state; + + mobile_prim_ntfy_shutdown(ms, old_state, state); } diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index efa7f3f..dde34bc 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -24,6 +24,8 @@ #include #include +static LLIST_HEAD(s_prims); + struct timer_closure { struct llist_head entry; struct mobile_prim_intf *intf; @@ -39,6 +41,7 @@ intf->ms = ms; INIT_LLIST_HEAD(&intf->timers); + llist_add_tail(&intf->entry, &s_prims); return intf; } @@ -51,6 +54,7 @@ llist_del(&timer->entry); talloc_free(timer); } + llist_del(&intf->entry); talloc_free(intf); } @@ -95,6 +99,33 @@ return 0; } +static void dispatch(struct osmocom_ms *ms, struct mobile_prim *prim) +{ + struct mobile_prim_intf *intf, *tmp; + + llist_for_each_entry_safe(intf, tmp, &s_prims, entry) { + if (intf->ms == ms) + intf->indication(intf, prim); + } +} + +void mobile_prim_ntfy_started(struct osmocom_ms *ms, bool started) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_STARTED, PRIM_OP_INDICATION); + + prim->u.started.started = started; + dispatch(ms, prim); +} + +void mobile_prim_ntfy_shutdown(struct osmocom_ms *ms, int old_state, int new_state) +{ + struct mobile_prim *prim = mobile_prim_alloc(PRIM_MOB_SHUTDOWN, PRIM_OP_INDICATION); + + prim->u.shutdown.old_state = old_state; + prim->u.shutdown.new_state = new_state; + dispatch(ms, prim); +} + static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) { struct timer_closure *closure; -- To view, visit https://gerrit.osmocom.org/4931 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5df20a4ab79c06b515780675b6df2929aa976f0d Gerrit-PatchSet: 6 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:44 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Add osmo.timeout for lua code to have timeouts In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Add osmo.timeout for lua code to have timeouts ...................................................................... mobile: Add osmo.timeout for lua code to have timeouts Allow to callback into lua code after a user configured timeout. Make it only work on seconds (truncate double to int). Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 134 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index b3b9c99..cd7e8bc 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -25,7 +25,26 @@ #include #include +#include + #include + +struct timer_userdata { + int cb_ref; +}; + +static char lua_prim_key[] = "osmocom.org-mobile-prim"; + +static struct mobile_prim_intf *get_primitive(lua_State *L) +{ + struct mobile_prim_intf *intf; + + lua_pushlightuserdata(L, lua_prim_key); + lua_gettable(L, LUA_REGISTRYINDEX); + intf = (void *) lua_topointer(L, -1); + lua_pop(L, 1); + return intf; +} static int lua_osmo_do_log(lua_State *L, int loglevel) { @@ -75,6 +94,94 @@ { NULL, NULL }, }; +static void handle_timeout(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_userdata *timer = (void *)(intptr_t) param->timer_id; + lua_State *L = intf->ms->lua_state; + int err; + + lua_rawgeti(L, LUA_REGISTRYINDEX, timer->cb_ref); + luaL_unref(L, LUA_REGISTRYINDEX, timer->cb_ref); + + err = lua_pcall(L, 0, 0, 0); + if (err) { + LOGP(DLUA, LOGL_ERROR, "lua error: %s\n", lua_tostring(L, -1)); + lua_pop(L, 1); + } +} + +static int lua_osmo_timeout(lua_State *L) +{ + struct mobile_prim *prim; + struct timer_userdata *timer; + + if(lua_gettop(L) != 2) { + lua_pushliteral(L, "Need two arguments"); + lua_error(L); + return 0; + } + + luaL_argcheck(L, lua_isnumber(L, -2), 1, "Timeout needs to be a number"); + luaL_argcheck(L, lua_isfunction(L, -1), 2, "Callback needs to be a function"); + + /* + * Create a handle to prevent the function to be GCed while we run the + * timer. Add a metatable to the object so itself will be GCed properly. + */ + timer = lua_newuserdata(L, sizeof(*timer)); + luaL_getmetatable(L, "Timer"); + lua_setmetatable(L, -2); + + lua_pushvalue(L, -2); + timer->cb_ref = luaL_ref(L, LUA_REGISTRYINDEX); + + /* Take the address of the user data... */ + prim = mobile_prim_alloc(PRIM_MOB_TIMER, PRIM_OP_REQUEST); + prim->u.timer.timer_id = (intptr_t) timer; + prim->u.timer.seconds = lua_tonumber(L, -3); + mobile_prim_intf_req(get_primitive(L), prim); + + return 1; +} + +static int lua_timer_cancel(lua_State *L) +{ + struct mobile_prim *prim; + struct timer_userdata *timer; + + luaL_argcheck(L, lua_isuserdata(L, -1), 1, "No userdata"); + timer = lua_touserdata(L, -1); + + prim = mobile_prim_alloc(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST); + prim->u.timer.timer_id = (intptr_t) timer; + mobile_prim_intf_req(get_primitive(L), prim); + return 0; +} + +static const struct luaL_Reg timer_funcs[] = { + { "cancel", lua_timer_cancel }, + { "__gc", lua_timer_cancel }, + { NULL, NULL }, +}; + +static const struct luaL_Reg osmo_funcs[] = { + { "timeout", lua_osmo_timeout }, + { NULL, NULL }, +}; + +static void lua_prim_ind(struct mobile_prim_intf *intf, struct mobile_prim *prim) +{ + switch (OSMO_PRIM_HDR(&prim->hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_INDICATION): + handle_timeout(intf, (struct mobile_timer_param *) &prim->u.timer); + break; + default: + LOGP(DLUA, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); + }; + + msgb_free(prim->hdr.msg); +} + /* * Add functions to the global lua scope. Technically these are * included in the _G table. The following lua code can be used @@ -89,9 +196,29 @@ lua_pop(L, 1); } -static void add_runtime(lua_State *L, struct osmocom_ms *ms) +static void add_runtime(lua_State *L, struct mobile_prim_intf *intf) { add_globals(L); + + /* Add a osmo module/table. Seems an oldschool module? */ + lua_newtable(L); + luaL_setfuncs(L, osmo_funcs, 0); + lua_setglobal(L, "osmo"); + + /* Create metatables so we can GC objects... */ + luaL_newmetatable(L, "Timer"); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); + luaL_setfuncs(L, timer_funcs, 0); + lua_pop(L, 1); + + + /* Remember the primitive pointer... store it in the registry */ + lua_pushlightuserdata(L, lua_prim_key); + lua_pushlightuserdata(L, intf); + lua_settable(L, LUA_REGISTRYINDEX); + } static void *talloc_lua_alloc(void *ctx, void *ptr, size_t osize, size_t nsize) @@ -115,6 +242,7 @@ int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename) { + struct mobile_prim_intf *intf; int err; if (ms->lua_state) @@ -124,6 +252,11 @@ return -1; luaL_openlibs(ms->lua_state); + + intf = mobile_prim_intf_alloc(ms); + intf->indication = lua_prim_ind; + add_runtime(ms->lua_state, intf); + err = luaL_loadfilex(ms->lua_state, filename, NULL); if (err) { vty_out(vty, "%% LUA load error: %s%s", @@ -132,7 +265,6 @@ return -2; } - add_runtime(ms->lua_state, ms); err = lua_pcall(ms->lua_state, 0, 0, 0); if (err) { -- To view, visit https://gerrit.osmocom.org/4839 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I355d2f8d15aeaa13abb1c5e4a8e0c958e5faf7f3 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:44 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Begin with a primitive interface on top of the code ...................................................................... mobile: Begin with a primitive interface on top of the code We want the script interface to interface through a primitive interface. This will allow to move it to a different thread or a process in the future. The script interface will just use the primitives. It is not clear how "sap" will be used here. I am keeping it at 0 right now. The first primitive is starting a timer with a request and then getting an indication as a response. Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/main.c A src/host/layer23/src/mobile/primitives.c 7 files changed, 193 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index efe493d..fb1229e 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -23,6 +23,7 @@ DSIM, DGPS, DMOB, + DPRIM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index b58b952..12cf24b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,3 +1,3 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h settings.h subscriber.h support.h \ - transaction.h vty.h mncc_sock.h + transaction.h vty.h mncc_sock.h primitives.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h new file mode 100644 index 0000000..a3168b2 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -0,0 +1,48 @@ +#pragma once + +#include + +struct mobile_prim; + +/** + * Mobile Script<->App primitives. Application script will receive + * indications and will send primitives to the lower layers. Here + * we will convert from internal state/events to the primitives. In + * the future the indications might be generated at lower levels + * directly. + */ +enum mobile_prims { + PRIM_MOB_TIMER, + PRIM_MOB_TIMER_CANCEL, +}; + +struct mobile_prim_intf { + struct osmocom_ms *ms; + void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim); + + /* Internal state */ + struct llist_head timers; +}; + +/** + * Primitive to create timers and get indication once they have + * expired. Currently there is no way to cancel timers. + */ +struct mobile_timer_param { + uint64_t timer_id; /*!< Unique Id identifying the timer */ + int seconds; /*!< Seconds the timer should fire in */ +}; + +struct mobile_prim { + struct osmo_prim_hdr hdr; /*!< Primitive base class */ + union { + struct mobile_timer_param timer; + } u; +}; + + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms); +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *hdr); +void mobile_prim_intf_free(struct mobile_prim_intf *intf); + +struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op); diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 3b761ef..7b3ea26 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -133,6 +133,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DPRIM] = { + .name = "DPRIM", + .description = "PRIM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..90468c0 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -5,7 +5,7 @@ noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ gsm48_rr.c mnccms.c settings.c subscriber.c support.c \ - transaction.c vty_interface.c voice.c mncc_sock.c + transaction.c vty_interface.c voice.c mncc_sock.c primitives.c bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 8921bd8..227cd10 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c new file mode 100644 index 0000000..efa7f3f --- /dev/null +++ b/src/host/layer23/src/mobile/primitives.c @@ -0,0 +1,135 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +#include +#include + +struct timer_closure { + struct llist_head entry; + struct mobile_prim_intf *intf; + struct osmo_timer_list timer; + uint64_t id; +}; + +struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms) +{ + struct mobile_prim_intf *intf; + + intf = talloc_zero(ms, struct mobile_prim_intf); + intf->ms = ms; + + INIT_LLIST_HEAD(&intf->timers); + return intf; +} + +void mobile_prim_intf_free(struct mobile_prim_intf *intf) +{ + struct timer_closure *timer, *tmp; + + llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) { + osmo_timer_del(&timer->timer); + llist_del(&timer->entry); + talloc_free(timer); + } + talloc_free(intf); +} + +struct mobile_prim *mobile_prim_alloc(unsigned int primitive, enum osmo_prim_operation op) +{ + struct msgb *msg = msgb_alloc(1024, "Mobile Primitive"); + struct mobile_prim *prim = (struct mobile_prim *) msgb_put(msg, sizeof(*prim)); + osmo_prim_init(&prim->hdr, 0, primitive, op, msg); + msg->l2h = msg->tail; + return prim; +} + +static void timer_expired_cb(void *_closure) +{ + struct timer_closure *closure = _closure; + struct mobile_prim_intf *intf; + struct mobile_prim *prim; + + prim = mobile_prim_alloc(PRIM_MOB_TIMER, PRIM_OP_INDICATION); + intf = closure->intf; + prim->u.timer.timer_id = closure->id; + + llist_del(&closure->entry); + talloc_free(closure); + + intf->indication(intf, prim); +} + +static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_closure *closure; + + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", param->timer_id); + + closure = talloc_zero(intf, struct timer_closure); + closure->intf = intf; + closure->id = param->timer_id; + closure->timer.cb = timer_expired_cb; + closure->timer.data = closure; + llist_add_tail(&closure->entry, &intf->timers); + osmo_timer_schedule(&closure->timer, param->seconds, 0); + return 0; +} + +static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param *param) +{ + struct timer_closure *closure; + + + llist_for_each_entry(closure, &intf->timers, entry) { + if (closure->id != param->timer_id) + continue; + + LOGP(DPRIM, LOGL_DEBUG, + "Canceling timer with reference: %llu\n", param->timer_id); + osmo_timer_del(&closure->timer); + llist_del(&closure->entry); + talloc_free(closure); + return 0; + } + return -1; +} + +int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *prim) +{ + int rc = 0; + + switch (OSMO_PRIM_HDR(&prim->hdr)) { + case OSMO_PRIM(PRIM_MOB_TIMER, PRIM_OP_REQUEST): + rc = create_timer(intf, &prim->u.timer); + break; + case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): + rc = cancel_timer(intf, &prim->u.timer); + break; + default: + LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); + break; + } + + msgb_free(prim->hdr.msg); + return rc; +} -- To view, visit https://gerrit.osmocom.org/4771 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c Gerrit-PatchSet: 8 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Sun Dec 3 18:09:44 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 18:09:44 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Add LUA as debug category to the applications In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Add LUA as debug category to the applications ...................................................................... mobile: Add LUA as debug category to the applications Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/main.c 3 files changed, 8 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index fb1229e..bf6e6aa 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -24,6 +24,7 @@ DGPS, DMOB, DPRIM, + DLUA, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index 7b3ea26..ed79991 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -139,6 +139,12 @@ .color = "\033[1;32m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DLUA] = { + .name = "DLUA", + .description = "LUA", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 227cd10..5a28be8 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DMOB:DPRIM:DLUA"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 9 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 19:10:12 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sun, 3 Dec 2017 19:10:12 +0000 Subject: osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) > (2 comments) https://gerrit.osmocom.org/#/c/5138/1/src/utils/Makefile.am File src/utils/Makefile.am: Line 12: $(LIBOSMOSCCP_CFLAGS) \ > which of the utilities needs SCCP? Correct, this is unneeded, I'll fix and resubmit. Line 127: $(LIBOSMOSCCP_CFLAGS) \ > for sure, meas_json doesn't need SCCP or MGCP, this is wrong. That's an indirect dependency via osmocom/msc/gsm_data.h. Without those CFLAGS the build (with previously described setup) fails with: CC meas_json-meas_json.o In file included from meas_json.c:40:0: ../../include/osmocom/msc/gsm_data.h:15:10: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. or: CC meas_json-meas_json.o In file included from meas_json.c:40:0: ../../include/osmocom/msc/gsm_data.h:19:10: fatal error: osmocom/mgcp_client/mgcp_client.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 3 19:18:56 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sun, 3 Dec 2017 19:18:56 +0000 Subject: [PATCH] osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5138 to look at the new patch set (#2). Add missing CFLAGS Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 --- M src/libcommon-cs/Makefile.am M src/libcommon/Makefile.am M src/libmsc/Makefile.am M src/libvlr/Makefile.am M src/utils/Makefile.am 5 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/38/5138/2 diff --git a/src/libcommon-cs/Makefile.am b/src/libcommon-cs/Makefile.am index 21c2745..eada698 100644 --- a/src/libcommon-cs/Makefile.am +++ b/src/libcommon-cs/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 0b258c0..18272c5 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..998df26 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -15,6 +15,7 @@ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) noinst_HEADERS = \ diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 17ad411..511dfc0 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -1,6 +1,14 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) +AM_CFLAGS= \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(LIBCRYPTO_CFLAGS) \ + $(NULL) noinst_HEADERS = \ vlr_access_req_fsm.h \ diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index 07b30d9..f1130db 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -123,5 +123,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 19:18:56 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sun, 3 Dec 2017 19:18:56 +0000 Subject: [PATCH] osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5139 to look at the new patch set (#3). Remove utils imported from openbsc, fix building remaining util smpp_mirror Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 --- M configure.ac M src/utils/Makefile.am D src/utils/meas_db.c D src/utils/meas_db.h D src/utils/meas_json.c D src/utils/meas_pcap2db.c D src/utils/meas_udp2db.c D src/utils/meas_vis.c 8 files changed, 6 insertions(+), 1,197 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/5139/3 diff --git a/configure.ac b/configure.ac index 5766fd0..6b6e9c7 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index f1130db..ad3ed3f 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -19,27 +19,10 @@ $(NULL) noinst_HEADERS = \ - meas_db.h \ $(NULL) bin_PROGRAMS = \ - meas_json \ $(NULL) -if HAVE_SQLITE3 -bin_PROGRAMS += \ - osmo-meas-udp2db \ - $(NULL) -if HAVE_PCAP -bin_PROGRAMS += \ - osmo-meas-pcap2db \ - $(NULL) -endif -endif -if HAVE_LIBCDK -bin_PROGRAMS += \ - meas_vis \ - $(NULL) -endif if BUILD_SMPP noinst_PROGRAMS = \ @@ -51,79 +34,15 @@ smpp_mirror.c \ $(NULL) +smpp_mirror_CFLAGS = \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBSMPP34_CFLAGS) \ + $(NULL) + smpp_mirror_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ - $(NULL) - -meas_vis_SOURCES = \ - meas_vis.c \ - $(NULL) - -meas_vis_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - -lcdk \ - -lncurses \ - $(NULL) - -meas_vis_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(NULL) - -osmo_meas_pcap2db_SOURCES = \ - meas_pcap2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_pcap2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - -lpcap \ - $(NULL) - -osmo_meas_pcap2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -osmo_meas_udp2db_SOURCES = \ - meas_udp2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_udp2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - $(NULL) - -osmo_meas_udp2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -meas_json_SOURCES = \ - meas_json.c \ - $(NULL) - -meas_json_LDADD = \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - -meas_json_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ - $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) diff --git a/src/utils/meas_db.c b/src/utils/meas_db.c deleted file mode 100644 index 8cf27df..0000000 --- a/src/utils/meas_db.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Routines for storing measurement reports in SQLite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "meas_db.h" - -#define INS_MR "INSERT INTO meas_rep (time, imsi, name, scenario, nr, bs_power, ms_timing_offset, fpc, ms_l1_pwr, ms_l1_ta) VALUES (?,?,?,?,?,?,?,?,?,?)" -#define INS_UD "INSERT INTO meas_rep_unidir (meas_id, rx_lev_full, rx_lev_sub, rx_qual_full, rx_qual_sub, dtx, uplink) VALUES (?,?,?,?,?,?,?)" -#define UPD_MR "UPDATE meas_rep SET ul_unidir=?, dl_unidir=? WHERE id=?" - -struct meas_db_state { - sqlite3 *db; - sqlite3_stmt *stmt_ins_ud; - sqlite3_stmt *stmt_ins_mr; - sqlite3_stmt *stmt_upd_mr; -}; - -/* macros to check for SQLite3 result codes */ -#define _SCK_OK(db, call, exp) \ - do { \ - int rc = call; \ - if (rc != exp) { \ - fprintf(stderr,"SQL Error in line %u: %s\n", \ - __LINE__, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) -#define SCK_OK(db, call) _SCK_OK(db, call, SQLITE_OK) -#define SCK_DONE(db, call) _SCK_OK(db, call, SQLITE_DONE) - -static int _insert_ud(struct meas_db_state *st, unsigned long meas_id, int dtx, - int uplink, const struct gsm_meas_rep_unidir *ud) -{ - unsigned long rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 1, meas_id)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 2, - rxlev2dbm(ud->full.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 3, - rxlev2dbm(ud->sub.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 4, ud->full.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 5, ud->sub.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 6, dtx)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 7, uplink)); - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_ud)); - - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_ud)); - - return sqlite3_last_insert_rowid(st->db); -err_io: - exit(1); -} - -/* insert a measurement report into the database */ -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr) -{ - int rc; - sqlite3_int64 rowid, ul_rowid, dl_rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 1, timestamp)); - - if (imsi) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 2, - imsi, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 2)); - - if (name) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 3, - name, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 3)); - - if (scenario) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 4, - scenario, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 4)); - - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 5, mr->nr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 6, mr->bs_power)); - - if (mr->flags & MEAS_REP_F_MS_TO) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 7, mr->ms_timing_offset)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 7)); - - if (mr->flags & MEAS_REP_F_FPC) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 1)); - else - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 0)); - - if (mr->flags & MEAS_REP_F_MS_L1) { - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 9, - mr->ms_l1.pwr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 10, - mr->ms_l1.ta)); - } - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_mr)); - - rowid = sqlite3_last_insert_rowid(st->db); - - /* insert uplink measurement */ - ul_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_UL_DTX, - 1, &mr->ul); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 1, ul_rowid)); - - /* insert downlink measurement, if present */ - if (mr->flags & MEAS_REP_F_DL_VALID) { - dl_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_DL_DTX, - 0, &mr->dl); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 2, dl_rowid)); - } else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_upd_mr, 2)); - - /* update meas_rep with the id's of the unidirectional - * measurements */ - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 3, rowid)); - SCK_DONE(st->db, sqlite3_step(st->stmt_upd_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_upd_mr)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_begin(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "BEGIN", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_commit(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "COMMIT", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -static const char *create_stmts[] = { - "CREATE TABLE IF NOT EXISTS meas_rep (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "time TIMESTAMP," - "imsi TEXT," - "name TEXT," - "scenario TEXT," - "nr INTEGER," - "bs_power INTEGER NOT NULL," - "ms_timing_offset INTEGER," - "fpc INTEGER NOT NULL DEFAULT 0," - "ul_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "dl_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "ms_l1_pwr INTEGER," - "ms_l1_ta INTEGER" - ")", - "CREATE TABLE IF NOT EXISTS meas_rep_unidir (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "meas_id INTEGER NOT NULL REFERENCES meas_rep(id)," - "rx_lev_full INTEGER NOT NULL," - "rx_lev_sub INTEGER NOT NULL," - "rx_qual_full INTEGER NOT NULL," - "rx_qual_sub INTEGER NOT NULL," - "dtx BOOLEAN NOT NULL DEFAULT 0," - "uplink BOOLEAN NOT NULL" - ")", - "CREATE VIEW IF NOT EXISTS path_loss AS " - "SELECT " - "meas_rep.id, " - "datetime(time,'unixepoch') AS timestamp, " - "imsi, " - "name, " - "scenario, " - "ms_timing_offset, " - "ms_l1_ta, " - "fpc, " - "ms_l1_pwr, " - "ud_ul.rx_lev_full AS ul_rx_lev_full, " - "ms_l1_pwr-ud_ul.rx_lev_full AS ul_path_loss_full, " - "ud_ul.rx_lev_sub ul_rx_lev_sub, " - "ms_l1_pwr-ud_ul.rx_lev_sub AS ul_path_loss_sub, " - "ud_ul.rx_qual_full AS ul_rx_qual_full, " - "ud_ul.rx_qual_sub AS ul_rx_qual_sub, " - "bs_power, " - "ud_dl.rx_lev_full AS dl_rx_lev_full, " - "bs_power-ud_dl.rx_lev_full AS dl_path_loss_full, " - "ud_dl.rx_lev_sub AS dl_rx_lev_sub, " - "bs_power-ud_dl.rx_lev_sub AS dl_path_loss_sub, " - "ud_dl.rx_qual_full AS dl_rx_qual_full, " - "ud_dl.rx_qual_sub AS dl_rx_qual_sub " - "FROM " - "meas_rep, " - "meas_rep_unidir AS ud_dl, " - "meas_rep_unidir AS ud_ul " - "WHERE " - "ud_ul.id = meas_rep.ul_unidir AND " - "ud_dl.id = meas_rep.dl_unidir", - "CREATE VIEW IF NOT EXISTS overview AS " - "SELECT " - "id," - "timestamp," - "imsi," - "name," - "scenario," - "ms_l1_pwr," - "ul_rx_lev_full," - "ul_path_loss_full," - "ul_rx_qual_full," - "bs_power," - "dl_rx_lev_full," - "dl_path_loss_full," - "dl_rx_qual_full " - "FROM path_loss", -}; - -static int check_create_tbl(struct meas_db_state *st) -{ - int i, rc; - - for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - SCK_OK(st->db, sqlite3_exec(st->db, create_stmts[i], - NULL, NULL, NULL)); - } - - return 0; -err_io: - return -EIO; -} - - -#define PREP_CHK(db, stmt, ptr) \ - do { \ - int rc; \ - rc = sqlite3_prepare_v2(db, stmt, strlen(stmt)+1, \ - ptr, NULL); \ - if (rc != SQLITE_OK) { \ - fprintf(stderr, "Error during prepare of '%s': %s\n", \ - stmt, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) - -struct meas_db_state *meas_db_open(void *ctx, const char *fname) -{ - int rc; - struct meas_db_state *st = talloc_zero(ctx, struct meas_db_state); - - if (!st) - return NULL; - - rc = sqlite3_open_v2(fname, &st->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, - NULL); - if (rc != SQLITE_OK) { - fprintf(stderr, "Unable to open DB: %s\n", - sqlite3_errmsg(st->db)); - goto err_io; - } - - rc = check_create_tbl(st); - - PREP_CHK(st->db, INS_MR, &st->stmt_ins_mr); - PREP_CHK(st->db, INS_UD, &st->stmt_ins_ud); - PREP_CHK(st->db, UPD_MR, &st->stmt_upd_mr); - - return st; -err_io: - talloc_free(st); - return NULL; -} - -void meas_db_close(struct meas_db_state *st) -{ - if (sqlite3_finalize(st->stmt_ins_mr) != SQLITE_OK) - fprintf(stderr, "DB insert measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_ins_ud) != SQLITE_OK) - fprintf(stderr, "DB insert unidir finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_upd_mr) != SQLITE_OK) - fprintf(stderr, "DB update measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_close(st->db) != SQLITE_OK) - fprintf(stderr, "Unable to close DB, abandoning.\n"); - - talloc_free(st); - -} diff --git a/src/utils/meas_db.h b/src/utils/meas_db.h deleted file mode 100644 index 889e902..0000000 --- a/src/utils/meas_db.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENBSC_MEAS_DB_H -#define OPENBSC_MEAS_DB_H - -struct meas_db_state; - -struct meas_db_state *meas_db_open(void *ctx, const char *fname); -void meas_db_close(struct meas_db_state *st); - -int meas_db_begin(struct meas_db_state *st); -int meas_db_commit(struct meas_db_state *st); - -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr); - -#endif diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c deleted file mode 100644 index 8db7791..0000000 --- a/src/utils/meas_json.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Convert measurement report feed into JSON feed printed to stdout. - * Each measurement report is printed as a separae JSON root entry. - * All measurement reports are separated by a new line. - */ - -/* (C) 2015 by Alexander Chemeris - * With parts of code adopted from different places in OpenBSC. - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -static void print_meas_rep_uni_json(struct gsm_meas_rep_unidir *mru) -{ - printf("\"RXL-FULL\":%d, \"RXL-SUB\":%d, ", - rxlev2dbm(mru->full.rx_lev), - rxlev2dbm(mru->sub.rx_lev)); - printf("\"RXQ-FULL\":%d, \"RXQ-SUB\":%d", - mru->full.rx_qual, mru->sub.rx_qual); -} - -static void print_meas_rep_json(struct gsm_meas_rep *mr) -{ - int i; - - printf("\"NR\":%d", mr->nr); - - if (mr->flags & MEAS_REP_F_DL_DTX) - printf(", \"DTXd\":true"); - - printf(", \"UL_MEAS\":{"); - print_meas_rep_uni_json(&mr->ul); - printf("}"); - printf(", \"BS_POWER\":%d", mr->bs_power); - if (mr->flags & MEAS_REP_F_MS_TO) - printf(", \"MS_TO\":%d", mr->ms_timing_offset); - - if (mr->flags & MEAS_REP_F_MS_L1) { - printf(", \"L1_MS_PWR\":%d", mr->ms_l1.pwr); - printf(", \"L1_FPC\":%s", - mr->flags & MEAS_REP_F_FPC ? "true" : "false"); - printf(", \"L1_TA\":%u", mr->ms_l1.ta); - } - - if (mr->flags & MEAS_REP_F_UL_DTX) - printf(", \"DTXu\":true"); - if (mr->flags & MEAS_REP_F_BA1) - printf(", \"BA1\":true"); - if (mr->flags & MEAS_REP_F_DL_VALID) { - printf(", \"DL_MEAS\":{"); - print_meas_rep_uni_json(&mr->dl); - printf("}"); - } - - if (mr->num_cell == 7) - return; - printf(", \"NUM_NEIGH\":%u, \"NEIGH\":[", mr->num_cell); - for (i = 0; i < mr->num_cell; i++) { - struct gsm_meas_rep_cell *mrc = &mr->cell[i]; - if (i!=0) printf(", "); - printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}", - mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev)); - } - printf("]"); -} - -static void print_chan_info_json(struct meas_feed_meas *mfm) -{ - printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " - "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), - mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); -} - -static void print_meas_feed_json(struct meas_feed_meas *mfm) -{ - time_t now = time(NULL); - - printf("{"); - printf("\"time\":%ld, \"imsi\":\"%s\", \"name\":\"%s\", \"scenario\":\"%s\", ", - now, mfm->imsi, mfm->name, mfm->scenario); - - switch (mfm->hdr.version) { - case 1: - printf("\"chan_info\":{"); - print_chan_info_json(mfm); - printf("}, "); - /* no break, fall to version 0 */ - case 0: - printf("\"meas_rep\":{"); - print_meas_rep_json(&mfm->mr); - printf("}"); - break; - } - - printf("}\n"); - -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - - print_meas_feed_json(mfm); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - int rc; - struct osmo_fd udp_ofd; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - }; - - exit(0); -} diff --git a/src/utils/meas_pcap2db.c b/src/utils/meas_pcap2db.c deleted file mode 100644 index 0644521..0000000 --- a/src/utils/meas_pcap2db.c +++ /dev/null @@ -1,138 +0,0 @@ -/* read PCAP file with meas_feed data and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include "meas_db.h" - -static struct meas_db_state *db; - -static void handle_mfm(const struct pcap_pkthdr *h, - const struct meas_feed_meas *mfm) -{ - const char *scenario; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, h->ts.tv_sec, - scenario, &mfm->mr); -} - -static void pcap_cb(u_char *user, const struct pcap_pkthdr *h, - const u_char *bytes) -{ - const char *cur = bytes; - const struct iphdr *ip; - const struct udphdr *udp; - const struct meas_feed_meas *mfm; - uint16_t udplen; - - if (h->caplen < 14+20+8) - return; - - /* Check if there is IPv4 in the Ethernet */ - if (cur[12] != 0x08 || cur[13] != 0x00) - return; - - cur += 14; /* ethernet header */ - ip = (struct iphdr *) cur; - - if (ip->version != 4) - return; - cur += ip->ihl * 4; - - if (ip->protocol != IPPROTO_UDP) - return; - - udp = (struct udphdr *) cur; - - if (udp->dest != htons(8888)) - return; - - udplen = ntohs(udp->len); - if (udplen != sizeof(*udp) + sizeof(*mfm)) - return; - cur += sizeof(*udp); - - mfm = (const struct meas_feed_meas *) cur; - - handle_mfm(h, mfm); -} - -int main(int argc, char **argv) -{ - char errbuf[PCAP_ERRBUF_SIZE+1]; - char *pcap_fname, *db_fname; - pcap_t *pc; - int rc; - - if (argc < 3) { - fprintf(stderr, "You need to specify PCAP and database file\n"); - exit(2); - } - - pcap_fname = argv[1]; - db_fname = argv[2]; - - pc = pcap_open_offline(pcap_fname, errbuf); - if (!pc) { - fprintf(stderr, "Cannot open %s: %s\n", pcap_fname, errbuf); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) - exit(0); - - rc = meas_db_begin(db); - if (rc < 0) { - fprintf(stderr, "Error during BEGIN\n"); - exit(1); - } - - pcap_loop(pc, 0 , pcap_cb, NULL); - - meas_db_commit(db); - - exit(0); -} diff --git a/src/utils/meas_udp2db.c b/src/utils/meas_udp2db.c deleted file mode 100644 index c2b5ace..0000000 --- a/src/utils/meas_udp2db.c +++ /dev/null @@ -1,126 +0,0 @@ -/* liesten to meas_feed on UDP and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include "meas_db.h" - -static struct osmo_fd udp_ofd; -static struct meas_db_state *db; - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - const char *scenario; - time_t now = time(NULL); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - if (mfh->msg_type != MEAS_FEED_MEAS) - return -EINVAL; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, now, - scenario, &mfm->mr); - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - char *db_fname; - int rc; - - msgb_talloc_ctx_init(NULL, 0); - - if (argc < 2) { - fprintf(stderr, "You have to specify the database file name\n"); - exit(2); - } - - db_fname = argv[1]; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, - IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) { - fprintf(stderr, "Unable to create UDP listen socket\n"); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) { - fprintf(stderr, "Unable to open database\n"); - exit(1); - } - - /* FIXME: timer-based BEGIN/COMMIT */ - - while (1) { - osmo_select_main(0); - }; - - meas_db_close(db); - - exit(0); -} - diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c deleted file mode 100644 index 5efb300..0000000 --- a/src/utils/meas_vis.c +++ /dev/null @@ -1,310 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -struct ms_state_uni { - CDKSLIDER *cdk; - CDKLABEL *cdk_label; - - time_t last_update; - char label[32]; - char *_lbl[1]; -}; - - -struct ms_state { - struct llist_head list; - - char name[31+1]; - char imsi[15+1]; - struct gsm_meas_rep mr; - - struct ms_state_uni ul; - struct ms_state_uni dl; -}; - -struct state { - struct osmo_fd udp_ofd; - struct llist_head ms_list; - - CDKSCREEN *cdkscreen; - WINDOW *curses_win; - - CDKLABEL *cdk_title; - char *title; - - CDKLABEL *cdk_header; - char header[256]; -}; - -static struct state g_st; - -struct ms_state *find_ms(const char *imsi) -{ - struct ms_state *ms; - - llist_for_each_entry(ms, &g_st.ms_list, list) { - if (!strcmp(ms->imsi, imsi)) - return ms; - } - return NULL; -} - -static struct ms_state *find_alloc_ms(const char *imsi) -{ - struct ms_state *ms; - - ms = find_ms(imsi); - if (!ms) { - ms = talloc_zero(NULL, struct ms_state); - osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); - ms->ul._lbl[0] = ms->ul.label; - ms->dl._lbl[0] = ms->dl.label; - llist_add_tail(&ms->list, &g_st.ms_list); - } - - return ms; -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - struct ms_state *ms = find_alloc_ms(mfm->imsi); - time_t now = time(NULL); - - osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); - memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); - ms->ul.last_update = now; - if (ms->mr.flags & MEAS_REP_F_DL_VALID) - ms->dl.last_update = now; - - /* move to head of list */ - llist_del(&ms->list); - llist_add(&ms->list, &g_st.ms_list); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - - -static void destroy_dir(struct ms_state_uni *uni) -{ - if (uni->cdk) { - destroyCDKSlider(uni->cdk); - uni->cdk = NULL; - } - if (uni->cdk_label) { - destroyCDKLabel(uni->cdk_label); - uni->cdk_label = NULL; - } -} - -#define DIR_UL 0 -#define DIR_DL 1 -static const char *dir_str[2] = { - [DIR_UL] = "UL", - [DIR_DL] = "DL", -}; - -static int colpair_by_qual(uint8_t rx_qual) -{ - if (rx_qual == 0) - return 24; - else if (rx_qual <= 4) - return 32; - else - return 16; -} - -static int colpair_by_lev(int rx_lev) -{ - if (rx_lev < -95) - return 16; - else if (rx_lev < -80) - return 32; - else - return 24; -} - - -void write_uni(struct ms_state *ms, struct ms_state_uni *msu, - struct gsm_rx_lev_qual *lq, int dir, int row) -{ - - char label[128]; - time_t now = time(NULL); - int qual_col = colpair_by_qual(lq->rx_qual); - int lev_col = colpair_by_lev(rxlev2dbm(lq->rx_lev)); - int color, pwr; - - if (dir == DIR_UL) { - pwr = ms->mr.ms_l1.pwr; - } else { - pwr = ms->mr.bs_power; - } - - color = A_REVERSE | COLOR_PAIR(lev_col) | ' '; - snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]); - msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color, - COLS-40, rxlev2dbm(lq->rx_lev), -110, -47, - 1, 2, FALSE, FALSE); - //IsVisibleObj(ms->ul.cdk) = FALSE; - snprintf(msu->label, sizeof(msu->label), "%1d %3d %2u %2d %4u", - qual_col, lq->rx_qual, qual_col, pwr, - ms->mr.ms_l1.ta, ms->mr.ms_timing_offset, - now - msu->last_update); - msu->cdk_label = newCDKLabel(g_st.cdkscreen, RIGHT, row, - msu->_lbl, 1, FALSE, FALSE); -} - -static void update_sliders(void) -{ - int num_vis_sliders = 0; - struct ms_state *ms; -#define HEADER_LINES 2 - - /* remove all sliders */ - llist_for_each_entry(ms, &g_st.ms_list, list) { - destroy_dir(&ms->ul); - destroy_dir(&ms->dl); - - } - - llist_for_each_entry(ms, &g_st.ms_list, list) { - struct gsm_rx_lev_qual *lq; - unsigned int row = HEADER_LINES + num_vis_sliders*3; - - if (ms->mr.flags & MEAS_REP_F_UL_DTX) - lq = &ms->mr.ul.sub; - else - lq = &ms->mr.ul.full; - write_uni(ms, &ms->ul, lq, DIR_UL, row); - - if (ms->mr.flags & MEAS_REP_F_DL_DTX) - lq = &ms->mr.dl.sub; - else - lq = &ms->mr.dl.full; - write_uni(ms, &ms->dl, lq, DIR_DL, row+1); - - num_vis_sliders++; - if (num_vis_sliders >= LINES/3) - break; - } - - refreshCDKScreen(g_st.cdkscreen); - -} - -const struct value_string col_strs[] = { - { COLOR_WHITE, "white" }, - { COLOR_RED, "red" }, - { COLOR_GREEN, "green" }, - { COLOR_YELLOW, "yellow" }, - { COLOR_BLUE, "blue" }, - { COLOR_MAGENTA,"magenta" }, - { COLOR_CYAN, "cyan" }, - { COLOR_BLACK, "black" }, - { 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc; - char *header[1]; - char *title[1]; - - msgb_talloc_ctx_init(NULL, 0); - - printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); - printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); - - INIT_LLIST_HEAD(&g_st.ms_list); - g_st.curses_win = initscr(); - g_st.cdkscreen = initCDKScreen(g_st.curses_win); - initCDKColor(); - - g_st.title = "OpenBSC link quality monitor"; - title[0] = g_st.title; - g_st.cdk_title = newCDKLabel(g_st.cdkscreen, CENTER, 0, title, 1, FALSE, FALSE); - - snprintf(g_st.header, sizeof(g_st.header), "Q Pwr TA TO Time"); - header[0] = g_st.header; - g_st.cdk_header = newCDKLabel(g_st.cdkscreen, RIGHT, 1, header, 1, FALSE, FALSE); - -#if 0 - int i; - for (i = 0; i < 64; i++) { - short f, b; - pair_content(i, &f, &b); - attron(COLOR_PAIR(i)); - printw("%u: %u (%s) ", i, f, get_value_string(col_strs, f)); - printw("%u (%s)\n\r", b, get_value_string(col_strs, b)); - } - refresh(); - getch(); - exit(0); -#endif - - g_st.udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - update_sliders(); - }; - - exit(0); -} -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 3 19:31:58 2017 From: gerrit-no-reply at lists.osmocom.org (Alexander Huemer) Date: Sun, 3 Dec 2017 19:31:58 +0000 Subject: [PATCH] osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5139 to look at the new patch set (#4). Remove utils imported from openbsc, fix building remaining util smpp_mirror Related: OS#2522 Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 --- M configure.ac M src/utils/Makefile.am D src/utils/meas_db.c D src/utils/meas_db.h D src/utils/meas_json.c D src/utils/meas_pcap2db.c D src/utils/meas_udp2db.c D src/utils/meas_vis.c 8 files changed, 6 insertions(+), 1,197 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/5139/4 diff --git a/configure.ac b/configure.ac index 5766fd0..6b6e9c7 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index f1130db..ad3ed3f 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -19,27 +19,10 @@ $(NULL) noinst_HEADERS = \ - meas_db.h \ $(NULL) bin_PROGRAMS = \ - meas_json \ $(NULL) -if HAVE_SQLITE3 -bin_PROGRAMS += \ - osmo-meas-udp2db \ - $(NULL) -if HAVE_PCAP -bin_PROGRAMS += \ - osmo-meas-pcap2db \ - $(NULL) -endif -endif -if HAVE_LIBCDK -bin_PROGRAMS += \ - meas_vis \ - $(NULL) -endif if BUILD_SMPP noinst_PROGRAMS = \ @@ -51,79 +34,15 @@ smpp_mirror.c \ $(NULL) +smpp_mirror_CFLAGS = \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBSMPP34_CFLAGS) \ + $(NULL) + smpp_mirror_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ - $(NULL) - -meas_vis_SOURCES = \ - meas_vis.c \ - $(NULL) - -meas_vis_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - -lcdk \ - -lncurses \ - $(NULL) - -meas_vis_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(NULL) - -osmo_meas_pcap2db_SOURCES = \ - meas_pcap2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_pcap2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - -lpcap \ - $(NULL) - -osmo_meas_pcap2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -osmo_meas_udp2db_SOURCES = \ - meas_udp2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_udp2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - $(NULL) - -osmo_meas_udp2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -meas_json_SOURCES = \ - meas_json.c \ - $(NULL) - -meas_json_LDADD = \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - -meas_json_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ - $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) diff --git a/src/utils/meas_db.c b/src/utils/meas_db.c deleted file mode 100644 index 8cf27df..0000000 --- a/src/utils/meas_db.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Routines for storing measurement reports in SQLite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "meas_db.h" - -#define INS_MR "INSERT INTO meas_rep (time, imsi, name, scenario, nr, bs_power, ms_timing_offset, fpc, ms_l1_pwr, ms_l1_ta) VALUES (?,?,?,?,?,?,?,?,?,?)" -#define INS_UD "INSERT INTO meas_rep_unidir (meas_id, rx_lev_full, rx_lev_sub, rx_qual_full, rx_qual_sub, dtx, uplink) VALUES (?,?,?,?,?,?,?)" -#define UPD_MR "UPDATE meas_rep SET ul_unidir=?, dl_unidir=? WHERE id=?" - -struct meas_db_state { - sqlite3 *db; - sqlite3_stmt *stmt_ins_ud; - sqlite3_stmt *stmt_ins_mr; - sqlite3_stmt *stmt_upd_mr; -}; - -/* macros to check for SQLite3 result codes */ -#define _SCK_OK(db, call, exp) \ - do { \ - int rc = call; \ - if (rc != exp) { \ - fprintf(stderr,"SQL Error in line %u: %s\n", \ - __LINE__, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) -#define SCK_OK(db, call) _SCK_OK(db, call, SQLITE_OK) -#define SCK_DONE(db, call) _SCK_OK(db, call, SQLITE_DONE) - -static int _insert_ud(struct meas_db_state *st, unsigned long meas_id, int dtx, - int uplink, const struct gsm_meas_rep_unidir *ud) -{ - unsigned long rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 1, meas_id)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 2, - rxlev2dbm(ud->full.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 3, - rxlev2dbm(ud->sub.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 4, ud->full.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 5, ud->sub.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 6, dtx)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 7, uplink)); - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_ud)); - - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_ud)); - - return sqlite3_last_insert_rowid(st->db); -err_io: - exit(1); -} - -/* insert a measurement report into the database */ -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr) -{ - int rc; - sqlite3_int64 rowid, ul_rowid, dl_rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 1, timestamp)); - - if (imsi) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 2, - imsi, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 2)); - - if (name) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 3, - name, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 3)); - - if (scenario) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 4, - scenario, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 4)); - - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 5, mr->nr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 6, mr->bs_power)); - - if (mr->flags & MEAS_REP_F_MS_TO) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 7, mr->ms_timing_offset)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 7)); - - if (mr->flags & MEAS_REP_F_FPC) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 1)); - else - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 0)); - - if (mr->flags & MEAS_REP_F_MS_L1) { - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 9, - mr->ms_l1.pwr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 10, - mr->ms_l1.ta)); - } - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_mr)); - - rowid = sqlite3_last_insert_rowid(st->db); - - /* insert uplink measurement */ - ul_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_UL_DTX, - 1, &mr->ul); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 1, ul_rowid)); - - /* insert downlink measurement, if present */ - if (mr->flags & MEAS_REP_F_DL_VALID) { - dl_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_DL_DTX, - 0, &mr->dl); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 2, dl_rowid)); - } else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_upd_mr, 2)); - - /* update meas_rep with the id's of the unidirectional - * measurements */ - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 3, rowid)); - SCK_DONE(st->db, sqlite3_step(st->stmt_upd_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_upd_mr)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_begin(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "BEGIN", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_commit(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "COMMIT", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -static const char *create_stmts[] = { - "CREATE TABLE IF NOT EXISTS meas_rep (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "time TIMESTAMP," - "imsi TEXT," - "name TEXT," - "scenario TEXT," - "nr INTEGER," - "bs_power INTEGER NOT NULL," - "ms_timing_offset INTEGER," - "fpc INTEGER NOT NULL DEFAULT 0," - "ul_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "dl_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "ms_l1_pwr INTEGER," - "ms_l1_ta INTEGER" - ")", - "CREATE TABLE IF NOT EXISTS meas_rep_unidir (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "meas_id INTEGER NOT NULL REFERENCES meas_rep(id)," - "rx_lev_full INTEGER NOT NULL," - "rx_lev_sub INTEGER NOT NULL," - "rx_qual_full INTEGER NOT NULL," - "rx_qual_sub INTEGER NOT NULL," - "dtx BOOLEAN NOT NULL DEFAULT 0," - "uplink BOOLEAN NOT NULL" - ")", - "CREATE VIEW IF NOT EXISTS path_loss AS " - "SELECT " - "meas_rep.id, " - "datetime(time,'unixepoch') AS timestamp, " - "imsi, " - "name, " - "scenario, " - "ms_timing_offset, " - "ms_l1_ta, " - "fpc, " - "ms_l1_pwr, " - "ud_ul.rx_lev_full AS ul_rx_lev_full, " - "ms_l1_pwr-ud_ul.rx_lev_full AS ul_path_loss_full, " - "ud_ul.rx_lev_sub ul_rx_lev_sub, " - "ms_l1_pwr-ud_ul.rx_lev_sub AS ul_path_loss_sub, " - "ud_ul.rx_qual_full AS ul_rx_qual_full, " - "ud_ul.rx_qual_sub AS ul_rx_qual_sub, " - "bs_power, " - "ud_dl.rx_lev_full AS dl_rx_lev_full, " - "bs_power-ud_dl.rx_lev_full AS dl_path_loss_full, " - "ud_dl.rx_lev_sub AS dl_rx_lev_sub, " - "bs_power-ud_dl.rx_lev_sub AS dl_path_loss_sub, " - "ud_dl.rx_qual_full AS dl_rx_qual_full, " - "ud_dl.rx_qual_sub AS dl_rx_qual_sub " - "FROM " - "meas_rep, " - "meas_rep_unidir AS ud_dl, " - "meas_rep_unidir AS ud_ul " - "WHERE " - "ud_ul.id = meas_rep.ul_unidir AND " - "ud_dl.id = meas_rep.dl_unidir", - "CREATE VIEW IF NOT EXISTS overview AS " - "SELECT " - "id," - "timestamp," - "imsi," - "name," - "scenario," - "ms_l1_pwr," - "ul_rx_lev_full," - "ul_path_loss_full," - "ul_rx_qual_full," - "bs_power," - "dl_rx_lev_full," - "dl_path_loss_full," - "dl_rx_qual_full " - "FROM path_loss", -}; - -static int check_create_tbl(struct meas_db_state *st) -{ - int i, rc; - - for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - SCK_OK(st->db, sqlite3_exec(st->db, create_stmts[i], - NULL, NULL, NULL)); - } - - return 0; -err_io: - return -EIO; -} - - -#define PREP_CHK(db, stmt, ptr) \ - do { \ - int rc; \ - rc = sqlite3_prepare_v2(db, stmt, strlen(stmt)+1, \ - ptr, NULL); \ - if (rc != SQLITE_OK) { \ - fprintf(stderr, "Error during prepare of '%s': %s\n", \ - stmt, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) - -struct meas_db_state *meas_db_open(void *ctx, const char *fname) -{ - int rc; - struct meas_db_state *st = talloc_zero(ctx, struct meas_db_state); - - if (!st) - return NULL; - - rc = sqlite3_open_v2(fname, &st->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, - NULL); - if (rc != SQLITE_OK) { - fprintf(stderr, "Unable to open DB: %s\n", - sqlite3_errmsg(st->db)); - goto err_io; - } - - rc = check_create_tbl(st); - - PREP_CHK(st->db, INS_MR, &st->stmt_ins_mr); - PREP_CHK(st->db, INS_UD, &st->stmt_ins_ud); - PREP_CHK(st->db, UPD_MR, &st->stmt_upd_mr); - - return st; -err_io: - talloc_free(st); - return NULL; -} - -void meas_db_close(struct meas_db_state *st) -{ - if (sqlite3_finalize(st->stmt_ins_mr) != SQLITE_OK) - fprintf(stderr, "DB insert measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_ins_ud) != SQLITE_OK) - fprintf(stderr, "DB insert unidir finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_upd_mr) != SQLITE_OK) - fprintf(stderr, "DB update measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_close(st->db) != SQLITE_OK) - fprintf(stderr, "Unable to close DB, abandoning.\n"); - - talloc_free(st); - -} diff --git a/src/utils/meas_db.h b/src/utils/meas_db.h deleted file mode 100644 index 889e902..0000000 --- a/src/utils/meas_db.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENBSC_MEAS_DB_H -#define OPENBSC_MEAS_DB_H - -struct meas_db_state; - -struct meas_db_state *meas_db_open(void *ctx, const char *fname); -void meas_db_close(struct meas_db_state *st); - -int meas_db_begin(struct meas_db_state *st); -int meas_db_commit(struct meas_db_state *st); - -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr); - -#endif diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c deleted file mode 100644 index 8db7791..0000000 --- a/src/utils/meas_json.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Convert measurement report feed into JSON feed printed to stdout. - * Each measurement report is printed as a separae JSON root entry. - * All measurement reports are separated by a new line. - */ - -/* (C) 2015 by Alexander Chemeris - * With parts of code adopted from different places in OpenBSC. - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -static void print_meas_rep_uni_json(struct gsm_meas_rep_unidir *mru) -{ - printf("\"RXL-FULL\":%d, \"RXL-SUB\":%d, ", - rxlev2dbm(mru->full.rx_lev), - rxlev2dbm(mru->sub.rx_lev)); - printf("\"RXQ-FULL\":%d, \"RXQ-SUB\":%d", - mru->full.rx_qual, mru->sub.rx_qual); -} - -static void print_meas_rep_json(struct gsm_meas_rep *mr) -{ - int i; - - printf("\"NR\":%d", mr->nr); - - if (mr->flags & MEAS_REP_F_DL_DTX) - printf(", \"DTXd\":true"); - - printf(", \"UL_MEAS\":{"); - print_meas_rep_uni_json(&mr->ul); - printf("}"); - printf(", \"BS_POWER\":%d", mr->bs_power); - if (mr->flags & MEAS_REP_F_MS_TO) - printf(", \"MS_TO\":%d", mr->ms_timing_offset); - - if (mr->flags & MEAS_REP_F_MS_L1) { - printf(", \"L1_MS_PWR\":%d", mr->ms_l1.pwr); - printf(", \"L1_FPC\":%s", - mr->flags & MEAS_REP_F_FPC ? "true" : "false"); - printf(", \"L1_TA\":%u", mr->ms_l1.ta); - } - - if (mr->flags & MEAS_REP_F_UL_DTX) - printf(", \"DTXu\":true"); - if (mr->flags & MEAS_REP_F_BA1) - printf(", \"BA1\":true"); - if (mr->flags & MEAS_REP_F_DL_VALID) { - printf(", \"DL_MEAS\":{"); - print_meas_rep_uni_json(&mr->dl); - printf("}"); - } - - if (mr->num_cell == 7) - return; - printf(", \"NUM_NEIGH\":%u, \"NEIGH\":[", mr->num_cell); - for (i = 0; i < mr->num_cell; i++) { - struct gsm_meas_rep_cell *mrc = &mr->cell[i]; - if (i!=0) printf(", "); - printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}", - mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev)); - } - printf("]"); -} - -static void print_chan_info_json(struct meas_feed_meas *mfm) -{ - printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " - "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), - mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); -} - -static void print_meas_feed_json(struct meas_feed_meas *mfm) -{ - time_t now = time(NULL); - - printf("{"); - printf("\"time\":%ld, \"imsi\":\"%s\", \"name\":\"%s\", \"scenario\":\"%s\", ", - now, mfm->imsi, mfm->name, mfm->scenario); - - switch (mfm->hdr.version) { - case 1: - printf("\"chan_info\":{"); - print_chan_info_json(mfm); - printf("}, "); - /* no break, fall to version 0 */ - case 0: - printf("\"meas_rep\":{"); - print_meas_rep_json(&mfm->mr); - printf("}"); - break; - } - - printf("}\n"); - -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - - print_meas_feed_json(mfm); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - int rc; - struct osmo_fd udp_ofd; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - }; - - exit(0); -} diff --git a/src/utils/meas_pcap2db.c b/src/utils/meas_pcap2db.c deleted file mode 100644 index 0644521..0000000 --- a/src/utils/meas_pcap2db.c +++ /dev/null @@ -1,138 +0,0 @@ -/* read PCAP file with meas_feed data and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include "meas_db.h" - -static struct meas_db_state *db; - -static void handle_mfm(const struct pcap_pkthdr *h, - const struct meas_feed_meas *mfm) -{ - const char *scenario; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, h->ts.tv_sec, - scenario, &mfm->mr); -} - -static void pcap_cb(u_char *user, const struct pcap_pkthdr *h, - const u_char *bytes) -{ - const char *cur = bytes; - const struct iphdr *ip; - const struct udphdr *udp; - const struct meas_feed_meas *mfm; - uint16_t udplen; - - if (h->caplen < 14+20+8) - return; - - /* Check if there is IPv4 in the Ethernet */ - if (cur[12] != 0x08 || cur[13] != 0x00) - return; - - cur += 14; /* ethernet header */ - ip = (struct iphdr *) cur; - - if (ip->version != 4) - return; - cur += ip->ihl * 4; - - if (ip->protocol != IPPROTO_UDP) - return; - - udp = (struct udphdr *) cur; - - if (udp->dest != htons(8888)) - return; - - udplen = ntohs(udp->len); - if (udplen != sizeof(*udp) + sizeof(*mfm)) - return; - cur += sizeof(*udp); - - mfm = (const struct meas_feed_meas *) cur; - - handle_mfm(h, mfm); -} - -int main(int argc, char **argv) -{ - char errbuf[PCAP_ERRBUF_SIZE+1]; - char *pcap_fname, *db_fname; - pcap_t *pc; - int rc; - - if (argc < 3) { - fprintf(stderr, "You need to specify PCAP and database file\n"); - exit(2); - } - - pcap_fname = argv[1]; - db_fname = argv[2]; - - pc = pcap_open_offline(pcap_fname, errbuf); - if (!pc) { - fprintf(stderr, "Cannot open %s: %s\n", pcap_fname, errbuf); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) - exit(0); - - rc = meas_db_begin(db); - if (rc < 0) { - fprintf(stderr, "Error during BEGIN\n"); - exit(1); - } - - pcap_loop(pc, 0 , pcap_cb, NULL); - - meas_db_commit(db); - - exit(0); -} diff --git a/src/utils/meas_udp2db.c b/src/utils/meas_udp2db.c deleted file mode 100644 index c2b5ace..0000000 --- a/src/utils/meas_udp2db.c +++ /dev/null @@ -1,126 +0,0 @@ -/* liesten to meas_feed on UDP and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include "meas_db.h" - -static struct osmo_fd udp_ofd; -static struct meas_db_state *db; - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - const char *scenario; - time_t now = time(NULL); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - if (mfh->msg_type != MEAS_FEED_MEAS) - return -EINVAL; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, now, - scenario, &mfm->mr); - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - char *db_fname; - int rc; - - msgb_talloc_ctx_init(NULL, 0); - - if (argc < 2) { - fprintf(stderr, "You have to specify the database file name\n"); - exit(2); - } - - db_fname = argv[1]; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, - IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) { - fprintf(stderr, "Unable to create UDP listen socket\n"); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) { - fprintf(stderr, "Unable to open database\n"); - exit(1); - } - - /* FIXME: timer-based BEGIN/COMMIT */ - - while (1) { - osmo_select_main(0); - }; - - meas_db_close(db); - - exit(0); -} - diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c deleted file mode 100644 index 5efb300..0000000 --- a/src/utils/meas_vis.c +++ /dev/null @@ -1,310 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -struct ms_state_uni { - CDKSLIDER *cdk; - CDKLABEL *cdk_label; - - time_t last_update; - char label[32]; - char *_lbl[1]; -}; - - -struct ms_state { - struct llist_head list; - - char name[31+1]; - char imsi[15+1]; - struct gsm_meas_rep mr; - - struct ms_state_uni ul; - struct ms_state_uni dl; -}; - -struct state { - struct osmo_fd udp_ofd; - struct llist_head ms_list; - - CDKSCREEN *cdkscreen; - WINDOW *curses_win; - - CDKLABEL *cdk_title; - char *title; - - CDKLABEL *cdk_header; - char header[256]; -}; - -static struct state g_st; - -struct ms_state *find_ms(const char *imsi) -{ - struct ms_state *ms; - - llist_for_each_entry(ms, &g_st.ms_list, list) { - if (!strcmp(ms->imsi, imsi)) - return ms; - } - return NULL; -} - -static struct ms_state *find_alloc_ms(const char *imsi) -{ - struct ms_state *ms; - - ms = find_ms(imsi); - if (!ms) { - ms = talloc_zero(NULL, struct ms_state); - osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); - ms->ul._lbl[0] = ms->ul.label; - ms->dl._lbl[0] = ms->dl.label; - llist_add_tail(&ms->list, &g_st.ms_list); - } - - return ms; -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - struct ms_state *ms = find_alloc_ms(mfm->imsi); - time_t now = time(NULL); - - osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); - memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); - ms->ul.last_update = now; - if (ms->mr.flags & MEAS_REP_F_DL_VALID) - ms->dl.last_update = now; - - /* move to head of list */ - llist_del(&ms->list); - llist_add(&ms->list, &g_st.ms_list); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - - -static void destroy_dir(struct ms_state_uni *uni) -{ - if (uni->cdk) { - destroyCDKSlider(uni->cdk); - uni->cdk = NULL; - } - if (uni->cdk_label) { - destroyCDKLabel(uni->cdk_label); - uni->cdk_label = NULL; - } -} - -#define DIR_UL 0 -#define DIR_DL 1 -static const char *dir_str[2] = { - [DIR_UL] = "UL", - [DIR_DL] = "DL", -}; - -static int colpair_by_qual(uint8_t rx_qual) -{ - if (rx_qual == 0) - return 24; - else if (rx_qual <= 4) - return 32; - else - return 16; -} - -static int colpair_by_lev(int rx_lev) -{ - if (rx_lev < -95) - return 16; - else if (rx_lev < -80) - return 32; - else - return 24; -} - - -void write_uni(struct ms_state *ms, struct ms_state_uni *msu, - struct gsm_rx_lev_qual *lq, int dir, int row) -{ - - char label[128]; - time_t now = time(NULL); - int qual_col = colpair_by_qual(lq->rx_qual); - int lev_col = colpair_by_lev(rxlev2dbm(lq->rx_lev)); - int color, pwr; - - if (dir == DIR_UL) { - pwr = ms->mr.ms_l1.pwr; - } else { - pwr = ms->mr.bs_power; - } - - color = A_REVERSE | COLOR_PAIR(lev_col) | ' '; - snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]); - msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color, - COLS-40, rxlev2dbm(lq->rx_lev), -110, -47, - 1, 2, FALSE, FALSE); - //IsVisibleObj(ms->ul.cdk) = FALSE; - snprintf(msu->label, sizeof(msu->label), "%1d %3d %2u %2d %4u", - qual_col, lq->rx_qual, qual_col, pwr, - ms->mr.ms_l1.ta, ms->mr.ms_timing_offset, - now - msu->last_update); - msu->cdk_label = newCDKLabel(g_st.cdkscreen, RIGHT, row, - msu->_lbl, 1, FALSE, FALSE); -} - -static void update_sliders(void) -{ - int num_vis_sliders = 0; - struct ms_state *ms; -#define HEADER_LINES 2 - - /* remove all sliders */ - llist_for_each_entry(ms, &g_st.ms_list, list) { - destroy_dir(&ms->ul); - destroy_dir(&ms->dl); - - } - - llist_for_each_entry(ms, &g_st.ms_list, list) { - struct gsm_rx_lev_qual *lq; - unsigned int row = HEADER_LINES + num_vis_sliders*3; - - if (ms->mr.flags & MEAS_REP_F_UL_DTX) - lq = &ms->mr.ul.sub; - else - lq = &ms->mr.ul.full; - write_uni(ms, &ms->ul, lq, DIR_UL, row); - - if (ms->mr.flags & MEAS_REP_F_DL_DTX) - lq = &ms->mr.dl.sub; - else - lq = &ms->mr.dl.full; - write_uni(ms, &ms->dl, lq, DIR_DL, row+1); - - num_vis_sliders++; - if (num_vis_sliders >= LINES/3) - break; - } - - refreshCDKScreen(g_st.cdkscreen); - -} - -const struct value_string col_strs[] = { - { COLOR_WHITE, "white" }, - { COLOR_RED, "red" }, - { COLOR_GREEN, "green" }, - { COLOR_YELLOW, "yellow" }, - { COLOR_BLUE, "blue" }, - { COLOR_MAGENTA,"magenta" }, - { COLOR_CYAN, "cyan" }, - { COLOR_BLACK, "black" }, - { 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc; - char *header[1]; - char *title[1]; - - msgb_talloc_ctx_init(NULL, 0); - - printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); - printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); - - INIT_LLIST_HEAD(&g_st.ms_list); - g_st.curses_win = initscr(); - g_st.cdkscreen = initCDKScreen(g_st.curses_win); - initCDKColor(); - - g_st.title = "OpenBSC link quality monitor"; - title[0] = g_st.title; - g_st.cdk_title = newCDKLabel(g_st.cdkscreen, CENTER, 0, title, 1, FALSE, FALSE); - - snprintf(g_st.header, sizeof(g_st.header), "Q Pwr TA TO Time"); - header[0] = g_st.header; - g_st.cdk_header = newCDKLabel(g_st.cdkscreen, RIGHT, 1, header, 1, FALSE, FALSE); - -#if 0 - int i; - for (i = 0; i < 64; i++) { - short f, b; - pair_content(i, &f, &b); - attron(COLOR_PAIR(i)); - printw("%u: %u (%s) ", i, f, get_value_string(col_strs, f)); - printw("%u (%s)\n\r", b, get_value_string(col_strs, b)); - } - refresh(); - getch(); - exit(0); -#endif - - g_st.udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - update_sliders(); - }; - - exit(0); -} -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 3 20:45:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 20:45:10 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn.c: Fix byte order of IPCP IPv4 DNS servers Message-ID: Review at https://gerrit.osmocom.org/5151 ggsn.c: Fix byte order of IPCP IPv4 DNS servers ... this probably didn't show up as 8.8.8.8 is dual-endian. doh! The address was already in network byte order, but msgb_put_u32 "of course" expects host byte order, ending up the wrong way in the actual packets :/ Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Closes: OS#2685 --- M ggsn/ggsn.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/51/5151/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 0beaef7..82e1b12 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -436,13 +436,13 @@ if (dns1 && dns1->len == 4) { msgb_put_u8(msg, 0x81); /* DNS1 Tag */ msgb_put_u8(msg, 2 + dns1->len);/* DNS1 Length, incl. TL */ - msgb_put_u32(msg, dns1->v4.s_addr); + msgb_put_u32(msg, ntohl(dns1->v4.s_addr)); } if (dns2 && dns2->len == 4) { msgb_put_u8(msg, 0x83); /* DNS2 Tag */ msgb_put_u8(msg, 2 + dns2->len);/* DNS2 Length, incl. TL */ - msgb_put_u32(msg, dns2->v4.s_addr); + msgb_put_u32(msg, ntohl(dns2->v4.s_addr)); } /* patch in length values */ -- To view, visit https://gerrit.osmocom.org/5151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 20:59:35 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 3 Dec 2017 20:59:35 +0000 Subject: osmo-ggsn[master]: ggsn.c: Fix byte order of IPCP IPv4 DNS servers In-Reply-To: References: Message-ID: Patch Set 1: I think lynxis saw this one last week -- To view, visit https://gerrit.osmocom.org/5151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:08:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:08:29 +0000 Subject: osmo-ggsn[master]: ggsn.c: Fix byte order of IPCP IPv4 DNS servers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 > I think lynxis saw this one last week yes, that' why I fixed it and I'm linking to the Osmocom redmine issue you created :) -- To view, visit https://gerrit.osmocom.org/5151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:12:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:12:36 +0000 Subject: osmo-trx[master]: UHDDevice.cpp: add USRP B205mini support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:13:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:13:24 +0000 Subject: [MERGED] osmo-bts[master]: rsl.c: Log RTP socket related errors as DRTP, not DRSL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rsl.c: Log RTP socket related errors as DRTP, not DRSL ...................................................................... rsl.c: Log RTP socket related errors as DRTP, not DRSL The respective errors/events occur as a result of calling osmo_rtp_* API, and are clearly more fitting into the DRTP category than the DRSL, even though the respective actions are triggered by RSL. Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef --- M src/common/rsl.c 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 1ebc8b2..461b21d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1061,7 +1061,7 @@ if (lchan->abis_ip.rtp_socket) { rsl_tx_ipac_dlcx_ind(lchan, RSL_ERR_NORMAL_UNSPEC); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on Channel Release "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; @@ -1682,7 +1682,7 @@ lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1697,11 +1697,11 @@ OSMO_RTP_P_JITBUF, btsb->rtp_jitter_buf_ms); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to set RTP socket parameters: %s\n", gsm_lchan_name(lchan), strerror(-rc)); else - LOGP(DRSL, LOGL_INFO, + LOGP(DRTP, LOGL_INFO, "%s IPAC set RTP socket parameters: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.rtp_socket->priv = lchan; @@ -1724,7 +1724,7 @@ rc = osmo_rtp_socket_bind(lchan->abis_ip.rtp_socket, ipstr, -1); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, @@ -1761,7 +1761,7 @@ rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket, inet_ntoa(ia), ntohs(connect_port)); if (rc < 0) { - LOGP(DRSL, LOGL_ERROR, + LOGP(DRTP, LOGL_ERROR, "%s Failed to connect RTP/RTCP sockets\n", gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); @@ -1778,7 +1778,7 @@ &lchan->abis_ip.bound_ip, &port); if (rc < 0) - LOGP(DRSL, LOGL_ERROR, "%s IPAC cannot obtain " + LOGP(DRTP, LOGL_ERROR, "%s IPAC cannot obtain " "locally bound IP/port: %d\n", gsm_lchan_name(lchan), rc); lchan->abis_ip.bound_port = port; @@ -1819,7 +1819,7 @@ inc_conn_id = 1; rc = rsl_tx_ipac_dlcx_ack(lchan, inc_conn_id); - osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRSL, LOGL_INFO, + osmo_rtp_socket_log_stats(lchan->abis_ip.rtp_socket, DRTP, LOGL_INFO, "Closing RTP socket on DLCX "); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; -- To view, visit https://gerrit.osmocom.org/5146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:19:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:19:32 +0000 Subject: [PATCH] gapk[refs/meta/config]: Edit Project Config In-Reply-To: References: Message-ID: Edit Project Config Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b --- M project.config 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/54/5154/2 diff --git a/project.config b/project.config index 563d43e..ecbce11 100644 --- a/project.config +++ b/project.config @@ -1,2 +1,3 @@ [access] inheritFrom = All-Projects +[receive] \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/5154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b Gerrit-PatchSet: 2 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:19:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:19:34 +0000 Subject: [PATCH] gapk[refs/meta/config]: Edit Project Config Message-ID: Review at https://gerrit.osmocom.org/5154 Edit Project Config Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b --- M project.config 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/54/5154/2 diff --git a/project.config b/project.config index 563d43e..ecbce11 100644 --- a/project.config +++ b/project.config @@ -1,2 +1,3 @@ [access] inheritFrom = All-Projects +[receive] \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/5154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b Gerrit-PatchSet: 2 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:19:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:19:41 +0000 Subject: gapk[refs/meta/config]: Edit Project Config In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b Gerrit-PatchSet: 2 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:19:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:19:43 +0000 Subject: [MERGED] gapk[refs/meta/config]: Edit Project Config In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Edit Project Config ...................................................................... Edit Project Config Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b --- M project.config 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/project.config b/project.config index 563d43e..ecbce11 100644 --- a/project.config +++ b/project.config @@ -1,2 +1,3 @@ [access] inheritFrom = All-Projects +[receive] \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/5154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If483e89aeb53426fac3a4d57bdecc00025cf174b Gerrit-PatchSet: 2 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:20:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:20:07 +0000 Subject: [PATCH] gapk[refs/meta/config]: Edit Project Config Message-ID: Review at https://gerrit.osmocom.org/5152 Edit Project Config Change-Id: I41a0a5caede1145d06c44a324d00bb6f71a9ca49 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/52/5152/1 -- To view, visit https://gerrit.osmocom.org/5152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41a0a5caede1145d06c44a324d00bb6f71a9ca49 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:20:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:20:18 +0000 Subject: gapk[refs/meta/config]: Edit Project Config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41a0a5caede1145d06c44a324d00bb6f71a9ca49 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:20:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:20:19 +0000 Subject: [MERGED] gapk[refs/meta/config]: Edit Project Config In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Edit Project Config ...................................................................... Edit Project Config Change-Id: I41a0a5caede1145d06c44a324d00bb6f71a9ca49 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified -- To view, visit https://gerrit.osmocom.org/5152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41a0a5caede1145d06c44a324d00bb6f71a9ca49 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: refs/meta/config Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 3 21:22:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 21:22:16 +0000 Subject: [MERGED] libosmo-abis[master]: Add a new osmo_rtp_set_source_desc() function to set the RTC... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items ...................................................................... Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items This allows the users of libosmotrau to set the content of the SDES items to something more useful than their compile-time defaults. Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Related: OS#2701 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 11 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..b02e1eb 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmotrau addition New osmo_rtp_set_source_desc() wrapper around libortp diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 578b1cb..5fb2960 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -100,5 +100,8 @@ uint32_t *recv_packets, uint32_t *recv_octets, uint32_t *recv_lost, uint32_t *last_jitter); +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note); #endif /* _OSMO_ORTP_H */ diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fab020d..8ea05e4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -655,3 +655,10 @@ if (jitter) *last_jitter = jitter->jitter; } + +void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname, + const char *name, const char *email, const char *phone, + const char *loc, const char *tool, const char *note) +{ + rtp_session_set_source_description(rs->sess, cname, name, email, phone, loc, tool, note); +} -- To view, visit https://gerrit.osmocom.org/5145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:03:24 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 22:03:24 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Simplify code and check the cb ref in load_cb Message-ID: Review at https://gerrit.osmocom.org/5155 mobile: Simplify code and check the cb ref in load_cb Change parameters and check if the cb_ref is valid or not. Change-Id: I74fbcd7e853e24b1225ecc4c19304134b8467c9b --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 14 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/55/5155/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 422f9e4..e63d205 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -97,9 +97,14 @@ }; /* Push table and function. Stack+=2 */ -static bool load_cb(lua_State *L, int ref, const char *cb_name) +static bool load_cb(struct osmocom_ms *ms, const char *cb_name) { - lua_rawgeti(L, LUA_REGISTRYINDEX, ref); + struct lua_State *L = ms->lua_state; + + if (ms->lua_cb_ref == LUA_REFNIL) + return false; + + lua_rawgeti(L, LUA_REGISTRYINDEX, ms->lua_cb_ref); lua_pushstring(L, cb_name); lua_gettable(L, -2); if (lua_isnil(L, -1)) { @@ -138,12 +143,9 @@ static void handle_started(struct mobile_prim_intf *intf, struct mobile_started_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Started")) + if (!load_cb(intf->ms, "Started")) return; lua_pushinteger(L, param->started); @@ -154,12 +156,9 @@ static void handle_shutdown(struct mobile_prim_intf *intf, struct mobile_shutdown_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Shutdown")) + if (!load_cb(intf->ms, "Shutdown")) return; lua_pushinteger(L, param->old_state); @@ -171,12 +170,9 @@ static void handle_sms(struct mobile_prim_intf *intf, struct mobile_sms_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Sms")) + if (!load_cb(intf->ms, "Sms")) return; lua_createtable(L, 0, 11); @@ -225,10 +221,7 @@ { lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Mm")) + if (!load_cb(intf->ms, "Mm")) return; lua_pushinteger(L, param->state); -- To view, visit https://gerrit.osmocom.org/5155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74fbcd7e853e24b1225ecc4c19304134b8467c9b Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:03:28 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 3 Dec 2017 22:03:28 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Return the name of the configured "MS" Message-ID: Review at https://gerrit.osmocom.org/5156 mobile: Return the name of the configured "MS" In lua osmo.ms():name() will print the name/number of the MS. This can be used by scripting code to use in events and then be analyzed. Change-Id: I881d3e87daa19f4e6f4f5bd30fe95906129e60ef --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/56/5156/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index e63d205..1b80c48 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -389,6 +389,12 @@ return 1; } +static int lua_ms_name(lua_State *L) +{ + lua_pushstring(L, get_primitive(L)->ms->name); + return 1; +} + static const struct luaL_Reg ms_funcs[] = { { "imsi", lua_ms_imsi }, { "imei", lua_ms_imei }, @@ -398,6 +404,7 @@ { "start", lua_ms_no_shutdown }, { "stop", lua_ms_shutdown }, { "sms_send_simple", lua_ms_sms_send_simple }, + { "number", lua_ms_name }, { NULL, NULL }, }; -- To view, visit https://gerrit.osmocom.org/5156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I881d3e87daa19f4e6f4f5bd30fe95906129e60ef Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:12:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 22:12:21 +0000 Subject: [MERGED] osmo-bts[master]: Put useful information in RTCP SDES. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Put useful information in RTCP SDES. ...................................................................... Put useful information in RTCP SDES. The RTCP Sender Description is supposed to contain useful information to identify the source of the RTP stream. So far, it only contained compile-time default data of libortp. Let's put the BTS UnitID, the lchan number and the OsmoBTS version in there. This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Related: OS#2701 --- M include/osmo-bts/gsm_data_shared.h M src/common/gsm_data_shared.c M src/common/rsl.c 3 files changed, 19 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 4c0fe5c..a05e4ca 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -1002,5 +1002,6 @@ enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts); uint8_t ts_subslots(struct gsm_bts_trx_ts *ts); bool ts_is_tch(struct gsm_bts_trx_ts *ts); +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx); #endif diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index c2d196b..f4fda55 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -851,3 +851,12 @@ { return pchan_is_tch(ts_pchan(ts)); } + +const char *gsm_trx_unit_id(struct gsm_bts_trx *trx) +{ + static char buf[23]; + + snprintf(buf, sizeof(buf), "%u/%u/%u", trx->bts->ip_access.site_id, + trx->bts->ip_access.bts_id, trx->nr); + return buf; +} diff --git a/src/common/rsl.c b/src/common/rsl.c index 461b21d..60f964e 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -20,6 +20,8 @@ * */ +#include "btsconfig.h" /* for PACKAGE_VERSION */ + #include #include #include @@ -1668,6 +1670,7 @@ } if (dch->c.msg_type == RSL_MT_IPAC_CRCX) { + char cname[32]; char *ipstr = NULL; if (lchan->abis_ip.rtp_socket) { LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, " @@ -1736,6 +1739,12 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } + /* Ensure RTCP SDES contains some useful information */ + snprintf(cname, sizeof(cname), "bts@%s", ipstr); + osmo_rtp_set_source_desc(lchan->abis_ip.rtp_socket, cname, + gsm_lchan_name(lchan), NULL, NULL, + gsm_trx_unit_id(lchan->ts->trx), + "OsmoBTS-" PACKAGE_VERSION, NULL); /* FIXME: multiplex connection, BSC proxy */ } else { /* MDCX */ -- To view, visit https://gerrit.osmocom.org/5147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:12:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 22:12:56 +0000 Subject: osmocom-bb[master]: mobile: Return the name of the configured "MS" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I881d3e87daa19f4e6f4f5bd30fe95906129e60ef Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:13:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 3 Dec 2017 22:13:18 +0000 Subject: osmocom-bb[master]: mobile: Simplify code and check the cb ref in load_cb In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74fbcd7e853e24b1225ecc4c19304134b8467c9b Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:46:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 3 Dec 2017 22:46:56 +0000 Subject: osmo-mgw[master]: mgcp_client_test makefile: add update_exp target In-Reply-To: References: Message-ID: Patch Set 1: hmm, good idea actually. I'll try to generalize next time I come across it. -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:47:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 3 Dec 2017 22:47:17 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_client: add transaction cleanup In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_client: add transaction cleanup ...................................................................... mgcp_client: add transaction cleanup So far, if an MGCP message is sent, the transaction gets enqueued, but there is no way to end the transaction other than receiving a valid reply. So, if the caller decides that the transaction timed out and tears down the priv pointer passed to mgcp_client_tx, and if then a late reply arrives, the callback will dereference the invalid priv pointer and cause a segfault. Hence it is possible to crash an mgcp_client program by sending a late response. Furthermore, if no reply ever arrives, we would keep the pending response in the list forever, amounting to a "memory leak". Add mgcp_client_cancel() to discard a pending transaction. The caller can now decide to discard a pending response when it sees fit (e.g. the caller's timeout expired). This needs to be added to OsmoMSC and OsmoBSC. Add mgcp_msg_trans_id() to provide an obvious way to obtain the transaction id from a generated MGCP message. No public API is broken; but refine the negative return code from mgcp_client_rx(): return -ENOENT if no such transaction ID is found, and still -1 if decoding failed. This is mainly for mgcp_client_test. Implement a test for mgcp_client_cancel() in mgcp_client_test.c. Tweak internal mgcp_client_response_pending_get() to take only the transaction id as argument instead of the entire mgcp message struct. Found-by: dexter Related: OS#2695 OS#2696 Change-Id: I16811e168a46a82a05943252a737b3434143f4bd --- M include/osmocom/mgcp_client/mgcp_client.h M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.err M tests/mgcp_client/mgcp_client_test.ok 5 files changed, 125 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index cf5e8c4..4caf656 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -93,6 +93,7 @@ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv); +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id); enum mgcp_connection_mode; @@ -111,6 +112,7 @@ OSMO_DEPRECATED("Use mgcp_msg_gen() instead"); struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg); extern const struct value_string mgcp_client_connection_mode_strs[]; static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode) diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index ee8d267..2f3d0d1 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -311,13 +311,11 @@ static struct mgcp_response_pending *mgcp_client_response_pending_get( struct mgcp_client *mgcp, - struct mgcp_response *r) + mgcp_trans_id_t trans_id) { struct mgcp_response_pending *pending; - if (!r) - return NULL; llist_for_each_entry(pending, &mgcp->responses_pending, entry) { - if (pending->trans_id == r->head.trans_id) { + if (pending->trans_id == trans_id) { llist_del(&pending->entry); return pending; } @@ -349,12 +347,12 @@ return -1; } - pending = mgcp_client_response_pending_get(mgcp, &r); + pending = mgcp_client_response_pending_get(mgcp, r.head.trans_id); if (!pending) { LOGP(DLMGCP, LOGL_ERROR, "Cannot find matching MGCP transaction for trans_id %d\n", r.head.trans_id); - return -1; + return -ENOENT; } mgcp_client_handle_response(mgcp, pending, &r); @@ -560,7 +558,10 @@ * response_cb. NOTE: the response_cb still needs to call * mgcp_response_parse_params(response) to get the parsed parameters -- to * potentially save some CPU cycles, only the head line has been parsed when - * the response_cb is invoked. */ + * the response_cb is invoked. + * Before the priv pointer becomes invalid, e.g. due to transaction timeout, + * mgcp_client_cancel() needs to be called for this transaction. + */ int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, mgcp_response_cb_t response_cb, void *priv) { @@ -601,6 +602,32 @@ /* Pass NULL to response cb to indicate an error */ mgcp_client_handle_response(mgcp, pending, NULL); return -1; +} + +/* Cancel a pending transaction. + * Should a priv pointer passed to mgcp_client_tx() become invalid, this function must be called. In + * practical terms, if the caller of mgcp_client_tx() wishes to tear down a transaction without having + * received a response this function must be called. The trans_id can be obtained by calling + * mgcp_msg_trans_id() on the msgb produced by mgcp_msg_gen(). + */ +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id) +{ + struct mgcp_response_pending *pending = mgcp_client_response_pending_get(mgcp, trans_id); + if (!pending) { + /* INFO is sufficient, it is not harmful to cancel a transaction twice. */ + LOGP(DLMGCP, LOGL_INFO, "Cannot cancel, no such transaction: %u\n", trans_id); + return -ENOENT; + } + LOGP(DLMGCP, LOGL_INFO, "Canceled transaction %u\n", trans_id); + talloc_free(pending); + return 0; + /* We don't really need to clean up the wqueue: In all sane cases, the msgb has already been sent + * out and is no longer in the wqueue. If it still is in the wqueue, then sending MGCP messages + * per se is broken and the program should notice so by a full wqueue. Even if this was called + * before we had a chance to send out the message and it is still going to be sent, we will just + * ignore the reply to it later. Removing a msgb from the wqueue here would just introduce more + * bug surface in terms of failing to update wqueue API's counters or some such. + */ } static struct msgb *mgcp_msg_from_buf(mgcp_trans_id_t trans_id, @@ -806,6 +833,12 @@ return msg; } +/* Retrieve the MGCP transaction ID from a msgb generated by mgcp_msg_gen() */ +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg) +{ + return (mgcp_trans_id_t)msg->cb[MSGB_CB_MGCP_TRANS_ID]; +} + struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp) { return &mgcp->actual; diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 37fe0b8..172faac 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -24,6 +24,7 @@ #include #include #include +#include void *ctx; @@ -73,7 +74,7 @@ static struct mgcp_client_conf conf; struct mgcp_client *mgcp = NULL; -static void reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, +static int reply_to(mgcp_trans_id_t trans_id, int code, const char *comment, int conn_id, const char *params) { static char compose[4096 - 128]; @@ -87,7 +88,7 @@ printf("composed response:\n-----\n%s\n-----\n", compose); - mgcp_client_rx(mgcp, from_str(compose)); + return mgcp_client_rx(mgcp, from_str(compose)); } void test_response_cb(struct mgcp_response *response, void *priv) @@ -225,6 +226,51 @@ msgb_free(msg); } +void test_mgcp_client_cancel() +{ + mgcp_trans_id_t trans_id; + struct msgb *msg; + struct mgcp_msg mgcp_msg = { + .verb = MGCP_VERB_CRCX, + .audio_ip = "192.168.100.23", + .endpoint = "23 at mgw", + .audio_port = 1234, + .call_id = 47, + .conn_id = 11, + .conn_mode = MGCP_CONN_RECV_SEND, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID + | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE), + }; + + printf("\n%s():\n", __func__); + fprintf(stderr, "\n%s():\n", __func__); + + if (mgcp) + talloc_free(mgcp); + mgcp = mgcp_client_init(ctx, &conf); + + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + trans_id = mgcp_msg_trans_id(msg); + fprintf(stderr, "- composed msg with trans_id=%u\n", trans_id); + + fprintf(stderr, "- not in queue yet, cannot cancel yet\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "- enqueue\n"); + dummy_mgcp_send(msg); + + fprintf(stderr, "- cancel succeeds\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == 0); + + fprintf(stderr, "- late response gets discarded\n"); + OSMO_ASSERT(reply_to(trans_id, 200, "OK", 1, "v=0\r\n") == -ENOENT); + + fprintf(stderr, "- canceling again does nothing\n"); + OSMO_ASSERT(mgcp_client_cancel(mgcp, trans_id) == -ENOENT); + + fprintf(stderr, "%s() done\n", __func__); +} + static const struct log_info_cat log_categories[] = { }; @@ -244,10 +290,13 @@ log_set_use_color(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 1); + log_set_category_filter(osmo_stderr_target, DLMGCP, 1, LOGL_DEBUG); + mgcp_client_conf_init(&conf); test_crcx(); test_mgcp_msg(); + test_mgcp_client_cancel(); printf("Done\n"); fprintf(stderr, "Done\n"); diff --git a/tests/mgcp_client/mgcp_client_test.err b/tests/mgcp_client/mgcp_client_test.err index 24151ee..8e9f648 100644 --- a/tests/mgcp_client/mgcp_client_test.err +++ b/tests/mgcp_client/mgcp_client_test.err @@ -1,2 +1,15 @@ DLMGCP message buffer to small, can not generate MGCP message + +test_mgcp_client_cancel(): +- composed msg with trans_id=1 +- not in queue yet, cannot cancel yet +DLMGCP Cannot cancel, no such transaction: 1 +- enqueue +- cancel succeeds +DLMGCP Canceled transaction 1 +- late response gets discarded +DLMGCP Cannot find matching MGCP transaction for trans_id 1 +- canceling again does nothing +DLMGCP Cannot cancel, no such transaction: 1 +test_mgcp_client_cancel() done Done diff --git a/tests/mgcp_client/mgcp_client_test.ok b/tests/mgcp_client/mgcp_client_test.ok index d4efee4..4039bb0 100644 --- a/tests/mgcp_client/mgcp_client_test.ok +++ b/tests/mgcp_client/mgcp_client_test.ok @@ -59,4 +59,23 @@ Overfolow test: + +test_mgcp_client_cancel(): +composed: +----- +CRCX 1 23 at mgw MGCP 1.0 +C: 2f +I: 11 +L: p:20, a:AMR, nt:IN +M: sendrecv + +----- +composed response: +----- +200 1 OK +I: 1 + +v=0 + +----- Done -- To view, visit https://gerrit.osmocom.org/5110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:47:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 3 Dec 2017 22:47:55 +0000 Subject: osmo-mgw[master]: mgcp_client_test makefile: add update_exp target In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 3 22:47:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 3 Dec 2017 22:47:57 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_client_test makefile: add update_exp target In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: mgcp_client_test makefile: add update_exp target ...................................................................... mgcp_client_test makefile: add update_exp target Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 --- M tests/mgcp_client/Makefile.am 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Verified Harald Welte: Looks good to me, approved diff --git a/tests/mgcp_client/Makefile.am b/tests/mgcp_client/Makefile.am index 5cd0d8a..5ce9538 100644 --- a/tests/mgcp_client/Makefile.am +++ b/tests/mgcp_client/Makefile.am @@ -37,3 +37,6 @@ $(LIBRARY_DL) \ $(LIBOSMONETIF_LIBS) \ $(NULL) + +update_exp: + $(builddir)/mgcp_client_test >$(srcdir)/mgcp_client_test.ok 2>$(srcdir)/mgcp_client_test.err -- To view, visit https://gerrit.osmocom.org/5111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:09:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 4 Dec 2017 09:09:38 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Simplify code and check the cb ref in load_cb In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Simplify code and check the cb ref in load_cb ...................................................................... mobile: Simplify code and check the cb ref in load_cb Change parameters and check if the cb_ref is valid or not. Change-Id: I74fbcd7e853e24b1225ecc4c19304134b8467c9b --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 14 insertions(+), 21 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 422f9e4..e63d205 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -97,9 +97,14 @@ }; /* Push table and function. Stack+=2 */ -static bool load_cb(lua_State *L, int ref, const char *cb_name) +static bool load_cb(struct osmocom_ms *ms, const char *cb_name) { - lua_rawgeti(L, LUA_REGISTRYINDEX, ref); + struct lua_State *L = ms->lua_state; + + if (ms->lua_cb_ref == LUA_REFNIL) + return false; + + lua_rawgeti(L, LUA_REGISTRYINDEX, ms->lua_cb_ref); lua_pushstring(L, cb_name); lua_gettable(L, -2); if (lua_isnil(L, -1)) { @@ -138,12 +143,9 @@ static void handle_started(struct mobile_prim_intf *intf, struct mobile_started_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Started")) + if (!load_cb(intf->ms, "Started")) return; lua_pushinteger(L, param->started); @@ -154,12 +156,9 @@ static void handle_shutdown(struct mobile_prim_intf *intf, struct mobile_shutdown_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Shutdown")) + if (!load_cb(intf->ms, "Shutdown")) return; lua_pushinteger(L, param->old_state); @@ -171,12 +170,9 @@ static void handle_sms(struct mobile_prim_intf *intf, struct mobile_sms_param *param) { - lua_State *L = intf->ms->lua_state; + struct lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Sms")) + if (!load_cb(intf->ms, "Sms")) return; lua_createtable(L, 0, 11); @@ -225,10 +221,7 @@ { lua_State *L = intf->ms->lua_state; - if (intf->ms->lua_cb_ref == LUA_REFNIL) - return; - - if (!load_cb(L, intf->ms->lua_cb_ref, "Mm")) + if (!load_cb(intf->ms, "Mm")) return; lua_pushinteger(L, param->state); -- To view, visit https://gerrit.osmocom.org/5155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74fbcd7e853e24b1225ecc4c19304134b8467c9b Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:09:38 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 4 Dec 2017 09:09:38 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Return the name of the configured "MS" In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: mobile: Return the name of the configured "MS" ...................................................................... mobile: Return the name of the configured "MS" In lua osmo.ms():name() will print the name/number of the MS. This can be used by scripting code to use in events and then be analyzed. Change-Id: I881d3e87daa19f4e6f4f5bd30fe95906129e60ef --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index e63d205..1b80c48 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -389,6 +389,12 @@ return 1; } +static int lua_ms_name(lua_State *L) +{ + lua_pushstring(L, get_primitive(L)->ms->name); + return 1; +} + static const struct luaL_Reg ms_funcs[] = { { "imsi", lua_ms_imsi }, { "imei", lua_ms_imei }, @@ -398,6 +404,7 @@ { "start", lua_ms_no_shutdown }, { "stop", lua_ms_shutdown }, { "sms_send_simple", lua_ms_sms_send_simple }, + { "number", lua_ms_name }, { NULL, NULL }, }; -- To view, visit https://gerrit.osmocom.org/5156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I881d3e87daa19f4e6f4f5bd30fe95906129e60ef Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:22:09 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 09:22:09 +0000 Subject: osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:27:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 09:27:02 +0000 Subject: osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5084/1/src/Makefile.am File src/Makefile.am: Line 25: libcommon-cs \ Does this position really matter? I mean, if you are running with parallel make, couldn't it fail the same way? -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:40:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:40:24 +0000 Subject: libosmocore[master]: embedded: fix tests In-Reply-To: References: Message-ID: Patch Set 1: We're testing it, so I've been asking this myself. One possible reason is that I'm using latest xubuntu and the build slave is old jenkins. Maybe smth in the toolchain have become stricter in a meantime? -- To view, visit https://gerrit.osmocom.org/5123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:40:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:40:33 +0000 Subject: [MERGED] libosmocore[master]: Fix embedded build In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix embedded build ...................................................................... Fix embedded build Do not attempt to load auth plugins - this does not make sense on embedded target anyway. Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0 --- M src/gsm/auth_core.c M src/gsm/gprs_cipher_core.c 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 9e3b2c0..400708f 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -20,6 +20,8 @@ * */ +#include "config.h" + #include #include #include @@ -71,7 +73,11 @@ int osmo_auth_load(const char *path) { /* load all plugins available from path */ +#if !defined(EMBEDDED) return osmo_plugin_load_all(path); +#else + return -1; +#endif } /*! Determine if a given authentication algorithm is supported diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c index 6fa25d6..7f2b1a5 100644 --- a/src/gsm/gprs_cipher_core.c +++ b/src/gsm/gprs_cipher_core.c @@ -23,6 +23,8 @@ * */ +#include "config.h" + #include #include @@ -68,9 +70,11 @@ /* load all available GPRS cipher plugins */ int gprs_cipher_load(const char *path) { +#if !defined(EMBEDDED) /* load all plugins available from path */ if (path) return osmo_plugin_load_all(path); +#endif return 0; } -- To view, visit https://gerrit.osmocom.org/5122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:40:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:40:39 +0000 Subject: [MERGED] libosmocore[master]: embedded: fix tests In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: embedded: fix tests ...................................................................... embedded: fix tests In case of embedded build some tests are failing to link properly. Fix it: * do not run fsm_test unless CTRL is enabled * do not run fr_test unless GB is enabled * do not link loggingrb_test with libosmovty Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index c609d6a..78542b2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,12 +8,12 @@ conv/conv_test auth/milenage_test lapd/lapd_test \ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gprs/gprs_test kasumi/kasumi_test gea/gea_test \ - logging/logging_test fr/fr_test codec/codec_test \ + logging/logging_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ comp128/comp128_test smscb/gsm0341_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ bits/bitfield_test \ - tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test \ + tlv/tlv_test gsup/gsup_test oap/oap_test \ write_queue/wqueue_test socket/socket_test \ coding/coding_test conv/conv_gsm0503_test \ abis/abis_test endian/endian_test sercomm/sercomm_test \ @@ -36,11 +36,11 @@ endif if ENABLE_CTRL -check_PROGRAMS += ctrl/ctrl_test +check_PROGRAMS += ctrl/ctrl_test fsm/fsm_test endif if ENABLE_GB -check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test +check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test fr/fr_test endif utils_utils_test_SOURCES = utils/utils_test.c @@ -137,7 +137,7 @@ codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c -loggingrb_loggingrb_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la +loggingrb_loggingrb_test_LDADD = $(LDADD) strrb_strrb_test_SOURCES = strrb/strrb_test.c -- To view, visit https://gerrit.osmocom.org/5123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:41:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:41:19 +0000 Subject: [MERGED] osmo-pcu[master]: Fix compiler warning In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix compiler warning ...................................................................... Fix compiler warning Move function declarations which use gprs_rlcmac_ul_tbf into tbf.h to avoid compiler warning: In file included from pcu_vty.c:15:0: bts.h:166:27: warning: ?struct gprs_rlcmac_ul_tbf? declared inside parameter list will not be visible outside of this definition or declaration void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); ^~~~~~~~~~~~~~~~~~ bts.h:167:24: warning: ?struct gprs_rlcmac_ul_tbf? declared inside parameter list will not be visible outside of this definition or declaration void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); ^~~~~~~~~~~~~~~~~~ Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4 --- M src/bts.h M src/tbf.h 2 files changed, 9 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.h b/src/bts.h index aaf81cf..a32e87d 100644 --- a/src/bts.h +++ b/src/bts.h @@ -163,8 +163,6 @@ extern "C" { #endif void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, int8_t ta, bool is_rach); -void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); -void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); #ifdef __cplusplus } #endif diff --git a/src/tbf.h b/src/tbf.h index 95e1e89..e9d8df8 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -562,6 +562,15 @@ void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc); }; +#ifdef __cplusplus +extern "C" { +#endif +void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); +void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); +#ifdef __cplusplus +} +#endif + inline enum gprs_rlcmac_tbf_direction reverse(enum gprs_rlcmac_tbf_direction dir) { return (enum gprs_rlcmac_tbf_direction) -- To view, visit https://gerrit.osmocom.org/5118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:43:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:43:41 +0000 Subject: osmo-pcu[master]: TBF: fix compiler warning in test In-Reply-To: References: Message-ID: Patch Set 1: It's only used inside OSMO_ASSERT() where it's compared to 0. I think it would be better to just print it, but that's rather topic for another patch. -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:44:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:44:25 +0000 Subject: [MERGED] osmo-msc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove unneeded .py scripts ...................................................................... Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not MSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 8 files changed, 2 insertions(+), 863 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index 690deae..2f0a786 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) BUILT_SOURCES = $(top_srcdir)/.version diff --git a/configure.ac b/configure.ac index 5766fd0..6434869 100644 --- a/configure.ac +++ b/configure.ac @@ -196,5 +196,4 @@ tests/msc_vlr/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 9a976a5..05d3e30 100644 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 8989f24..de1997c 100644 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/4991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:46:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:46:01 +0000 Subject: osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5084/1/src/Makefile.am File src/Makefile.am: Line 25: libcommon-cs \ > Does this position really matter? I mean, if you are running with parallel I'm not 100% sure but I think that parallel make takes this into account. At least in the tests with "make -k" without this change it fails and with it works. -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:56:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:56:05 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: expand timer logging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5120 to look at the new patch set (#2). TBF: expand timer logging * log timer values * log start/stop cause * update test output as necessary This simplifies debugging issues with TBF timers. Related: OS#2407 Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 342 insertions(+), 341 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/20/5120/2 diff --git a/src/bts.cpp b/src/bts.cpp index c323101..341c9d4 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch); + tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); return 0; } @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0); + tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " @@ -1036,7 +1036,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer(); + new_tbf->stop_timer("control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index 831cd97..7b609c8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -394,7 +394,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0); + tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -464,7 +464,7 @@ tbf_name(tbf), get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer(); + tbf->stop_timer("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -529,13 +529,14 @@ }; void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds) + unsigned int seconds, unsigned int microseconds, const char *reason) { - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T); + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, + "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", + tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T); + LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); @@ -551,14 +552,14 @@ void gprs_rlcmac_tbf::stop_t3191() { - return stop_timer(); + return stop_timer("T3191"); } -void gprs_rlcmac_tbf::stop_timer() +void gprs_rlcmac_tbf::stop_timer(const char *reason) { if (osmo_timer_pending(&timer)) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %u.\n", - tbf_name(this), T); + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", + tbf_name(this), T, reason); osmo_timer_del(&timer); } } @@ -662,7 +663,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0); + tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); return; } /* reschedule UL ack */ @@ -684,7 +685,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -706,7 +707,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -732,7 +733,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0); + tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1192,7 +1193,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer(); + new_dl_tbf->stop_timer("assignment (DL-TBF)"); } @@ -1222,7 +1223,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch); + tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); return msg; diff --git a/src/tbf.h b/src/tbf.h index e9d8df8..80249df 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -174,7 +174,7 @@ int update(); void handle_timeout(); - void stop_timer(); + void stop_timer(const char *reason); void stop_t3191(); int establish_dl_tbf_on_pacch(); @@ -330,7 +330,7 @@ int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds); + unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 3d27883..73708f5 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -488,7 +488,7 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer(); + stop_timer("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -502,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch); + tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); @@ -861,7 +861,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0); + tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); clear_poll_timeout_flag(); @@ -1126,7 +1126,7 @@ /* start T3193 */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000); + (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 81d3b24..0bbb817 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0); + tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 31ab608..f534c54 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -91,7 +91,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -110,16 +110,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -180,7 +180,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -199,16 +199,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000001. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -530,10 +530,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xffeeddcc @@ -1556,7 +1556,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -1566,7 +1566,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1641,7 +1641,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1661,7 +1661,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1692,7 +1692,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -1725,7 +1725,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1745,7 +1745,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1775,7 +1775,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 1 Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -1791,7 +1791,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -1814,7 +1814,7 @@ - Copying data unit 0 (BSN 0) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654292, TS=7) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654292, TS=7 msg block (BSN 0, CS-4): 0f 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654279 block=10 data=08 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 @@ -1862,7 +1862,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf5667788, not yet confirmed Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1883,7 +1883,7 @@ UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1933,7 +1933,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1953,7 +1953,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1983,14 +1983,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2009,7 +2009,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Release pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2030,7 +2030,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN)s start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ @@ -2062,12 +2062,12 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2108,7 +2108,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2128,7 +2128,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2158,14 +2158,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2190,7 +2190,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654275 (17,31,13) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -2200,7 +2200,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2208,7 +2208,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 01, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2261,7 +2261,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2281,7 +2281,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2311,7 +2311,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append @@ -2366,7 +2366,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3046,7 +3046,7 @@ - V(B): (V(A)=28)""(V(S)-1=27) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid - Final ACK received. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=1/0 Slot Allocation (Algorithm A) for class 1 @@ -3065,7 +3065,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ @@ -3080,12 +3080,12 @@ TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 01, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3315,7 +3315,7 @@ - Copying data unit 0 (BSN 10) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654461, TS=7) -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654461, TS=7 msg block (BSN 10, CS-1): 0f 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654448 block=1 data=08 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 @@ -3435,7 +3435,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3457,7 +3457,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3491,7 +3491,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -3529,7 +3529,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3551,7 +3551,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3565,7 +3565,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3575,7 +3575,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3593,7 +3593,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3603,7 +3603,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3622,7 +3622,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=1, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(1) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3632,7 +3632,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3642,7 +3642,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3661,7 +3661,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3671,7 +3671,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3680,7 +3680,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3699,7 +3699,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3709,7 +3709,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3748,7 +3748,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -4101,10 +4101,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4400,10 +4400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4654,10 +4654,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4869,10 +4869,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5060,10 +5060,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5230,10 +5230,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5394,10 +5394,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5544,10 +5544,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5695,10 +5695,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5749,10 +5749,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5803,10 +5803,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5857,10 +5857,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5930,10 +5930,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6003,10 +6003,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6076,10 +6076,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6149,10 +6149,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6210,10 +6210,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6271,10 +6271,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6332,10 +6332,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6400,10 +6400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6444,7 +6444,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6466,7 +6466,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6480,7 +6480,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6497,7 +6497,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (2..65) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6530,7 +6530,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=11/11 @@ -6620,7 +6620,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6642,7 +6642,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6656,7 +6656,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=0, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6694,7 +6694,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -6866,7 +6866,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6891,7 +6891,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6916,7 +6916,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6941,7 +6941,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6966,7 +6966,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6991,7 +6991,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7016,7 +7016,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7080,7 +7080,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) ws(192) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -7102,7 +7102,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7116,7 +7116,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7126,7 +7126,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7136,7 +7136,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7146,7 +7146,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7156,7 +7156,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7166,7 +7166,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7176,7 +7176,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7186,7 +7186,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7196,7 +7196,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7206,7 +7206,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7216,7 +7216,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7226,7 +7226,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7236,7 +7236,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7246,7 +7246,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7256,7 +7256,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7266,7 +7266,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7276,7 +7276,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7286,7 +7286,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7296,7 +7296,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7307,7 +7307,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 40 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7317,7 +7317,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 42 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7327,7 +7327,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 44 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7337,7 +7337,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 46 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7347,7 +7347,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 48 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7357,7 +7357,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 50 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7367,7 +7367,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 52 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7377,7 +7377,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 54 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7387,7 +7387,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 56 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7397,7 +7397,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 58 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7407,7 +7407,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 60 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7417,7 +7417,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 62 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7427,7 +7427,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7437,7 +7437,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 66 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7447,7 +7447,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 68 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7457,7 +7457,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 70 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7467,7 +7467,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 72 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7477,7 +7477,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 74 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7487,7 +7487,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 76 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7497,7 +7497,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 78 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7509,7 +7509,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7519,7 +7519,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7529,7 +7529,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7539,7 +7539,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7549,7 +7549,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7559,7 +7559,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7569,7 +7569,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7579,7 +7579,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7589,7 +7589,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7599,7 +7599,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7609,7 +7609,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7619,7 +7619,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7629,7 +7629,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7639,7 +7639,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7649,7 +7649,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7659,7 +7659,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7669,7 +7669,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7679,7 +7679,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7689,7 +7689,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7699,7 +7699,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7711,7 +7711,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7721,7 +7721,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7731,7 +7731,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7741,7 +7741,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7751,7 +7751,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7761,7 +7761,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7771,7 +7771,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7781,7 +7781,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7791,7 +7791,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7801,7 +7801,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7811,7 +7811,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7821,7 +7821,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7831,7 +7831,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7841,7 +7841,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7851,7 +7851,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7861,7 +7861,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7871,7 +7871,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7881,7 +7881,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7891,7 +7891,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7901,7 +7901,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7918,7 +7918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 already received Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -7948,14 +7948,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Got RLC block, coding scheme: MCS-4, length: 49 (49)) UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7969,7 +7969,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7979,7 +7979,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7989,7 +7989,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7999,7 +7999,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8009,7 +8009,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8019,7 +8019,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8029,7 +8029,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8039,7 +8039,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8049,7 +8049,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8059,7 +8059,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8069,7 +8069,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8079,7 +8079,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8089,7 +8089,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8099,7 +8099,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8109,7 +8109,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8119,7 +8119,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8129,7 +8129,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8139,7 +8139,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8150,7 +8150,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8163,7 +8163,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8183,7 +8183,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8193,7 +8193,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 81 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8203,7 +8203,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8213,7 +8213,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 83 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8223,7 +8223,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8233,7 +8233,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 85 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8243,7 +8243,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8253,7 +8253,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 87 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8263,7 +8263,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8273,7 +8273,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 89 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8283,7 +8283,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8293,7 +8293,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 91 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8303,7 +8303,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8313,7 +8313,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 93 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8323,7 +8323,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8333,7 +8333,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 95 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8343,7 +8343,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8353,7 +8353,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 97 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8364,7 +8364,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8374,7 +8374,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 99 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8384,7 +8384,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8394,7 +8394,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 101 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8404,7 +8404,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8414,7 +8414,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 103 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8424,7 +8424,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8434,7 +8434,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 105 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8444,7 +8444,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8454,7 +8454,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 107 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8464,7 +8464,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8474,7 +8474,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 109 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8484,7 +8484,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8494,7 +8494,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 111 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8504,7 +8504,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8514,7 +8514,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 113 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8524,7 +8524,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8534,7 +8534,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 115 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8544,7 +8544,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8554,7 +8554,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 117 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8566,7 +8566,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8576,7 +8576,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 119 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8586,7 +8586,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8596,7 +8596,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 121 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8606,7 +8606,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8616,7 +8616,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 123 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8626,7 +8626,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8636,7 +8636,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 125 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8646,7 +8646,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8656,7 +8656,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 127 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8666,7 +8666,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8676,7 +8676,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 129 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8686,7 +8686,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8696,7 +8696,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 131 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8706,7 +8706,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8716,7 +8716,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 133 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8726,7 +8726,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8736,7 +8736,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 135 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8746,7 +8746,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8756,7 +8756,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 137 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8768,7 +8768,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8778,7 +8778,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 139 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8788,7 +8788,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8798,7 +8798,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 141 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8808,7 +8808,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8818,7 +8818,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 143 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8828,7 +8828,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8838,7 +8838,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 145 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8848,7 +8848,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8858,7 +8858,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 147 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8868,7 +8868,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8878,7 +8878,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 149 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8888,7 +8888,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8898,7 +8898,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 151 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8908,7 +8908,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8918,7 +8918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 153 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8928,7 +8928,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8938,7 +8938,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 155 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8948,7 +8948,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8958,7 +8958,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 157 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8970,7 +8970,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8980,7 +8980,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 159 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8997,7 +8997,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -9049,7 +9049,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9074,7 +9074,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9099,7 +9099,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9124,7 +9124,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9149,7 +9149,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9174,7 +9174,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9199,7 +9199,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9232,7 +9232,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Received RTS for PDCH: TRX=0 TS=7 FN=2654218 block_nr=8 scheduling USF=0 for required uplink resource of UL TFI=0 -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Destroying MS object, TLLI = 0x00000000 @@ -9240,13 +9240,13 @@ Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) timer 0 expired. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) releasing due to PACCH assignment timeout. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer T0 [freeing TBF] Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** -- To view, visit https://gerrit.osmocom.org/5120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 4 09:56:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 09:56:28 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: log timer override In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: TBF: log timer override ...................................................................... TBF: log timer override Currently TBF support only single Txxxx timer so scheduling another timer will cancel out the one which is already running. Until the proper fix is in place, let's at least log this situation as error. Note: cosmetic adjustement to test output is required - we do not report restart of the same timer twice because "restarting" assumes it anyway. Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Related: OS#2407 --- M src/tbf.cpp M tests/tbf/TbfTest.err 2 files changed, 218 insertions(+), 218 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 8e54157..831cd97 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -531,13 +531,13 @@ void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, unsigned int seconds, unsigned int microseconds) { - if (!osmo_timer_pending(&tbf->timer)) - LOGP(DRLCMAC, LOGL_DEBUG, "%s starting timer %u.\n", - tbf_name(tbf), T); - else - LOGP(DRLCMAC, LOGL_DEBUG, "%s restarting timer %u " - "while old timer %u pending \n", - tbf_name(tbf), T, tbf->T); + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.", + tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T); + + if (T != tbf->T && osmo_timer_pending(&tbf->timer)) + LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T); + + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); tbf->T = T; tbf->num_T_exp = 0; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 602e35b..31ab608 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1566,7 +1566,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1661,7 +1661,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1745,7 +1745,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1883,7 +1883,7 @@ UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1953,7 +1953,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2067,7 +2067,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2128,7 +2128,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2200,7 +2200,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2281,7 +2281,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3457,7 +3457,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3551,7 +3551,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3565,7 +3565,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3575,7 +3575,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3593,7 +3593,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3603,7 +3603,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3622,7 +3622,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=1, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(1) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3632,7 +3632,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3642,7 +3642,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3661,7 +3661,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3671,7 +3671,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3680,7 +3680,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3699,7 +3699,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3709,7 +3709,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (5), TFI(0). @@ -6466,7 +6466,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6480,7 +6480,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6497,7 +6497,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (2..65) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6642,7 +6642,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6656,7 +6656,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=0, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -7102,7 +7102,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7116,7 +7116,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7126,7 +7126,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7136,7 +7136,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7146,7 +7146,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7156,7 +7156,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7166,7 +7166,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7176,7 +7176,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7186,7 +7186,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7196,7 +7196,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7206,7 +7206,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7216,7 +7216,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7226,7 +7226,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7236,7 +7236,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7246,7 +7246,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7256,7 +7256,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7266,7 +7266,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7276,7 +7276,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7286,7 +7286,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7296,7 +7296,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7307,7 +7307,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 40 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7317,7 +7317,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 42 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7327,7 +7327,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 44 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7337,7 +7337,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 46 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7347,7 +7347,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 48 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7357,7 +7357,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 50 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7367,7 +7367,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 52 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7377,7 +7377,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 54 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7387,7 +7387,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 56 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7397,7 +7397,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 58 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7407,7 +7407,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 60 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7417,7 +7417,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 62 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7427,7 +7427,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7437,7 +7437,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 66 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7447,7 +7447,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 68 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7457,7 +7457,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 70 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7467,7 +7467,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 72 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7477,7 +7477,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 74 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7487,7 +7487,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 76 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7497,7 +7497,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 78 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7509,7 +7509,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7519,7 +7519,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7529,7 +7529,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7539,7 +7539,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7549,7 +7549,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7559,7 +7559,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7569,7 +7569,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7579,7 +7579,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7589,7 +7589,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7599,7 +7599,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7609,7 +7609,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7619,7 +7619,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7629,7 +7629,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7639,7 +7639,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7649,7 +7649,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7659,7 +7659,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7669,7 +7669,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7679,7 +7679,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7689,7 +7689,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7699,7 +7699,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7711,7 +7711,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7721,7 +7721,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7731,7 +7731,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7741,7 +7741,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7751,7 +7751,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7761,7 +7761,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7771,7 +7771,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7781,7 +7781,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7791,7 +7791,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7801,7 +7801,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7811,7 +7811,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7821,7 +7821,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7831,7 +7831,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7841,7 +7841,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7851,7 +7851,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7861,7 +7861,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7871,7 +7871,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7881,7 +7881,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7891,7 +7891,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7901,7 +7901,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7918,7 +7918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 already received Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -7955,7 +7955,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7969,7 +7969,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7979,7 +7979,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7989,7 +7989,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7999,7 +7999,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8009,7 +8009,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8019,7 +8019,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8029,7 +8029,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8039,7 +8039,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8049,7 +8049,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8059,7 +8059,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8069,7 +8069,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8079,7 +8079,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8089,7 +8089,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8099,7 +8099,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8109,7 +8109,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8119,7 +8119,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8129,7 +8129,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8139,7 +8139,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8150,7 +8150,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8163,7 +8163,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8183,7 +8183,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8193,7 +8193,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 81 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8203,7 +8203,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8213,7 +8213,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 83 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8223,7 +8223,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8233,7 +8233,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 85 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8243,7 +8243,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8253,7 +8253,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 87 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8263,7 +8263,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8273,7 +8273,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 89 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8283,7 +8283,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8293,7 +8293,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 91 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8303,7 +8303,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8313,7 +8313,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 93 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8323,7 +8323,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8333,7 +8333,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 95 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8343,7 +8343,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8353,7 +8353,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 97 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8364,7 +8364,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8374,7 +8374,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 99 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8384,7 +8384,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8394,7 +8394,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 101 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8404,7 +8404,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8414,7 +8414,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 103 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8424,7 +8424,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8434,7 +8434,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 105 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8444,7 +8444,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8454,7 +8454,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 107 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8464,7 +8464,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8474,7 +8474,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 109 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8484,7 +8484,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8494,7 +8494,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 111 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8504,7 +8504,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8514,7 +8514,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 113 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8524,7 +8524,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8534,7 +8534,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 115 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8544,7 +8544,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8554,7 +8554,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 117 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8566,7 +8566,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8576,7 +8576,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 119 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8586,7 +8586,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8596,7 +8596,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 121 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8606,7 +8606,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8616,7 +8616,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 123 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8626,7 +8626,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8636,7 +8636,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 125 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8646,7 +8646,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8656,7 +8656,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 127 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8666,7 +8666,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8676,7 +8676,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 129 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8686,7 +8686,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8696,7 +8696,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 131 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8706,7 +8706,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8716,7 +8716,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 133 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8726,7 +8726,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8736,7 +8736,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 135 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8746,7 +8746,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8756,7 +8756,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 137 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8768,7 +8768,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8778,7 +8778,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 139 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8788,7 +8788,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8798,7 +8798,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 141 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8808,7 +8808,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8818,7 +8818,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 143 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8828,7 +8828,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8838,7 +8838,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 145 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8848,7 +8848,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8858,7 +8858,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 147 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8868,7 +8868,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8878,7 +8878,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 149 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8888,7 +8888,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8898,7 +8898,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 151 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8908,7 +8908,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8918,7 +8918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 153 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8928,7 +8928,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8938,7 +8938,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 155 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8948,7 +8948,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8958,7 +8958,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 157 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8970,7 +8970,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8980,7 +8980,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 159 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8997,7 +8997,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 -- To view, visit https://gerrit.osmocom.org/5109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 4 10:01:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 10:01:10 +0000 Subject: openbsc[vlr_3G]: contrib: Add osmo-msc service file In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 I guess this can be abandoned now? -- To view, visit https://gerrit.osmocom.org/2537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3cb8a90010451bed3a1462ac9ba48275c28d48aa Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: vlr_3G Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 11:10:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 11:10:33 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: cancel transactions on timeout Message-ID: Review at https://gerrit.osmocom.org/5157 mgcp: cancel transactions on timeout when a transaction to the MGW times out, then the context information is freed. Unfortunately the client is not informed about this and will try to execute the callback anyway. explicitly cancel the transaction in order to prevent access to already freed data structures. Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/57/5157/1 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index df18524..f7106b6 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -21,6 +21,7 @@ #pragma once #include +#include /* MGCP state handler context (fsm etc..) */ struct mgcp_ctx { @@ -43,6 +44,7 @@ struct gsm_lchan *lchan; struct gsm_lchan *ho_lchan; struct msgb *resp; + mgcp_trans_id_t mgw_pending_trans; }; struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f5efa95..39ae9d0 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -182,6 +182,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -335,6 +336,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -460,6 +462,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -595,6 +598,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -652,6 +656,8 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); OSMO_ASSERT(msg); + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -815,6 +821,9 @@ /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + /* Initiate self destruction of the FSM */ osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 11:53:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 11:53:19 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers Message-ID: Review at https://gerrit.osmocom.org/5158 TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. N. B. - some timers are still used as before: * T3169: changing would require changing test output * T3193: changing causes segfault * T0: used for assign/reject timeouts, have to be properly attributed and documented first This will be fixed in follow-up patches. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 4 files changed, 146 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..15e73f1 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -163,6 +164,12 @@ n3105(0), T(0), num_T_exp(0), + num_T3169_exp(0), + num_T3191_exp(0), + num_T3193_exp(0), + num_T3195_exp(0), + num_T3197_exp(0), + num_T3199_exp(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -183,6 +190,12 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T3169, 0, sizeof(T3169)); + memset(&T3191, 0, sizeof(T3191)); + memset(&T3193, 0, sizeof(T3193)); + memset(&T3195, 0, sizeof(T3195)); + memset(&T3197, 0, sizeof(T3197)); + memset(&T3199, 0, sizeof(T3199)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -465,6 +478,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -550,9 +564,30 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +static inline void t_stop(const char *tbf_name, struct osmo_timer_list *t, uint16_t num, const char *reason) { - return stop_timer("T3191"); + if (osmo_timer_pending(t)) { + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", tbf_name, num, reason); + osmo_timer_del(t); + } +} + +#define STOP_T(nn) void gprs_rlcmac_tbf::stop_t##nn(const char *reason) { t_stop(tbf_name(this), &T##nn, nn, reason); } + +STOP_T(3169) +STOP_T(3191) +STOP_T(3193) +STOP_T(3195) +STOP_T(3197) +STOP_T(3199) + +void gprs_rlcmac_tbf::stop_timers(const char *reason) { + stop_t3169(reason); + stop_t3191(reason); + stop_t3193(reason); + stop_t3195(reason); + stop_t3197(reason); + stop_t3199(reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -563,6 +598,59 @@ osmo_timer_del(&timer); } } + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, uint16_t num, bool run_diag, bool free_tbf) +{ + LOGP(DRLCMAC, LOGL_NOTICE, "%s T%u timeout expired, freeing TBF\n", + tbf_name(tbf), num, free_tbf ? "freeing" : "ignoring"); + + if (run_diag) + tbf->rlcmac_diag(); + + if (free_tbf) + tbf_free(tbf); +} + +#define T_CBACK(nn, diag, free) \ + static void tbf_timer_cb##nn(void *_tbf) { \ + struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)_tbf; \ + tbf_timeout_free(tbf, nn, diag, free); \ + tbf->num_T ## nn ## _exp++; \ + } + +T_CBACK(3169, true, true) +T_CBACK(3191, true, true) +T_CBACK(3193, false, true) +T_CBACK(3195, true, true) +T_CBACK(3197, false, false) +T_CBACK(3199, false, false) + +typedef void (*t_cback)(void *_tbf); + +static inline void t_sched(struct gprs_rlcmac_tbf *tbf, struct osmo_timer_list *t, uint64_t *exp, + uint16_t num, uint32_t sec, uint32_t microsec, t_cback cback, const char *reason) +{ + LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer T%u [%s] with %u sec. %u microsec.\n", + tbf_name(tbf), osmo_timer_pending(t) ? "re" : "", num, reason, sec, microsec); + + t->data = tbf; + t->cb = cback; + + *exp = 0; + osmo_timer_schedule(t, sec, microsec); +} + +#define START_T(nn) \ + void gprs_rlcmac_tbf::start_t##nn(uint32_t sec, uint32_t microsec, const char *reason) { \ + t_sched(this, &T##nn, &num_T ## nn ##_exp, nn, sec, microsec, &tbf_timer_cb##nn, reason); \ + } + +START_T(3169) +START_T(3191) +START_T(3193) +START_T(3195) +START_T(3197) +START_T(3199) int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, uint32_t *poll_fn_, unsigned int *rrbp_) @@ -685,7 +773,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + start_t3195(bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +795,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + start_t3195(bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +821,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->start_t3195(dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1004,6 +1092,7 @@ tbf->handle_timeout(); } +/* FIXME: remove this once the switch over to start_t31*()/stop_t31*() is complete */ void gprs_rlcmac_tbf::handle_timeout() { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", @@ -1053,13 +1142,11 @@ } break; case 3169: - case 3191: - case 3195: LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " "transsmission\n", tbf_name(this), T); rlcmac_diag(); /* fall through */ - case 3193: + case 3193: /* FIXME: remove once issue with start_t3193() is resolved */ LOGP(DRLCMAC, LOGL_DEBUG, "%s will be freed due to timeout\n", tbf_name(this)); /* free TBF */ diff --git a/src/tbf.h b/src/tbf.h index 80249df..085c283 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -175,7 +175,19 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + void stop_t3169(const char *reason); + void stop_t3191(const char *reason); + void stop_t3193(const char *reason); + void stop_t3195(const char *reason); + void stop_t3197(const char *reason); + void stop_t3199(const char *reason); + void start_t3169(uint32_t sec, uint32_t microsec, const char *reason); + void start_t3191(uint32_t sec, uint32_t microsec, const char *reason); + void start_t3193(uint32_t sec, uint32_t microsec, const char *reason); + void start_t3195(uint32_t sec, uint32_t microsec, const char *reason); + void start_t3197(uint32_t sec, uint32_t microsec, const char *reason); + void start_t3199(uint32_t sec, uint32_t microsec, const char *reason); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -248,6 +260,35 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ unsigned int num_T_exp; /* number of consecutive T expirations */ + + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + struct osmo_timer_list T3169; + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + struct osmo_timer_list T3191; + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + struct osmo_timer_list T3193; + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + struct osmo_timer_list T3195; + + /* Wait for the indication from the MS that it has received needed system information + messages. */ + struct osmo_timer_list T3197; + + /* Wait for reuse of MS_ID on an MBMS radio bearer. */ + struct osmo_timer_list T3199; + + uint64_t num_T3169_exp; /* number of consecutive T3169 expirations */ + uint64_t num_T3191_exp; /* number of consecutive T3191 expirations */ + uint64_t num_T3193_exp; /* number of consecutive T3193 expirations */ + uint64_t num_T3195_exp; /* number of consecutive T3195 expirations */ + uint64_t num_T3197_exp; /* number of consecutive T3197 expirations */ + uint64_t num_T3199_exp; /* number of consecutive T3199 expirations */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..11c3af7 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -489,6 +489,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -658,7 +659,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + stop_t3191("ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -861,7 +862,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + start_t3191(bts_data()->t3191, 0, "final block (DL-TBF)"); clear_poll_timeout_flag(); @@ -1124,6 +1125,10 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ + /* FIXME: using + start_t3193(bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + causes segfault + */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..23790de 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,7 +51,8 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(osmo_timer_pending(&tbf->T3191) || tbf->T == 3193); + /* FIXME: use ... || osmo_timer_pending(&tbf->T3193) above once issue with start_t3193() is resolved */ if (tbf->state_is(GPRS_RLCMAC_RELEASING)) OSMO_ASSERT(tbf->T != 0); } -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:25:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 4 Dec 2017 12:25:32 +0000 Subject: [PATCH] libosmocore[master]: Embedded: fix sercomm test Message-ID: Review at https://gerrit.osmocom.org/5159 Embedded: fix sercomm test The external sercomm_drv_[un]lock() functions are defined as stubs in case of non-embedded build only which causes linking issue with sercomm_test. Let's define the same stubs in sercomm_test unconditionally - the implementation details of the locking are irrelevant for the test anyway. Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 --- M tests/sercomm/sercomm_test.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/5159/1 diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index 058c9eb..4a40f62 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -27,6 +27,10 @@ struct osmo_sercomm_inst g_osi; +/* Locking details are not checked by this test anyway */ +void sercomm_drv_lock(unsigned long __attribute__((unused)) *flags) {} +void sercomm_drv_unlock(unsigned long __attribute__((unused)) *flags) {} + static const uint8_t valid_dlci3[] = { 0x7E, 3, 0x03, 'f', 'o', 'o', 0x7E }; static const uint8_t valid_dlci23[] = { 0x7E, 23, 0x03, '2', '3', 0x7E }; static const uint8_t valid_dlci23esc[] = { 0x7E, 23, 0x03, 0x7D, '2' ^ (1 << 5), '3', 0x7E }; -- To view, visit https://gerrit.osmocom.org/5159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:26:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:26:22 +0000 Subject: [PATCH] osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5121 to look at the new patch set (#2). Add configure flag to disable ipv6 support Some users may want to disable ipv6 related features in case they are not needed. It can also be used as a workaround to build libgtp and osmo-ggsn in systems where ipv6 supports fails to build due to header struct definition conflicts between kernel and libc. Related: SYS#3815 Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 --- M configure.ac M ggsn/Makefile.am M ggsn/ggsn.c M ggsn/ggsn.h M ggsn/ggsn_vty.c M lib/in46_addr.c M lib/in46_addr.h M lib/ippool.c M lib/tun.c M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c M tests/lib/ippool_test.c M tests/testsuite.at 13 files changed, 180 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/5121/2 diff --git a/configure.ac b/configure.ac index 4fd0132..b835f7d 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,15 @@ AM_CONDITIONAL([ENABLE_GTP_KERNEL], [test "$enable_gtp_linux" = "yes"]) +# Enable/disable IPv6 support +AC_ARG_ENABLE([ipv6], [AS_HELP_STRING([--enable-ipv6], [Build IPv6 support])], + [enable_ipv6="$enableval"],[enable_ipv6="yes"]) +if test "x$enable_ipv6" = "xyes" ; then + AC_DEFINE(BUILD_IPv6, 1, [Define if we want to build IPv6 support]) +fi +AM_CONDITIONAL(BUILD_IPv6, test "x$enable_ipv6" = "xyes") +#AC_SUBST(enable_ipv6) + # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT @@ -170,4 +179,5 @@ echo " osmo-ggsn Configuration: - GTP Linux kernel support: ${enable_gtp_linux}" + GTP Linux kernel support: ${enable_gtp_linux} + IPv6 support: ${enable_ipv6}" diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am index 8a468a9..07adf80 100644 --- a/ggsn/Makefile.am +++ b/ggsn/Makefile.am @@ -12,7 +12,10 @@ endif osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a -osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h +osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h checksum.c checksum.h +if BUILD_IPv6 +osmo_ggsn_SOURCES += icmpv6.c icmpv6.h +endif if ENABLE_GTP_KERNEL osmo_ggsn_SOURCES += gtp-kernel.c diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 763a2c5..6a206a2 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -65,7 +65,9 @@ #include "../gtp/pdp.h" #include "../gtp/gtp.h" #include "gtp-kernel.h" +#if defined(BUILD_IPv6) #include "icmpv6.h" +#endif #include "ggsn.h" void *tall_ggsn_ctx; @@ -115,7 +117,9 @@ LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : ""); /* check if pools have any active PDP contexts and bail out */ pool_close_all_pdp(apn->v4.pool); +#if defined(BUILD_IPv6) pool_close_all_pdp(apn->v6.pool); +#endif /* shutdown whatever old state might be left */ if (apn->tun.tun) { @@ -137,12 +141,13 @@ ippool_free(apn->v4.pool); apn->v4.pool = NULL; } +#if defined(BUILD_IPv6) if (apn->v6.pool) { LOGPAPN(LOGL_INFO, apn, "Releasing IPv6 pool\n"); ippool_free(apn->v6.pool); apn->v6.pool = NULL; } - +#endif apn->started = false; return 0; } @@ -155,9 +160,11 @@ *blacklist = NULL; +#if defined(BUILD_IPv6) if (ipv6) flags = IP_TYPE_IPv6_NONLINK; else +#endif flags = IP_TYPE_IPv4; while (1) { @@ -191,7 +198,9 @@ int apn_start(struct apn_ctx *apn) { int ippool_flags = IPPOOL_NONETWORK | IPPOOL_NOBROADCAST; +#if defined(BUILD_IPv6) struct in46_prefix ipv6_tun_linklocal_ip; +#endif struct in46_prefix *blacklist; int blacklist_size; @@ -226,7 +235,7 @@ return -1; } } - +#if defined(BUILD_IPv6) if (apn->v6.cfg.ifconfig_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Setting tun IPv6 address %s\n", in46p_ntoa(&apn->v6.cfg.ifconfig_prefix)); @@ -239,13 +248,13 @@ return -1; } } - +#endif if (apn->tun.cfg.ipup_script) { LOGPAPN(LOGL_INFO, apn, "Running ip-up script %s\n", apn->tun.cfg.ipup_script); tun_runscript(apn->tun.tun, apn->tun.cfg.ipup_script); } - +#if defined(BUILD_IPv6) if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { if (tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK) < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of " @@ -255,17 +264,20 @@ } apn->v6_lladdr = ipv6_tun_linklocal_ip.addr.v6; } +#endif /* set back-pointer from TUN device to APN */ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: LOGPAPN(LOGL_INFO, apn, "Opening Kernel GTP device %s\n", apn->tun.cfg.dev_name); +#if defined(BUILD_IPv6) if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); apn_stop(apn, false); return -1; } +#endif /* use GTP kernel module for data packet encapsulation */ if (gtp_kernel_init(apn->ggsn->gsn, apn->tun.cfg.dev_name, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { @@ -294,6 +306,7 @@ talloc_free(blacklist); } +#if defined(BUILD_IPv6) /* Create IPv6 pool */ if (apn->v6.cfg.dynamic_prefix.addr.len) { LOGPAPN(LOGL_INFO, apn, "Creating IPv6 pool %s\n", @@ -310,6 +323,7 @@ } talloc_free(blacklist); } +#endif LOGPAPN(LOGL_NOTICE, apn, "Successfully started\n"); apn->started = true; @@ -468,6 +482,7 @@ build_ipcp_pco(msg, 0, &apn->v4.cfg.dns[0], &apn->v4.cfg.dns[1]); } +#if defined(BUILD_IPv6) if (pco_contains_proto(&pdp->pco_req, PCO_P_DNS_IPv6_ADDR)) { for (i = 0; i < ARRAY_SIZE(apn->v6.cfg.dns); i++) { struct in46_addr *i46a = &apn->v6.cfg.dns[i]; @@ -476,6 +491,7 @@ msgb_t16lv_put(msg, PCO_P_DNS_IPv6_ADDR, i46a->len, i46a->v6.s6_addr); } } +#endif if (pco_contains_proto(&pdp->pco_req, PCO_P_DNS_IPv4_ADDR)) { for (i = 0; i < ARRAY_SIZE(apn->v4.cfg.dns); i++) { @@ -502,12 +518,14 @@ return false; } +#if defined(BUILD_IPv6) static bool apn_supports_ipv6(const struct apn_ctx *apn) { if (apn->v6.cfg.static_prefix.addr.len || apn->v6.cfg.dynamic_prefix.addr.len) return true; return false; } +#endif int create_context_ind(struct pdp_t *pdp) { @@ -575,6 +593,7 @@ gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } +#if defined(BUILD_IPv6) } else if (addr.len == sizeof(struct in6_addr)) { struct in46_addr tmp; @@ -594,6 +613,7 @@ /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); in46a_to_eua(&tmp, &pdp->eua); +#endif } else OSMO_ASSERT(0); @@ -635,7 +655,9 @@ struct ippoolm_t *ipm; struct in46_addr dst; struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif struct ippool_t *pool; if (iph->version == 4) { @@ -644,6 +666,7 @@ dst.len = 4; dst.v4.s_addr = iph->daddr; pool = apn->v4.pool; +#if defined(BUILD_IPv6) } else if (iph->version == 6) { /* Due to the fact that 3GPP requires an allocation of a * /64 prefix to each MS, we must instruct @@ -652,6 +675,7 @@ dst.len = 8; dst.v6 = ip6h->ip6_dst; pool = apn->v6.pool; +#endif } else { LOGP(DTUN, LOGL_NOTICE, "non-IPv%u packet received from tun\n", iph->version); return -1; @@ -673,16 +697,20 @@ return 0; } +#if defined(BUILD_IPv6) /* RFC3307 link-local scope multicast address */ static const struct in6_addr all_router_mcast_addr = { .s6_addr = { 0xff,0x02,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,2 } }; +#endif /* MS-originated GTP1-U packet, needs to be sent via TUN device */ static int encaps_tun(struct pdp_t *pdp, void *pack, unsigned len) { struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif struct tun_t *tun = (struct tun_t *)pdp->ipif; struct apn_ctx *apn = tun->priv; @@ -692,11 +720,13 @@ LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); switch (iph->version) { +#if defined(BUILD_IPv6) case 6: /* daddr: all-routers multicast addr */ if (IN6_ARE_ADDR_EQUAL(&ip6h->ip6_dst, &all_router_mcast_addr)) return handle_router_mcast(pdp->gsn, pdp, &apn->v6_lladdr, pack, len); break; +#endif case 4: break; default: diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h index c0774c4..ca0013f 100644 --- a/ggsn/ggsn.h +++ b/ggsn/ggsn.h @@ -80,11 +80,12 @@ struct osmo_fd fd; } tun; + struct apn_ctx_ip v4; +#if defined(BUILD_IPv6) + struct apn_ctx_ip v6; /* ipv6 link-local address */ struct in6_addr v6_lladdr; - - struct apn_ctx_ip v4; - struct apn_ctx_ip v6; +#endif }; struct ggsn_ctx { diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 6e15ae4..4932c20 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -334,8 +334,10 @@ static const struct value_string pdp_type_names[] = { { APN_TYPE_IPv4, "v4" }, +#if defined(BUILD_IPv6) { APN_TYPE_IPv6, "v6" }, { APN_TYPE_IPv4v6, "v4v6" }, +#endif { 0, NULL } }; @@ -345,13 +347,17 @@ { 0, NULL } }; - +#if defined(BUILD_IPv6) +#define V4V6V46_ARGS "(v4|v6|v4v6)" #define V4V6V46_STRING "IPv4(-only) PDP Type\n" \ "IPv6(-only) PDP Type\n" \ "IPv4v6 (dual-stack) PDP Type\n" - +#else +#define V4V6V46_ARGS "(v4)" +#define V4V6V46_STRING "IPv4(-only) PDP Type\n" +#endif DEFUN(cfg_apn_type_support, cfg_apn_type_support_cmd, - "type-support (v4|v6|v4v6)", + "type-support " V4V6V46_ARGS, "Enable support for PDP Type\n" V4V6V46_STRING) { @@ -363,7 +369,7 @@ } DEFUN(cfg_apn_no_type_support, cfg_apn_no_type_support_cmd, - "no type-support (v4|v6|v4v6)", + "no type-support " V4V6V46_ARGS, NO_STR "Disable support for PDP Type\n" V4V6V46_STRING) { @@ -480,6 +486,7 @@ return CMD_SUCCESS; } +#if defined(BUILD_IPv6) DEFUN(cfg_apn_ipv6_prefix, cfg_apn_ipv6_prefix_cmd, "ipv6 prefix (static|dynamic) X:X::X:X/M", IP6_STR PREFIX_STR "IPv6 Address/Prefix-Length\n") @@ -512,6 +519,7 @@ memset(&apn->v6.cfg.ifconfig_prefix, 0, sizeof(apn->v6.cfg.ifconfig_prefix)); return CMD_SUCCESS; } +#endif #define DNS_STRINGS "Configure DNS Server\n" "primary/secondary DNS\n" "IP address of DNS Sever\n" @@ -528,6 +536,7 @@ return CMD_SUCCESS; } +#if defined(BUILD_IPv6) DEFUN(cfg_apn_ipv6_dns, cfg_apn_ipv6_dns_cmd, "ipv6 dns <0-1> X:X::X:X", IP6_STR DNS_STRINGS) @@ -540,20 +549,27 @@ return CMD_SUCCESS; } +#endif +#if defined(BUILD_IPv6) +#define IPV46_ARGS "(ip|ipv6)" +#else +#define IPV46_ARGS "(ip)" +#endif DEFUN(cfg_apn_no_dns, cfg_apn_no_dns_cmd, - "no (ip|ipv6) dns <0-1>", + "no " IPV46_ARGS " dns <0-1>", NO_STR IP_STR IP6_STR "Disable DNS Server\n" "primary/secondary DNS\n") { struct apn_ctx *apn = (struct apn_ctx *) vty->index; - struct in46_addr *a; + struct in46_addr *a = NULL; int idx = atoi(argv[1]); if (!strcmp(argv[0], "ip")) a = &apn->v4.cfg.dns[idx]; +#if defined(BUILD_IPv6) else a = &apn->v6.cfg.dns[idx]; - +#endif memset(a, 0, sizeof(*a)); return CMD_SUCCESS; @@ -656,6 +672,7 @@ if (apn->v4.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ip ifconfig", &apn->v4.cfg.ifconfig_prefix); +#if defined(BUILD_IPv6) /* IPv6 prefixes + DNS */ if (apn->v6.cfg.static_prefix.addr.len) vty_dump_prefix(vty, " ipv6 prefix static", &apn->v6.cfg.static_prefix); @@ -668,7 +685,7 @@ } if (apn->v6.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ipv6 ifconfig", &apn->v6.cfg.ifconfig_prefix); - +#endif /* must be last */ vty_out(vty, " %sshutdown%s", apn->cfg.shutdown ? "" : "no ", VTY_NEWLINE); } @@ -704,8 +721,12 @@ struct in46_addr in46; in46.len = in->l; +#if defined(BUILD_IPv6) OSMO_ASSERT(in->l <= sizeof(in46.v6)); - memcpy(&in46.v6, in->v, in->l); +#else + OSMO_ASSERT(in->l <= sizeof(in46.v4)); +#endif + memcpy(&in46.v4, in->v, in->l); return in46a_ntoa(&in46); } @@ -781,7 +802,9 @@ static void apn_show_pdp_contexts(struct vty *vty, struct apn_ctx *apn) { ippool_show_pdp_contexts(vty, apn->v4.pool); +#if defined(BUILD_IPv6) ippool_show_pdp_contexts(vty, apn->v6.pool); +#endif } DEFUN(show_pdpctx, show_pdpctx_cmd, @@ -885,14 +908,16 @@ install_element(APN_NODE, &cfg_apn_ipdown_script_cmd); install_element(APN_NODE, &cfg_apn_no_ipdown_script_cmd); install_element(APN_NODE, &cfg_apn_ip_prefix_cmd); - install_element(APN_NODE, &cfg_apn_ipv6_prefix_cmd); install_element(APN_NODE, &cfg_apn_ip_dns_cmd); - install_element(APN_NODE, &cfg_apn_ipv6_dns_cmd); install_element(APN_NODE, &cfg_apn_no_dns_cmd); install_element(APN_NODE, &cfg_apn_ip_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ip_ifconfig_cmd); +#if defined(BUILD_IPv6) + install_element(APN_NODE, &cfg_apn_ipv6_prefix_cmd); + install_element(APN_NODE, &cfg_apn_ipv6_dns_cmd); install_element(APN_NODE, &cfg_apn_ipv6_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ipv6_ifconfig_cmd); +#endif install_element(APN_NODE, &cfg_apn_gpdu_seq_cmd); install_element(APN_NODE, &cfg_apn_no_gpdu_seq_cmd); diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..79123b5 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -28,9 +28,11 @@ switch (in->len) { case 4: return AF_INET; +#if defined(BUILD_IPv6) case 8: case 16: return AF_INET6; +#endif default: OSMO_ASSERT(0); return -1; @@ -41,17 +43,21 @@ int in46a_to_sas(struct sockaddr_storage *out, const struct in46_addr *in) { struct sockaddr_in *sin = (struct sockaddr_in *)out; +#if defined(BUILD_IPv6) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)out; +#endif switch (in->len) { case 4: sin->sin_family = AF_INET; sin->sin_addr = in->v4; break; +#if defined(BUILD_IPv6) case 16: sin6->sin6_family = AF_INET6; sin6->sin6_addr = in->v6; break; +#endif default: OSMO_ASSERT(0); return -1; @@ -98,7 +104,7 @@ * \returns 1 in case they are equal; 0 otherwise */ int in46a_equal(const struct in46_addr *a, const struct in46_addr *b) { - if (a->len == b->len && !memcmp(&a->v6, &b->v6, a->len)) + if (a->len == b->len && !memcmp(&a->v4, &b->v4, a->len)) return 1; else return 0; @@ -115,12 +121,13 @@ else len = a->len; - if (!memcmp(&a->v6, &b->v6, len)) + if (!memcmp(&a->v4, &b->v4, len)) return 1; else return 0; } +#if defined(BUILD_IPv6) /*! Match if IPv6 addr1 + addr2 are within same \a mask */ static int ipv6_within_mask(const struct in6_addr *addr1, const struct in6_addr *addr2, const struct in6_addr *mask) @@ -167,6 +174,7 @@ *p_netmask = htonl(0xFFFFFFFF << (32 - prefixlen)); } } +#endif /*! Determine if given \a addr is within given \a net + \a prefixlen * Builds the netmask from \a net + \a prefixlen and matches it to \a addr @@ -174,7 +182,9 @@ int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen) { struct in_addr netmask; +#if defined(BUILD_IPv6) struct in6_addr netmask6; +#endif if (addr->len != net->len) return 0; @@ -186,9 +196,11 @@ return 1; else return 0; +#if defined(BUILD_IPv6) case 16: create_ipv6_netmask(&netmask6, prefixlen); return ipv6_within_mask(&addr->v6, &net->v6, &netmask6); +#endif default: OSMO_ASSERT(0); return 0; @@ -210,6 +222,7 @@ return prefix; } +#if defined(BUILD_IPv6) static unsigned int ipv6_netmasklen(const struct in6_addr *netmask) { #if defined(__linux__) @@ -235,6 +248,7 @@ return prefix; } +#endif /*! Convert netmask to prefix length representation * \param[in] netmask in46_addr containing a netmask (consecutive list of 1-bit followed by consecutive list of 0-bit) @@ -245,8 +259,10 @@ switch (netmask->len) { case 4: return ipv4_netmasklen(&netmask->v4); +#if defined(BUILD_IPv6) case 16: return ipv6_netmasklen(&netmask->v6); +#endif default: OSMO_ASSERT(0); return 0; @@ -264,6 +280,7 @@ eua->v[1] = PDP_EUA_TYPE_v4; memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ break; +#if defined(BUILD_IPv6) case 8: case 16: eua->l = 18; @@ -271,6 +288,7 @@ eua->v[1] = PDP_EUA_TYPE_v6; memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ break; +#endif default: OSMO_ASSERT(0); return -1; @@ -296,6 +314,7 @@ else dst->v4.s_addr = 0; break; +#if defined(BUILD_IPv6) case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) @@ -303,6 +322,7 @@ else memset(&dst->v6, 0, 16); break; +#endif default: return -1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..2b3755b 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -4,13 +4,17 @@ #include "../gtp/pdp.h" +#include "config.h" + /* a simple wrapper around an in6_addr to also contain the length of the address, * thereby implicitly indicating the address family of the address */ struct in46_addr { uint8_t len; union { struct in_addr v4; +#if defined(BUILD_IPv6) struct in6_addr v6; +#endif }; }; diff --git a/lib/ippool.c b/lib/ippool.c index a9a64be..ffc4388 100644 --- a/lib/ippool.c +++ b/lib/ippool.c @@ -22,6 +22,8 @@ #include "ippool.h" #include "lookup.h" +#include "config.h" + int ippool_printaddr(struct ippool_t *this) { unsigned int n; @@ -96,18 +98,24 @@ return lookup((unsigned char *)&addr->s_addr, sizeof(addr->s_addr), 0); } +#if defined(BUILD_IPv6) static unsigned long int ippool_hash6(struct in6_addr *addr, unsigned int len) { /* TODO: Review hash spread for IPv6 */ return lookup((unsigned char *)addr->s6_addr, len, 0); } +#endif unsigned long int ippool_hash(struct in46_addr *addr) { +#if defined(BUILD_IPv6) if (addr->len == 4) return ippool_hash4(&addr->v4); else return ippool_hash6(&addr->v6, addr->len); +#else + return ippool_hash4(&addr->v4); +#endif } /* Get IP address and mask */ @@ -148,11 +156,14 @@ *prefixlen = 32; addr->len = sizeof(struct in_addr); addr->v4 = ((struct sockaddr_in*)ai->ai_addr)->sin_addr; - } else { + } +#if defined(BUILD_IPv6) + else { *prefixlen = 128; addr->len = sizeof(struct in6_addr); addr->v6 = ((struct sockaddr_in6*)ai->ai_addr)->sin6_addr; } +#endif freeaddrinfo(ai); /* parse prefixlen */ @@ -177,7 +188,7 @@ void in46a_inc(struct in46_addr *addr) { size_t addrlen; - uint8_t *a = (uint8_t *)&addr->v6; + uint8_t *a = (uint8_t *)&addr->v4; for (addrlen = addr->len; addrlen > 0; addrlen--) { if (++a[addrlen-1]) break; @@ -215,11 +226,12 @@ } else { addr = dyn->addr; addrprefixlen = dyn->prefixlen; +#if defined(BUILD_IPv6) /* we want to work with /64 prefixes, i.e. allocate /64 prefixes rather * than /128 (single IPv6 addresses) */ if (addr.len == sizeof(struct in6_addr)) addr.len = 64/8; - +#endif dynsize = (1 << (addr.len*8 - addrprefixlen)); if (flags & IPPOOL_NONETWORK) /* Exclude network address from pool */ dynsize--; @@ -404,8 +416,10 @@ if (addr) { if (addr->len == 4 && addr->v4.s_addr) specified = 1; +#if defined(BUILD_IPv6) if (addr->len == 16 && !IN6_IS_ADDR_UNSPECIFIED(&addr->v6)) specified = 1; +#endif } /* First check to see if this type of address is allowed */ diff --git a/lib/tun.c b/lib/tun.c index d8e4b62..ce3eced 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -62,7 +62,9 @@ #if defined(__linux__) +#if defined(BUILD_IPv6) #include +#endif static int tun_nlattr(struct nlmsghdr *n, int nsize, int type, void *d, int dlen) { @@ -197,6 +199,7 @@ return 0; } +#if defined(BUILD_IPv6) static int tun_setaddr6(struct tun_t *this, struct in6_addr *addr, struct in6_addr *dstaddr, size_t prefixlen) { @@ -280,6 +283,7 @@ return 0; } +#endif /* BUILD_IPv6 */ int tun_setaddr(struct tun_t *this, struct in46_addr *addr, struct in46_addr *dstaddr, size_t prefixlen) { @@ -288,8 +292,10 @@ case 4: netmask.s_addr = htonl(0xffffffff << (32 - prefixlen)); return tun_setaddr4(this, &addr->v4, dstaddr ? &dstaddr->v4 : NULL, &netmask); +#if defined(BUILD_IPv6) case 16: return tun_setaddr6(this, &addr->v6, dstaddr ? &dstaddr->v6 : NULL, prefixlen); +#endif default: return -1; } @@ -762,11 +768,13 @@ */ int netdev_ip_local_get(const char *devname, struct in46_prefix *prefix_list, size_t prefix_size, int flags) { +#if defined(BUILD_IPv6) static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; + bool is_ipv6_ll; +#endif struct ifaddrs *ifaddr, *ifa; struct in46_addr netmask; size_t count = 0; - bool is_ipv6_ll; if (getifaddrs(&ifaddr) == -1) { return -1; @@ -792,7 +800,7 @@ } count++; } - +#if defined(BUILD_IPv6) if (ifa->ifa_addr->sa_family == AF_INET6 && (flags & IP_TYPE_IPv6)) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) ifa->ifa_addr; struct sockaddr_in6 *netmask6 = (struct sockaddr_in6 *) ifa->ifa_netmask; @@ -812,6 +820,7 @@ } count++; } +#endif } freeifaddrs(ifaddr); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..10075d7 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -936,10 +936,12 @@ options.tx_gpdu_seq = 1; /* PDP Type */ - if (!strcmp(args_info.pdp_type_arg, "v6")) - options.pdp_type = PDP_EUA_TYPE_v6; - else if (!strcmp(args_info.pdp_type_arg, "v4")) + if (!strcmp(args_info.pdp_type_arg, "v4")) options.pdp_type = PDP_EUA_TYPE_v4; +#if defined(BUILD_IPv6) + else if (!strcmp(args_info.pdp_type_arg, "v6")) + options.pdp_type = PDP_EUA_TYPE_v6; +#endif else { SYS_ERR(DSGSN, LOGL_ERROR, 0, "Unsupported/unknown PDP Type '%s'\n", args_info.pdp_type_arg); @@ -955,6 +957,7 @@ } +#if defined(BUILD_IPv6) /* read a single value from a /procc file, up to 255 bytes, callee-allocated */ static char *proc_read(const char *path) { @@ -989,6 +992,7 @@ snprintf(path, sizeof(path), fmt, dev, file); return proc_read(path); } +#endif static char *print_ipprot(int t) { @@ -1323,8 +1327,10 @@ return 0; } +#if defined(BUILD_IPv6) /* Link-Local address prefix fe80::/64 */ static const uint8_t ll_prefix[] = { 0xfe,0x80, 0,0, 0,0, 0,0 }; +#endif /* Callback for receiving messages from tun */ static int cb_tun_ind(struct tun_t *tun, void *pack, unsigned len) @@ -1332,7 +1338,9 @@ struct iphash_t *ipm; struct in46_addr src; struct iphdr *iph = (struct iphdr *)pack; +#if defined(BUILD_IPv6) struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; +#endif if (iph->version == 4) { if (len < sizeof(*iph) || len < 4*iph->ihl) { @@ -1341,6 +1349,7 @@ } src.len = 4; src.v4.s_addr = iph->saddr; +#if defined(BUILD_IPv6) } else if (iph->version == 6) { /* We only have a single entry in the hash table, and it consists of the link-local * address "fe80::prefix". So we need to make sure to convert non-link-local source @@ -1355,6 +1364,7 @@ memcpy(&src.v6.s6_addr[0], ll_prefix, sizeof(ll_prefix)); memcpy(&src.v6.s6_addr[sizeof(ll_prefix)], ip6h->ip6_src.s6_addr, 16-sizeof(ll_prefix)); } +#endif } else { printf("Dropping packet with invalid IP version %u\n", iph->version); return 0; @@ -1416,6 +1426,7 @@ in46a_ntoa(&addr)); switch (addr.len) { +#if defined(BUILD_IPv6) case 16: /* IPv6 */ /* we have to enable the kernel to perform stateless autoconfiguration, * i.e. send a router solicitation using the lover 64bits of the allocated @@ -1423,6 +1434,7 @@ memcpy(addr.v6.s6_addr, ll_prefix, sizeof(ll_prefix)); printf("Derived IPv6 link-local address: %s\n", in46a_ntoa(&addr)); break; +#endif case 4: /* IPv4 */ break; } @@ -1443,6 +1455,7 @@ tun_runscript(tun, options.ipup); } +#if defined(BUILD_IPv6) /* now that ip-up has been executed, check if we are configured to * accept router advertisements */ if (options.createif && options.pdp_type == PDP_EUA_TYPE_v6) { @@ -1463,6 +1476,7 @@ free(accept_ra); free(forwarding); } +#endif ipset((struct iphash_t *)pdp->peer, &addr); diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index c0bb670..991c164 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -15,6 +15,8 @@ #include "../../lib/in46_addr.h" #include "../../lib/syserr.h" +#include "config.h" + static const struct in46_addr g_ia4 = { .len = 4, .v4.s_addr = 0x0d0c0b0a, @@ -214,6 +216,8 @@ OSMO_ASSERT(len == 0); } +#if defined(BUILD_IPv6) + /* IPv6 specific tests */ static const struct in46_addr g_ia6 = { @@ -353,6 +357,8 @@ OSMO_ASSERT(len == 0); } +#endif /* BUILD_IPv6 */ + int main(int argc, char **argv) { osmo_init_logging(&log_info); @@ -372,6 +378,7 @@ test_in46a_from_eua(); test_in46a_netmasklen(); } else { +#if defined(BUILD_IPv6) test_in46a_to_af_v6(); test_in46a_to_sas_v6(); test_in46a_ntop_v6(); @@ -379,6 +386,9 @@ test_in46a_to_eua_v6(); test_in46a_from_eua_v6(); test_in46a_netmasklen_v6(); +#else + return EXIT_FAILURE; +#endif } return 0; } diff --git a/tests/lib/ippool_test.c b/tests/lib/ippool_test.c index 8d3f46c..f55494b 100644 --- a/tests/lib/ippool_test.c +++ b/tests/lib/ippool_test.c @@ -12,6 +12,8 @@ #include "../../lib/ippool.h" #include "../../lib/syserr.h" +#include "config.h" + static struct ippool_t *create_pool(const char *prefix_str, unsigned int flags, char **blacklist, size_t blacklist_size) { @@ -118,11 +120,13 @@ test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, blacklist, 3, 253); } +#if defined(BUILD_IPv6) static void test_pool_sizes_v6(void) { /* 256 prefixes of /64 each */ test_pool_size("2001:DB8::/56", 0, NULL, 0, 256); } +#endif /* BUILD_IPv6 */ int main(int argc, char **argv) { @@ -135,7 +139,11 @@ if (argc < 2 || strcmp(argv[1], "-v6")) { test_pool_sizes(); } else { +#if defined(BUILD_IPv6) test_pool_sizes_v6(); +#else + return EXIT_FAILURE; +#endif } return 0; } diff --git a/tests/testsuite.at b/tests/testsuite.at index fa94db3..464a6e5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -10,6 +10,7 @@ AT_SETUP([ippool_v6]) AT_KEYWORDS([ippool_v6]) +AT_SKIP_IF([! grep "#define BUILD_IPv6" $abs_top_builddir/config.h]) cat $abs_srcdir/lib/ippool_v6_test.ok > expout cat $abs_srcdir/lib/ippool_v6_test.err > experr AT_CHECK([$abs_top_builddir/tests/lib/ippool_test -v6], [], [expout], [experr]) @@ -23,6 +24,7 @@ AT_SETUP([in46a_v6]) AT_KEYWORDS([in46a_v6]) +AT_SKIP_IF([! grep "#define BUILD_IPv6" $abs_top_builddir/config.h]) cat $abs_srcdir/lib/in46a_v6_test.ok > expout AT_CHECK([$abs_top_builddir/tests/lib/in46a_test -v6], [], [expout], []) AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:26:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:26:23 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn.c: Print version of unhandled ip packet Message-ID: Review at https://gerrit.osmocom.org/5160 ggsn.c: Print version of unhandled ip packet Change-Id: I7e226a12b074c96c572f90e3aaf62716d0cd47c5 --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/60/5160/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 0beaef7..763a2c5 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -653,7 +653,7 @@ dst.v6 = ip6h->ip6_dst; pool = apn->v6.pool; } else { - LOGP(DTUN, LOGL_NOTICE, "non-IPv packet received from tun\n"); + LOGP(DTUN, LOGL_NOTICE, "non-IPv%u packet received from tun\n", iph->version); return -1; } -- To view, visit https://gerrit.osmocom.org/5160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e226a12b074c96c572f90e3aaf62716d0cd47c5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:26:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:26:23 +0000 Subject: [PATCH] osmo-ggsn[master]: Remove unused empty src/Makefile.in Message-ID: Review at https://gerrit.osmocom.org/5161 Remove unused empty src/Makefile.in Change-Id: I207362e055dbfafc42fad2cfdd0cf1da9dcad88b --- D src/Makefile.in 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/61/5161/1 diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index e69de29..0000000 --- a/src/Makefile.in +++ /dev/null -- To view, visit https://gerrit.osmocom.org/5161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I207362e055dbfafc42fad2cfdd0cf1da9dcad88b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:26:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:26:23 +0000 Subject: [PATCH] osmo-ggsn[master]: tests: Split ipv6 specific tests into a new test group Message-ID: Review at https://gerrit.osmocom.org/5162 tests: Split ipv6 specific tests into a new test group This way they can be easily disabled later on when IPv6 support is made optional. Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef --- M tests/lib/Makefile.am M tests/lib/in46a_test.c M tests/lib/in46a_test.ok A tests/lib/in46a_v6_test.ok M tests/lib/ippool_test.c M tests/lib/ippool_test.err M tests/lib/ippool_test.ok A tests/lib/ippool_v6_test.err A tests/lib/ippool_v6_test.ok M tests/testsuite.at 10 files changed, 440 insertions(+), 352 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/62/5162/1 diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 95d6901..ee46468 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -1,7 +1,11 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/include $(LIBOSMOCORE_CFLAGS) -g -EXTRA_DIST = ippool_test.ok ippool_test.err \ - in46a_test.ok +EXTRA_DIST = ippool_test.ok \ + ippool_test.err \ + ippool_v6_test.ok \ + ippool_v6_test.err \ + in46a_test.ok \ + in46a_v6_test.ok noinst_PROGRAMS = ippool_test in46a_test diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index d4a5dbc..c0bb670 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -20,41 +20,24 @@ .v4.s_addr = 0x0d0c0b0a, }; -static const struct in46_addr g_ia6 = { - .len = 16, - .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, -}; - static void test_in46a_to_af(void) { - struct in46_addr ia; - - printf("Testing in46a_to_af()\n"); + printf("Testing in46a_to_af() with IPv4 addresses\n"); OSMO_ASSERT(in46a_to_af(&g_ia4) == AF_INET); - OSMO_ASSERT(in46a_to_af(&g_ia6) == AF_INET6); - - ia.len = 8; - OSMO_ASSERT(in46a_to_af(&ia) == AF_INET6); } static void test_in46a_to_sas(void) { struct sockaddr_storage ss; struct sockaddr_in *sin = (struct sockaddr_in *) &ss; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss; - printf("Testing in46a_to_sas()\n"); + printf("Testing in46a_to_sas() with IPv4 addresses\n"); memset(&ss, 0, sizeof(ss)); OSMO_ASSERT(in46a_to_sas(&ss, &g_ia4) == 0); OSMO_ASSERT(sin->sin_family == AF_INET); OSMO_ASSERT(sin->sin_addr.s_addr == g_ia4.v4.s_addr); - - memset(&ss, 0, sizeof(ss)); - OSMO_ASSERT(in46a_to_sas(&ss, &g_ia6) == 0); - OSMO_ASSERT(sin6->sin6_family == AF_INET6); - OSMO_ASSERT(!memcmp(&sin6->sin6_addr, &g_ia6.v6, sizeof(sin6->sin6_addr))); } static void test_in46a_ntop(void) @@ -63,7 +46,7 @@ char buf[256]; const char *res; - printf("Testing in46a_ntop()\n"); + printf("Testing in46a_ntop() with IPv4 addresses\n"); res = in46a_ntop(NULL, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "UNDEFINED")); @@ -78,10 +61,6 @@ ia.v4.s_addr = htonl(0x01020304); res = in46a_ntop(&ia, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "1.2.3.4")); - printf("res = %s\n", res); - - res = in46a_ntop(&g_ia6, buf, sizeof(buf)); - OSMO_ASSERT(res && !strcmp(res, "102:304:506:708:90a:b0c:d0e:f10")); printf("res = %s\n", res); } @@ -101,20 +80,13 @@ { struct in46_addr b; - printf("Testing in46a_equal()\n"); + printf("Testing in46a_equal() with IPv4 addresses\n"); memset(&b, 0xff, sizeof(b)); b.len = g_ia4.len; b.v4.s_addr = g_ia4.v4.s_addr; OSMO_ASSERT(in46a_equal(&g_ia4, &b)); - - memset(&b, 0xff, sizeof(b)); - b.len = g_ia6.len; - b.v6 = g_ia6.v6; - OSMO_ASSERT(in46a_equal(&g_ia6, &b)); - } - static int log_in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen) @@ -134,7 +106,7 @@ { struct in46_addr addr, mask; - printf("Testing in46a_within_mask()\n"); + printf("Testing in46a_within_mask() with IPv4 addresses\n"); addr = g_ia4; mask = g_ia4; @@ -155,13 +127,9 @@ static void test_in46a_to_eua(void) { - const struct in46_addr ia_v6_8 = { - .len = 8, - .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, - }; struct ul66_t eua; - printf("testing in46a_to_eua()\n"); + printf("testing in46a_to_eua() with IPv4 addresses\n"); #if 0 /* triggers assert in current implementation */ const struct in46_addr ia_invalid = { .len = 3, }; @@ -173,18 +141,6 @@ OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); - - /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); - OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); - OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); - OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); - - /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); - OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); - OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); - OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); } static void test_in46a_from_eua(void) @@ -193,13 +149,9 @@ struct ul66_t eua; const uint8_t v4_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4 }; const uint8_t v4_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4, 1,2,3,4 }; - const uint8_t v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6 }; - const uint8_t v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6, - 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; - memset(&eua, 0, sizeof(eua)); - printf("Testing in46a_from_eua()\n"); + printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); @@ -231,20 +183,6 @@ OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); - - /* unspecified V6 */ - memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); - eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); - OSMO_ASSERT(ia.len == 16); - OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); - - /* specified V6 */ - memcpy(eua.v, v6_spec, sizeof(v6_spec)); - eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); - OSMO_ASSERT(ia.len == 16); - OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); } static void test_in46a_netmasklen(void) @@ -274,7 +212,117 @@ netmask.v4.s_addr = 0x00000000; len = in46a_netmasklen(&netmask); OSMO_ASSERT(len == 0); +} +/* IPv6 specific tests */ + +static const struct in46_addr g_ia6 = { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, +}; + +static void test_in46a_to_af_v6(void) +{ + struct in46_addr ia; + + printf("Testing in46a_to_af() with IPv6 addresses\n"); + + OSMO_ASSERT(in46a_to_af(&g_ia6) == AF_INET6); + + ia.len = 8; + OSMO_ASSERT(in46a_to_af(&ia) == AF_INET6); +} + +static void test_in46a_to_sas_v6(void) +{ + struct sockaddr_storage ss; + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss; + + printf("Testing in46a_to_sas() with IPv6 addresses\n"); + + memset(&ss, 0, sizeof(ss)); + OSMO_ASSERT(in46a_to_sas(&ss, &g_ia6) == 0); + OSMO_ASSERT(sin6->sin6_family == AF_INET6); + OSMO_ASSERT(!memcmp(&sin6->sin6_addr, &g_ia6.v6, sizeof(sin6->sin6_addr))); +} + +static void test_in46a_ntop_v6(void) +{ + char buf[256]; + const char *res; + + printf("Testing in46a_ntop() with IPv6 addresses\n"); + + res = in46a_ntop(&g_ia6, buf, sizeof(buf)); + OSMO_ASSERT(res && !strcmp(res, "102:304:506:708:90a:b0c:d0e:f10")); + printf("res = %s\n", res); +} + +static void test_in46a_equal_v6(void) +{ + struct in46_addr b; + + printf("Testing in46a_equal() with IPv6 addresses\n"); + + memset(&b, 0xff, sizeof(b)); + b.len = g_ia6.len; + b.v6 = g_ia6.v6; + OSMO_ASSERT(in46a_equal(&g_ia6, &b)); +} + +static void test_in46a_to_eua_v6(void) +{ + const struct in46_addr ia_v6_8 = { + .len = 8, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }; + struct ul66_t eua; + + printf("testing in46a_to_eua() with IPv6 addresses\n"); + + /* IPv6 address */ + OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); + OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); + + /* IPv6 address with prefix / length 8 */ + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); + OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_from_eua_v6(void) +{ + struct in46_addr ia; + struct ul66_t eua; + const uint8_t v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6 }; + const uint8_t v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6, + 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv6 addresses\n"); + + /* unspecified V6 */ + memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); + eua.l = sizeof(v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(ia.len == 16); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); + + /* specified V6 */ + memcpy(eua.v, v6_spec, sizeof(v6_spec)); + eua.l = sizeof(v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(ia.len == 16); + OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_netmasklen_v6(void) +{ + unsigned int len; printf("Testing in46a_netmasklen() with IPv6 addresses\n"); const struct in46_addr netmaskA = { .len = 16, @@ -313,14 +361,24 @@ srand(time(NULL)); - test_in46a_to_af(); - test_in46a_to_sas(); - test_in46a_ntop(); - test_in46p_ntoa(); - test_in46a_equal(); - test_in46a_within_mask(); - test_in46a_to_eua(); - test_in46a_from_eua(); - test_in46a_netmasklen(); + if (argc < 2 || strcmp(argv[1], "-v6")) { + test_in46a_to_af(); + test_in46a_to_sas(); + test_in46a_ntop(); + test_in46p_ntoa(); + test_in46a_equal(); + test_in46a_within_mask(); + test_in46a_to_eua(); + test_in46a_from_eua(); + test_in46a_netmasklen(); + } else { + test_in46a_to_af_v6(); + test_in46a_to_sas_v6(); + test_in46a_ntop_v6(); + test_in46a_equal_v6(); + test_in46a_to_eua_v6(); + test_in46a_from_eua_v6(); + test_in46a_netmasklen_v6(); + } return 0; } diff --git a/tests/lib/in46a_test.ok b/tests/lib/in46a_test.ok index 9a0ff7a..b497ad1 100644 --- a/tests/lib/in46a_test.ok +++ b/tests/lib/in46a_test.ok @@ -1,19 +1,17 @@ -Testing in46a_to_af() -Testing in46a_to_sas() -Testing in46a_ntop() +Testing in46a_to_af() with IPv4 addresses +Testing in46a_to_sas() with IPv4 addresses +Testing in46a_ntop() with IPv4 addresses res = UNDEFINED res = UNDEFINED res = 1.2.3.4 -res = 102:304:506:708:90a:b0c:d0e:f10 in46p_ntoa() returns 16.32.48.0/24 -Testing in46a_equal() -Testing in46a_within_mask() +Testing in46a_equal() with IPv4 addresses +Testing in46a_within_mask() with IPv4 addresses in46a_within_mask(10.11.12.13, 10.11.12.13, 32) = 1 in46a_within_mask(10.11.12.13, 10.11.12.12, 30) = 1 in46a_within_mask(10.11.12.13, 10.8.0.0, 13) = 1 in46a_within_mask(10.11.12.14, 10.11.12.13, 32) = 0 in46a_within_mask(10.11.12.14, 10.11.12.12, 30) = 1 -testing in46a_to_eua() -Testing in46a_from_eua() +testing in46a_to_eua() with IPv4 addresses +Testing in46a_from_eua() with IPv4 addresses Testing in46a_netmasklen() with IPv4 addresses -Testing in46a_netmasklen() with IPv6 addresses diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok new file mode 100644 index 0000000..d092591 --- /dev/null +++ b/tests/lib/in46a_v6_test.ok @@ -0,0 +1,8 @@ +Testing in46a_to_af() with IPv6 addresses +Testing in46a_to_sas() with IPv6 addresses +Testing in46a_ntop() with IPv6 addresses +res = 102:304:506:708:90a:b0c:d0e:f10 +Testing in46a_equal() with IPv6 addresses +testing in46a_to_eua() with IPv6 addresses +Testing in46a_from_eua() with IPv6 addresses +Testing in46a_netmasklen() with IPv6 addresses diff --git a/tests/lib/ippool_test.c b/tests/lib/ippool_test.c index 5b3227c..8d3f46c 100644 --- a/tests/lib/ippool_test.c +++ b/tests/lib/ippool_test.c @@ -113,12 +113,15 @@ /* 65534 addresses [0.1..255.254] */ test_pool_size("192.168.0.0/16", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, NULL, 0, 65534); - /* 256 prefixes of /64 each */ - test_pool_size("2001:DB8::/56", 0, NULL, 0, 256); - /* 253 addresses [1..254] & exclude 192.168.23.1/24 */ char *blacklist[] = {"176.16.222.10/24", "192.168.23.1/24", "192.168.38.2/24"}; test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, blacklist, 3, 253); +} + +static void test_pool_sizes_v6(void) +{ + /* 256 prefixes of /64 each */ + test_pool_size("2001:DB8::/56", 0, NULL, 0, 256); } int main(int argc, char **argv) @@ -129,6 +132,10 @@ srand(time(NULL)); - test_pool_sizes(); + if (argc < 2 || strcmp(argv[1], "-v6")) { + test_pool_sizes(); + } else { + test_pool_sizes_v6(); + } return 0; } diff --git a/tests/lib/ippool_test.err b/tests/lib/ippool_test.err index b11c12a..7dc5371 100644 --- a/tests/lib/ippool_test.err +++ b/tests/lib/ippool_test.err @@ -8,5 +8,3 @@ No more IP addresses available No more IP addresses available No more IP addresses available -No more IP addresses available -No more IP addresses available diff --git a/tests/lib/ippool_test.ok b/tests/lib/ippool_test.ok index 263494e..d247c74 100644 --- a/tests/lib/ippool_test.ok +++ b/tests/lib/ippool_test.ok @@ -66301,263 +66301,6 @@ allocated address 192.168.255.252 allocated address 192.168.255.253 allocated address 192.168.255.254 -testing pool for prefix 2001:DB8::/56, flags=0x0, blacklist_size=0, expected_size=256 -allocated address 2001:db8:: -allocated address 2001:db8:0:1:: -allocated address 2001:db8:0:2:: -allocated address 2001:db8:0:3:: -allocated address 2001:db8:0:4:: -allocated address 2001:db8:0:5:: -allocated address 2001:db8:0:6:: -allocated address 2001:db8:0:7:: -allocated address 2001:db8:0:8:: -allocated address 2001:db8:0:9:: -allocated address 2001:db8:0:a:: -allocated address 2001:db8:0:b:: -allocated address 2001:db8:0:c:: -allocated address 2001:db8:0:d:: -allocated address 2001:db8:0:e:: -allocated address 2001:db8:0:f:: -allocated address 2001:db8:0:10:: -allocated address 2001:db8:0:11:: -allocated address 2001:db8:0:12:: -allocated address 2001:db8:0:13:: -allocated address 2001:db8:0:14:: -allocated address 2001:db8:0:15:: -allocated address 2001:db8:0:16:: -allocated address 2001:db8:0:17:: -allocated address 2001:db8:0:18:: -allocated address 2001:db8:0:19:: -allocated address 2001:db8:0:1a:: -allocated address 2001:db8:0:1b:: -allocated address 2001:db8:0:1c:: -allocated address 2001:db8:0:1d:: -allocated address 2001:db8:0:1e:: -allocated address 2001:db8:0:1f:: -allocated address 2001:db8:0:20:: -allocated address 2001:db8:0:21:: -allocated address 2001:db8:0:22:: -allocated address 2001:db8:0:23:: -allocated address 2001:db8:0:24:: -allocated address 2001:db8:0:25:: -allocated address 2001:db8:0:26:: -allocated address 2001:db8:0:27:: -allocated address 2001:db8:0:28:: -allocated address 2001:db8:0:29:: -allocated address 2001:db8:0:2a:: -allocated address 2001:db8:0:2b:: -allocated address 2001:db8:0:2c:: -allocated address 2001:db8:0:2d:: -allocated address 2001:db8:0:2e:: -allocated address 2001:db8:0:2f:: -allocated address 2001:db8:0:30:: -allocated address 2001:db8:0:31:: -allocated address 2001:db8:0:32:: -allocated address 2001:db8:0:33:: -allocated address 2001:db8:0:34:: -allocated address 2001:db8:0:35:: -allocated address 2001:db8:0:36:: -allocated address 2001:db8:0:37:: -allocated address 2001:db8:0:38:: -allocated address 2001:db8:0:39:: -allocated address 2001:db8:0:3a:: -allocated address 2001:db8:0:3b:: -allocated address 2001:db8:0:3c:: -allocated address 2001:db8:0:3d:: -allocated address 2001:db8:0:3e:: -allocated address 2001:db8:0:3f:: -allocated address 2001:db8:0:40:: -allocated address 2001:db8:0:41:: -allocated address 2001:db8:0:42:: -allocated address 2001:db8:0:43:: -allocated address 2001:db8:0:44:: -allocated address 2001:db8:0:45:: -allocated address 2001:db8:0:46:: -allocated address 2001:db8:0:47:: -allocated address 2001:db8:0:48:: -allocated address 2001:db8:0:49:: -allocated address 2001:db8:0:4a:: -allocated address 2001:db8:0:4b:: -allocated address 2001:db8:0:4c:: -allocated address 2001:db8:0:4d:: -allocated address 2001:db8:0:4e:: -allocated address 2001:db8:0:4f:: -allocated address 2001:db8:0:50:: -allocated address 2001:db8:0:51:: -allocated address 2001:db8:0:52:: -allocated address 2001:db8:0:53:: -allocated address 2001:db8:0:54:: -allocated address 2001:db8:0:55:: -allocated address 2001:db8:0:56:: -allocated address 2001:db8:0:57:: -allocated address 2001:db8:0:58:: -allocated address 2001:db8:0:59:: -allocated address 2001:db8:0:5a:: -allocated address 2001:db8:0:5b:: -allocated address 2001:db8:0:5c:: -allocated address 2001:db8:0:5d:: -allocated address 2001:db8:0:5e:: -allocated address 2001:db8:0:5f:: -allocated address 2001:db8:0:60:: -allocated address 2001:db8:0:61:: -allocated address 2001:db8:0:62:: -allocated address 2001:db8:0:63:: -allocated address 2001:db8:0:64:: -allocated address 2001:db8:0:65:: -allocated address 2001:db8:0:66:: -allocated address 2001:db8:0:67:: -allocated address 2001:db8:0:68:: -allocated address 2001:db8:0:69:: -allocated address 2001:db8:0:6a:: -allocated address 2001:db8:0:6b:: -allocated address 2001:db8:0:6c:: -allocated address 2001:db8:0:6d:: -allocated address 2001:db8:0:6e:: -allocated address 2001:db8:0:6f:: -allocated address 2001:db8:0:70:: -allocated address 2001:db8:0:71:: -allocated address 2001:db8:0:72:: -allocated address 2001:db8:0:73:: -allocated address 2001:db8:0:74:: -allocated address 2001:db8:0:75:: -allocated address 2001:db8:0:76:: -allocated address 2001:db8:0:77:: -allocated address 2001:db8:0:78:: -allocated address 2001:db8:0:79:: -allocated address 2001:db8:0:7a:: -allocated address 2001:db8:0:7b:: -allocated address 2001:db8:0:7c:: -allocated address 2001:db8:0:7d:: -allocated address 2001:db8:0:7e:: -allocated address 2001:db8:0:7f:: -allocated address 2001:db8:0:80:: -allocated address 2001:db8:0:81:: -allocated address 2001:db8:0:82:: -allocated address 2001:db8:0:83:: -allocated address 2001:db8:0:84:: -allocated address 2001:db8:0:85:: -allocated address 2001:db8:0:86:: -allocated address 2001:db8:0:87:: -allocated address 2001:db8:0:88:: -allocated address 2001:db8:0:89:: -allocated address 2001:db8:0:8a:: -allocated address 2001:db8:0:8b:: -allocated address 2001:db8:0:8c:: -allocated address 2001:db8:0:8d:: -allocated address 2001:db8:0:8e:: -allocated address 2001:db8:0:8f:: -allocated address 2001:db8:0:90:: -allocated address 2001:db8:0:91:: -allocated address 2001:db8:0:92:: -allocated address 2001:db8:0:93:: -allocated address 2001:db8:0:94:: -allocated address 2001:db8:0:95:: -allocated address 2001:db8:0:96:: -allocated address 2001:db8:0:97:: -allocated address 2001:db8:0:98:: -allocated address 2001:db8:0:99:: -allocated address 2001:db8:0:9a:: -allocated address 2001:db8:0:9b:: -allocated address 2001:db8:0:9c:: -allocated address 2001:db8:0:9d:: -allocated address 2001:db8:0:9e:: -allocated address 2001:db8:0:9f:: -allocated address 2001:db8:0:a0:: -allocated address 2001:db8:0:a1:: -allocated address 2001:db8:0:a2:: -allocated address 2001:db8:0:a3:: -allocated address 2001:db8:0:a4:: -allocated address 2001:db8:0:a5:: -allocated address 2001:db8:0:a6:: -allocated address 2001:db8:0:a7:: -allocated address 2001:db8:0:a8:: -allocated address 2001:db8:0:a9:: -allocated address 2001:db8:0:aa:: -allocated address 2001:db8:0:ab:: -allocated address 2001:db8:0:ac:: -allocated address 2001:db8:0:ad:: -allocated address 2001:db8:0:ae:: -allocated address 2001:db8:0:af:: -allocated address 2001:db8:0:b0:: -allocated address 2001:db8:0:b1:: -allocated address 2001:db8:0:b2:: -allocated address 2001:db8:0:b3:: -allocated address 2001:db8:0:b4:: -allocated address 2001:db8:0:b5:: -allocated address 2001:db8:0:b6:: -allocated address 2001:db8:0:b7:: -allocated address 2001:db8:0:b8:: -allocated address 2001:db8:0:b9:: -allocated address 2001:db8:0:ba:: -allocated address 2001:db8:0:bb:: -allocated address 2001:db8:0:bc:: -allocated address 2001:db8:0:bd:: -allocated address 2001:db8:0:be:: -allocated address 2001:db8:0:bf:: -allocated address 2001:db8:0:c0:: -allocated address 2001:db8:0:c1:: -allocated address 2001:db8:0:c2:: -allocated address 2001:db8:0:c3:: -allocated address 2001:db8:0:c4:: -allocated address 2001:db8:0:c5:: -allocated address 2001:db8:0:c6:: -allocated address 2001:db8:0:c7:: -allocated address 2001:db8:0:c8:: -allocated address 2001:db8:0:c9:: -allocated address 2001:db8:0:ca:: -allocated address 2001:db8:0:cb:: -allocated address 2001:db8:0:cc:: -allocated address 2001:db8:0:cd:: -allocated address 2001:db8:0:ce:: -allocated address 2001:db8:0:cf:: -allocated address 2001:db8:0:d0:: -allocated address 2001:db8:0:d1:: -allocated address 2001:db8:0:d2:: -allocated address 2001:db8:0:d3:: -allocated address 2001:db8:0:d4:: -allocated address 2001:db8:0:d5:: -allocated address 2001:db8:0:d6:: -allocated address 2001:db8:0:d7:: -allocated address 2001:db8:0:d8:: -allocated address 2001:db8:0:d9:: -allocated address 2001:db8:0:da:: -allocated address 2001:db8:0:db:: -allocated address 2001:db8:0:dc:: -allocated address 2001:db8:0:dd:: -allocated address 2001:db8:0:de:: -allocated address 2001:db8:0:df:: -allocated address 2001:db8:0:e0:: -allocated address 2001:db8:0:e1:: -allocated address 2001:db8:0:e2:: -allocated address 2001:db8:0:e3:: -allocated address 2001:db8:0:e4:: -allocated address 2001:db8:0:e5:: -allocated address 2001:db8:0:e6:: -allocated address 2001:db8:0:e7:: -allocated address 2001:db8:0:e8:: -allocated address 2001:db8:0:e9:: -allocated address 2001:db8:0:ea:: -allocated address 2001:db8:0:eb:: -allocated address 2001:db8:0:ec:: -allocated address 2001:db8:0:ed:: -allocated address 2001:db8:0:ee:: -allocated address 2001:db8:0:ef:: -allocated address 2001:db8:0:f0:: -allocated address 2001:db8:0:f1:: -allocated address 2001:db8:0:f2:: -allocated address 2001:db8:0:f3:: -allocated address 2001:db8:0:f4:: -allocated address 2001:db8:0:f5:: -allocated address 2001:db8:0:f6:: -allocated address 2001:db8:0:f7:: -allocated address 2001:db8:0:f8:: -allocated address 2001:db8:0:f9:: -allocated address 2001:db8:0:fa:: -allocated address 2001:db8:0:fb:: -allocated address 2001:db8:0:fc:: -allocated address 2001:db8:0:fd:: -allocated address 2001:db8:0:fe:: -allocated address 2001:db8:0:ff:: testing pool for prefix 192.168.23.0/24, flags=0x3, blacklist_size=3, expected_size=253 allocated address 192.168.23.2 allocated address 192.168.23.3 diff --git a/tests/lib/ippool_v6_test.err b/tests/lib/ippool_v6_test.err new file mode 100644 index 0000000..f0edefe --- /dev/null +++ b/tests/lib/ippool_v6_test.err @@ -0,0 +1,2 @@ +No more IP addresses available +No more IP addresses available diff --git a/tests/lib/ippool_v6_test.ok b/tests/lib/ippool_v6_test.ok new file mode 100644 index 0000000..19ea4d1 --- /dev/null +++ b/tests/lib/ippool_v6_test.ok @@ -0,0 +1,257 @@ +testing pool for prefix 2001:DB8::/56, flags=0x0, blacklist_size=0, expected_size=256 +allocated address 2001:db8:: +allocated address 2001:db8:0:1:: +allocated address 2001:db8:0:2:: +allocated address 2001:db8:0:3:: +allocated address 2001:db8:0:4:: +allocated address 2001:db8:0:5:: +allocated address 2001:db8:0:6:: +allocated address 2001:db8:0:7:: +allocated address 2001:db8:0:8:: +allocated address 2001:db8:0:9:: +allocated address 2001:db8:0:a:: +allocated address 2001:db8:0:b:: +allocated address 2001:db8:0:c:: +allocated address 2001:db8:0:d:: +allocated address 2001:db8:0:e:: +allocated address 2001:db8:0:f:: +allocated address 2001:db8:0:10:: +allocated address 2001:db8:0:11:: +allocated address 2001:db8:0:12:: +allocated address 2001:db8:0:13:: +allocated address 2001:db8:0:14:: +allocated address 2001:db8:0:15:: +allocated address 2001:db8:0:16:: +allocated address 2001:db8:0:17:: +allocated address 2001:db8:0:18:: +allocated address 2001:db8:0:19:: +allocated address 2001:db8:0:1a:: +allocated address 2001:db8:0:1b:: +allocated address 2001:db8:0:1c:: +allocated address 2001:db8:0:1d:: +allocated address 2001:db8:0:1e:: +allocated address 2001:db8:0:1f:: +allocated address 2001:db8:0:20:: +allocated address 2001:db8:0:21:: +allocated address 2001:db8:0:22:: +allocated address 2001:db8:0:23:: +allocated address 2001:db8:0:24:: +allocated address 2001:db8:0:25:: +allocated address 2001:db8:0:26:: +allocated address 2001:db8:0:27:: +allocated address 2001:db8:0:28:: +allocated address 2001:db8:0:29:: +allocated address 2001:db8:0:2a:: +allocated address 2001:db8:0:2b:: +allocated address 2001:db8:0:2c:: +allocated address 2001:db8:0:2d:: +allocated address 2001:db8:0:2e:: +allocated address 2001:db8:0:2f:: +allocated address 2001:db8:0:30:: +allocated address 2001:db8:0:31:: +allocated address 2001:db8:0:32:: +allocated address 2001:db8:0:33:: +allocated address 2001:db8:0:34:: +allocated address 2001:db8:0:35:: +allocated address 2001:db8:0:36:: +allocated address 2001:db8:0:37:: +allocated address 2001:db8:0:38:: +allocated address 2001:db8:0:39:: +allocated address 2001:db8:0:3a:: +allocated address 2001:db8:0:3b:: +allocated address 2001:db8:0:3c:: +allocated address 2001:db8:0:3d:: +allocated address 2001:db8:0:3e:: +allocated address 2001:db8:0:3f:: +allocated address 2001:db8:0:40:: +allocated address 2001:db8:0:41:: +allocated address 2001:db8:0:42:: +allocated address 2001:db8:0:43:: +allocated address 2001:db8:0:44:: +allocated address 2001:db8:0:45:: +allocated address 2001:db8:0:46:: +allocated address 2001:db8:0:47:: +allocated address 2001:db8:0:48:: +allocated address 2001:db8:0:49:: +allocated address 2001:db8:0:4a:: +allocated address 2001:db8:0:4b:: +allocated address 2001:db8:0:4c:: +allocated address 2001:db8:0:4d:: +allocated address 2001:db8:0:4e:: +allocated address 2001:db8:0:4f:: +allocated address 2001:db8:0:50:: +allocated address 2001:db8:0:51:: +allocated address 2001:db8:0:52:: +allocated address 2001:db8:0:53:: +allocated address 2001:db8:0:54:: +allocated address 2001:db8:0:55:: +allocated address 2001:db8:0:56:: +allocated address 2001:db8:0:57:: +allocated address 2001:db8:0:58:: +allocated address 2001:db8:0:59:: +allocated address 2001:db8:0:5a:: +allocated address 2001:db8:0:5b:: +allocated address 2001:db8:0:5c:: +allocated address 2001:db8:0:5d:: +allocated address 2001:db8:0:5e:: +allocated address 2001:db8:0:5f:: +allocated address 2001:db8:0:60:: +allocated address 2001:db8:0:61:: +allocated address 2001:db8:0:62:: +allocated address 2001:db8:0:63:: +allocated address 2001:db8:0:64:: +allocated address 2001:db8:0:65:: +allocated address 2001:db8:0:66:: +allocated address 2001:db8:0:67:: +allocated address 2001:db8:0:68:: +allocated address 2001:db8:0:69:: +allocated address 2001:db8:0:6a:: +allocated address 2001:db8:0:6b:: +allocated address 2001:db8:0:6c:: +allocated address 2001:db8:0:6d:: +allocated address 2001:db8:0:6e:: +allocated address 2001:db8:0:6f:: +allocated address 2001:db8:0:70:: +allocated address 2001:db8:0:71:: +allocated address 2001:db8:0:72:: +allocated address 2001:db8:0:73:: +allocated address 2001:db8:0:74:: +allocated address 2001:db8:0:75:: +allocated address 2001:db8:0:76:: +allocated address 2001:db8:0:77:: +allocated address 2001:db8:0:78:: +allocated address 2001:db8:0:79:: +allocated address 2001:db8:0:7a:: +allocated address 2001:db8:0:7b:: +allocated address 2001:db8:0:7c:: +allocated address 2001:db8:0:7d:: +allocated address 2001:db8:0:7e:: +allocated address 2001:db8:0:7f:: +allocated address 2001:db8:0:80:: +allocated address 2001:db8:0:81:: +allocated address 2001:db8:0:82:: +allocated address 2001:db8:0:83:: +allocated address 2001:db8:0:84:: +allocated address 2001:db8:0:85:: +allocated address 2001:db8:0:86:: +allocated address 2001:db8:0:87:: +allocated address 2001:db8:0:88:: +allocated address 2001:db8:0:89:: +allocated address 2001:db8:0:8a:: +allocated address 2001:db8:0:8b:: +allocated address 2001:db8:0:8c:: +allocated address 2001:db8:0:8d:: +allocated address 2001:db8:0:8e:: +allocated address 2001:db8:0:8f:: +allocated address 2001:db8:0:90:: +allocated address 2001:db8:0:91:: +allocated address 2001:db8:0:92:: +allocated address 2001:db8:0:93:: +allocated address 2001:db8:0:94:: +allocated address 2001:db8:0:95:: +allocated address 2001:db8:0:96:: +allocated address 2001:db8:0:97:: +allocated address 2001:db8:0:98:: +allocated address 2001:db8:0:99:: +allocated address 2001:db8:0:9a:: +allocated address 2001:db8:0:9b:: +allocated address 2001:db8:0:9c:: +allocated address 2001:db8:0:9d:: +allocated address 2001:db8:0:9e:: +allocated address 2001:db8:0:9f:: +allocated address 2001:db8:0:a0:: +allocated address 2001:db8:0:a1:: +allocated address 2001:db8:0:a2:: +allocated address 2001:db8:0:a3:: +allocated address 2001:db8:0:a4:: +allocated address 2001:db8:0:a5:: +allocated address 2001:db8:0:a6:: +allocated address 2001:db8:0:a7:: +allocated address 2001:db8:0:a8:: +allocated address 2001:db8:0:a9:: +allocated address 2001:db8:0:aa:: +allocated address 2001:db8:0:ab:: +allocated address 2001:db8:0:ac:: +allocated address 2001:db8:0:ad:: +allocated address 2001:db8:0:ae:: +allocated address 2001:db8:0:af:: +allocated address 2001:db8:0:b0:: +allocated address 2001:db8:0:b1:: +allocated address 2001:db8:0:b2:: +allocated address 2001:db8:0:b3:: +allocated address 2001:db8:0:b4:: +allocated address 2001:db8:0:b5:: +allocated address 2001:db8:0:b6:: +allocated address 2001:db8:0:b7:: +allocated address 2001:db8:0:b8:: +allocated address 2001:db8:0:b9:: +allocated address 2001:db8:0:ba:: +allocated address 2001:db8:0:bb:: +allocated address 2001:db8:0:bc:: +allocated address 2001:db8:0:bd:: +allocated address 2001:db8:0:be:: +allocated address 2001:db8:0:bf:: +allocated address 2001:db8:0:c0:: +allocated address 2001:db8:0:c1:: +allocated address 2001:db8:0:c2:: +allocated address 2001:db8:0:c3:: +allocated address 2001:db8:0:c4:: +allocated address 2001:db8:0:c5:: +allocated address 2001:db8:0:c6:: +allocated address 2001:db8:0:c7:: +allocated address 2001:db8:0:c8:: +allocated address 2001:db8:0:c9:: +allocated address 2001:db8:0:ca:: +allocated address 2001:db8:0:cb:: +allocated address 2001:db8:0:cc:: +allocated address 2001:db8:0:cd:: +allocated address 2001:db8:0:ce:: +allocated address 2001:db8:0:cf:: +allocated address 2001:db8:0:d0:: +allocated address 2001:db8:0:d1:: +allocated address 2001:db8:0:d2:: +allocated address 2001:db8:0:d3:: +allocated address 2001:db8:0:d4:: +allocated address 2001:db8:0:d5:: +allocated address 2001:db8:0:d6:: +allocated address 2001:db8:0:d7:: +allocated address 2001:db8:0:d8:: +allocated address 2001:db8:0:d9:: +allocated address 2001:db8:0:da:: +allocated address 2001:db8:0:db:: +allocated address 2001:db8:0:dc:: +allocated address 2001:db8:0:dd:: +allocated address 2001:db8:0:de:: +allocated address 2001:db8:0:df:: +allocated address 2001:db8:0:e0:: +allocated address 2001:db8:0:e1:: +allocated address 2001:db8:0:e2:: +allocated address 2001:db8:0:e3:: +allocated address 2001:db8:0:e4:: +allocated address 2001:db8:0:e5:: +allocated address 2001:db8:0:e6:: +allocated address 2001:db8:0:e7:: +allocated address 2001:db8:0:e8:: +allocated address 2001:db8:0:e9:: +allocated address 2001:db8:0:ea:: +allocated address 2001:db8:0:eb:: +allocated address 2001:db8:0:ec:: +allocated address 2001:db8:0:ed:: +allocated address 2001:db8:0:ee:: +allocated address 2001:db8:0:ef:: +allocated address 2001:db8:0:f0:: +allocated address 2001:db8:0:f1:: +allocated address 2001:db8:0:f2:: +allocated address 2001:db8:0:f3:: +allocated address 2001:db8:0:f4:: +allocated address 2001:db8:0:f5:: +allocated address 2001:db8:0:f6:: +allocated address 2001:db8:0:f7:: +allocated address 2001:db8:0:f8:: +allocated address 2001:db8:0:f9:: +allocated address 2001:db8:0:fa:: +allocated address 2001:db8:0:fb:: +allocated address 2001:db8:0:fc:: +allocated address 2001:db8:0:fd:: +allocated address 2001:db8:0:fe:: +allocated address 2001:db8:0:ff:: diff --git a/tests/testsuite.at b/tests/testsuite.at index f365f95..fa94db3 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -8,12 +8,25 @@ AT_CHECK([$abs_top_builddir/tests/lib/ippool_test], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([ippool_v6]) +AT_KEYWORDS([ippool_v6]) +cat $abs_srcdir/lib/ippool_v6_test.ok > expout +cat $abs_srcdir/lib/ippool_v6_test.err > experr +AT_CHECK([$abs_top_builddir/tests/lib/ippool_test -v6], [], [expout], [experr]) +AT_CLEANUP + AT_SETUP([in46a]) AT_KEYWORDS([in46a]) cat $abs_srcdir/lib/in46a_test.ok > expout AT_CHECK([$abs_top_builddir/tests/lib/in46a_test], [], [expout], []) AT_CLEANUP +AT_SETUP([in46a_v6]) +AT_KEYWORDS([in46a_v6]) +cat $abs_srcdir/lib/in46a_v6_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/lib/in46a_test -v6], [], [expout], []) +AT_CLEANUP + AT_SETUP([gtpie]) AT_KEYWORDS([gtpie]) cat $abs_srcdir/gtp/gtpie_test.ok > expout -- To view, visit https://gerrit.osmocom.org/5162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:29:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:29:03 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 2: With this new version tests are passing both with "--disable-ipv6" flag and with "--enable-ipv6" (default) flag. I tested locally with an osmo-bts-trx and a mobile phone that GPRS was working fine in both cases. TODO: - Modify osmo-ggsn to build both with "disable-ipv6" flag and "enable-ipv6" flag. I think I need to modify osmo-ci. -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:44:56 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:44:56 +0000 Subject: [PATCH] osmo-ggsn[master]: contrib: Add IPv6 build option Message-ID: Review at https://gerrit.osmocom.org/5163 contrib: Add IPv6 build option Change-Id: Id62f186d93bb0165764d9d25fbee2d359df79149 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/63/5163/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4437541..bb1dd8b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ cd "$base" autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP +./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP $IPv6 $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/5163 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id62f186d93bb0165764d9d25fbee2d359df79149 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:47:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:47:39 +0000 Subject: [PATCH] osmo-ci[master]: jobs: Fix osmo-ggsn GTP build option Message-ID: Review at https://gerrit.osmocom.org/5164 jobs: Fix osmo-ggsn GTP build option As far as I understand, the variable is populated using the name field. In openggsn build it matches, but it doesn't in osmo-ggsn. Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/64/5164/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index da80e62..3de5093 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -104,7 +104,7 @@ cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - osmo-ggsn: - a1_name: gtp-linux + a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index b127069..711bc0e 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -154,7 +154,7 @@ cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - osmo-ggsn: - a1_name: gtp-linux + a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh publishers: -- To view, visit https://gerrit.osmocom.org/5164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:47:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:47:40 +0000 Subject: [PATCH] osmo-ci[master]: jobs: Add IPv6 build option to osmo-ggsn job Message-ID: Review at https://gerrit.osmocom.org/5165 jobs: Add IPv6 build option to osmo-ggsn job Change-Id: I3f97bcd163b0458d00c0def7982cdaa349f08747 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/65/5165/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 3de5093..d27fa62 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -106,7 +106,9 @@ - osmo-ggsn: a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] - cmd: GTP="$GTP" ./contrib/jenkins.sh + a2_name: IPv6 + a2: !!python/tuple [--enable-ipv6, --disable-ipv6] + cmd: GTP="$GTP" IPv6="$IPv6" ./contrib/jenkins.sh - osmo-gsm-manuals diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 711bc0e..5f305f3 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -156,7 +156,9 @@ - osmo-ggsn: a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] - cmd: GTP="$GTP" ./contrib/jenkins.sh + a2_name: IPv6 + a2: !!python/tuple [--enable-ipv6, --disable-ipv6] + cmd: GTP="$GTP" IPv6="$IPv6" ./contrib/jenkins.sh publishers: downstream-ext: projects: -- To view, visit https://gerrit.osmocom.org/5165 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f97bcd163b0458d00c0def7982cdaa349f08747 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:48:17 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 12:48:17 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 > I don't have equipment right now to test this, but the code looks > good on the first glance. > > Just one comment - is this requirement of sending the first frame > number documented in the parameters of the relevant functions? That > would be great to have it there to avoid mistakes in future. I have tried it out, I could reproduce the problem. With the patch it works fine again. I have tested it on TS0-7 in TCH/H and TCH/F mode. -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 12:48:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 12:48:59 +0000 Subject: osmo-ggsn[master]: contrib: Add IPv6 build option In-Reply-To: References: Message-ID: Patch Set 1: patch adding the option in osmo-ci can be found in https://gerrit.osmocom.org/#/c/5165/ -- To view, visit https://gerrit.osmocom.org/5163 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id62f186d93bb0165764d9d25fbee2d359df79149 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:18:11 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 4 Dec 2017 13:18:11 +0000 Subject: [MERGED] osmo-trx[master]: UHDDevice.cpp: add USRP B205mini support In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: UHDDevice.cpp: add USRP B205mini support ...................................................................... UHDDevice.cpp: add USRP B205mini support The B205mini is similar to the B200mini and runs OsmoTRX just fine, so let's make OsmoTRX recogonize and support it too. Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 --- M Transceiver52M/UHDDevice.cpp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alexander Chemeris: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 778c772..09317a9 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -519,6 +519,7 @@ { "B100", { B100, TX_WINDOW_USRP1 } }, { "B200", { B200, TX_WINDOW_USRP1 } }, { "B200mini", { B200, TX_WINDOW_USRP1 } }, + { "B205mini", { B200, TX_WINDOW_USRP1 } }, { "B210", { B210, TX_WINDOW_USRP1 } }, { "E100", { E1XX, TX_WINDOW_FIXED } }, { "E110", { E1XX, TX_WINDOW_FIXED } }, -- To view, visit https://gerrit.osmocom.org/5150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:22:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:22:40 +0000 Subject: osmo-ggsn[master]: contrib: Add IPv6 build option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5163 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id62f186d93bb0165764d9d25fbee2d359df79149 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:22:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:22:52 +0000 Subject: osmo-ggsn[master]: ggsn.c: Print version of unhandled ip packet In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e226a12b074c96c572f90e3aaf62716d0cd47c5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:22:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:22:58 +0000 Subject: osmo-ggsn[master]: Remove unused empty src/Makefile.in In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I207362e055dbfafc42fad2cfdd0cf1da9dcad88b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:23:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:23:23 +0000 Subject: osmo-ggsn[master]: tests: Split ipv6 specific tests into a new test group In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:24:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:24:46 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 I think it's rather ugly to have the code full of #ifdef's. I'm really not sure if this is the way to go, sorry. -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:25:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:25:18 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:25:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:25:33 +0000 Subject: osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 13:25:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 13:25:34 +0000 Subject: [MERGED] osmo-bts[master]: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS ...................................................................... osmo-bts-trx: Fix reported frame number during PRIM_INFO_MEAS The upper layers (L1SAP, the common part of L1) *always* require frame numbers in the uplink direction to be reported as the frame number of the *first* burst, not the last burst of a given block. This is particularly important in the case of passing up measurement information, as we use this frame number to detect if the measurement interval for that specific timeslot has just ended (and hence we must process the measurements and send an uplink measurement report to the BSC. Before this patch, the measurement results were reported with the *last* frame number, which caused the common/measurement.c code never detect the end of a measurement window. On TS2, tons of the following log messages were observed: <0004> measurement.c:199 (bts=0,trx=0,ts=2,ss=0) no space for uplink measurement, num_ul_meas=104 With this patch, it behves as expected: the measurements of 25 blocks (= 100 bursts) are aggregated, after which point the report is computed and sent. Subsequently, num_ul_meas is reset to 0 and the cycle restarts. Related: OS#2329 Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 10 insertions(+), 4 deletions(-) Approvals: dexter: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve Alexander Chemeris: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 0549156..d3928f1 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -843,7 +843,7 @@ l2_len = GSM_MACBLOCK_LEN; /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); ber10k = compute_ber10k(n_bits_total, n_errors); return _sched_compose_ph_data_ind(l1t, tn, *first_fn, chan, l2, l2_len, @@ -860,6 +860,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; float *rssi_sum = &chan_state->rssi_sum; uint8_t *rssi_num = &chan_state->rssi_num; @@ -884,6 +885,7 @@ if (bid == 0) { memset(*bursts_p, 0, GSM0503_EGPRS_BURSTS_NBITS); *mask = 0x0; + *first_fn = fn; *rssi_sum = 0; *rssi_num = 0; *toa_sum = 0; @@ -937,7 +939,7 @@ /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr | tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr | tn, n_errors, n_bits_total, *rssi_sum / *rssi_num, *toa_sum / *toa_num); if (rc <= 0) { @@ -959,6 +961,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -985,6 +988,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 464); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1047,7 +1051,7 @@ memcpy(*bursts_p, *bursts_p + 464, 464); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ @@ -1117,6 +1121,7 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; + uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1148,6 +1153,7 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 232); *mask = 0x0; + *first_fn = fn; } /* update mask */ @@ -1221,7 +1227,7 @@ memcpy(*bursts_p + 232, *bursts_p + 464, 232); /* Send uplink measurement information to L2 */ - l1if_process_meas_res(l1t->trx, tn, fn, trx_chan_desc[chan].chan_nr|tn, + l1if_process_meas_res(l1t->trx, tn, *first_fn, trx_chan_desc[chan].chan_nr|tn, n_errors, n_bits_total, rssi, toa); /* Check if the frame is bad */ -- To view, visit https://gerrit.osmocom.org/5136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Alexander Chemeris Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 14:09:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 14:09:07 +0000 Subject: osmo-ggsn[master]: Add configure flag to disable ipv6 support In-Reply-To: References: Message-ID: Patch Set 2: Do you have any alternative in mind regarding this topic? AFAIR that's how it's done in the kernel for instance. Or maybe you think it's not worth it having aflag to disable ipv6 support? -- To view, visit https://gerrit.osmocom.org/5121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 14:39:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 14:39:42 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: don't configure specific local IP address for ST... Message-ID: Review at https://gerrit.osmocom.org/5166 osmo-hnbgw: don't configure specific local IP address for STP connection It's not necessary to set a local IP to connect to OsmoSTP with, 'any' is as good as any. Related: OS#2663 Change-Id: If5d0a1500de5e2c4b80acf025761d0264a8a51a0 --- M src/hnbgw.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/66/5166/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index 5c0570e..c1b931c 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -478,8 +478,7 @@ ranap_set_log_area(DRANAP); - rc = hnbgw_cnlink_init(g_hnb_gw, - "127.0.0.1", M3UA_PORT, "127.0.0.5" /* FIXME: configurable */); + rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "Failed to initialize SCCP link to CN\n"); exit(1); -- To view, visit https://gerrit.osmocom.org/5166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5d0a1500de5e2c4b80acf025761d0264a8a51a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 14:40:03 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 14:40:03 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#9). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 14 files changed, 1,121 insertions(+), 321 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/9 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..da06dae --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,50 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer + * needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..e872d03 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -40,6 +40,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..438b7cf 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -596,11 +596,9 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + conn->rtp.remote_port_ran = osmo_ntohs(rtp_addr_in->sin_port); + osmo_strlcpy(conn->rtp.remote_addr_ran, inet_ntoa(rtp_addr_in->sin_addr), + sizeof(conn->rtp.remote_addr_ran)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..881a81c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -78,6 +78,7 @@ #include #include +#include #include @@ -1328,8 +1329,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teadown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1386,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1418,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1761,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1803,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2687,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2728,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2744,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2771,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2787,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = rtp->ip; + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..736ed0b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,21 @@ #include #include +#include #include #include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +200,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..362873e --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,961 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* Note: If the logic that controls the RAN is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Note: Under normal conditions, the MSC logic should + * always command to release the call at some point. + * However, the release may be missing due to errors + * in the MSC logic and we may have reached ST_HALT + * because of cascading errors and timeouts. In this + * and only in this case we will allow ST_HALT to + * free all context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: check MGW reseponse, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: connection context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 9 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 14:56:00 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 14:56:00 +0000 Subject: [PATCH] osmo-mgw[master]: client: use string as connection identifier Message-ID: Review at https://gerrit.osmocom.org/5167 client: use string as connection identifier The test that tests the cancelation of a pending mgcp message uses an integer as connection identifier, which leads to a segfault since connection identifiers are represented as strings. Use a string as connection identifier. Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/67/5167/1 diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 172faac..ef2fca8 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -236,7 +236,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE), -- To view, visit https://gerrit.osmocom.org/5167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 15:00:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 15:00:45 +0000 Subject: osmo-mgw[master]: client: use string as connection identifier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 I confirm this fixes the segfault in my PC and test passes successfully. -- To view, visit https://gerrit.osmocom.org/5167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 15:26:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 15:26:30 +0000 Subject: [PATCH] meta-telephony[201705]: libosmo-abis: Remove unused patch Message-ID: Review at https://gerrit.osmocom.org/5168 libosmo-abis: Remove unused patch The patch was applied upstream in 37fcd93a508b52f6f33bf47191bba41cb7367b0d, and removed from libosmo-abis recipe in meta-telephony d91abc18f1a1d0003fe946c5dce173f1946b9712. Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 --- D recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch 1 file changed, 0 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/68/5168/1 diff --git a/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch b/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch deleted file mode 100644 index 63c5052..0000000 --- a/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch +++ /dev/null @@ -1,21 +0,0 @@ -The line is not initiliazed to E1INP_TS_TYPE_SIGN by default - -diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c -index 145e471..49424e7 100644 ---- a/src/input/ipaccess.c -+++ b/src/input/ipaccess.c -@@ -915,12 +915,14 @@ int e1inp_ipa_bts_rsl_connect_n(struct e1inp_line *line, - "trx_nr (%d) out of range\n", trx_nr); - return -EINVAL; - } -+/* - if (line->ts[E1INP_SIGN_RSL+trx_nr-1].type != E1INP_TS_TYPE_SIGN) { - LOGP(DLINP, LOGL_ERROR, "cannot create RSL BTS link: " - "trx_nr (%d) does not refer to a signalling link\n", - trx_nr); - return -EINVAL; - } -+*/ - - rsl_link = ipa_client_conn_create(tall_ipa_ctx, - &line->ts[E1INP_SIGN_RSL+trx_nr-1], -- To view, visit https://gerrit.osmocom.org/5168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 15:26:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 15:26:30 +0000 Subject: [PATCH] meta-telephony[201705]: libosmo-abis: Split libosmo-trau into its own package Message-ID: Review at https://gerrit.osmocom.org/5169 libosmo-abis: Split libosmo-trau into its own package Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be --- M recipes-osmocom/libosmo-abis/libosmo-abis.inc 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/69/5169/1 diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc index 15a512a..afac8a9 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis.inc +++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc @@ -4,10 +4,17 @@ HOMEPAGE = "http://openbsc.gnumonks.org" LICENSE = "AGPLv3" -INC_PR="r2.${META_TELEPHONY_OSMO_INC}" +INC_PR="r3.${META_TELEPHONY_OSMO_INC}" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" inherit autotools pkgconfig -ALLOW_EMPTY_libosmo-abis = "1" +PACKAGES =+ "libosmo-trau libosmo-trau-dev" + +FILES_libosmo-trau = "${libdir}/libosmotrau${SOLIBS}" +FILES_libosmo-trau-dev = " \ + ${includedir}/osmocom/trau \ + ${libdir}/pkgconfig/libosmotrau.pc \ + ${libdir}/libosmotrau${SOLIBSDEV} \ + " -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 15:57:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 15:57:42 +0000 Subject: [PATCH] meta-telephony[201705]: ortp: Remove unused old ortp 0.16.5 Message-ID: Review at https://gerrit.osmocom.org/5170 ortp: Remove unused old ortp 0.16.5 A new version 0.25.0 was added around 3 years ago and has been used since then, because osmocom stack requires at least 0.22.0. This 0.16.5 version has been unused since then, so we can drop it. Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 --- D recipes-misc/ortp/files/0001-fix-unused-variables.patch D recipes-misc/ortp/files/compile-fixes-newer-gcc.diff D recipes-misc/ortp/ortp_0.16.5.bb 3 files changed, 0 insertions(+), 97 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/70/5170/1 diff --git a/recipes-misc/ortp/files/0001-fix-unused-variables.patch b/recipes-misc/ortp/files/0001-fix-unused-variables.patch deleted file mode 100644 index a57eaff..0000000 --- a/recipes-misc/ortp/files/0001-fix-unused-variables.patch +++ /dev/null @@ -1,75 +0,0 @@ -From eb4f54377e2560a76a05f62a22c961edbce8f4c2 Mon Sep 17 00:00:00 2001 -From: Simon Morlat -Date: Tue, 31 May 2011 10:52:49 +0200 -Subject: [PATCH] fix unused variables - ---- - src/stun.c | 10 +++++----- - src/tests/rtprecv.c | 6 +++++- - 2 files changed, 10 insertions(+), 6 deletions(-) - -diff --git a/src/stun.c b/src/stun.c -index ccac58f..e0d7c80 100644 ---- a/src/stun.c -+++ b/src/stun.c -@@ -1993,7 +1993,6 @@ stunSendTest( Socket myFd, StunAddress4 *dest, - - bool_t changePort=FALSE; - bool_t changeIP=FALSE; -- bool_t discard=FALSE; - - StunMessage req; - char buf[STUN_MAX_MESSAGE_SIZE]; -@@ -2015,9 +2014,10 @@ stunSendTest( Socket myFd, StunAddress4 *dest, - case 4: - changeIP=TRUE; - break; -- case 5: -+ /* case 5: - discard=TRUE; - break; -+ */ - default: - ortp_error("stun: Test %i is unkown\n", testNum); - return ; /* error */ -@@ -2162,7 +2162,7 @@ stunNatType( StunAddress4 *dest, - - bool_t respTestI=FALSE; - bool_t isNat=TRUE; -- StunAddress4 testIchangedAddr; -+ /*StunAddress4 testIchangedAddr;*/ - StunAddress4 testImappedAddr; - bool_t respTestI2=FALSE; - bool_t mappedIpSame = TRUE; -@@ -2345,8 +2345,8 @@ stunNatType( StunAddress4 *dest, - if ( !respTestI ) - { - -- testIchangedAddr.addr = resp.changedAddress.ipv4.addr; -- testIchangedAddr.port = resp.changedAddress.ipv4.port; -+ /*testIchangedAddr.addr = resp.changedAddress.ipv4.addr; -+ testIchangedAddr.port = resp.changedAddress.ipv4.port;*/ - testImappedAddr.addr = resp.mappedAddress.ipv4.addr; - testImappedAddr.port = resp.mappedAddress.ipv4.port; - -diff --git a/src/tests/rtprecv.c b/src/tests/rtprecv.c -index 1861592..5eee649 100644 ---- a/src/tests/rtprecv.c -+++ b/src/tests/rtprecv.c -@@ -163,8 +163,12 @@ int main(int argc, char*argv[]) - /* this is to avoid to write to disk some silence before the first RTP packet is returned*/ - if ((stream_received) && (err>0)) { - size_t ret = fwrite(buffer,1,err,outfile); -- if (sound_fd>0) -+ if (sound_fd>0){ - ret = write(sound_fd,buffer,err); -+ if (ret==-1){ -+ fprintf(stderr,"write to sound card failed (%s)",strerror(errno)); -+ } -+ } - } - } - ts+=160; --- -1.7.5.4 - diff --git a/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff b/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff deleted file mode 100644 index 94ddde0..0000000 --- a/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: ortp-0.16.5/src/stun.c -=================================================================== ---- ortp-0.16.5.orig/src/stun.c -+++ ortp-0.16.5/src/stun.c -@@ -399,7 +399,7 @@ stunParseMessage( char* buf, unsigned in - char* body; - unsigned int size; - ortp_debug("stun: Received stun message: %i bytes\n", bufLen); -- memset(msg, 0, sizeof(msg)); -+ memset(msg, 0, sizeof(*msg)); - - if (sizeof(StunMsgHdr) > bufLen) - { diff --git a/recipes-misc/ortp/ortp_0.16.5.bb b/recipes-misc/ortp/ortp_0.16.5.bb deleted file mode 100644 index 919405f..0000000 --- a/recipes-misc/ortp/ortp_0.16.5.bb +++ /dev/null @@ -1,9 +0,0 @@ -require ortp.inc -DEPENDS = "glib-2.0 openssl" -PR = "${INC_PR}.1" - -SRC_URI += "file://0001-fix-unused-variables.patch;patch=1 \ - file://compile-fixes-newer-gcc.diff" - -SRC_URI[md5sum] = "94546901d14b85f97342f4ecf39489b1" -SRC_URI[sha256sum] = "3b655a79f9122afd298e9cd702e542908bbd6ea1337c02553110c57e0b3c5835" -- To view, visit https://gerrit.osmocom.org/5170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 15:57:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 15:57:42 +0000 Subject: [PATCH] meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace Message-ID: Review at https://gerrit.osmocom.org/5171 ortp: Move DEPENDS to inc file and fix whitespace Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c --- M recipes-misc/ortp/ortp.inc M recipes-misc/ortp/ortp_0.25.0.bb 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/71/5171/1 diff --git a/recipes-misc/ortp/ortp.inc b/recipes-misc/ortp/ortp.inc index 98a52eb..068c4de 100644 --- a/recipes-misc/ortp/ortp.inc +++ b/recipes-misc/ortp/ortp.inc @@ -9,10 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" +DEPENDS = "glib-2.0 openssl" + do_compile_append() { sed -i -e s:${STAGING_DIR_TARGET}::g \ -e s:/${TARGET_SYS}::g \ ortp.pc - } - diff --git a/recipes-misc/ortp/ortp_0.25.0.bb b/recipes-misc/ortp/ortp_0.25.0.bb index 74687a2..b48660b 100644 --- a/recipes-misc/ortp/ortp_0.25.0.bb +++ b/recipes-misc/ortp/ortp_0.25.0.bb @@ -1,5 +1,4 @@ require ortp.inc -DEPENDS = "glib-2.0 openssl" PR = "${INC_PR}.1" SRC_URI[md5sum] = "f44b4ab2a8de32c19abfa584c4426f76" -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:17:48 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:17:48 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: fix wrong strcmp() parameters Message-ID: Review at https://gerrit.osmocom.org/5172 mgcp_test: fix wrong strcmp() parameters The CRCX string parameter lacks the quotes and the result of the function call is not checked against zero. Also the return code of get_conn_id_from_response() is not asserted. Fixes: Coverity CID#180534 Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9 --- M tests/mgcp/mgcp_test.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/72/5172/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index fb99911..86edf00 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -765,6 +765,7 @@ struct mgcp_config *cfg; int i; char last_conn_id[256]; + int rc; cfg = mgcp_config_alloc(); @@ -792,9 +793,11 @@ OSMO_ASSERT(false); } - if (msg && strcmp(t->name, CRCX)) - get_conn_id_from_response(msg->data, last_conn_id, - sizeof(last_conn_id)); + if (msg && strcmp(t->name, "CRCX") == 0) { + rc = get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + OSMO_ASSERT(rc == 0); + } msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5172 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:17:49 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:17:49 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: fix nullpointer dereferentiation Message-ID: Review at https://gerrit.osmocom.org/5173 mgcp_test: fix nullpointer dereferentiation Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Fixes: Coverity CID#180536 --- M tests/mgcp/mgcp_test.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/73/5173/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 86edf00..1c57347 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -788,7 +788,7 @@ msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (check_response(msg->data, t->exp_resp) != 0) { + if (msg && check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -799,7 +799,8 @@ OSMO_ASSERT(rc == 0); } - msgb_free(msg); + if (msg) + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); -- To view, visit https://gerrit.osmocom.org/5173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:17:50 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:17:50 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: add returncode check Message-ID: Review at https://gerrit.osmocom.org/5174 mgcp_test: add returncode check The returncode of get_conn_id_from_response() is unchecked, which is intentional since some of the test messages will intentionally cause this function to fail (the response does not inclde a connection identifier). This means it makes no sense to assert this function to a fixed value. In order to spot regressions better print a log message depending on the return code. Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Fixes: Coverity CID#180534 --- M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 2 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/74/5174/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 1c57347..ee49eef 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -636,6 +636,7 @@ int i; struct mgcp_conn_rtp *conn = NULL; char last_conn_id[256]; + int rc; cfg = mgcp_config_alloc(); @@ -675,9 +676,14 @@ OSMO_ASSERT(false); } - if (msg) - get_conn_id_from_response(msg->data, last_conn_id, - sizeof(last_conn_id)); + if (msg) { + rc = get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + if (rc) + printf("(response contains a connection id)\n"); + else + printf("(response does not contain a connection id)\n"); + } msgb_free(msg); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index c764531..23f0658 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -22,6 +22,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing AUEP2 @@ -33,6 +34,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX1 @@ -44,6 +46,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX2 @@ -55,6 +58,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -75,6 +79,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -88,6 +93,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -111,6 +117,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -134,6 +141,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -157,6 +165,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -180,6 +189,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -203,6 +213,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) ================================================ Testing MDCX4_RO @@ -217,6 +228,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -231,6 +243,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX_ZYN @@ -243,6 +256,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -263,6 +277,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT2 @@ -273,6 +288,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT3 @@ -283,6 +299,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT4 @@ -293,6 +310,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT1 @@ -306,6 +324,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT2 @@ -319,6 +338,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing DLCX @@ -332,6 +352,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -352,6 +373,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -365,6 +387,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -379,6 +402,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX -- To view, visit https://gerrit.osmocom.org/5174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:17:50 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:17:50 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: fix possible double free Message-ID: Review at https://gerrit.osmocom.org/5175 mgcp_test: fix possible double free Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a --- M tests/mgcp/mgcp_test.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/5175/1 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index ee49eef..330d24d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -685,7 +685,8 @@ printf("(response does not contain a connection id)\n"); } - msgb_free(msg); + if (msg) + msgb_free(msg); if (dummy_packets) printf("Dummy packets: %d\n", dummy_packets); -- To view, visit https://gerrit.osmocom.org/5175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:21:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:21:39 +0000 Subject: osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:23:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:23:21 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:24:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:24:15 +0000 Subject: osmo-gsm-tester[master]: resource: next_lac: Avoid using LAC 0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:26:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:26:26 +0000 Subject: osmo-gsm-tester[master]: bts_*: Add ready_for_pcu API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7209589f60bda63094336e417638906be5e273c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:27:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:27:21 +0000 Subject: osmo-gsm-tester[master]: bts_*: Add ready_for_pcu API In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5067/1//COMMIT_MSG Commit Message: Line 11: "pcu_l1_if.cpp:416 BTS not available" there's no caller though, I assume that will follow in a test case? -- To view, visit https://gerrit.osmocom.org/5067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7209589f60bda63094336e417638906be5e273c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:28:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:28:30 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5011/3/suites/gprs/ping.py File suites/gprs/ping.py: Line 29: bts.start() wait(bts.ready_for_pcu) ? -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:32:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:32:22 +0000 Subject: osmo-mgw[master]: mgcp_test: fix nullpointer dereferentiation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5173/1//COMMIT_MSG Commit Message: Line 7: mgcp_test: fix nullpointer dereferentiation ("dereference" or "dereferencing") -- To view, visit https://gerrit.osmocom.org/5173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:34:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:34:15 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: fix nullpointer dereference In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5173 to look at the new patch set (#2). mgcp_test: fix nullpointer dereference Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Fixes: Coverity CID#180536 --- M tests/mgcp/mgcp_test.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/73/5173/2 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 86edf00..1c57347 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -788,7 +788,7 @@ msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (check_response(msg->data, t->exp_resp) != 0) { + if (msg && check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -799,7 +799,8 @@ OSMO_ASSERT(rc == 0); } - msgb_free(msg); + if (msg) + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); -- To view, visit https://gerrit.osmocom.org/5173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:34:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:34:15 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: add returncode check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5174 to look at the new patch set (#2). mgcp_test: add returncode check The returncode of get_conn_id_from_response() is unchecked, which is intentional since some of the test messages will intentionally cause this function to fail (the response does not inclde a connection identifier). This means it makes no sense to assert this function to a fixed value. In order to spot regressions better print a log message depending on the return code. Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Fixes: Coverity CID#180534 --- M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 2 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/74/5174/2 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 1c57347..ee49eef 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -636,6 +636,7 @@ int i; struct mgcp_conn_rtp *conn = NULL; char last_conn_id[256]; + int rc; cfg = mgcp_config_alloc(); @@ -675,9 +676,14 @@ OSMO_ASSERT(false); } - if (msg) - get_conn_id_from_response(msg->data, last_conn_id, - sizeof(last_conn_id)); + if (msg) { + rc = get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + if (rc) + printf("(response contains a connection id)\n"); + else + printf("(response does not contain a connection id)\n"); + } msgb_free(msg); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index c764531..23f0658 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -22,6 +22,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing AUEP2 @@ -33,6 +34,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX1 @@ -44,6 +46,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX2 @@ -55,6 +58,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -75,6 +79,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -88,6 +93,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -111,6 +117,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -134,6 +141,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -157,6 +165,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -180,6 +189,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -203,6 +213,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) ================================================ Testing MDCX4_RO @@ -217,6 +228,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -231,6 +243,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX_ZYN @@ -243,6 +256,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -263,6 +277,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT2 @@ -273,6 +288,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT3 @@ -283,6 +299,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT4 @@ -293,6 +310,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT1 @@ -306,6 +324,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT2 @@ -319,6 +338,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing DLCX @@ -332,6 +352,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -352,6 +373,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -365,6 +387,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -379,6 +402,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX -- To view, visit https://gerrit.osmocom.org/5174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:34:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 4 Dec 2017 16:34:15 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_test: fix possible double free In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5175 to look at the new patch set (#2). mgcp_test: fix possible double free Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a --- M tests/mgcp/mgcp_test.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/5175/2 diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index ee49eef..330d24d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -685,7 +685,8 @@ printf("(response does not contain a connection id)\n"); } - msgb_free(msg); + if (msg) + msgb_free(msg); if (dummy_packets) printf("Dummy packets: %d\n", dummy_packets); -- To view, visit https://gerrit.osmocom.org/5175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:34:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 16:34:24 +0000 Subject: osmo-gsm-tester[master]: bts_*: Add ready_for_pcu API In-Reply-To: References: Message-ID: Patch Set 1: Yes it is used afterwards in another commit, but that one is already quite big so it's better to split this into a former commit -- To view, visit https://gerrit.osmocom.org/5067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7209589f60bda63094336e417638906be5e273c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:35:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 4 Dec 2017 16:35:13 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn: Ignore PCO with length 0, don't abort processing Message-ID: Review at https://gerrit.osmocom.org/5176 ggsn: Ignore PCO with length 0, don't abort processing The existing code would abort iterating over the list of PCO TLVs if a TLV of length zero was encountered. However, there's nothing in the spec that would make a zero-length PCO invalid, so we should continue to iterate over any PCO TLVs after the zero-length one. This issue was discovered while writing test cases in osmo-ttcn3-hacks.git Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 --- M ggsn/ggsn.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/76/5176/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 82e1b12..e2ff88c 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -400,8 +400,6 @@ uint8_t cur_len = cur[2]; if (cur_prot == prot) return true; - if (cur_len == 0) - break; cur += cur_len + 3; } return false; -- To view, visit https://gerrit.osmocom.org/5176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:35:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:35:14 +0000 Subject: osmo-mgw[master]: mgcp_test: fix wrong strcmp() parameters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/5172/1/tests/mgcp/mgcp_test.c File tests/mgcp/mgcp_test.c: Line 796: if (msg && strcmp(t->name, "CRCX") == 0) { lol, didn't even see the missing quotes ... so much for picking too general macro names further above Line 799: OSMO_ASSERT(rc == 0); since there's just a single evaluator of rc, I'd have called OSMO_ASSERT(get_conn_id...() == 0); directly, but whatever -- To view, visit https://gerrit.osmocom.org/5172 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:35:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 16:35:15 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5011/3/suites/gprs/ping.py File suites/gprs/ping.py: Line 29: bts.start() > wait(bts.ready_for_pcu) ? That's done by the pcu automatically when needed. -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:35:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:35:26 +0000 Subject: osmo-mgw[master]: mgcp_test: fix nullpointer dereference In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:36:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:36:48 +0000 Subject: osmo-mgw[master]: client: use string as connection identifier In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:37:10 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:37:10 +0000 Subject: osmo-mgw[master]: conn: remove assertions In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:37:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:37:39 +0000 Subject: osmo-mgw[master]: mgcp_test: fix possible double free In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:38:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:38:44 +0000 Subject: osmo-mgw[master]: mgcp_test: add returncode check In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 16:51:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 16:51:07 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: mgcp_trans_id_t mgw_pending_trans; (makes me think ... this requires that we only have a single MGCP transaction pending at any given time. At the moment we do, right?) https://gerrit.osmocom.org/#/c/5157/1/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 825: mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); Can it happen that no mgw_pending_trans was set? If yes, we might cancel an unrelated transaction. -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:08:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:08:07 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:17:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:17:40 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (3 comments) https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 43: # othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" (typo otherwise) Line 44: event_loop.wait(self, self.bts.ready_for_pcu) oh, here it is. I'd have expected this in a test script instead. https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl: Line 5: logging level all debug careful with all-debug on lower layers. We might get a mad log flood here. (At least in osmo-bts, we don't want debug logging on for everything.) Have you verified that the PCU log is not growing to megabytes quickly with this? -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:19:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:19:26 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/5006/2/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl: Line 81: % else: indent is not same as '% if' -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:21:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:21:05 +0000 Subject: osmo-gsm-tester[master]: Add OsmoSgsn class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:22:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:22:25 +0000 Subject: osmo-gsm-tester[master]: Add OsmoGgsn class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:24:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:24:41 +0000 Subject: osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5003/2/src/osmo_gsm_tester/pcu_sysmo.py File src/osmo_gsm_tester/pcu_sysmo.py: Line 49: event_loop.wait(self, self.sysmobts.ready_for_pcu) expecting this to be part of the test script. We should not make assumptions on the scenario that the test scripts want to test. Maybe we want to provoke such "BTS not available" in some test? Line 84: def _process_remote(self, name, popen_args, remote_cwd=None): (might make sense to have a common "run on sysmobts" api, but ok since we seem to be going for code dup instead generally) -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:25:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:25:26 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 44: event_loop.wait(self, self.bts.ready_for_pcu) > oh, here it is. I'd have expected this in a test script instead. decided that this is worth a -1. We should not make assumptions on the scenario that the test scripts want to test. Maybe we want to provoke such "BTS not available" in some test? -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:27:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 4 Dec 2017 17:27:01 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5008/2/src/osmo_gsm_tester/bts_octphy.py File src/osmo_gsm_tester/bts_octphy.py: Line 177: config.overlay(values, sgsn_conf) heh, why not if self.sgsn: config.overlay... -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:45:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 17:45:07 +0000 Subject: [PATCH] meta-telephony[201705]: osmo-sgsn: Install example osmo-gtphub config file Message-ID: Review at https://gerrit.osmocom.org/5177 osmo-sgsn: Install example osmo-gtphub config file Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d --- M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/77/5177/1 diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 77029a0..74a6bd4 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -5,7 +5,7 @@ DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" -INC_PR="r2.${META_TELEPHONY_OSMO_INC}" +INC_PR="r3.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -18,6 +18,7 @@ install -m 0644 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/ install -m 0644 ${S}/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg ${D}${sysconfdir}/osmocom/ + install -m 0644 ${S}/doc/examples/osmo-gtphub/osmo-gtphub.cfg ${D}${sysconfdir}/osmocom/ install -m 0644 ${S}/contrib/systemd/osmo-sgsn.service ${D}${systemd_system_unitdir}/ install -m 0644 ${S}/contrib/systemd/osmo-gbproxy.service ${D}${systemd_system_unitdir}/ -- To view, visit https://gerrit.osmocom.org/5177 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 17:45:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 17:45:07 +0000 Subject: [PATCH] meta-telephony[201705]: osmocom: Use CONFFILES for cfg files Message-ID: Review at https://gerrit.osmocom.org/5178 osmocom: Use CONFFILES for cfg files Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 --- M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc.inc M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr.inc M recipes-osmocom/osmo-iuh/osmo-iuh.inc M recipes-osmocom/osmo-mgw/osmo-mgw.inc M recipes-osmocom/osmo-msc/osmo-msc.inc M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 8 files changed, 25 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/78/5178/1 diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index ed28cea..a335993 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -4,7 +4,7 @@ SRCREV = "54fa75b85c91bb4bb79960942f63968f6423f6a5" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" PV = "0.7.0+gitr${SRCPV}" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" # we require the tests to link to the static libosmo-sigtran library to # access symbols not starting with osmo_* @@ -31,3 +31,4 @@ ${bindir}/osmo-stp \ ${sysconfdir}/osmocom/osmo-stp.cfg \ " +CONFFILES_osmo-stp = "${sysconfdir}/osmocom/osmo-stp.cfg" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc.inc b/recipes-osmocom/osmo-bsc/osmo-bsc.inc index dfa332a..820baf5 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc.inc +++ b/recipes-osmocom/osmo-bsc/osmo-bsc.inc @@ -5,7 +5,7 @@ DEPENDS = "sqlite3 libosmocore libosmo-abis libosmo-sccp libosmo-netif osmo-mgw" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -23,6 +23,8 @@ SYSTEMD_PACKAGES = "osmo-bsc" SYSTEMD_SERVICE_osmo-bsc = "osmo-bsc.service" +CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg" + FILES_ipaccess-utils = " \ ${bindir}/ipaccess-find \ ${bindir}/ipaccess-config \ @@ -33,5 +35,6 @@ ${bindir}/osmo-bsc_nat \ ${sysconfdir}/osmocom/osmo-bsc_nat.cfg \ " +CONFFILES_osmo-bsc-nat = "${sysconfdir}/osmocom/osmo-bsc_nat.cfg" FILES_osmo-bsc-nat-doc = " ${docdir}/osmo-bsc/examples/osmo-bsc_nat " diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 2751985..3aafe13 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -3,7 +3,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" PV = "1.0.0+gitr${SRCPV}" -PR = "r0" +PR = "r1" SRCREV = "859f9b0752419d43928d465bc96a87238c6d7940" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ @@ -35,6 +35,8 @@ INITSCRIPT_NAME_osmo-ggsn = "osmo-ggsn" INITSCRIPT_PARAMS_osmo-ggsn = "defaults 29 29" +CONFFILES_osmo-ggsn = "${sysconfdir}/osmocom/osmo-ggsn.cfg" + FILES_libgtp = "${libdir}/*${SOLIBS}" FILES_libgtp-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la" FILES_libgtp-staticdev = "${libdir}/*.a" diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr.inc b/recipes-osmocom/osmo-hlr/osmo-hlr.inc index 8afe774..7dd6234 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr.inc +++ b/recipes-osmocom/osmo-hlr/osmo-hlr.inc @@ -5,7 +5,7 @@ DEPENDS = "libtalloc libosmocore libosmo-abis sqlite3 sqlite3-native" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -24,3 +24,7 @@ } SYSTEMD_SERVICE_${PN} = "${PN}.service" +CONFFILES_osmo-hlr = "\ + ${sysconfdir}/osmocom/osmo-hlr.cfg \ + ${localstatedir}/lib/osmocom/hlr.db \ + " diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh.inc b/recipes-osmocom/osmo-iuh/osmo-iuh.inc index a5f1cbc..2737412 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh.inc +++ b/recipes-osmocom/osmo-iuh/osmo-iuh.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif libosmo-sccp libasn1c" -INC_PR="r1.${META_TELEPHONY_OSMO_INC}" +INC_PR="r2.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -35,5 +35,6 @@ ${bindir}/osmo-hnbgw \ ${sysconfdir}/osmocom/osmo-hnbgw.cfg \ " +CONFFILES_osmo-hnbgw = "${sysconfdir}/osmocom/osmo-hnbgw.cfg" ALLOW_EMPTY_${PN} = "1" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 45ee338..1b3362f 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif bcg729 libgsm" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -20,3 +20,4 @@ } SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" +CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" diff --git a/recipes-osmocom/osmo-msc/osmo-msc.inc b/recipes-osmocom/osmo-msc/osmo-msc.inc index 9be747d..82a51b1 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc.inc +++ b/recipes-osmocom/osmo-msc/osmo-msc.inc @@ -5,7 +5,7 @@ DEPENDS = "libdbi libosmocore libosmo-abis libosmo-sccp libosmo-netif osmo-mgw" -INC_PR="r2.${META_TELEPHONY_OSMO_INC}" +INC_PR="r3.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -28,3 +28,4 @@ } SYSTEMD_SERVICE_${PN} = "${PN}.service" +CONFFILES_osmo-msc = "${sysconfdir}/osmocom/osmo-msc.cfg" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 74a6bd4..8ed6a10 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -5,7 +5,7 @@ DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" -INC_PR="r3.${META_TELEPHONY_OSMO_INC}" +INC_PR="r4.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -29,15 +29,19 @@ SYSTEMD_SERVICE_osmo-sgsn = "osmo-sgsn.service" SYSTEMD_SERVICE_osmo-gbproxy = "osmo-gbproxy.service" +CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg" + FILES_osmo-gbproxy = " \ ${bindir}/osmo-gbproxy \ ${sysconfdir}/osmocom/osmo-gbproxy.cfg \ " +CONFFILES_osmo-gbproxy = "${sysconfdir}/osmocom/osmo-gbproxy.cfg" FILES_osmo-gtphub = " \ ${bindir}/osmo-gtphub \ ${sysconfdir}/osmocom/osmo-gtphub.cfg \ " +CONFFILES_osmo-gtphub = "${sysconfdir}/osmocom/osmo-gtphub.cfg" FILES_osmo-gbproxy-doc = " ${docdir}/osmo-sgsn/examples/osmo-gbproxy " FILES_osmo-gtphub-doc = " ${docdir}/osmo-sgsn/examples/osmo-gtphub " -- To view, visit https://gerrit.osmocom.org/5178 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 4 18:07:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 18:07:50 +0000 Subject: osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/5003/2/src/osmo_gsm_tester/pcu_sysmo.py File src/osmo_gsm_tester/pcu_sysmo.py: Line 49: event_loop.wait(self, self.sysmobts.ready_for_pcu) > expecting this to be part of the test script. We should not make assumption I don't agree here. This is just a workaround for the current implementation as otherwise the process will fail. It's a known issue/limitation and improvement for it is being tracked in a task in redmime. Once osmo-pcu supports re-connecting to osmo-bts if it's not available, then we can drop this code. Test doesn't care about this implementation specific things, let's not add more boilerplate to all test for something which is strictly not needed from tester point of view. Line 84: def _process_remote(self, name, popen_args, remote_cwd=None): > (might make sense to have a common "run on sysmobts" api, but ok since we s I agree that we need to improve the code sharing by using several levels of classes and interfaces, but for now the quick way to add features requires is to do it like this. -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 18:12:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 18:12:30 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 2: (3 comments) https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/pcu_osmo.py File src/osmo_gsm_tester/pcu_osmo.py: Line 43: # othwerwise osmo-pcu ends after connecting to socket with "pcu_l1_if.cpp:416 BTS not available" > (typo otherwise) I'll fix it. Line 44: event_loop.wait(self, self.bts.ready_for_pcu) > decided that this is worth a -1. As I said, I don't agree. Once we support doing something useful once we hit the BTS not available, like re-connecting, we can just drop this line and we will from time to time hit it due to race conditions, and if something goes wrong it will fail. So there's no benefit really in having this in each and every test. https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl: Line 5: logging level all debug > careful with all-debug on lower layers. We might get a mad log flood here. It logs a lot of stuff but I think for now it's fine since I'm adding support for related features and debugging it. We can always drop to a lower lever in the future once we add some missing features (gprs data) and we have them working. -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 18:15:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 18:15:30 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5008/2/src/osmo_gsm_tester/bts_octphy.py File src/osmo_gsm_tester/bts_octphy.py: Line 177: config.overlay(values, sgsn_conf) > heh, why not What would happen then? because self.sgsn is None in that case. Does overlay() actually handle that correctly and replaces it with {} ? I don't like the idea of being able to pass None to that method and I'd like to avoid it. This way is more clear to understand what's the result inside overlay. -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 18:18:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 18:18:13 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/5006/2/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl: Line 77: gprs nsvc 0 local udp port 23000 Reminder: I shall set this one to 23020 like already done in osmo-bsc.cfg.tmpl Line 81: % else: > indent is not same as '% if' Thanks, I'll fix it. -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 4 18:27:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 4 Dec 2017 18:27:20 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: Reserve ARFCN dynamically based on BTS band support ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/3731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels From admin at opensuse.org Mon Dec 4 20:07:24 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:07:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a25ab164f321_9828e0f58148383@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 99s] | #define HAVE_SYS_TYPES_H 1 [ 99s] | #define HAVE_SYS_STAT_H 1 [ 99s] | #define HAVE_STDLIB_H 1 [ 99s] | #define HAVE_STRING_H 1 [ 99s] | #define HAVE_MEMORY_H 1 [ 99s] | #define HAVE_STRINGS_H 1 [ 99s] | #define HAVE_INTTYPES_H 1 [ 99s] | #define HAVE_STDINT_H 1 [ 99s] | #define HAVE_UNISTD_H 1 [ 99s] | #define HAVE_DLFCN_H 1 [ 99s] | #define LT_OBJDIR ".libs/" [ 99s] | [ 99s] | configure: exit 0 [ 99s] [ 99s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 99s] make[1]: *** [override_dh_auto_test] Error 1 [ 99s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 99s] debian/rules:17: recipe for target 'build' failed [ 99s] make: *** [build] Error 2 [ 99s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 99s] [ 99s] lamb12 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:06 UTC 2017. [ 99s] [ 99s] ### VM INTERACTION START ### [ 102s] [ 94.798568] reboot: Power down [ 102s] ### VM INTERACTION END ### [ 102s] [ 102s] lamb12 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:10 UTC 2017. [ 102s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:07:41 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:07:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a25ab17427c7_9828e0f581484e6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/i586 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 120s] | #define HAVE_SYS_TYPES_H 1 [ 120s] | #define HAVE_SYS_STAT_H 1 [ 120s] | #define HAVE_STDLIB_H 1 [ 120s] | #define HAVE_STRING_H 1 [ 120s] | #define HAVE_MEMORY_H 1 [ 120s] | #define HAVE_STRINGS_H 1 [ 120s] | #define HAVE_INTTYPES_H 1 [ 120s] | #define HAVE_STDINT_H 1 [ 120s] | #define HAVE_UNISTD_H 1 [ 120s] | #define HAVE_DLFCN_H 1 [ 120s] | #define LT_OBJDIR ".libs/" [ 120s] | [ 120s] | configure: exit 0 [ 120s] [ 120s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 120s] make[1]: *** [override_dh_auto_test] Error 1 [ 120s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 120s] debian/rules:17: recipe for target 'build' failed [ 120s] make: *** [build] Error 2 [ 120s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 120s] [ 120s] lamb05 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:25 UTC 2017. [ 120s] [ 120s] ### VM INTERACTION START ### [ 123s] [ 114.658788] reboot: Power down [ 123s] ### VM INTERACTION END ### [ 123s] [ 123s] lamb05 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:29 UTC 2017. [ 123s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:07:24 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:07:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a25ab156c0a8_9828e0f5814828@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 114s] -M: sendrecv [ 114s] - [ 114s] ------ [ 114s] -composed response: [ 114s] ------ [ 114s] -200 1 OK [ 114s] -I: 1 [ 114s] - [ 114s] -v=0 [ 114s] - [ 114s] ------ [ 114s] -Done [ 114s] ./testsuite.at:21: exit code was 139, expected 0 [ 114s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 114s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 114s] make[1]: *** [override_dh_auto_test] Error 1 [ 114s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 114s] debian/rules:17: recipe for target 'build' failed [ 114s] make: *** [build] Error 2 [ 114s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 114s] [ 114s] lamb07 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:18 UTC 2017. [ 114s] [ 114s] ### VM INTERACTION START ### [ 117s] [ 109.156358] reboot: Power down [ 117s] ### VM INTERACTION END ### [ 117s] [ 117s] lamb07 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:22 UTC 2017. [ 117s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:07:58 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:07:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a25ab32d5066_9828e0f5814867b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 138s] -M: sendrecv [ 138s] - [ 138s] ------ [ 138s] -composed response: [ 138s] ------ [ 138s] -200 1 OK [ 138s] -I: 1 [ 138s] - [ 138s] -v=0 [ 138s] - [ 138s] ------ [ 138s] -Done [ 138s] ./testsuite.at:21: exit code was 139, expected 0 [ 138s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 138s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 138s] make[1]: *** [override_dh_auto_test] Error 1 [ 138s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 138s] debian/rules:17: recipe for target 'build' failed [ 138s] make: *** [build] Error 2 [ 138s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 138s] [ 138s] lamb03 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:50 UTC 2017. [ 138s] [ 138s] ### VM INTERACTION START ### [ 141s] [ 125.622879] reboot: Power down [ 141s] ### VM INTERACTION END ### [ 141s] [ 141s] lamb03 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:07:55 UTC 2017. [ 141s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:10:33 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:10:33 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a25abc74a9dc_9828e0f5814938a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 106s] -M: sendrecv [ 106s] - [ 106s] ------ [ 106s] -composed response: [ 106s] ------ [ 106s] -200 1 OK [ 106s] -I: 1 [ 106s] - [ 106s] -v=0 [ 106s] - [ 106s] ------ [ 106s] -Done [ 106s] ./testsuite.at:21: exit code was 139, expected 0 [ 106s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 106s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 106s] make[1]: *** [override_dh_auto_test] Error 1 [ 106s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 106s] debian/rules:17: recipe for target 'build' failed [ 106s] make: *** [build] Error 2 [ 106s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 106s] [ 106s] lamb26 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:10:16 UTC 2017. [ 106s] [ 106s] ### VM INTERACTION START ### [ 110s] [ 101.485505] reboot: Power down [ 110s] ### VM INTERACTION END ### [ 110s] [ 110s] lamb26 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:10:19 UTC 2017. [ 110s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:11:24 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:11:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a25ac0632f79_9828e0f58149677@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_8.0/i586 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 103s] - [ 103s] ------ [ 103s] -composed response: [ 103s] ------ [ 103s] -200 1 OK [ 103s] -I: 1 [ 103s] - [ 103s] -v=0 [ 103s] - [ 103s] ------ [ 103s] -Done [ 103s] ./testsuite.at:21: exit code was 139, expected 0 [ 103s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 103s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 103s] make[1]: *** [override_dh_auto_test] Error 1 [ 103s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 103s] debian/rules:17: recipe for target 'build' failed [ 103s] make: *** [build] Error 2 [ 103s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 103s] [ 103s] lamb27 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:14 UTC 2017. [ 103s] [ 103s] ### VM INTERACTION START ### [ 104s] Powering off. [ 104s] [ 97.561515] reboot: Power down [ 104s] ### VM INTERACTION END ### [ 104s] [ 104s] lamb27 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:16 UTC 2017. [ 104s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:11:24 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:11:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a25ac074bcc1_9828e0f581498b1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 201s] | #define HAVE_SYS_STAT_H 1 [ 201s] | #define HAVE_STDLIB_H 1 [ 201s] | #define HAVE_STRING_H 1 [ 201s] | #define HAVE_MEMORY_H 1 [ 201s] | #define HAVE_STRINGS_H 1 [ 201s] | #define HAVE_INTTYPES_H 1 [ 201s] | #define HAVE_STDINT_H 1 [ 201s] | #define HAVE_UNISTD_H 1 [ 201s] | #define HAVE_DLFCN_H 1 [ 201s] | #define LT_OBJDIR ".libs/" [ 201s] | [ 201s] | configure: exit 0 [ 201s] [ 201s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 201s] make[1]: *** [override_dh_auto_test] Error 1 [ 201s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 201s] debian/rules:17: recipe for target 'build' failed [ 201s] make: *** [build] Error 2 [ 201s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 201s] [ 201s] wildcard2 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:07 UTC 2017. [ 201s] [ 201s] ### VM INTERACTION START ### [ 201s] Powering off. [ 201s] [ 181.664593] reboot: Power down [ 202s] ### VM INTERACTION END ### [ 202s] [ 202s] wildcard2 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:09 UTC 2017. [ 202s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:11:41 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:11:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a25ac08f2e6c_9828e0f58150141@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 96s] -M: sendrecv [ 96s] - [ 96s] ------ [ 96s] -composed response: [ 96s] ------ [ 96s] -200 1 OK [ 96s] -I: 1 [ 96s] - [ 96s] -v=0 [ 96s] - [ 96s] ------ [ 96s] -Done [ 96s] ./testsuite.at:21: exit code was 139, expected 0 [ 96s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 96s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 96s] make[1]: *** [override_dh_auto_test] Error 1 [ 96s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 96s] debian/rules:17: recipe for target 'build' failed [ 96s] make: *** [build] Error 2 [ 96s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 96s] [ 96s] lamb27 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:22 UTC 2017. [ 96s] [ 96s] ### VM INTERACTION START ### [ 99s] [ 91.350985] reboot: Power down [ 99s] ### VM INTERACTION END ### [ 99s] [ 99s] lamb27 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:25 UTC 2017. [ 99s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:11:41 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:11:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a25ac0942d51_9828e0f581502fd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 95s] ------ [ 95s] -200 1 OK [ 95s] -I: 1 [ 95s] - [ 95s] -v=0 [ 95s] - [ 95s] ------ [ 95s] -Done [ 95s] ./testsuite.at:21: exit code was 139, expected 0 [ 95s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 95s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 95s] make[1]: *** [override_dh_auto_test] Error 1 [ 95s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 95s] debian/rules:17: recipe for target 'build' failed [ 95s] make: *** [build] Error 2 [ 95s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 95s] [ 95s] lamb26 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:21 UTC 2017. [ 95s] [ 95s] ### VM INTERACTION START ### [ 95s] [ 87.580898] serial8250: too much work for irq4 [ 95s] [ 87.776191] serial8250: too much work for irq4 [ 95s] [ 87.937076] serial8250: too much work for irq4 [ 95s] [ 88.028100] serial8250: too much work for irq4 [ 98s] [ 90.986290] reboot: Power down [ 98s] ### VM INTERACTION END ### [ 98s] [ 98s] lamb26 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:11:25 UTC 2017. [ 98s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:12:50 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:12:50 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a25ac5e274e3_9828e0f58150596@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 135s] -M: sendrecv [ 135s] - [ 135s] ------ [ 135s] -composed response: [ 135s] ------ [ 135s] -200 1 OK [ 135s] -I: 1 [ 135s] - [ 135s] -v=0 [ 135s] - [ 135s] ------ [ 135s] -Done [ 135s] ./testsuite.at:21: exit code was 139, expected 0 [ 135s] 3. testsuite.at:17: 3. mgcp_client (testsuite.at:17): FAILED (testsuite.at:21) [ 135s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 135s] make[1]: *** [override_dh_auto_test] Error 1 [ 135s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 135s] debian/rules:17: recipe for target 'build' failed [ 135s] make: *** [build] Error 2 [ 135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 135s] [ 135s] lamb66 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:12:46 UTC 2017. [ 135s] [ 135s] ### VM INTERACTION START ### [ 138s] [ 130.912264] reboot: Power down [ 138s] ### VM INTERACTION END ### [ 138s] [ 138s] lamb66 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:12:49 UTC 2017. [ 138s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:16:16 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:16:16 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a25ad314167c_9828e0f581513b0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-mgw failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 189s] | #define HAVE_SYS_TYPES_H 1 [ 189s] | #define HAVE_SYS_STAT_H 1 [ 189s] | #define HAVE_STDLIB_H 1 [ 189s] | #define HAVE_STRING_H 1 [ 189s] | #define HAVE_MEMORY_H 1 [ 189s] | #define HAVE_STRINGS_H 1 [ 189s] | #define HAVE_INTTYPES_H 1 [ 189s] | #define HAVE_STDINT_H 1 [ 189s] | #define HAVE_UNISTD_H 1 [ 189s] | #define HAVE_DLFCN_H 1 [ 189s] | #define LT_OBJDIR ".libs/" [ 189s] | [ 189s] | configure: exit 0 [ 189s] [ 189s] debian/rules:30: recipe for target 'override_dh_auto_test' failed [ 189s] make[1]: *** [override_dh_auto_test] Error 1 [ 189s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 189s] debian/rules:17: recipe for target 'build' failed [ 189s] make: *** [build] Error 2 [ 189s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 189s] [ 189s] lamb57 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:16:04 UTC 2017. [ 189s] [ 189s] ### VM INTERACTION START ### [ 192s] [ 178.719448] reboot: Power down [ 192s] ### VM INTERACTION END ### [ 192s] [ 192s] lamb57 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:16:08 UTC 2017. [ 192s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 4 20:27:40 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 20:27:40 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a25afc49e58b_9828e0f5815449@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 549s] | configure:7598: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 549s] | configure:7598: $? = 0 [ 549s] | configure:7671: gcc -o conftest -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro conftest.c >&5 [ 549s] | configure:7671: $? = 0 [ 549s] | configure:7671: ./conftest [ 549s] | configure:7671: $? = 0 [ 549s] | configure:7682: result: yes [ 549s] | configure:7695: checking for sys/types.h [ 549s] | configure:7695: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 549s] | configure:7695: $? = 0 [ 549s] | configure:7695: result: yes [ 549s] | configure:7695: checking for sys/stat.h [ 549s] | configure:7695: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 549s] | configure:7695: $? = 0 [ 549s] | configure:7695: result: yes [ 549s] | configure:7695: checking for stdlib.h [ 549s] | configure:7695: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 549s] | configure:7695: $? = 0 [ 549s] | configure:7695: result: yes [ 549s] | configure:7695: checking for string.h [ 549s] | configure:7695: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 549s] | configure:7695: $? = 0 [ 549s] | configure:7695: result: yes [ 551s] | configure[ 502.874011] sysrq: SysRq : Power Off [ 551s] [ 502.895302] reboot: Power down [ 551s] ### VM INTERACTION END ### [ 551s] [ 551s] obs-arm-1 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 20:27:35 UTC 2017. [ 551s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 4 20:42:20 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 4 Dec 2017 20:42:20 +0000 Subject: meta-telephony[201705]: libosmo-abis: Remove unused patch In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 4 20:44:03 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 4 Dec 2017 20:44:03 +0000 Subject: meta-telephony[201705]: libosmo-abis: Split libosmo-trau into its own package In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) libosmo-trau -> libosmotrau and the rest looks fine. https://gerrit.osmocom.org/#/c/5169/1/recipes-osmocom/libosmo-abis/libosmo-abis.inc File recipes-osmocom/libosmo-abis/libosmo-abis.inc: Line 7: INC_PR="r3.${META_TELEPHONY_OSMO_INC}" We can drop the INC_PR with our version of Yocto/Poky Linux Line 13: PACKAGES =+ "libosmo-trau libosmo-trau-dev" call it libosmotrau when the library is called like this? -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-HasComments: Yes From admin at opensuse.org Mon Dec 4 22:20:55 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Dec 2017 22:20:55 +0000 Subject: Build failure of network:osmocom:nightly/osmo-mgw in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a25e54de8aff_9828e0f58244310@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-mgw/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-mgw failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-mgw Last lines of build log: [ 942s] -o=- 1 23 IN IP4 10.9.1.120 [ 942s] -s=- [ 942s] -c=IN IP4 10.9.1.120 [ 942s] -t=0 0 [ 942s] -m=audio 16002 RTP/AVP 98 [ 942s] -a=rtpmap:98 AMR/8000 [ 942s] -a=ptime:20 [ 942s] - [ 942s] ------ [ 942s] -response cb received: [ 942s] - head.response_code = 200 [ 942s] - head.trans_id = 1 [ 942s] - head.comment = OK [ 942s] - audio_port = 16002 [ 942s] - audio_ip = 10.9.1.120 [ 942s] - [ 942s] -Generated CRCX message: [ 942s] -CRCX 1 23 at mgw MGCP 1.0 [ 942s] -C: 2f [ 942s] -I: 11 [ 942s] -L: p:20, a:AMR, nt:IN [ 942s] -M: sendrecv [ 942s] - [ 944s] -Generated MDCX mes[ 886.510285] SysRq : Power Off [ 944s] [ 886.590583] reboot: Power down [ 945s] ### VM INTERACTION END ### [ 945s] [ 945s] armbuild21 failed "build osmo-mgw_1.2.0.20171204.dsc" at Mon Dec 4 22:20:53 UTC 2017. [ 945s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 5 09:07:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 09:07:14 +0000 Subject: osmo-ggsn[master]: ggsn: Ignore PCO with length 0, don't abort processing In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:28 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:28 +0000 Subject: [MERGED] osmo-mgw[master]: client: use string as connection identifier In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: client: use string as connection identifier ...................................................................... client: use string as connection identifier The test that tests the cancelation of a pending mgcp message uses an integer as connection identifier, which leads to a segfault since connection identifiers are represented as strings. Use a string as connection identifier. Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 172faac..ef2fca8 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -236,7 +236,7 @@ .endpoint = "23 at mgw", .audio_port = 1234, .call_id = 47, - .conn_id = 11, + .conn_id = "11", .conn_mode = MGCP_CONN_RECV_SEND, .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE), -- To view, visit https://gerrit.osmocom.org/5167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I395a23c1828cf216031d69d481ad35dd458ee7d4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:39 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: add returncode check In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: mgcp_test: add returncode check ...................................................................... mgcp_test: add returncode check The returncode of get_conn_id_from_response() is unchecked, which is intentional since some of the test messages will intentionally cause this function to fail (the response does not inclde a connection identifier). This means it makes no sense to assert this function to a fixed value. In order to spot regressions better print a log message depending on the return code. Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Fixes: Coverity CID#180534 --- M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 2 files changed, 33 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 1c57347..ee49eef 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -636,6 +636,7 @@ int i; struct mgcp_conn_rtp *conn = NULL; char last_conn_id[256]; + int rc; cfg = mgcp_config_alloc(); @@ -675,9 +676,14 @@ OSMO_ASSERT(false); } - if (msg) - get_conn_id_from_response(msg->data, last_conn_id, - sizeof(last_conn_id)); + if (msg) { + rc = get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + if (rc) + printf("(response contains a connection id)\n"); + else + printf("(response does not contain a connection id)\n"); + } msgb_free(msg); diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index c764531..23f0658 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -22,6 +22,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing AUEP2 @@ -33,6 +34,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX1 @@ -44,6 +46,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing MDCX2 @@ -55,6 +58,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -75,6 +79,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -88,6 +93,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -111,6 +117,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -134,6 +141,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -157,6 +165,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -180,6 +189,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -203,6 +213,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) ================================================ Testing MDCX4_RO @@ -217,6 +228,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -231,6 +243,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX_ZYN @@ -243,6 +256,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -263,6 +277,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT2 @@ -273,6 +288,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT3 @@ -283,6 +299,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing SHORT4 @@ -293,6 +310,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT1 @@ -306,6 +324,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing RQNT2 @@ -319,6 +338,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing DLCX @@ -332,6 +352,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX @@ -352,6 +373,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -365,6 +387,7 @@ checking response: using message with patched conn_id for comparison Response matches our expectations. +(response does not contain a connection id) Dummy packets: 2 ================================================ @@ -379,6 +402,7 @@ checking response: using message as statically defined for comparison Response matches our expectations. +(response contains a connection id) ================================================ Testing CRCX -- To view, visit https://gerrit.osmocom.org/5174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9bce9ca39b7751b557374b7ab57c6c9005bcdb7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:39 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: fix possible double free In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: mgcp_test: fix possible double free ...................................................................... mgcp_test: fix possible double free Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a --- M tests/mgcp/mgcp_test.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index ee49eef..330d24d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -685,7 +685,8 @@ printf("(response does not contain a connection id)\n"); } - msgb_free(msg); + if (msg) + msgb_free(msg); if (dummy_packets) printf("Dummy packets: %d\n", dummy_packets); -- To view, visit https://gerrit.osmocom.org/5175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d044382c0bb66e190400e3397449c3f2387359a Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:40 +0000 Subject: [MERGED] osmo-mgw[master]: conn: remove assertions In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: conn: remove assertions ...................................................................... conn: remove assertions the assertions in the code that handles the connection lists introduce a lot of unnecessary bloat. Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 --- M src/libosmo-mgcp/mgcp_conn.c 1 file changed, 0 insertions(+), 25 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index ae3f026..4090a9f 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -124,10 +124,6 @@ struct mgcp_conn *conn; int rc; - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - OSMO_ASSERT(strlen(name) < sizeof(conn->name)); - /* Do not allow more then two connections */ if (llist_count(&endp->conns) >= endp->type->max_conns) return NULL; @@ -170,11 +166,6 @@ * \returns pointer to allocated connection, NULL if not found */ struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; llist_for_each_entry(conn, &endp->conns, entry) { @@ -192,11 +183,6 @@ struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -214,11 +200,6 @@ * \param[in] id identification number of the connection */ void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id) { - OSMO_ASSERT(endp); - OSMO_ASSERT(id); - OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; conn = mgcp_conn_get(endp, id); @@ -246,9 +227,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_oldest(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; if (llist_empty(&endp->conns)) @@ -265,9 +243,6 @@ * \param[in] endp associated endpoint */ void mgcp_conn_free_all(struct mgcp_endpoint *endp) { - OSMO_ASSERT(endp); - OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL); - struct mgcp_conn *conn; struct mgcp_conn *conn_tmp; -- To view, visit https://gerrit.osmocom.org/5107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:40 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: fix nullpointer dereference In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: mgcp_test: fix nullpointer dereference ...................................................................... mgcp_test: fix nullpointer dereference Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Fixes: Coverity CID#180536 --- M tests/mgcp/mgcp_test.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 86edf00..1c57347 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -788,7 +788,7 @@ msg = mgcp_handle_message(cfg, inp); msgb_free(inp); - if (check_response(msg->data, t->exp_resp) != 0) { + if (msg && check_response(msg->data, t->exp_resp) != 0) { printf("%s failed '%s'\n", t->name, (char *)msg->data); OSMO_ASSERT(false); } @@ -799,7 +799,8 @@ OSMO_ASSERT(rc == 0); } - msgb_free(msg); + if (msg) + msgb_free(msg); /* Retransmit... */ printf("Re-transmitting %s\n", t->name); -- To view, visit https://gerrit.osmocom.org/5173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2ee79eaaca2fada673baf6ff4c226aa16c26269 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 10:19:40 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_test: fix wrong strcmp() parameters In-Reply-To: References: Message-ID: dexter has submitted this change and it was merged. Change subject: mgcp_test: fix wrong strcmp() parameters ...................................................................... mgcp_test: fix wrong strcmp() parameters The CRCX string parameter lacks the quotes and the result of the function call is not checked against zero. Also the return code of get_conn_id_from_response() is not asserted. Fixes: Coverity CID#180534 Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9 --- M tests/mgcp/mgcp_test.c 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index fb99911..86edf00 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -765,6 +765,7 @@ struct mgcp_config *cfg; int i; char last_conn_id[256]; + int rc; cfg = mgcp_config_alloc(); @@ -792,9 +793,11 @@ OSMO_ASSERT(false); } - if (msg && strcmp(t->name, CRCX)) - get_conn_id_from_response(msg->data, last_conn_id, - sizeof(last_conn_id)); + if (msg && strcmp(t->name, "CRCX") == 0) { + rc = get_conn_id_from_response(msg->data, last_conn_id, + sizeof(last_conn_id)); + OSMO_ASSERT(rc == 0); + } msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5172 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 10:19:49 +0000 Subject: meta-telephony[201705]: libosmo-abis: Remove unused patch In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:19:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 10:19:53 +0000 Subject: [MERGED] meta-telephony[201705]: libosmo-abis: Remove unused patch In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: libosmo-abis: Remove unused patch ...................................................................... libosmo-abis: Remove unused patch The patch was applied upstream in 37fcd93a508b52f6f33bf47191bba41cb7367b0d, and removed from libosmo-abis recipe in meta-telephony d91abc18f1a1d0003fe946c5dce173f1946b9712. Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 --- D recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch 1 file changed, 0 insertions(+), 21 deletions(-) Approvals: Pau Espin Pedrol: Verified Holger Freyther: Looks good to me, approved diff --git a/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch b/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch deleted file mode 100644 index 63c5052..0000000 --- a/recipes-osmocom/libosmo-abis/files/fix-rsl-connect.patch +++ /dev/null @@ -1,21 +0,0 @@ -The line is not initiliazed to E1INP_TS_TYPE_SIGN by default - -diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c -index 145e471..49424e7 100644 ---- a/src/input/ipaccess.c -+++ b/src/input/ipaccess.c -@@ -915,12 +915,14 @@ int e1inp_ipa_bts_rsl_connect_n(struct e1inp_line *line, - "trx_nr (%d) out of range\n", trx_nr); - return -EINVAL; - } -+/* - if (line->ts[E1INP_SIGN_RSL+trx_nr-1].type != E1INP_TS_TYPE_SIGN) { - LOGP(DLINP, LOGL_ERROR, "cannot create RSL BTS link: " - "trx_nr (%d) does not refer to a signalling link\n", - trx_nr); - return -EINVAL; - } -+*/ - - rsl_link = ipa_client_conn_create(tall_ipa_ctx, - &line->ts[E1INP_SIGN_RSL+trx_nr-1], -- To view, visit https://gerrit.osmocom.org/5168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7cf50808f0b826e82614ecd5844ab082ac017873 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 10:25:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 10:25:31 +0000 Subject: [PATCH] meta-telephony[201705]: libosmo-abis: Split libosmotrau into its own package In-Reply-To: References: Message-ID: Hello Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5169 to look at the new patch set (#2). libosmo-abis: Split libosmotrau into its own package Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be --- M recipes-osmocom/libosmo-abis/libosmo-abis.inc 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/69/5169/2 diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc index 15a512a..3f1ce3c 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis.inc +++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc @@ -10,4 +10,11 @@ inherit autotools pkgconfig -ALLOW_EMPTY_libosmo-abis = "1" +PACKAGES =+ "libosmotrau libosmotrau-dev" + +FILES_libosmotrau = "${libdir}/libosmotrau${SOLIBS}" +FILES_libosmotrau-dev = " \ + ${includedir}/osmocom/trau \ + ${libdir}/pkgconfig/libosmotrau.pc \ + ${libdir}/libosmotrau${SOLIBSDEV} \ + " -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:05:22 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 11:05:22 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-nightly/latest: check if osc is installed Message-ID: Review at https://gerrit.osmocom.org/5179 osmocom-nightly/latest: check if osc is installed Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/79/5179/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 6933baa..d0f64e0 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -8,6 +8,11 @@ DT=$(date +%Y%m%d) TOP=$(pwd) +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary is not installed" + exit 1 +fi + # start with a checkout of the project if [ -d $PROJ ]; then (cd $PROJ && osc up) diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 8c7a732..b4e2335 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -6,6 +6,11 @@ exit 1 fi +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary is not installed" + exit 1 +fi + set -x -e git clone git://git.osmocom.org/osmo-sip-connector -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:09:11 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add OsmoGgsn class In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add OsmoGgsn class ...................................................................... Add OsmoGgsn class Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 --- A src/osmo_gsm_tester/osmo_ggsn.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl 3 files changed, 169 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py new file mode 100644 index 0000000..c11353c --- /dev/null +++ b/src/osmo_gsm_tester/osmo_ggsn.py @@ -0,0 +1,89 @@ +# osmo_gsm_tester: specifics for running an openggsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoGgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + + def __init__(self, suite_run, ip_address): + super().__init__(log.C_RUN, 'osmo-ggsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-ggsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-ggsn'))) + + binary = inst.child('bin', 'osmo-ggsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-ggsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(ggsn=config.get_defaults('ggsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(ggsn=dict(ip_address=self.ip_address))) + config.overlay(values, dict(ggsn=dict(statedir=self.run_dir.new_dir('statedir')))) + + self.dbg('GGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-ggsn.cfg', values) + self.dbg(r) + f.write(r) + + def conf_for_client(self): + return dict(ggsn=dict(ip_address=self.ip_address)) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 2d04937..8c1d38d 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme class Timeout(Exception): pass @@ -230,6 +230,11 @@ ip_address = self.ip_address() return osmo_hlr.OsmoHlr(self, ip_address) + def ggsn(self, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_ggsn.OsmoGgsn(self, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl new file mode 100644 index 0000000..1ee19d1 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl @@ -0,0 +1,74 @@ +! +! OpenGGSN (0.94.1-adac) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level ip info + logging level tun info + logging level ggsn info + logging level sgsn notice + logging level icmp6 notice + logging level lglobal notice + logging level llapd notice + logging level linp notice + logging level lmux notice + logging level lmi notice + logging level lmib notice + logging level lsms notice + logging level lctrl notice + logging level lgtp info + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 notice + logging level lsccp notice + logging level lsua notice + logging level lm3ua notice + logging level lmgcp notice + logging level all debug +! +stats interval 5 +! +line vty + no login +! +ggsn ggsn0 + gtp state-dir ${ggsn.statedir} + gtp bind-ip ${ggsn.ip_address.addr} + apn internet + gtpu-mode tun + tun-device tun4 + type-support v4 + ip prefix dynamic 176.16.222.0/24 + ip dns 0 8.8.8.8 + ip dns 1 8.8.8.4 + ip ifconfig 176.16.222.1/24 + no shutdown + apn inet6 + gtpu-mode tun + tun-device tun6 + type-support v6 + ipv6 prefix dynamic fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 + ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + no shutdown + apn inet46 + gtpu-mode tun + tun-device tun46 + type-support v4v6 + ip prefix dynamic 176.16.46.0/24 + ip dns 0 192.168.100.1 + ip dns 1 8.8.8.8 + ip ifconfig 176.16.46.0/24 + ipv6 prefix dynamic fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 dns 0 2001:4860:4860::8888 + ipv6 dns 1 2001:4860:4860::8844 + ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + no shutdown + default-apn internet + no shutdown ggsn -- To view, visit https://gerrit.osmocom.org/5001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:09:11 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add OsmoSgsn class In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add OsmoSgsn class ...................................................................... Add OsmoSgsn class Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb --- A src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl 3 files changed, 112 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py new file mode 100644 index 0000000..7a9c5ff --- /dev/null +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -0,0 +1,94 @@ +# osmo_gsm_tester: specifics for running an osmo-sgsn +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class OsmoSgsn(log.Origin): + suite_run = None + ip_address = None + run_dir = None + config_file = None + process = None + hlr = None + ggsn = None + + def __init__(self, suite_run, hlr, ggsn, ip_address): + super().__init__(log.C_RUN, 'osmo-sgsn_%s' % ip_address.get('addr')) + self.suite_run = suite_run + self.hlr = hlr + self.ggsn = ggsn + self.ip_address = ip_address + + def start(self): + self.log('Starting osmo-sgsn') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-sgsn'))) + + binary = inst.child('bin', 'osmo-sgsn') + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, + 'host %s' % self.addr()) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, + (binary, + '-c', os.path.abspath(self.config_file)), + env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file('osmo-sgsn.cfg') + self.dbg(config_file=self.config_file) + + values = dict(sgsn=config.get_defaults('sgsn')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(sgsn=dict(ip_address=self.ip_address))) + config.overlay(values, self.hlr.conf_for_client()) + config.overlay(values, self.ggsn.conf_for_client()) + + self.dbg('SGSN CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render('osmo-sgsn.cfg', values) + self.dbg(r) + f.write(r) + + def conf_for_client(self): + return dict(sgsn=dict(ip_address=self.ip_address)) + + def addr(self): + return self.ip_address.get('addr') + + def running(self): + return not self.process.terminated() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 8c1d38d..0d5f97a 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -22,7 +22,7 @@ import time import pprint from . import config, log, template, util, resource, schema, event_loop, test -from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, modem, esme +from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, modem, esme class Timeout(Exception): pass @@ -235,6 +235,11 @@ ip_address = self.ip_address() return osmo_ggsn.OsmoGgsn(self, ip_address) + def sgsn(self, hlr, ggsn, ip_address=None): + if ip_address is None: + ip_address = self.ip_address() + return osmo_sgsn.OsmoSgsn(self, hlr, ggsn, ip_address) + def mgcpgw(self, ip_address=None, bts_ip=None): if ip_address is None: ip_address = self.ip_address() diff --git a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl index 4955983..9faf316 100644 --- a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl @@ -2,13 +2,21 @@ ! Osmocom SGSN configuration ! ! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging print extended-timestamp 1 + logging level all debug line vty no login -! sgsn - gtp local-ip 127.0.0.1 - ggsn 0 remote-ip 127.0.0.1 + gtp local-ip ${sgsn.ip_address.addr} + ggsn 0 remote-ip ${ggsn.ip_address.addr} ggsn 0 gtp-version 1 + auth-policy remote + gsup remote-ip ${hlr.ip_address.addr} + gsup remote-port 4222 ! ns timer tns-block 3 @@ -18,7 +26,7 @@ timer tns-test 30 timer tns-alive 3 timer tns-alive-retries 10 - encapsulation udp local-ip 127.0.0.1 + encapsulation udp local-ip ${sgsn.ip_address.addr} encapsulation udp local-port 23000 encapsulation framerelay-gre enabled 0 ! -- To view, visit https://gerrit.osmocom.org/5002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:09:11 +0000 Subject: [MERGED] osmo-gsm-tester[master]: bts_*: Add ready_for_pcu API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: bts_*: Add ready_for_pcu API ...................................................................... bts_*: Add ready_for_pcu API This is required to start osmo-pcu after osmo-bts is already setup and activated. Otherwise osmo-pcu ends after connecting to socket with: "pcu_l1_if.cpp:416 BTS not available" Change-Id: I7209589f60bda63094336e417638906be5e273c4 --- M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl 6 files changed, 32 insertions(+), 9 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index bc93a3a..d9ffd6e 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,6 +32,7 @@ values = None lac = None cellid = None + proc_bts = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -83,10 +84,9 @@ self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) - self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', '-c', os.path.abspath(self.config_file), '-i', self.bsc.addr(), '-t', str(self.num_trx())) - #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1') self.suite_run.poll() def launch_process(self, binary_name, *args): @@ -168,6 +168,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index a964169..d30c1ee 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,6 +32,7 @@ pcu_sk_tmp_dir = None lac = None cellid = None + proc_bts = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -92,10 +93,9 @@ raise RuntimeError('No lib/ in %r' % self.inst) self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', + self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', '-c', os.path.abspath(self.config_file), '-i', self.bsc.addr()) - #self.launch_process(OsmoBtsTrx.BIN_PCU, '-r', '1') self.suite_run.poll() def launch_process(self, binary_name, *args): @@ -146,6 +146,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index fc546ae..1a7b139 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,6 +31,7 @@ remote_dir = None lac = None cellid = None + proc_bts = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -76,11 +77,11 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + self.proc_bts = self.launch_remote('osmo-bts-sysmo', + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()), + remote_cwd=remote_run_dir) def cleanup(self): pass @@ -105,6 +106,7 @@ proc = self._process_remote(name, popen_args, remote_cwd) self.suite_run.remember_to_stop(proc) proc.launch() + return proc def run_local(self, name, popen_args): run_dir = self.run_dir.new_dir(name) @@ -153,6 +155,11 @@ self.dbg(conf=values) return values + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + def set_bsc(self, bsc): self.bsc = bsc diff --git a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl index 13cdb1d..906e7b9 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-octphy.cfg.tmpl @@ -9,6 +9,8 @@ logging level rll debug logging level rr debug logging level rsl debug + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! %for phy in osmo_bts_octphy.phy_list: diff --git a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl index 69f7ac1..c9dde86 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-sysmo.cfg.tmpl @@ -9,6 +9,8 @@ logging level rll debug logging level rr debug logging level rsl debug + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! phy 0 instance 0 diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl index c316e62..1931e9b 100644 --- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl @@ -12,6 +12,8 @@ logging level l1c info logging level l1p error logging level trx info + ! Level required by ready_for_pcu(): pcu info + logging level pcu info ! phy 0 osmotrx ip local ${osmo_bts_trx.trx_local_ip} -- To view, visit https://gerrit.osmocom.org/5067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7209589f60bda63094336e417638906be5e273c4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:09:11 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resource: next_lac: Avoid using LAC 0 In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resource: next_lac: Avoid using LAC 0 ...................................................................... resource: next_lac: Avoid using LAC 0 Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f --- M src/osmo_gsm_tester/resource.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 746aae0..8412d6a 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -211,7 +211,8 @@ return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) def next_lac(self, origin): - return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + # LAC=0 has special meaning (MS detached), avoid it + return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) -- To view, visit https://gerrit.osmocom.org/5066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:50 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 11:09:50 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5158 to look at the new patch set (#2). TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It be neecessary to change this later on after spec review. N. B. - some timers are still used as before: * T3169: changing would require changing test output * T3193: changing causes segfault * T0: used for assign/reject timeouts, have to be properly attributed and documented first This will be fixed in follow-up patches. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 4 files changed, 149 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/2 diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..b349d5e 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -163,6 +164,12 @@ n3105(0), T(0), num_T_exp(0), + num_T3169_exp(0), + num_T3191_exp(0), + num_T3193_exp(0), + num_T3195_exp(0), + num_T3197_exp(0), + num_T3199_exp(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -183,6 +190,12 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T3169, 0, sizeof(T3169)); + memset(&T3191, 0, sizeof(T3191)); + memset(&T3193, 0, sizeof(T3193)); + memset(&T3195, 0, sizeof(T3195)); + memset(&T3197, 0, sizeof(T3197)); + memset(&T3199, 0, sizeof(T3199)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -465,6 +478,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -550,9 +564,30 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +static inline void t_stop(const char *tbf_name, struct osmo_timer_list *t, uint16_t num, const char *reason) { - return stop_timer("T3191"); + if (osmo_timer_pending(t)) { + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", tbf_name, num, reason); + osmo_timer_del(t); + } +} + +#define STOP_T(nn) void gprs_rlcmac_tbf::stop_t##nn(const char *reason) { t_stop(tbf_name(this), &T##nn, nn, reason); } + +STOP_T(3169) +STOP_T(3191) +STOP_T(3193) +STOP_T(3195) +STOP_T(3197) +STOP_T(3199) + +void gprs_rlcmac_tbf::stop_timers(const char *reason) { + stop_t3169(reason); + stop_t3191(reason); + stop_t3193(reason); + stop_t3195(reason); + stop_t3197(reason); + stop_t3199(reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -563,6 +598,62 @@ osmo_timer_del(&timer); } } + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, uint16_t num, bool run_diag, bool free_tbf) +{ + LOGP(DRLCMAC, LOGL_NOTICE, "%s T%u timeout expired, freeing TBF\n", + tbf_name(tbf), num, free_tbf ? "freeing" : "ignoring"); + + if (run_diag) + tbf->rlcmac_diag(); + + if (free_tbf) + tbf_free(tbf); +} + +#define T_CBACK(nn, diag, free) \ + static void tbf_timer_cb##nn(void *_tbf) { \ + struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)_tbf; \ + tbf_timeout_free(tbf, nn, diag, free); \ + tbf->num_T ## nn ## _exp++; \ + } + +T_CBACK(3169, true, true) +T_CBACK(3191, true, true) +T_CBACK(3193, false, true) +T_CBACK(3195, true, true) +T_CBACK(3197, false, false) +T_CBACK(3199, false, false) + +typedef void (*t_cback)(void *_tbf); + +static inline void t_sched(struct gprs_rlcmac_tbf *tbf, struct osmo_timer_list *t, uint64_t *exp, uint16_t num, + uint32_t sec, uint32_t microsec, t_cback cback, const char *reason, bool force_restart) +{ + if (!force_restart && osmo_timer_pending(t)) + return; + + LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer T%u [%s] with %u sec. %u microsec.\n", + tbf_name(tbf), osmo_timer_pending(t) ? "re" : "", num, reason, sec, microsec); + + t->data = tbf; + t->cb = cback; + + *exp = 0; + osmo_timer_schedule(t, sec, microsec); +} + +#define START_T(nn) \ + void gprs_rlcmac_tbf::start_t##nn(uint32_t sec, uint32_t microsec, const char *reason, bool force) { \ + t_sched(this, &T##nn, &num_T ## nn ##_exp, nn, sec, microsec, &tbf_timer_cb##nn, reason, force); \ + } + +START_T(3169) +START_T(3191) +START_T(3193) +START_T(3195) +START_T(3197) +START_T(3199) int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, uint32_t *poll_fn_, unsigned int *rrbp_) @@ -685,7 +776,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + start_t3195(bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +798,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + start_t3195(bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +824,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->start_t3195(dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1004,6 +1095,7 @@ tbf->handle_timeout(); } +/* FIXME: remove this once the switch over to start_t31*()/stop_t31*() is complete */ void gprs_rlcmac_tbf::handle_timeout() { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", @@ -1053,13 +1145,11 @@ } break; case 3169: - case 3191: - case 3195: LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " "transsmission\n", tbf_name(this), T); rlcmac_diag(); /* fall through */ - case 3193: + case 3193: /* FIXME: remove once issue with start_t3193() is resolved */ LOGP(DRLCMAC, LOGL_DEBUG, "%s will be freed due to timeout\n", tbf_name(this)); /* free TBF */ diff --git a/src/tbf.h b/src/tbf.h index 80249df..597a6d8 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -175,7 +175,19 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + void stop_t3169(const char *reason); + void stop_t3191(const char *reason); + void stop_t3193(const char *reason); + void stop_t3195(const char *reason); + void stop_t3197(const char *reason); + void stop_t3199(const char *reason); + void start_t3169(uint32_t sec, uint32_t microsec, const char *reason, bool force); + void start_t3191(uint32_t sec, uint32_t microsec, const char *reason, bool force); + void start_t3193(uint32_t sec, uint32_t microsec, const char *reason, bool force); + void start_t3195(uint32_t sec, uint32_t microsec, const char *reason, bool force); + void start_t3197(uint32_t sec, uint32_t microsec, const char *reason, bool force); + void start_t3199(uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -248,6 +260,35 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ unsigned int num_T_exp; /* number of consecutive T expirations */ + + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + struct osmo_timer_list T3169; + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + struct osmo_timer_list T3191; + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + struct osmo_timer_list T3193; + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + struct osmo_timer_list T3195; + + /* Wait for the indication from the MS that it has received needed system information + messages. */ + struct osmo_timer_list T3197; + + /* Wait for reuse of MS_ID on an MBMS radio bearer. */ + struct osmo_timer_list T3199; + + uint64_t num_T3169_exp; /* number of consecutive T3169 expirations */ + uint64_t num_T3191_exp; /* number of consecutive T3191 expirations */ + uint64_t num_T3193_exp; /* number of consecutive T3193 expirations */ + uint64_t num_T3195_exp; /* number of consecutive T3195 expirations */ + uint64_t num_T3197_exp; /* number of consecutive T3197 expirations */ + uint64_t num_T3199_exp; /* number of consecutive T3199 expirations */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..8c8c442 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -489,6 +489,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -658,7 +659,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + stop_t3191("ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -861,7 +862,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + start_t3191(bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1124,6 +1125,10 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ + /* FIXME: using + start_t3193(bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)", true); + causes segfault + */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..23790de 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,7 +51,8 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(osmo_timer_pending(&tbf->T3191) || tbf->T == 3193); + /* FIXME: use ... || osmo_timer_pending(&tbf->T3193) above once issue with start_t3193() is resolved */ if (tbf->state_is(GPRS_RLCMAC_RELEASING)) OSMO_ASSERT(tbf->T != 0); } -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:09:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 11:09:51 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: use independent T3169 Message-ID: Review at https://gerrit.osmocom.org/5180 TBF: use independent T3169 Previously T3169 was handled using generic timer which means pending T3169 was automatically cancelled by any new timer scheduled which used the same timer on that TBF. Make it independent so it can be explicitly scheduled and stopped regardless of other timers. Additionally this allows us to control whether it should be restarted if it's already pending. Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 4 files changed, 11 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/80/5180/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..6f76d84 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->start_t3169(m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index b349d5e..e7635f2 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -407,7 +407,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->start_t3169(bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -754,7 +754,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->start_t3169(ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -1144,11 +1144,6 @@ "IMM.ASS confirm\n", tbf_name(dl_tbf)); } break; - case 3169: - LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " - "transsmission\n", tbf_name(this), T); - rlcmac_diag(); - /* fall through */ case 3193: /* FIXME: remove once issue with start_t3193() is resolved */ LOGP(DRLCMAC, LOGL_DEBUG, "%s will be freed due to timeout\n", tbf_name(this)); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..b63988b 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + start_t3169(bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f534c54..f09f732 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1897,8 +1897,15 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) IMSI 0011223344: moving DL TBF to new MS object Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Attaching TBF to MS object, TLLI = 0xf5667788, TBF = TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) +UL RSSI of TLLI=0xf1223344: 31 dBm +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] +PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 1 TBFs, USFs = 02, TFIs = 00000002. +Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) +********** TBF ends here ********** Modifying MS object, TLLI = 0xf5667788, IMSI '' -> '0011223344' Clearing MS object, TLLI: 0xf1223344, IMSI: '0011223344' +Destroying MS object, TLLI = 0x00000000 TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) append Modifying MS object, TLLI: 0xf5667788 confirmed New MS: TLLI = 0xf5667788, TA = 7, IMSI = 0011223344, LLC = 1 -- To view, visit https://gerrit.osmocom.org/5180 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 11:13:42 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... Message-ID: Review at https://gerrit.osmocom.org/5181 osmocom-nightly/latest: document which debian packages are required Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/81/5181/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index d0f64e0..118f310 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -1,5 +1,8 @@ #!/bin/sh +# requirements +# apt install git-buildpackage osc git + set -e # OBS project name diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index b4e2335..aa32214 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -1,5 +1,8 @@ #!/bin/sh +# requirements +# apt install devscripts git-buildpackage osc git + # rather than including a dangerous 'rm -rf *' here, lets delegate to the user: if [ -n "$(ls)" ]; then echo "ERROR: I need to run in an empty directory." -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:15:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 11:15:51 +0000 Subject: [PATCH] libosmocore[master]: Embedded: fix sercomm test In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5159 to look at the new patch set (#2). Embedded: fix sercomm test The external sercomm_drv_[un]lock() functions are defined as stubs in case of non-embedded build only which causes linking issue with sercomm_test. Let's define the same stubs in sercomm_test unconditionally - the implementation details of the locking are irrelevant for the test anyway. Related: OS#2708 Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 --- M tests/sercomm/sercomm_test.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/5159/2 diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index 058c9eb..4a40f62 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -27,6 +27,10 @@ struct osmo_sercomm_inst g_osi; +/* Locking details are not checked by this test anyway */ +void sercomm_drv_lock(unsigned long __attribute__((unused)) *flags) {} +void sercomm_drv_unlock(unsigned long __attribute__((unused)) *flags) {} + static const uint8_t valid_dlci3[] = { 0x7E, 3, 0x03, 'f', 'o', 'o', 0x7E }; static const uint8_t valid_dlci23[] = { 0x7E, 23, 0x03, '2', '3', 0x7E }; static const uint8_t valid_dlci23esc[] = { 0x7E, 23, 0x03, 0x7D, '2' ^ (1 << 5), '3', 0x7E }; -- To view, visit https://gerrit.osmocom.org/5159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 11:34:34 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: add N3101 counter Message-ID: Review at https://gerrit.osmocom.org/5182 TBF: add N3101 counter Properly reset the counter when receiving valid RLCMAC block and update it when no data is received as per 3GPP TS 44.060 ?8.1.1.1 Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Fixes: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h 3 files changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/5182/1 diff --git a/src/bts.cpp b/src/bts.cpp index 6f76d84..684ccc9 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -994,6 +994,10 @@ ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); LOGP(DRLCMAC, LOGL_DEBUG, "RX: [PCU <- BTS] %s Packet Control Ack\n", tbf_name(tbf)); @@ -1186,6 +1190,9 @@ return; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + if (tbf->handle_ack_nack()) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered downlink ack for %s\n", tbf_name(tbf)); @@ -1249,6 +1256,9 @@ "wrong TFI=%d, ignoring!\n", tfi); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; if (tbf->handle_ack_nack()) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered EGPRS downlink ack for %s\n", tbf_name(tbf)); @@ -1422,6 +1432,9 @@ LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n", tbf_name(dl_tbf)); + + /* Reset N3101 counter: */ + dl_tbf->m_n3101 = 0; } else { struct gprs_rlcmac_ul_tbf *ul_tbf; int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI; @@ -1433,6 +1446,9 @@ LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n", tbf_name(ul_tbf)); + + /* Reset N3101 counter: */ + ul_tbf->m_n3101 = 0; } } @@ -1585,6 +1601,9 @@ return 0; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas); } diff --git a/src/tbf.cpp b/src/tbf.cpp index e7635f2..d1a686a 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -176,6 +176,7 @@ was_releasing(0), upgrade_to_multislot(0), bts(bts_), + m_n3101(0), m_tfi(0), m_created_ts(0), m_ctrs(NULL), @@ -740,6 +741,14 @@ poll_state = GPRS_RLCMAC_POLL_NONE; + m_n3101++; + if (m_n3101 == bts->bts_data()->n3101) { + LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); + set_state(GPRS_RLCMAC_RELEASING); + start_t3169(bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + return; + } + if (ul_tbf && ul_tbf->handle_ctrl_ack()) { if (!ul_tbf->ctrl_ack_to_toggle()) { LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK\n"); diff --git a/src/tbf.h b/src/tbf.h index 597a6d8..66c7c36 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -316,6 +316,8 @@ /* store the BTS this TBF belongs to */ BTS *bts; + uint8_t m_n3101; /* N3101 counter */ + /* * private fields. We can't make it private as it is breaking the * llist macros. -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:36:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 11:36:12 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5010 to look at the new patch set (#4). suites: aoip_debug: Start GPRS services Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 --- M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf 2 files changed, 43 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/10/5010/4 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cad68b7..312083a 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -2,30 +2,40 @@ from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() +pcu = bts.pcu() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) msc = suite.msc(hlr, mgcpgw, stp) bsc = suite.bsc(msc, mgw_bsc, stp) + modems = suite.modems(int(prompt('How many modems?'))) + +bsc.bts_add(bts) +sgsn.bts_add(bts) hlr.start() stp.start() +ggsn.start() +sgsn.start() msc.start() mgcpgw.start() mgw_bsc.start() - -bsc.bts_add(bts) bsc.start() bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() for m in modems: hlr.subscriber_add(m) m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -115,5 +125,34 @@ response = ms.ussd_send(ussd_cmd) print('modem %s: response=%r' % (ms.name(), response)) + elif cmd.startswith('data-attach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: attach' % ms.name()) + ms.attach() + wait(ms.is_attached) + print('modem %s: attached' % ms.name()) + + elif cmd.startswith('data-detach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: detach' % ms.name()) + ms.attach() + wait(lambda: not ms.is_attached()) + print('modem %s: detached' % ms.name()) + + elif cmd.startswith('data-activate'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: activate' % ms.name()) + response = ms.activate_context() + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index d75cacb..2f36e1d 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 6 + - times: 8 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5011 to look at the new patch set (#4). suites: gprs: Introduce suite with ping test Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus we don't test sending data yet here, but at least we can already test pdp context activation. This test will be extended to run ping once we support setting up the GPRS data plane in osmo-gsm-tester. Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b --- M example/resources.conf A suites/gprs/ping.py A suites/gprs/suite.conf 3 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/5011/4 diff --git a/example/resources.conf b/example/resources.conf index d503a48..26e1d80 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -7,6 +7,8 @@ - addr: 10.42.42.5 - addr: 10.42.42.6 - addr: 10.42.42.7 +- addr: 10.42.42.8 +- addr: 10.42.42.9 bts: - label: sysmoBTS 1002 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py new file mode 100755 index 0000000..46ab540 --- /dev/null +++ b/suites/gprs/ping.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +hlr = suite.hlr() +bts = suite.bts() +pcu = bts.pcu() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() +stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) +ms = suite.modem() + +bsc.bts_add(bts) +sgsn.bts_add(bts) + +print('start network...') +hlr.start() +stp.start() +ggsn.start() +sgsn.start() +msc.start() +mgcpgw.start() +mgw_bsc.start() +bsc.start() + +bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) +ms.attach() + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('waiting for modems to attach to data services...') +wait(ms.is_attached) +ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) +# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) +# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) +# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v4) diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf new file mode 100644 index 0000000..1590b7d --- /dev/null +++ b/suites/gprs/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn + bts: + - times: 1 + modem: + - times: 1 + features: + - gprs -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5003 to look at the new patch set (#3). Add class OsmoPcuSysmo Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 --- A src/osmo_gsm_tester/pcu_sysmo.py A src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl 2 files changed, 139 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/5003/3 diff --git a/src/osmo_gsm_tester/pcu_sysmo.py b/src/osmo_gsm_tester/pcu_sysmo.py new file mode 100644 index 0000000..fd1b272 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_sysmo.py @@ -0,0 +1,127 @@ +# osmo_gsm_tester: specifics for running a osmo-pcu for sysmoBTS +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +from . import log, config, util, template, process, event_loop + +class OsmoPcuSysmo(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + remote_inst = None + remote_env = None + remote_dir = None + sysmobts = None + + REMOTE_DIR = '/osmo-gsm-tester-pcu' + PCU_SYSMO_BIN = 'osmo-pcu' + PCU_SYSMO_CFG = 'osmo-pcu-sysmo.cfg' + + def __init__(self, suite_run, sysmobts, conf): + super().__init__(log.C_RUN, self.PCU_SYSMO_BIN) + self.suite_run = suite_run + self.sysmobts = sysmobts + self.conf = conf + self.remote_env = {} + self.remote_user = 'root' + + def start(self): + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu-sysmo'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', OsmoPcuSysmo.PCU_SYSMO_BIN): + raise log.Error('No osmo-pcu-sysmo binary in', self.inst) + + self.remote_dir = util.Dir(OsmoPcuSysmo.REMOTE_DIR) + self.remote_inst = util.Dir(self.remote_dir.child(os.path.basename(str(self.inst)))) + + self.run_remote('rm-remote-dir', ('test', '!', '-d', OsmoPcuSysmo.REMOTE_DIR, '||', 'rm', '-rf', OsmoPcuSysmo.REMOTE_DIR)) + self.run_remote('mk-remote-dir', ('mkdir', '-p', OsmoPcuSysmo.REMOTE_DIR)) + self.run_local('scp-inst-to-sysmobts', + ('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), str(self.remote_inst)))) + + remote_run_dir = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_BIN) + self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) + + remote_config_file = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.run_local('scp-cfg-to-sysmobts', + ('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), remote_config_file))) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', OsmoPcuSysmo.PCU_SYSMO_BIN) + self.launch_remote(OsmoPcuSysmo.PCU_SYSMO_BIN, + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.sysmobts.bsc.addr()), + remote_cwd=remote_run_dir) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.sysmobts.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_pcu_sysmo': config.get_defaults('osmo_pcu_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu_sysmo': { + 'pcu_socket_path': self.sysmobts.pcu_socket_path() + } + }) + config.overlay(values, { 'osmo_pcu_sysmo': self.conf }) + + self.dbg('OSMO-PCU-SYSMO CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcuSysmo.PCU_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl new file mode 100644 index 0000000..632bc27 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl @@ -0,0 +1,12 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug +pcu + pcu-socket ${osmo_pcu_sysmo.pcu_socket_path} + flow-control-interval 10 + cs 2 + alloc-algorithm dynamic + alpha 0 + gamma 0 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5004 to look at the new patch set (#3). Add OsmoPcu class Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 --- A src/osmo_gsm_tester/pcu_osmo.py M src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl 2 files changed, 94 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/5004/3 diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py new file mode 100644 index 0000000..23c93eb --- /dev/null +++ b/src/osmo_gsm_tester/pcu_osmo.py @@ -0,0 +1,88 @@ +# osmo_gsm_tester: specifics for running an osmo-pcu +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoPcu(log.Origin): + suite_run = None + run_dir = None + inst = None + env = None + + BIN_PCU = 'osmo-pcu' + PCU_OSMO_CFG = 'osmo-pcu.cfg' + + def __init__(self, suite_run, bts, conf): + super().__init__(log.C_RUN, OsmoPcu.BIN_PCU) + self.suite_run = suite_run + self.bts = bts + self.conf = conf + self.env = {} + + def start(self): + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.launch_process(OsmoPcu.BIN_PCU, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bts.bsc.addr()) + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcu.PCU_OSMO_CFG) + self.dbg(config_file=self.config_file) + + values = dict(osmo_pcu=config.get_defaults('osmo_pcu')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu': { + 'pcu_socket_path': self.bts.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_pcu': self.conf }) + + self.dbg('OSMO-PCU CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcu.PCU_OSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl index b88e6e7..02382c2 100644 --- a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl @@ -1,4 +1,10 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug pcu + pcu-socket ${osmo_pcu.pcu_socket_path} flow-control-interval 10 cs 2 alloc-algorithm dynamic -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5068 to look at the new patch set (#3). bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 80 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/68/5068/3 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 70aa2b9..2ea8cc0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -51,9 +51,9 @@ ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts0 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts0 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts0 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts0 gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 @@ -122,9 +122,9 @@ ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts1 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts1 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -136,7 +136,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts1 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -144,7 +144,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts1 gprs nsvc 0 local udp port 23000 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 314dd8d..f4f1bd5 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,7 +22,9 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'routing_area_code': 'val_bts.routing_area_code', 'cell_identity': 'val_bts.cell_identity', + 'bvci': 'val_bts.bvci', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 6d4f634..9b1f077 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2466f9f..95db16d 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,9 +61,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -75,7 +75,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -83,7 +83,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 419d185..acedd0c 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5006 to look at the new patch set (#3). OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/3 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..70aa2b9 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b3761..2466f9f 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -59,7 +59,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..419d185 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none + % endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 11:46:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5007 to look at the new patch set (#3). OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn Change-Id: I777835345355538a945599fb088630af63dc9140 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/07/5007/3 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index d30c1ee..6d4f634 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsTrx(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -33,6 +34,7 @@ lac = None cellid = None proc_bts = None + _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -55,6 +57,11 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + if self._pcu is None: + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -143,6 +150,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -154,6 +165,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:02:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 12:02:35 +0000 Subject: [PATCH] osmo-msc[master]: sms db: don't attempt to query pending SMS for unset MSISDN Message-ID: Review at https://gerrit.osmocom.org/5183 sms db: don't attempt to query pending SMS for unset MSISDN When the subscriber has no MSISDN, we might construct an invalid SQL statement such as ... AND dest_addr= AND ... Instead, don't even query for empty MSISDNs. Related: OS#2706 Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e --- M src/libmsc/db.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/83/5183/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4e4477b..ca27b6a 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -840,6 +840,10 @@ if (!vsub->lu_complete) return NULL; + /* A subscriber having no phone number cannot possibly receive SMS. */ + if (*vsub->msisdn == '\0') + return NULL; + result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" -- To view, visit https://gerrit.osmocom.org/5183 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:02:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 12:02:35 +0000 Subject: [PATCH] osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries Message-ID: Review at https://gerrit.osmocom.org/5184 sms db: properly quote MSISDN in various SQL queries Related: OS#2706 Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 --- M src/libmsc/db.c 1 file changed, 18 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/84/5184/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index ca27b6a..eba4b1b 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -836,6 +836,7 @@ struct gsm_network *net = vsub->vlr->user_ctx; dbi_result result; struct gsm_sms *sms; + char *q_msisdn; if (!vsub->lu_complete) return NULL; @@ -844,13 +845,16 @@ if (*vsub->msisdn == '\0') return NULL; + dbi_conn_quote_string_copy(conn, vsub->msisdn, &q_msisdn); result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" - " AND dest_addr=%s" + " AND dest_addr = %s" " AND deliver_attempts <= %u" " ORDER BY id LIMIT 1", - vsub->msisdn, max_failed); + q_msisdn, max_failed); + free(q_msisdn); + if (!result) return NULL; @@ -872,14 +876,18 @@ { dbi_result result; struct gsm_sms *sms; + char *q_last_msisdn; + dbi_conn_quote_string_copy(conn, last_msisdn, &q_last_msisdn); result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" - " AND dest_addr > '%s'" + " AND dest_addr > %s" " AND deliver_attempts <= %u" " ORDER BY dest_addr, id LIMIT 1", - last_msisdn, max_failed); + q_last_msisdn, max_failed); + free(q_last_msisdn); + if (!result) return NULL; @@ -936,11 +944,16 @@ int db_sms_delete_by_msisdn(const char *msisdn) { dbi_result result; + char *q_msisdn; if (!msisdn || !*msisdn) return 0; + + dbi_conn_quote_string_copy(conn, msisdn, &q_msisdn); result = dbi_conn_queryf(conn, "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - msisdn, msisdn); + q_msisdn, q_msisdn); + free(q_msisdn); + if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to delete SMS for %s\n", msisdn); -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:10:27 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:10:27 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5068 to look at the new patch set (#4). bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 78 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/68/5068/4 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index ed96be7..c5471d0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -51,9 +51,9 @@ ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts0 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts0 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts0 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -122,9 +122,9 @@ ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts1 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts1 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -136,7 +136,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts1 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 diff --git a/selftest/template_test.py b/selftest/template_test.py index 314dd8d..f4f1bd5 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,7 +22,9 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'routing_area_code': 'val_bts.routing_area_code', 'cell_identity': 'val_bts.cell_identity', + 'bvci': 'val_bts.bvci', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 6d4f634..9b1f077 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2466f9f..95db16d 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,9 +61,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -75,7 +75,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -83,7 +83,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 419d185..acedd0c 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:10:27 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:10:27 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5006 to look at the new patch set (#4). OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/4 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..ed96be7 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci val_bts.bvci_bts0 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci val_bts.bvci_bts1 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b3761..2466f9f 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -59,7 +59,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..419d185 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none + % endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:15:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 12:15:56 +0000 Subject: osmo-msc[master]: sms db: don't attempt to query pending SMS for unset MSISDN In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5183 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:19:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 12:19:07 +0000 Subject: osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5184/1/src/libmsc/db.c File src/libmsc/db.c: Line 951: dbi_conn_quote_string_copy(conn, msisdn, &q_msisdn); You should check for return value. Line 955: free(q_msisdn); You shouldn't free memory if dbi_conn_quote_string_copy() failed to allocate it (which it might). -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:25:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 12:25:56 +0000 Subject: [PATCH] libosmocore[master]: Add osmo_timerfd_ functions for osmo_fd-wrapped timerfd Message-ID: Review at https://gerrit.osmocom.org/5185 Add osmo_timerfd_ functions for osmo_fd-wrapped timerfd Linux offers file descriptor based periodic (interval) timers, which can achieve a higher precision than our userspace based timers and which can be slave'd to CLOCK_MONOTINIC or other clock sources. Let's add some code for osmo_fd wrapped versions that integrate well with our select() abstraction. The code has been used in osmo-bts-trx since June 2017 (change-id I51b19adde14ebb7ef3bb863d45e06243c323e22e), and I'm just renaming and moving it to libosmocore here. After a merge, the osmo-bts implementations can be removed in favor if this one. Change-Id: Ibeffba7c997252c003723bcd5d14122c4ded2fe7 --- M configure.ac M include/osmocom/core/select.h M src/select.c 3 files changed, 74 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/5185/1 diff --git a/configure.ac b/configure.ac index f7acf05..e2b225e 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ dnl checks for header files AC_HEADER_STDC -AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h netinet/tcp.h) +AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h sys/timerfd.h syslog.h ctype.h netinet/tcp.h) # for src/conv.c AC_FUNC_ALLOCA AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h index b6fed3c..1ba6b83 100644 --- a/include/osmocom/core/select.h +++ b/include/osmocom/core/select.h @@ -6,6 +6,7 @@ #include #include +#include /*! \defgroup select Select loop abstraction * @{ @@ -54,4 +55,10 @@ int osmo_fd_fill_fds(void *readset, void *writeset, void *exceptset); int osmo_fd_disp_fds(void *readset, void *writeset, void *exceptset); +/* timerfd integration */ +int osmo_timerfd_disable(struct osmo_fd *ofd); +int osmo_timerfd_schedule(struct osmo_fd *ofd, const struct timespec *first, + const struct timespec *interval); +int osmo_timerfd_setup(struct osmo_fd *ofd, int (*cb)(struct osmo_fd *, unsigned int), void *data); + /*! @} */ diff --git a/src/select.c b/src/select.c index 1c62e01..0b115c6 100644 --- a/src/select.c +++ b/src/select.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -270,6 +271,71 @@ return NULL; } +#ifdef HAVE_SYS_TIMERFD_H +#include + +/*! disable the osmocom-wrapped timerfd */ +int osmo_timerfd_disable(struct osmo_fd *ofd) +{ + const struct itimerspec its_null = { + .it_value = { 0, 0 }, + .it_interval = { 0, 0 }, + }; + return timerfd_settime(ofd->fd, 0, &its_null, NULL); +} + +/*! schedule the osmcoom-wrapped timerfd to occur first at \a first, then periodically at \a interval + * \param[in] ofd Osmocom wrapped timerfd + * \param[in] first Relative time at which the timer should first execute (NULL = \a interval) + * \param[in] interval Time interval at which subsequent timer shall fire + * \returns 0 on success; negative on error */ +int osmo_timerfd_schedule(struct osmo_fd *ofd, const struct timespec *first, + const struct timespec *interval) +{ + struct itimerspec its; + + if (ofd->fd < 0) + return -EINVAL; + + /* first expiration */ + if (first) + its.it_value = *first; + else + its.it_value = *interval; + /* repeating interval */ + its.it_interval = *interval; + + return timerfd_settime(ofd->fd, 0, &its, NULL); +} + +/*! setup osmocom-wrapped timerfd + * \param[inout] ofd Osmocom-wrapped timerfd on which to operate + * \param[in] cb Call-back function called when timerfd becomes readable + * \param[in] data Opaque data to be passed on to call-back + * \returns 0 on success; negative on error + * + * We simply initialize the data structures here, but do not yet + * schedule the timer. + */ +int osmo_timerfd_setup(struct osmo_fd *ofd, int (*cb)(struct osmo_fd *, unsigned int), void *data) +{ + ofd->cb = cb; + ofd->data = data; + ofd->when = BSC_FD_READ; + + if (ofd->fd < 0) { + ofd->fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); + if (ofd->fd < 0) + return ofd->fd; + + osmo_fd_register(ofd); + } + return 0; +} + +#endif /* HAVE_SYS_TIMERFD_H */ + + /*! @} */ #endif /* _HAVE_SYS_SELECT_H */ -- To view, visit https://gerrit.osmocom.org/5185 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibeffba7c997252c003723bcd5d14122c4ded2fe7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:28:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 12:28:12 +0000 Subject: libosmocore[master]: Add osmo_timerfd_ functions for osmo_fd-wrapped timerfd In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5185/1/src/select.c File src/select.c: PS1, Line 326: ofd->fd < 0 this is the only controversial part: Do we force the user to initialize the unused ofd->fd to -1 and safely handle multiple successive calls to osmo_timerfd_setup(), OR do we work with normal zero-initialized structs, at which point "0" is a valid FD and we could not handle multiple calls to osmo_timerfd_setup() correctly. -- To view, visit https://gerrit.osmocom.org/5185 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeffba7c997252c003723bcd5d14122c4ded2fe7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:46:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 12:46:29 +0000 Subject: libosmocore[master]: Add osmo_timerfd_ functions for osmo_fd-wrapped timerfd In-Reply-To: References: Message-ID: Patch Set 1: I think the semantic should be the same as in osmo_fd_setup(). Not sure how it handles successive calls though. -- To view, visit https://gerrit.osmocom.org/5185 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeffba7c997252c003723bcd5d14122c4ded2fe7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:47:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 12:47:15 +0000 Subject: [PATCH] osmo-msc[master]: mncc: re-add lchan members to structs Message-ID: Review at https://gerrit.osmocom.org/5186 mncc: re-add lchan members to structs The lchan related struct members do not serve any useful purpose in the msc code, since the lchan concept is not in the scope of osmo-msc. However, if removed te struct size will change which will lead into shortened protocol messages as well. This is is detected by osmo-sip-connector and eventually leads into a reject ofthe shortended protocol messages. Re add the missing struct members in order to maintain compatibility This commit reverts the changes made to mncc.h by commit: e2f24d53e4f80b34ec6d656d93127cb598229a96 Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 --- M include/osmocom/msc/mncc.h 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/86/5186/1 diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 881e041..49f0c8b 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -155,6 +155,9 @@ int notify; /* 0..127 */ int emergency; char imsi[16]; + + unsigned char lchan_type; + unsigned char lchan_mode; }; struct gsm_data_frame { @@ -176,6 +179,7 @@ uint32_t called_offset; uint32_t signal_offset; uint32_t emergency_offset; + uint32_t lchan_type_offset; }; struct gsm_mncc_rtp { -- To view, visit https://gerrit.osmocom.org/5186 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:47:15 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Dec 2017 12:47:15 +0000 Subject: [PATCH] osmo-msc[master]: mncc: remove deprecated commandline option. Message-ID: Review at https://gerrit.osmocom.org/5187 mncc: remove deprecated commandline option. The commandline option -m has already been deprecated before the split. Use the split as an opportunity to get rid of this option. Change-Id: Ie23d492a839aae85470e39b0d0ad8f57b0d38f7e --- M src/osmo-msc/msc_main.c 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/87/5187/1 diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index b4bafd5..0d23697 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -133,7 +133,6 @@ printf(" -V --version Print the version of OpenBSC.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -M --mncc-sock-path PATH Disable built-in MNCC handler and offer socket.\n"); - printf(" -m --mncc-sock Same as `-M /tmp/bsc_mncc' (deprecated).\n"); printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n"); } @@ -151,13 +150,12 @@ {"timestamp", 0, 0, 'T'}, {"version", 0, 0, 'V' }, {"log-level", 1, 0, 'e'}, - {"mncc-sock", 0, 0, 'm'}, {"mncc-sock-path", 1, 0, 'M'}, {"no-dbcounter", 0, 0, 'C'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:Dsl:TVc:e:mCM:", + c = getopt_long(argc, argv, "hd:Dsl:TVc:e:CM:", long_options, &option_index); if (c == -1) break; @@ -190,9 +188,6 @@ break; case 'M': msc_cmdline_config.mncc_sock_path = optarg; - break; - case 'm': - msc_cmdline_config.mncc_sock_path = "/tmp/bsc_mncc"; break; case 'C': msc_cmdline_config.use_db_counter = 0; -- To view, visit https://gerrit.osmocom.org/5187 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie23d492a839aae85470e39b0d0ad8f57b0d38f7e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5009 to look at the new patch set (#6). modem: Add minimal GPRS support Up to this point we can test signalling plane: attaching to GPRS network and activating a context. Data plane (sending IP packets through the network) is still not implemented as it requires setting up the network interface provided by ofono as well as routing, and most probably move osmo-ggsn to its own network namespace. Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f --- M src/osmo_gsm_tester/modem.py 1 file changed, 59 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/09/5009/6 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index 0796fa6..206a081 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -37,6 +37,7 @@ I_MODEM = 'org.ofono.Modem' I_NETREG = 'org.ofono.NetworkRegistration' I_SMS = 'org.ofono.MessageManager' +I_CONNMGR = 'org.ofono.ConnectionManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' I_SS = 'org.ofono.SupplementaryServices' @@ -334,6 +335,10 @@ sms_received_list = None _ki = None + CTX_PROT_IPv4 = 'ip' + CTX_PROT_IPv6 = 'ipv6' + CTX_PROT_IPv46 = 'dual' + def __init__(self, conf): self.conf = conf self.path = conf.get('path') @@ -347,6 +352,7 @@ self.dbus.required_signals = { I_SMS: ( ('IncomingMessage', self._on_incoming_message), ), I_NETREG: ( ('PropertyChanged', self._on_netreg_property_changed), ), + I_CONNMGR: ( ('PropertyChanged', self._on_connmgr_property_changed), ), I_CALLMGR: ( ('PropertyChanged', self._on_callmgr_property_changed), ('CallAdded', self._on_callmgr_call_added), ('CallRemoved', self._on_callmgr_call_removed), ), @@ -430,6 +436,7 @@ req_ifaces = (I_NETREG,) req_ifaces += (I_SMS,) if 'sms' in self.features() else () req_ifaces += (I_SS,) if 'ussd' in self.features() else () + req_ifaces += (I_CONNMGR,) if 'gprs' in self.features() else () return req_ifaces def _on_netreg_property_changed(self, name, value): @@ -531,6 +538,8 @@ self.cancellable = Gio.Cancellable.new() def power_off(self): + if self.dbus.has_interface(I_CONNMGR) and self.is_attached(): + self.detach() self.set_online(False) self.set_powered(False) req_ifaces = self._required_ifaces() @@ -562,6 +571,53 @@ else: self.log('Connect to', mcc_mnc if mcc_mnc else 'default network') self.schedule_scan_register(mcc_mnc) + + def is_attached(self): + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.GetProperties() + attached = prop.get('Attached') + self.dbg('attached:', attached) + return attached + + def attach(self, allow_roaming=False): + self.dbg('attach') + if self.is_attached(): + self.detach() + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', allow_roaming)) + prop = connmgr.SetProperty('Powered', Variant('b', True)) + + def detach(self): + self.dbg('detach') + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', False)) + prop = connmgr.SetProperty('Powered', Variant('b', False)) + connmgr.DeactivateAll() + connmgr.ResetContexts() # Requires Powered=false + + def activate_context(self, apn='internet', user='ogt', pwd='', protocol='ip'): + self.dbg('activate_context', apn=apn, user=user) + + connmgr = self.dbus.interface(I_CONNMGR) + ctx_path = connmgr.AddContext('internet') + + ctx = systembus_get(ctx_path) + ctx.SetProperty('AccessPointName', Variant('s', apn)) + ctx.SetProperty('Username', Variant('s', user)) + ctx.SetProperty('Password', Variant('s', pwd)) + ctx.SetProperty('Protocol', Variant('s', protocol)) + + # Activate can only be called after we are attached + ctx.SetProperty('Active', Variant('b', True)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == True) + self.log('context activated', path=ctx_path, apn=apn, user=user, properties=ctx.GetProperties()) + return ctx_path + + def deactivate_context(self, ctx_id): + self.dbg('activate_context', path=ctx_id) + ctx = systembus_get(ctx_id) + ctx.SetProperty('Active', Variant('b', False)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == False) def sms_send(self, to_msisdn_or_modem, *tokens): if isinstance(to_msisdn_or_modem, Modem): @@ -663,6 +719,9 @@ def _on_callmgr_property_changed(self, name, value): self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CALLMGR, name, value)) + def _on_connmgr_property_changed(self, name, value): + self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CONNMGR, name, value)) + def info(self, keys=('Manufacturer', 'Model', 'Revision', 'Serial')): props = self.properties() return ', '.join(['%s: %r'%(k,props.get(k)) for k in keys]) -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5010 to look at the new patch set (#6). suites: aoip_debug: Start GPRS services Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 --- M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf 2 files changed, 43 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/10/5010/6 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cad68b7..312083a 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -2,30 +2,40 @@ from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() +pcu = bts.pcu() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) msc = suite.msc(hlr, mgcpgw, stp) bsc = suite.bsc(msc, mgw_bsc, stp) + modems = suite.modems(int(prompt('How many modems?'))) + +bsc.bts_add(bts) +sgsn.bts_add(bts) hlr.start() stp.start() +ggsn.start() +sgsn.start() msc.start() mgcpgw.start() mgw_bsc.start() - -bsc.bts_add(bts) bsc.start() bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() for m in modems: hlr.subscriber_add(m) m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -115,5 +125,34 @@ response = ms.ussd_send(ussd_cmd) print('modem %s: response=%r' % (ms.name(), response)) + elif cmd.startswith('data-attach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: attach' % ms.name()) + ms.attach() + wait(ms.is_attached) + print('modem %s: attached' % ms.name()) + + elif cmd.startswith('data-detach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: detach' % ms.name()) + ms.attach() + wait(lambda: not ms.is_attached()) + print('modem %s: detached' % ms.name()) + + elif cmd.startswith('data-activate'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: activate' % ms.name()) + response = ms.activate_context() + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index d75cacb..2f36e1d 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 6 + - times: 8 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5011 to look at the new patch set (#6). suites: gprs: Introduce suite with ping test Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus we don't test sending data yet here, but at least we can already test pdp context activation. This test will be extended to run ping once we support setting up the GPRS data plane in osmo-gsm-tester. Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b --- M example/resources.conf A suites/gprs/ping.py A suites/gprs/suite.conf 3 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/11/5011/6 diff --git a/example/resources.conf b/example/resources.conf index d503a48..26e1d80 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -7,6 +7,8 @@ - addr: 10.42.42.5 - addr: 10.42.42.6 - addr: 10.42.42.7 +- addr: 10.42.42.8 +- addr: 10.42.42.9 bts: - label: sysmoBTS 1002 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py new file mode 100755 index 0000000..46ab540 --- /dev/null +++ b/suites/gprs/ping.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +hlr = suite.hlr() +bts = suite.bts() +pcu = bts.pcu() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() +stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) +ms = suite.modem() + +bsc.bts_add(bts) +sgsn.bts_add(bts) + +print('start network...') +hlr.start() +stp.start() +ggsn.start() +sgsn.start() +msc.start() +mgcpgw.start() +mgw_bsc.start() +bsc.start() + +bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) +ms.attach() + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('waiting for modems to attach to data services...') +wait(ms.is_attached) +ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) +# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) +# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) +# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v4) diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf new file mode 100644 index 0000000..1590b7d --- /dev/null +++ b/suites/gprs/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn + bts: + - times: 1 + modem: + - times: 1 + features: + - gprs -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: default-suites.conf: Use same order for sysmocell5000 as for... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5012 to look at the new patch set (#6). default-suites.conf: Use same order for sysmocell5000 as for other bts Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/12/5012/6 diff --git a/example/default-suites.conf b/example/default-suites.conf index 039ead8..cc65a53 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -10,9 +10,9 @@ - voice:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 -- voice:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 +- voice:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy -- To view, visit https://gerrit.osmocom.org/5012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: default-suites.conf: Add gprs suite In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5013 to look at the new patch set (#6). default-suites.conf: Add gprs suite Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 --- M example/default-suites.conf 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/5013/6 diff --git a/example/default-suites.conf b/example/default-suites.conf index cc65a53..83dd079 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -3,21 +3,25 @@ - ussd:sysmo - aoip_ussd:sysmo - voice:sysmo +- gprs:sysmo - sms:trx-b200 - aoip_sms:trx-b200 - ussd:trx-b200 - aoip_ussd:trx-b200 - voice:trx-b200 +- gprs:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 - voice:trx-sysmocell5000 +- gprs:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy - aoip_ussd:octphy - voice:octphy +- gprs:octphy - smpp - aoip_smpp - aoip_encryption -- To view, visit https://gerrit.osmocom.org/5013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5068 to look at the new patch set (#5). bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 80 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/68/5068/5 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index bae21d2..c5471d0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -51,9 +51,9 @@ ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts0 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts0 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts0 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts0 gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 @@ -122,9 +122,9 @@ ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts1 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts1 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -136,7 +136,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts1 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -144,7 +144,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts1 gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 314dd8d..f4f1bd5 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,7 +22,9 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'routing_area_code': 'val_bts.routing_area_code', 'cell_identity': 'val_bts.cell_identity', + 'bvci': 'val_bts.bvci', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 6d4f634..9b1f077 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2466f9f..95db16d 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,9 +61,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -75,7 +75,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -83,7 +83,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 419d185..acedd0c 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 12:53:50 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5006 to look at the new patch set (#5). OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/5 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..bae21d2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b3761..2466f9f 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -59,7 +59,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..419d185 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none + % endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 12:56:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 12:56:47 +0000 Subject: [PATCH] osmo-bts[master]: Log filenames on L1 errors Message-ID: Review at https://gerrit.osmocom.org/5188 Log filenames on L1 errors Change-Id: I7e73374f3f1da662ebed52548d29b6b76443c81b --- M src/osmo-bts-sysmo/l1_transp_hw.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/88/5188/1 diff --git a/src/osmo-bts-sysmo/l1_transp_hw.c b/src/osmo-bts-sysmo/l1_transp_hw.c index 9c0a514..95e3119 100644 --- a/src/osmo-bts-sysmo/l1_transp_hw.c +++ b/src/osmo-bts-sysmo/l1_transp_hw.c @@ -266,8 +266,8 @@ rc = open(rd_devnames[q], O_RDONLY); if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "unable to open msg_queue: %s\n", - strerror(errno)); + LOGP(DL1C, LOGL_FATAL, "[%d] unable to open %s for reading: %s\n", + q, rd_devnames[q], strerror(errno)); return rc; } read_ofd->fd = rc; @@ -284,8 +284,8 @@ rc = open(wr_devnames[q], O_WRONLY); if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "unable to open msg_queue: %s\n", - strerror(errno)); + LOGP(DL1C, LOGL_FATAL, "[%d] unable to open %s for writing: %s\n", + q, wr_devnames[q], strerror(errno)); goto out_read; } osmo_wqueue_init(wq, 10); -- To view, visit https://gerrit.osmocom.org/5188 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e73374f3f1da662ebed52548d29b6b76443c81b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:33:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:33:51 +0000 Subject: osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:35:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:35:44 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5006/5/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl: Line 84: % for trx in bts.trx_list: this indent is still wrong -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:36:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:36:51 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5006 to look at the new patch set (#6). OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/5006/6 diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..bae21d2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b3761..2466f9f 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -59,7 +59,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..211b4cc 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:37:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:37:14 +0000 Subject: osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:39:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:39:05 +0000 Subject: osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:39:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:39:40 +0000 Subject: osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:39:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:39:53 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:41:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:41:49 +0000 Subject: osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:43:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 13:43:00 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5004/2/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl File src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl: Line 5: logging level all debug > It logs a lot of stuff but I think for now it's fine since I'm adding suppo hoping that it doesn't fill up the sysmobts memory... -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:54:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 13:54:44 +0000 Subject: osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Patch Set 3: It didn't so far -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 13:57:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 13:57:34 +0000 Subject: osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:03:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:03:12 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add OsmoPcu class In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add OsmoPcu class ...................................................................... Add OsmoPcu class Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 --- A src/osmo_gsm_tester/pcu_osmo.py M src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl 2 files changed, 94 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py new file mode 100644 index 0000000..23c93eb --- /dev/null +++ b/src/osmo_gsm_tester/pcu_osmo.py @@ -0,0 +1,88 @@ +# osmo_gsm_tester: specifics for running an osmo-pcu +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from . import log, config, util, template, process, event_loop + +class OsmoPcu(log.Origin): + suite_run = None + run_dir = None + inst = None + env = None + + BIN_PCU = 'osmo-pcu' + PCU_OSMO_CFG = 'osmo-pcu.cfg' + + def __init__(self, suite_run, bts, conf): + super().__init__(log.C_RUN, OsmoPcu.BIN_PCU) + self.suite_run = suite_run + self.bts = bts + self.conf = conf + self.env = {} + + def start(self): + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.launch_process(OsmoPcu.BIN_PCU, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bts.bsc.addr()) + self.suite_run.poll() + + def launch_process(self, binary_name, *args): + binary = os.path.abspath(self.inst.child('bin', binary_name)) + run_dir = self.run_dir.new_dir(binary_name) + if not os.path.isfile(binary): + raise RuntimeError('Binary missing: %r' % binary) + proc = process.Process(binary_name, run_dir, + (binary,) + args, + env=self.env) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcu.PCU_OSMO_CFG) + self.dbg(config_file=self.config_file) + + values = dict(osmo_pcu=config.get_defaults('osmo_pcu')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu': { + 'pcu_socket_path': self.bts.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_pcu': self.conf }) + + self.dbg('OSMO-PCU CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcu.PCU_OSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl index b88e6e7..02382c2 100644 --- a/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-pcu.cfg.tmpl @@ -1,4 +1,10 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug pcu + pcu-socket ${osmo_pcu.pcu_socket_path} flow-control-interval 10 cs 2 alloc-algorithm dynamic -- To view, visit https://gerrit.osmocom.org/5004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:03:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:03:13 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add class OsmoPcuSysmo In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Add class OsmoPcuSysmo ...................................................................... Add class OsmoPcuSysmo Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 --- A src/osmo_gsm_tester/pcu_sysmo.py A src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl 2 files changed, 139 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/pcu_sysmo.py b/src/osmo_gsm_tester/pcu_sysmo.py new file mode 100644 index 0000000..fd1b272 --- /dev/null +++ b/src/osmo_gsm_tester/pcu_sysmo.py @@ -0,0 +1,127 @@ +# osmo_gsm_tester: specifics for running a osmo-pcu for sysmoBTS +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +from . import log, config, util, template, process, event_loop + +class OsmoPcuSysmo(log.Origin): + suite_run = None + bsc = None + run_dir = None + inst = None + remote_inst = None + remote_env = None + remote_dir = None + sysmobts = None + + REMOTE_DIR = '/osmo-gsm-tester-pcu' + PCU_SYSMO_BIN = 'osmo-pcu' + PCU_SYSMO_CFG = 'osmo-pcu-sysmo.cfg' + + def __init__(self, suite_run, sysmobts, conf): + super().__init__(log.C_RUN, self.PCU_SYSMO_BIN) + self.suite_run = suite_run + self.sysmobts = sysmobts + self.conf = conf + self.remote_env = {} + self.remote_user = 'root' + + def start(self): + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-pcu-sysmo'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', OsmoPcuSysmo.PCU_SYSMO_BIN): + raise log.Error('No osmo-pcu-sysmo binary in', self.inst) + + self.remote_dir = util.Dir(OsmoPcuSysmo.REMOTE_DIR) + self.remote_inst = util.Dir(self.remote_dir.child(os.path.basename(str(self.inst)))) + + self.run_remote('rm-remote-dir', ('test', '!', '-d', OsmoPcuSysmo.REMOTE_DIR, '||', 'rm', '-rf', OsmoPcuSysmo.REMOTE_DIR)) + self.run_remote('mk-remote-dir', ('mkdir', '-p', OsmoPcuSysmo.REMOTE_DIR)) + self.run_local('scp-inst-to-sysmobts', + ('scp', '-r', str(self.inst), '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), str(self.remote_inst)))) + + remote_run_dir = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_BIN) + self.run_remote('mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) + + remote_config_file = self.remote_dir.child(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.run_local('scp-cfg-to-sysmobts', + ('scp', '-r', self.config_file, '%s@%s:%s' % (self.remote_user, self.sysmobts.remote_addr(), remote_config_file))) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', OsmoPcuSysmo.PCU_SYSMO_BIN) + self.launch_remote(OsmoPcuSysmo.PCU_SYSMO_BIN, + ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.sysmobts.bsc.addr()), + remote_cwd=remote_run_dir) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.sysmobts.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def configure(self): + self.config_file = self.run_dir.new_file(OsmoPcuSysmo.PCU_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_pcu_sysmo': config.get_defaults('osmo_pcu_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_pcu_sysmo': { + 'pcu_socket_path': self.sysmobts.pcu_socket_path() + } + }) + config.overlay(values, { 'osmo_pcu_sysmo': self.conf }) + + self.dbg('OSMO-PCU-SYSMO CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(OsmoPcuSysmo.PCU_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl new file mode 100644 index 0000000..632bc27 --- /dev/null +++ b/src/osmo_gsm_tester/templates/osmo-pcu-sysmo.cfg.tmpl @@ -0,0 +1,12 @@ +log stderr + logging color 1 + logging print extended-timestamp 1 + logging print category 1 + logging level all debug +pcu + pcu-socket ${osmo_pcu_sysmo.pcu_socket_path} + flow-control-interval 10 + cs 2 + alloc-algorithm dynamic + alpha 0 + gamma 0 -- To view, visit https://gerrit.osmocom.org/5003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:03:13 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:03:13 +0000 Subject: [MERGED] osmo-gsm-tester[master]: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn ...................................................................... OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef --- M example/resources.conf M selftest/conf/resources.conf M selftest/resource_test.ok M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_sgsn.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 162 insertions(+), 12 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index e8b1695..d503a48 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -14,6 +14,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: [a5_0, a5_1, a5_3] - label: Ettus B200 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index b186737..9e4e015 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -13,6 +13,7 @@ ipa_unit_id: 1 addr: 10.42.42.114 band: GSM-1800 + direct_pcu: true ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 09c276a..650a8bc 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -46,10 +46,11 @@ {'_hash': 'dc9ce027a257da087f31a5bc1ee6b4abd2637369', 'arfcn': '548', 'band': 'GSM-1900'}], - 'bts': [{'_hash': '377ac78d5404b826d40c84efd04b4a9fd4e62b7e', + 'bts': [{'_hash': 'd2aa7c1124943de352351b650ca0c751784da6b6', 'addr': '10.42.42.114', 'band': 'GSM-1800', 'ciphers': ['a5_0', 'a5_1'], + 'direct_pcu': 'True', 'ipa_unit_id': '1', 'label': 'sysmoBTS 1002', 'type': 'osmo-bts-sysmo'}, @@ -118,12 +119,13 @@ arfcn: '514' band: GSM-1800 --- testowner: Reserving 2 x bts (candidates: 3) ---- testowner: DBG: Picked - _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +--- testowner: DBG: Picked - _hash: d2aa7c1124943de352351b650ca0c751784da6b6 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -170,13 +172,14 @@ arfcn: '514' band: GSM-1800 bts: -- _hash: 377ac78d5404b826d40c84efd04b4a9fd4e62b7e +- _hash: d2aa7c1124943de352351b650ca0c751784da6b6 _reserved_by: testowner-123-1490837279 addr: 10.42.42.114 band: GSM-1800 ciphers: - a5_0 - a5_1 + direct_pcu: 'True' ipa_unit_id: '1' label: sysmoBTS 1002 type: osmo-bts-sysmo diff --git a/selftest/template_test.ok b/selftest/template_test.ok index dcfacc2..bae21d2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -50,7 +50,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 @@ -94,7 +121,34 @@ rach max transmission 7 ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 - gprs mode none + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 + no force-combined-si trx 0 rf_locked 0 arfcn val_trx_arfcn_trx0 diff --git a/selftest/template_test.py b/selftest/template_test.py index 0c83632..314dd8d 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -26,6 +26,7 @@ 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', + 'sgsn': (dict(ip_address=dict(addr='val_bts.sgsn_ip_addr'))), 'trx_list': ( dict(arfcn='val_trx_arfcn_trx0', nominal_power='val_trx_nominal_power_trx0', diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1a7b139..812a247 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,11 +19,12 @@ import os import pprint -from . import log, config, util, template, process +from . import log, config, util, template, process, pcu_sysmo class SysmoBts(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None remote_inst = None @@ -32,8 +33,9 @@ lac = None cellid = None proc_bts = None + _pcu = None - REMOTE_DIR = '/osmo-gsm-tester' + REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' @@ -77,14 +79,21 @@ remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') - self.proc_bts = self.launch_remote('osmo-bts-sysmo', - ('LD_LIBRARY_PATH=%s' % remote_lib, - remote_binary, '-c', remote_config_file, '-r', '1', - '-i', self.bsc.addr()), - remote_cwd=remote_run_dir) + + args = ('LD_LIBRARY_PATH=%s' % remote_lib, + remote_binary, '-c', remote_config_file, '-r', '1', + '-i', self.bsc.addr()) + + if self._direct_pcu_enabled(): + args += ('-M',) + + self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) def cleanup(self): pass + + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -117,8 +126,16 @@ log.ctx(proc) raise log.Error('Exited in error') + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu + def remote_addr(self): return self.conf.get('addr') + + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def configure(self): if self.bsc is None: @@ -152,6 +169,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -163,6 +184,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac diff --git a/src/osmo_gsm_tester/osmo_sgsn.py b/src/osmo_gsm_tester/osmo_sgsn.py index 7a9c5ff..8659186 100644 --- a/src/osmo_gsm_tester/osmo_sgsn.py +++ b/src/osmo_gsm_tester/osmo_sgsn.py @@ -91,4 +91,7 @@ def running(self): return not self.process.terminated() + def bts_add(self, bts): + bts.set_sgsn(self) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 8412d6a..604a9e9 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -55,6 +55,7 @@ 'bts[].band': schema.BAND, 'bts[].trx_remote_ip': schema.IPV4, 'bts[].launch_trx': schema.BOOL_STR, + 'bts[].direct_pcu': schema.BOOL_STR, 'bts[].ciphers[]': schema.CIPHER, 'bts[].trx_list[].hw_addr': schema.HWADDR, 'bts[].trx_list[].net_device': schema.STR, diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 18b3761..2466f9f 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -59,7 +59,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 803a375..211b4cc 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -49,7 +49,38 @@ rach max transmission 7 ip.access unit_id ${bts.ipa_unit_id} 0 oml ip.access stream_id ${bts.stream_id} line 0 +% if bts.get('sgsn', False): + gprs mode gprs + gprs routing area 0 + gprs network-control-order nc1 + gprs cell bvci 1800 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1800 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1800 + gprs nsvc 0 local udp port 23020 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} + no force-combined-si +% else: gprs mode none +% endif % for trx in bts.trx_list: trx ${loop.index} rf_locked 0 -- To view, visit https://gerrit.osmocom.org/5006 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:05:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:05:11 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: pcu_osmo: workaround osmo-pcu failing if bts not ready In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: pcu_osmo: workaround osmo-pcu failing if bts not ready ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I647f287a7e652df74021093fa5edb330a333c7c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:11:09 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:11:09 +0000 Subject: [MERGED] osmo-ggsn[master]: tests: Split ipv6 specific tests into a new test group In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: tests: Split ipv6 specific tests into a new test group ...................................................................... tests: Split ipv6 specific tests into a new test group This way they can be easily disabled later on when IPv6 support is made optional. Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef --- M tests/lib/Makefile.am M tests/lib/in46a_test.c M tests/lib/in46a_test.ok A tests/lib/in46a_v6_test.ok M tests/lib/ippool_test.c M tests/lib/ippool_test.err M tests/lib/ippool_test.ok A tests/lib/ippool_v6_test.err A tests/lib/ippool_v6_test.ok M tests/testsuite.at 10 files changed, 440 insertions(+), 352 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 95d6901..ee46468 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -1,7 +1,11 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/include $(LIBOSMOCORE_CFLAGS) -g -EXTRA_DIST = ippool_test.ok ippool_test.err \ - in46a_test.ok +EXTRA_DIST = ippool_test.ok \ + ippool_test.err \ + ippool_v6_test.ok \ + ippool_v6_test.err \ + in46a_test.ok \ + in46a_v6_test.ok noinst_PROGRAMS = ippool_test in46a_test diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index d4a5dbc..c0bb670 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -20,41 +20,24 @@ .v4.s_addr = 0x0d0c0b0a, }; -static const struct in46_addr g_ia6 = { - .len = 16, - .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, -}; - static void test_in46a_to_af(void) { - struct in46_addr ia; - - printf("Testing in46a_to_af()\n"); + printf("Testing in46a_to_af() with IPv4 addresses\n"); OSMO_ASSERT(in46a_to_af(&g_ia4) == AF_INET); - OSMO_ASSERT(in46a_to_af(&g_ia6) == AF_INET6); - - ia.len = 8; - OSMO_ASSERT(in46a_to_af(&ia) == AF_INET6); } static void test_in46a_to_sas(void) { struct sockaddr_storage ss; struct sockaddr_in *sin = (struct sockaddr_in *) &ss; - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss; - printf("Testing in46a_to_sas()\n"); + printf("Testing in46a_to_sas() with IPv4 addresses\n"); memset(&ss, 0, sizeof(ss)); OSMO_ASSERT(in46a_to_sas(&ss, &g_ia4) == 0); OSMO_ASSERT(sin->sin_family == AF_INET); OSMO_ASSERT(sin->sin_addr.s_addr == g_ia4.v4.s_addr); - - memset(&ss, 0, sizeof(ss)); - OSMO_ASSERT(in46a_to_sas(&ss, &g_ia6) == 0); - OSMO_ASSERT(sin6->sin6_family == AF_INET6); - OSMO_ASSERT(!memcmp(&sin6->sin6_addr, &g_ia6.v6, sizeof(sin6->sin6_addr))); } static void test_in46a_ntop(void) @@ -63,7 +46,7 @@ char buf[256]; const char *res; - printf("Testing in46a_ntop()\n"); + printf("Testing in46a_ntop() with IPv4 addresses\n"); res = in46a_ntop(NULL, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "UNDEFINED")); @@ -78,10 +61,6 @@ ia.v4.s_addr = htonl(0x01020304); res = in46a_ntop(&ia, buf, sizeof(buf)); OSMO_ASSERT(res && !strcmp(res, "1.2.3.4")); - printf("res = %s\n", res); - - res = in46a_ntop(&g_ia6, buf, sizeof(buf)); - OSMO_ASSERT(res && !strcmp(res, "102:304:506:708:90a:b0c:d0e:f10")); printf("res = %s\n", res); } @@ -101,20 +80,13 @@ { struct in46_addr b; - printf("Testing in46a_equal()\n"); + printf("Testing in46a_equal() with IPv4 addresses\n"); memset(&b, 0xff, sizeof(b)); b.len = g_ia4.len; b.v4.s_addr = g_ia4.v4.s_addr; OSMO_ASSERT(in46a_equal(&g_ia4, &b)); - - memset(&b, 0xff, sizeof(b)); - b.len = g_ia6.len; - b.v6 = g_ia6.v6; - OSMO_ASSERT(in46a_equal(&g_ia6, &b)); - } - static int log_in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen) @@ -134,7 +106,7 @@ { struct in46_addr addr, mask; - printf("Testing in46a_within_mask()\n"); + printf("Testing in46a_within_mask() with IPv4 addresses\n"); addr = g_ia4; mask = g_ia4; @@ -155,13 +127,9 @@ static void test_in46a_to_eua(void) { - const struct in46_addr ia_v6_8 = { - .len = 8, - .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, - }; struct ul66_t eua; - printf("testing in46a_to_eua()\n"); + printf("testing in46a_to_eua() with IPv4 addresses\n"); #if 0 /* triggers assert in current implementation */ const struct in46_addr ia_invalid = { .len = 3, }; @@ -173,18 +141,6 @@ OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); - - /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); - OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); - OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); - OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); - - /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); - OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); - OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); - OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); } static void test_in46a_from_eua(void) @@ -193,13 +149,9 @@ struct ul66_t eua; const uint8_t v4_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4 }; const uint8_t v4_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4, 1,2,3,4 }; - const uint8_t v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6 }; - const uint8_t v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6, - 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; - memset(&eua, 0, sizeof(eua)); - printf("Testing in46a_from_eua()\n"); + printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); @@ -231,20 +183,6 @@ OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); - - /* unspecified V6 */ - memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); - eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); - OSMO_ASSERT(ia.len == 16); - OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); - - /* specified V6 */ - memcpy(eua.v, v6_spec, sizeof(v6_spec)); - eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); - OSMO_ASSERT(ia.len == 16); - OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); } static void test_in46a_netmasklen(void) @@ -274,7 +212,117 @@ netmask.v4.s_addr = 0x00000000; len = in46a_netmasklen(&netmask); OSMO_ASSERT(len == 0); +} +/* IPv6 specific tests */ + +static const struct in46_addr g_ia6 = { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, +}; + +static void test_in46a_to_af_v6(void) +{ + struct in46_addr ia; + + printf("Testing in46a_to_af() with IPv6 addresses\n"); + + OSMO_ASSERT(in46a_to_af(&g_ia6) == AF_INET6); + + ia.len = 8; + OSMO_ASSERT(in46a_to_af(&ia) == AF_INET6); +} + +static void test_in46a_to_sas_v6(void) +{ + struct sockaddr_storage ss; + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss; + + printf("Testing in46a_to_sas() with IPv6 addresses\n"); + + memset(&ss, 0, sizeof(ss)); + OSMO_ASSERT(in46a_to_sas(&ss, &g_ia6) == 0); + OSMO_ASSERT(sin6->sin6_family == AF_INET6); + OSMO_ASSERT(!memcmp(&sin6->sin6_addr, &g_ia6.v6, sizeof(sin6->sin6_addr))); +} + +static void test_in46a_ntop_v6(void) +{ + char buf[256]; + const char *res; + + printf("Testing in46a_ntop() with IPv6 addresses\n"); + + res = in46a_ntop(&g_ia6, buf, sizeof(buf)); + OSMO_ASSERT(res && !strcmp(res, "102:304:506:708:90a:b0c:d0e:f10")); + printf("res = %s\n", res); +} + +static void test_in46a_equal_v6(void) +{ + struct in46_addr b; + + printf("Testing in46a_equal() with IPv6 addresses\n"); + + memset(&b, 0xff, sizeof(b)); + b.len = g_ia6.len; + b.v6 = g_ia6.v6; + OSMO_ASSERT(in46a_equal(&g_ia6, &b)); +} + +static void test_in46a_to_eua_v6(void) +{ + const struct in46_addr ia_v6_8 = { + .len = 8, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }; + struct ul66_t eua; + + printf("testing in46a_to_eua() with IPv6 addresses\n"); + + /* IPv6 address */ + OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); + OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); + + /* IPv6 address with prefix / length 8 */ + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); + OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_from_eua_v6(void) +{ + struct in46_addr ia; + struct ul66_t eua; + const uint8_t v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6 }; + const uint8_t v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v6, + 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv6 addresses\n"); + + /* unspecified V6 */ + memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); + eua.l = sizeof(v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(ia.len == 16); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); + + /* specified V6 */ + memcpy(eua.v, v6_spec, sizeof(v6_spec)); + eua.l = sizeof(v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(ia.len == 16); + OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_netmasklen_v6(void) +{ + unsigned int len; printf("Testing in46a_netmasklen() with IPv6 addresses\n"); const struct in46_addr netmaskA = { .len = 16, @@ -313,14 +361,24 @@ srand(time(NULL)); - test_in46a_to_af(); - test_in46a_to_sas(); - test_in46a_ntop(); - test_in46p_ntoa(); - test_in46a_equal(); - test_in46a_within_mask(); - test_in46a_to_eua(); - test_in46a_from_eua(); - test_in46a_netmasklen(); + if (argc < 2 || strcmp(argv[1], "-v6")) { + test_in46a_to_af(); + test_in46a_to_sas(); + test_in46a_ntop(); + test_in46p_ntoa(); + test_in46a_equal(); + test_in46a_within_mask(); + test_in46a_to_eua(); + test_in46a_from_eua(); + test_in46a_netmasklen(); + } else { + test_in46a_to_af_v6(); + test_in46a_to_sas_v6(); + test_in46a_ntop_v6(); + test_in46a_equal_v6(); + test_in46a_to_eua_v6(); + test_in46a_from_eua_v6(); + test_in46a_netmasklen_v6(); + } return 0; } diff --git a/tests/lib/in46a_test.ok b/tests/lib/in46a_test.ok index 9a0ff7a..b497ad1 100644 --- a/tests/lib/in46a_test.ok +++ b/tests/lib/in46a_test.ok @@ -1,19 +1,17 @@ -Testing in46a_to_af() -Testing in46a_to_sas() -Testing in46a_ntop() +Testing in46a_to_af() with IPv4 addresses +Testing in46a_to_sas() with IPv4 addresses +Testing in46a_ntop() with IPv4 addresses res = UNDEFINED res = UNDEFINED res = 1.2.3.4 -res = 102:304:506:708:90a:b0c:d0e:f10 in46p_ntoa() returns 16.32.48.0/24 -Testing in46a_equal() -Testing in46a_within_mask() +Testing in46a_equal() with IPv4 addresses +Testing in46a_within_mask() with IPv4 addresses in46a_within_mask(10.11.12.13, 10.11.12.13, 32) = 1 in46a_within_mask(10.11.12.13, 10.11.12.12, 30) = 1 in46a_within_mask(10.11.12.13, 10.8.0.0, 13) = 1 in46a_within_mask(10.11.12.14, 10.11.12.13, 32) = 0 in46a_within_mask(10.11.12.14, 10.11.12.12, 30) = 1 -testing in46a_to_eua() -Testing in46a_from_eua() +testing in46a_to_eua() with IPv4 addresses +Testing in46a_from_eua() with IPv4 addresses Testing in46a_netmasklen() with IPv4 addresses -Testing in46a_netmasklen() with IPv6 addresses diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok new file mode 100644 index 0000000..d092591 --- /dev/null +++ b/tests/lib/in46a_v6_test.ok @@ -0,0 +1,8 @@ +Testing in46a_to_af() with IPv6 addresses +Testing in46a_to_sas() with IPv6 addresses +Testing in46a_ntop() with IPv6 addresses +res = 102:304:506:708:90a:b0c:d0e:f10 +Testing in46a_equal() with IPv6 addresses +testing in46a_to_eua() with IPv6 addresses +Testing in46a_from_eua() with IPv6 addresses +Testing in46a_netmasklen() with IPv6 addresses diff --git a/tests/lib/ippool_test.c b/tests/lib/ippool_test.c index 5b3227c..8d3f46c 100644 --- a/tests/lib/ippool_test.c +++ b/tests/lib/ippool_test.c @@ -113,12 +113,15 @@ /* 65534 addresses [0.1..255.254] */ test_pool_size("192.168.0.0/16", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, NULL, 0, 65534); - /* 256 prefixes of /64 each */ - test_pool_size("2001:DB8::/56", 0, NULL, 0, 256); - /* 253 addresses [1..254] & exclude 192.168.23.1/24 */ char *blacklist[] = {"176.16.222.10/24", "192.168.23.1/24", "192.168.38.2/24"}; test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, blacklist, 3, 253); +} + +static void test_pool_sizes_v6(void) +{ + /* 256 prefixes of /64 each */ + test_pool_size("2001:DB8::/56", 0, NULL, 0, 256); } int main(int argc, char **argv) @@ -129,6 +132,10 @@ srand(time(NULL)); - test_pool_sizes(); + if (argc < 2 || strcmp(argv[1], "-v6")) { + test_pool_sizes(); + } else { + test_pool_sizes_v6(); + } return 0; } diff --git a/tests/lib/ippool_test.err b/tests/lib/ippool_test.err index b11c12a..7dc5371 100644 --- a/tests/lib/ippool_test.err +++ b/tests/lib/ippool_test.err @@ -8,5 +8,3 @@ No more IP addresses available No more IP addresses available No more IP addresses available -No more IP addresses available -No more IP addresses available diff --git a/tests/lib/ippool_test.ok b/tests/lib/ippool_test.ok index 263494e..d247c74 100644 --- a/tests/lib/ippool_test.ok +++ b/tests/lib/ippool_test.ok @@ -66301,263 +66301,6 @@ allocated address 192.168.255.252 allocated address 192.168.255.253 allocated address 192.168.255.254 -testing pool for prefix 2001:DB8::/56, flags=0x0, blacklist_size=0, expected_size=256 -allocated address 2001:db8:: -allocated address 2001:db8:0:1:: -allocated address 2001:db8:0:2:: -allocated address 2001:db8:0:3:: -allocated address 2001:db8:0:4:: -allocated address 2001:db8:0:5:: -allocated address 2001:db8:0:6:: -allocated address 2001:db8:0:7:: -allocated address 2001:db8:0:8:: -allocated address 2001:db8:0:9:: -allocated address 2001:db8:0:a:: -allocated address 2001:db8:0:b:: -allocated address 2001:db8:0:c:: -allocated address 2001:db8:0:d:: -allocated address 2001:db8:0:e:: -allocated address 2001:db8:0:f:: -allocated address 2001:db8:0:10:: -allocated address 2001:db8:0:11:: -allocated address 2001:db8:0:12:: -allocated address 2001:db8:0:13:: -allocated address 2001:db8:0:14:: -allocated address 2001:db8:0:15:: -allocated address 2001:db8:0:16:: -allocated address 2001:db8:0:17:: -allocated address 2001:db8:0:18:: -allocated address 2001:db8:0:19:: -allocated address 2001:db8:0:1a:: -allocated address 2001:db8:0:1b:: -allocated address 2001:db8:0:1c:: -allocated address 2001:db8:0:1d:: -allocated address 2001:db8:0:1e:: -allocated address 2001:db8:0:1f:: -allocated address 2001:db8:0:20:: -allocated address 2001:db8:0:21:: -allocated address 2001:db8:0:22:: -allocated address 2001:db8:0:23:: -allocated address 2001:db8:0:24:: -allocated address 2001:db8:0:25:: -allocated address 2001:db8:0:26:: -allocated address 2001:db8:0:27:: -allocated address 2001:db8:0:28:: -allocated address 2001:db8:0:29:: -allocated address 2001:db8:0:2a:: -allocated address 2001:db8:0:2b:: -allocated address 2001:db8:0:2c:: -allocated address 2001:db8:0:2d:: -allocated address 2001:db8:0:2e:: -allocated address 2001:db8:0:2f:: -allocated address 2001:db8:0:30:: -allocated address 2001:db8:0:31:: -allocated address 2001:db8:0:32:: -allocated address 2001:db8:0:33:: -allocated address 2001:db8:0:34:: -allocated address 2001:db8:0:35:: -allocated address 2001:db8:0:36:: -allocated address 2001:db8:0:37:: -allocated address 2001:db8:0:38:: -allocated address 2001:db8:0:39:: -allocated address 2001:db8:0:3a:: -allocated address 2001:db8:0:3b:: -allocated address 2001:db8:0:3c:: -allocated address 2001:db8:0:3d:: -allocated address 2001:db8:0:3e:: -allocated address 2001:db8:0:3f:: -allocated address 2001:db8:0:40:: -allocated address 2001:db8:0:41:: -allocated address 2001:db8:0:42:: -allocated address 2001:db8:0:43:: -allocated address 2001:db8:0:44:: -allocated address 2001:db8:0:45:: -allocated address 2001:db8:0:46:: -allocated address 2001:db8:0:47:: -allocated address 2001:db8:0:48:: -allocated address 2001:db8:0:49:: -allocated address 2001:db8:0:4a:: -allocated address 2001:db8:0:4b:: -allocated address 2001:db8:0:4c:: -allocated address 2001:db8:0:4d:: -allocated address 2001:db8:0:4e:: -allocated address 2001:db8:0:4f:: -allocated address 2001:db8:0:50:: -allocated address 2001:db8:0:51:: -allocated address 2001:db8:0:52:: -allocated address 2001:db8:0:53:: -allocated address 2001:db8:0:54:: -allocated address 2001:db8:0:55:: -allocated address 2001:db8:0:56:: -allocated address 2001:db8:0:57:: -allocated address 2001:db8:0:58:: -allocated address 2001:db8:0:59:: -allocated address 2001:db8:0:5a:: -allocated address 2001:db8:0:5b:: -allocated address 2001:db8:0:5c:: -allocated address 2001:db8:0:5d:: -allocated address 2001:db8:0:5e:: -allocated address 2001:db8:0:5f:: -allocated address 2001:db8:0:60:: -allocated address 2001:db8:0:61:: -allocated address 2001:db8:0:62:: -allocated address 2001:db8:0:63:: -allocated address 2001:db8:0:64:: -allocated address 2001:db8:0:65:: -allocated address 2001:db8:0:66:: -allocated address 2001:db8:0:67:: -allocated address 2001:db8:0:68:: -allocated address 2001:db8:0:69:: -allocated address 2001:db8:0:6a:: -allocated address 2001:db8:0:6b:: -allocated address 2001:db8:0:6c:: -allocated address 2001:db8:0:6d:: -allocated address 2001:db8:0:6e:: -allocated address 2001:db8:0:6f:: -allocated address 2001:db8:0:70:: -allocated address 2001:db8:0:71:: -allocated address 2001:db8:0:72:: -allocated address 2001:db8:0:73:: -allocated address 2001:db8:0:74:: -allocated address 2001:db8:0:75:: -allocated address 2001:db8:0:76:: -allocated address 2001:db8:0:77:: -allocated address 2001:db8:0:78:: -allocated address 2001:db8:0:79:: -allocated address 2001:db8:0:7a:: -allocated address 2001:db8:0:7b:: -allocated address 2001:db8:0:7c:: -allocated address 2001:db8:0:7d:: -allocated address 2001:db8:0:7e:: -allocated address 2001:db8:0:7f:: -allocated address 2001:db8:0:80:: -allocated address 2001:db8:0:81:: -allocated address 2001:db8:0:82:: -allocated address 2001:db8:0:83:: -allocated address 2001:db8:0:84:: -allocated address 2001:db8:0:85:: -allocated address 2001:db8:0:86:: -allocated address 2001:db8:0:87:: -allocated address 2001:db8:0:88:: -allocated address 2001:db8:0:89:: -allocated address 2001:db8:0:8a:: -allocated address 2001:db8:0:8b:: -allocated address 2001:db8:0:8c:: -allocated address 2001:db8:0:8d:: -allocated address 2001:db8:0:8e:: -allocated address 2001:db8:0:8f:: -allocated address 2001:db8:0:90:: -allocated address 2001:db8:0:91:: -allocated address 2001:db8:0:92:: -allocated address 2001:db8:0:93:: -allocated address 2001:db8:0:94:: -allocated address 2001:db8:0:95:: -allocated address 2001:db8:0:96:: -allocated address 2001:db8:0:97:: -allocated address 2001:db8:0:98:: -allocated address 2001:db8:0:99:: -allocated address 2001:db8:0:9a:: -allocated address 2001:db8:0:9b:: -allocated address 2001:db8:0:9c:: -allocated address 2001:db8:0:9d:: -allocated address 2001:db8:0:9e:: -allocated address 2001:db8:0:9f:: -allocated address 2001:db8:0:a0:: -allocated address 2001:db8:0:a1:: -allocated address 2001:db8:0:a2:: -allocated address 2001:db8:0:a3:: -allocated address 2001:db8:0:a4:: -allocated address 2001:db8:0:a5:: -allocated address 2001:db8:0:a6:: -allocated address 2001:db8:0:a7:: -allocated address 2001:db8:0:a8:: -allocated address 2001:db8:0:a9:: -allocated address 2001:db8:0:aa:: -allocated address 2001:db8:0:ab:: -allocated address 2001:db8:0:ac:: -allocated address 2001:db8:0:ad:: -allocated address 2001:db8:0:ae:: -allocated address 2001:db8:0:af:: -allocated address 2001:db8:0:b0:: -allocated address 2001:db8:0:b1:: -allocated address 2001:db8:0:b2:: -allocated address 2001:db8:0:b3:: -allocated address 2001:db8:0:b4:: -allocated address 2001:db8:0:b5:: -allocated address 2001:db8:0:b6:: -allocated address 2001:db8:0:b7:: -allocated address 2001:db8:0:b8:: -allocated address 2001:db8:0:b9:: -allocated address 2001:db8:0:ba:: -allocated address 2001:db8:0:bb:: -allocated address 2001:db8:0:bc:: -allocated address 2001:db8:0:bd:: -allocated address 2001:db8:0:be:: -allocated address 2001:db8:0:bf:: -allocated address 2001:db8:0:c0:: -allocated address 2001:db8:0:c1:: -allocated address 2001:db8:0:c2:: -allocated address 2001:db8:0:c3:: -allocated address 2001:db8:0:c4:: -allocated address 2001:db8:0:c5:: -allocated address 2001:db8:0:c6:: -allocated address 2001:db8:0:c7:: -allocated address 2001:db8:0:c8:: -allocated address 2001:db8:0:c9:: -allocated address 2001:db8:0:ca:: -allocated address 2001:db8:0:cb:: -allocated address 2001:db8:0:cc:: -allocated address 2001:db8:0:cd:: -allocated address 2001:db8:0:ce:: -allocated address 2001:db8:0:cf:: -allocated address 2001:db8:0:d0:: -allocated address 2001:db8:0:d1:: -allocated address 2001:db8:0:d2:: -allocated address 2001:db8:0:d3:: -allocated address 2001:db8:0:d4:: -allocated address 2001:db8:0:d5:: -allocated address 2001:db8:0:d6:: -allocated address 2001:db8:0:d7:: -allocated address 2001:db8:0:d8:: -allocated address 2001:db8:0:d9:: -allocated address 2001:db8:0:da:: -allocated address 2001:db8:0:db:: -allocated address 2001:db8:0:dc:: -allocated address 2001:db8:0:dd:: -allocated address 2001:db8:0:de:: -allocated address 2001:db8:0:df:: -allocated address 2001:db8:0:e0:: -allocated address 2001:db8:0:e1:: -allocated address 2001:db8:0:e2:: -allocated address 2001:db8:0:e3:: -allocated address 2001:db8:0:e4:: -allocated address 2001:db8:0:e5:: -allocated address 2001:db8:0:e6:: -allocated address 2001:db8:0:e7:: -allocated address 2001:db8:0:e8:: -allocated address 2001:db8:0:e9:: -allocated address 2001:db8:0:ea:: -allocated address 2001:db8:0:eb:: -allocated address 2001:db8:0:ec:: -allocated address 2001:db8:0:ed:: -allocated address 2001:db8:0:ee:: -allocated address 2001:db8:0:ef:: -allocated address 2001:db8:0:f0:: -allocated address 2001:db8:0:f1:: -allocated address 2001:db8:0:f2:: -allocated address 2001:db8:0:f3:: -allocated address 2001:db8:0:f4:: -allocated address 2001:db8:0:f5:: -allocated address 2001:db8:0:f6:: -allocated address 2001:db8:0:f7:: -allocated address 2001:db8:0:f8:: -allocated address 2001:db8:0:f9:: -allocated address 2001:db8:0:fa:: -allocated address 2001:db8:0:fb:: -allocated address 2001:db8:0:fc:: -allocated address 2001:db8:0:fd:: -allocated address 2001:db8:0:fe:: -allocated address 2001:db8:0:ff:: testing pool for prefix 192.168.23.0/24, flags=0x3, blacklist_size=3, expected_size=253 allocated address 192.168.23.2 allocated address 192.168.23.3 diff --git a/tests/lib/ippool_v6_test.err b/tests/lib/ippool_v6_test.err new file mode 100644 index 0000000..f0edefe --- /dev/null +++ b/tests/lib/ippool_v6_test.err @@ -0,0 +1,2 @@ +No more IP addresses available +No more IP addresses available diff --git a/tests/lib/ippool_v6_test.ok b/tests/lib/ippool_v6_test.ok new file mode 100644 index 0000000..19ea4d1 --- /dev/null +++ b/tests/lib/ippool_v6_test.ok @@ -0,0 +1,257 @@ +testing pool for prefix 2001:DB8::/56, flags=0x0, blacklist_size=0, expected_size=256 +allocated address 2001:db8:: +allocated address 2001:db8:0:1:: +allocated address 2001:db8:0:2:: +allocated address 2001:db8:0:3:: +allocated address 2001:db8:0:4:: +allocated address 2001:db8:0:5:: +allocated address 2001:db8:0:6:: +allocated address 2001:db8:0:7:: +allocated address 2001:db8:0:8:: +allocated address 2001:db8:0:9:: +allocated address 2001:db8:0:a:: +allocated address 2001:db8:0:b:: +allocated address 2001:db8:0:c:: +allocated address 2001:db8:0:d:: +allocated address 2001:db8:0:e:: +allocated address 2001:db8:0:f:: +allocated address 2001:db8:0:10:: +allocated address 2001:db8:0:11:: +allocated address 2001:db8:0:12:: +allocated address 2001:db8:0:13:: +allocated address 2001:db8:0:14:: +allocated address 2001:db8:0:15:: +allocated address 2001:db8:0:16:: +allocated address 2001:db8:0:17:: +allocated address 2001:db8:0:18:: +allocated address 2001:db8:0:19:: +allocated address 2001:db8:0:1a:: +allocated address 2001:db8:0:1b:: +allocated address 2001:db8:0:1c:: +allocated address 2001:db8:0:1d:: +allocated address 2001:db8:0:1e:: +allocated address 2001:db8:0:1f:: +allocated address 2001:db8:0:20:: +allocated address 2001:db8:0:21:: +allocated address 2001:db8:0:22:: +allocated address 2001:db8:0:23:: +allocated address 2001:db8:0:24:: +allocated address 2001:db8:0:25:: +allocated address 2001:db8:0:26:: +allocated address 2001:db8:0:27:: +allocated address 2001:db8:0:28:: +allocated address 2001:db8:0:29:: +allocated address 2001:db8:0:2a:: +allocated address 2001:db8:0:2b:: +allocated address 2001:db8:0:2c:: +allocated address 2001:db8:0:2d:: +allocated address 2001:db8:0:2e:: +allocated address 2001:db8:0:2f:: +allocated address 2001:db8:0:30:: +allocated address 2001:db8:0:31:: +allocated address 2001:db8:0:32:: +allocated address 2001:db8:0:33:: +allocated address 2001:db8:0:34:: +allocated address 2001:db8:0:35:: +allocated address 2001:db8:0:36:: +allocated address 2001:db8:0:37:: +allocated address 2001:db8:0:38:: +allocated address 2001:db8:0:39:: +allocated address 2001:db8:0:3a:: +allocated address 2001:db8:0:3b:: +allocated address 2001:db8:0:3c:: +allocated address 2001:db8:0:3d:: +allocated address 2001:db8:0:3e:: +allocated address 2001:db8:0:3f:: +allocated address 2001:db8:0:40:: +allocated address 2001:db8:0:41:: +allocated address 2001:db8:0:42:: +allocated address 2001:db8:0:43:: +allocated address 2001:db8:0:44:: +allocated address 2001:db8:0:45:: +allocated address 2001:db8:0:46:: +allocated address 2001:db8:0:47:: +allocated address 2001:db8:0:48:: +allocated address 2001:db8:0:49:: +allocated address 2001:db8:0:4a:: +allocated address 2001:db8:0:4b:: +allocated address 2001:db8:0:4c:: +allocated address 2001:db8:0:4d:: +allocated address 2001:db8:0:4e:: +allocated address 2001:db8:0:4f:: +allocated address 2001:db8:0:50:: +allocated address 2001:db8:0:51:: +allocated address 2001:db8:0:52:: +allocated address 2001:db8:0:53:: +allocated address 2001:db8:0:54:: +allocated address 2001:db8:0:55:: +allocated address 2001:db8:0:56:: +allocated address 2001:db8:0:57:: +allocated address 2001:db8:0:58:: +allocated address 2001:db8:0:59:: +allocated address 2001:db8:0:5a:: +allocated address 2001:db8:0:5b:: +allocated address 2001:db8:0:5c:: +allocated address 2001:db8:0:5d:: +allocated address 2001:db8:0:5e:: +allocated address 2001:db8:0:5f:: +allocated address 2001:db8:0:60:: +allocated address 2001:db8:0:61:: +allocated address 2001:db8:0:62:: +allocated address 2001:db8:0:63:: +allocated address 2001:db8:0:64:: +allocated address 2001:db8:0:65:: +allocated address 2001:db8:0:66:: +allocated address 2001:db8:0:67:: +allocated address 2001:db8:0:68:: +allocated address 2001:db8:0:69:: +allocated address 2001:db8:0:6a:: +allocated address 2001:db8:0:6b:: +allocated address 2001:db8:0:6c:: +allocated address 2001:db8:0:6d:: +allocated address 2001:db8:0:6e:: +allocated address 2001:db8:0:6f:: +allocated address 2001:db8:0:70:: +allocated address 2001:db8:0:71:: +allocated address 2001:db8:0:72:: +allocated address 2001:db8:0:73:: +allocated address 2001:db8:0:74:: +allocated address 2001:db8:0:75:: +allocated address 2001:db8:0:76:: +allocated address 2001:db8:0:77:: +allocated address 2001:db8:0:78:: +allocated address 2001:db8:0:79:: +allocated address 2001:db8:0:7a:: +allocated address 2001:db8:0:7b:: +allocated address 2001:db8:0:7c:: +allocated address 2001:db8:0:7d:: +allocated address 2001:db8:0:7e:: +allocated address 2001:db8:0:7f:: +allocated address 2001:db8:0:80:: +allocated address 2001:db8:0:81:: +allocated address 2001:db8:0:82:: +allocated address 2001:db8:0:83:: +allocated address 2001:db8:0:84:: +allocated address 2001:db8:0:85:: +allocated address 2001:db8:0:86:: +allocated address 2001:db8:0:87:: +allocated address 2001:db8:0:88:: +allocated address 2001:db8:0:89:: +allocated address 2001:db8:0:8a:: +allocated address 2001:db8:0:8b:: +allocated address 2001:db8:0:8c:: +allocated address 2001:db8:0:8d:: +allocated address 2001:db8:0:8e:: +allocated address 2001:db8:0:8f:: +allocated address 2001:db8:0:90:: +allocated address 2001:db8:0:91:: +allocated address 2001:db8:0:92:: +allocated address 2001:db8:0:93:: +allocated address 2001:db8:0:94:: +allocated address 2001:db8:0:95:: +allocated address 2001:db8:0:96:: +allocated address 2001:db8:0:97:: +allocated address 2001:db8:0:98:: +allocated address 2001:db8:0:99:: +allocated address 2001:db8:0:9a:: +allocated address 2001:db8:0:9b:: +allocated address 2001:db8:0:9c:: +allocated address 2001:db8:0:9d:: +allocated address 2001:db8:0:9e:: +allocated address 2001:db8:0:9f:: +allocated address 2001:db8:0:a0:: +allocated address 2001:db8:0:a1:: +allocated address 2001:db8:0:a2:: +allocated address 2001:db8:0:a3:: +allocated address 2001:db8:0:a4:: +allocated address 2001:db8:0:a5:: +allocated address 2001:db8:0:a6:: +allocated address 2001:db8:0:a7:: +allocated address 2001:db8:0:a8:: +allocated address 2001:db8:0:a9:: +allocated address 2001:db8:0:aa:: +allocated address 2001:db8:0:ab:: +allocated address 2001:db8:0:ac:: +allocated address 2001:db8:0:ad:: +allocated address 2001:db8:0:ae:: +allocated address 2001:db8:0:af:: +allocated address 2001:db8:0:b0:: +allocated address 2001:db8:0:b1:: +allocated address 2001:db8:0:b2:: +allocated address 2001:db8:0:b3:: +allocated address 2001:db8:0:b4:: +allocated address 2001:db8:0:b5:: +allocated address 2001:db8:0:b6:: +allocated address 2001:db8:0:b7:: +allocated address 2001:db8:0:b8:: +allocated address 2001:db8:0:b9:: +allocated address 2001:db8:0:ba:: +allocated address 2001:db8:0:bb:: +allocated address 2001:db8:0:bc:: +allocated address 2001:db8:0:bd:: +allocated address 2001:db8:0:be:: +allocated address 2001:db8:0:bf:: +allocated address 2001:db8:0:c0:: +allocated address 2001:db8:0:c1:: +allocated address 2001:db8:0:c2:: +allocated address 2001:db8:0:c3:: +allocated address 2001:db8:0:c4:: +allocated address 2001:db8:0:c5:: +allocated address 2001:db8:0:c6:: +allocated address 2001:db8:0:c7:: +allocated address 2001:db8:0:c8:: +allocated address 2001:db8:0:c9:: +allocated address 2001:db8:0:ca:: +allocated address 2001:db8:0:cb:: +allocated address 2001:db8:0:cc:: +allocated address 2001:db8:0:cd:: +allocated address 2001:db8:0:ce:: +allocated address 2001:db8:0:cf:: +allocated address 2001:db8:0:d0:: +allocated address 2001:db8:0:d1:: +allocated address 2001:db8:0:d2:: +allocated address 2001:db8:0:d3:: +allocated address 2001:db8:0:d4:: +allocated address 2001:db8:0:d5:: +allocated address 2001:db8:0:d6:: +allocated address 2001:db8:0:d7:: +allocated address 2001:db8:0:d8:: +allocated address 2001:db8:0:d9:: +allocated address 2001:db8:0:da:: +allocated address 2001:db8:0:db:: +allocated address 2001:db8:0:dc:: +allocated address 2001:db8:0:dd:: +allocated address 2001:db8:0:de:: +allocated address 2001:db8:0:df:: +allocated address 2001:db8:0:e0:: +allocated address 2001:db8:0:e1:: +allocated address 2001:db8:0:e2:: +allocated address 2001:db8:0:e3:: +allocated address 2001:db8:0:e4:: +allocated address 2001:db8:0:e5:: +allocated address 2001:db8:0:e6:: +allocated address 2001:db8:0:e7:: +allocated address 2001:db8:0:e8:: +allocated address 2001:db8:0:e9:: +allocated address 2001:db8:0:ea:: +allocated address 2001:db8:0:eb:: +allocated address 2001:db8:0:ec:: +allocated address 2001:db8:0:ed:: +allocated address 2001:db8:0:ee:: +allocated address 2001:db8:0:ef:: +allocated address 2001:db8:0:f0:: +allocated address 2001:db8:0:f1:: +allocated address 2001:db8:0:f2:: +allocated address 2001:db8:0:f3:: +allocated address 2001:db8:0:f4:: +allocated address 2001:db8:0:f5:: +allocated address 2001:db8:0:f6:: +allocated address 2001:db8:0:f7:: +allocated address 2001:db8:0:f8:: +allocated address 2001:db8:0:f9:: +allocated address 2001:db8:0:fa:: +allocated address 2001:db8:0:fb:: +allocated address 2001:db8:0:fc:: +allocated address 2001:db8:0:fd:: +allocated address 2001:db8:0:fe:: +allocated address 2001:db8:0:ff:: diff --git a/tests/testsuite.at b/tests/testsuite.at index f365f95..fa94db3 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -8,12 +8,25 @@ AT_CHECK([$abs_top_builddir/tests/lib/ippool_test], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([ippool_v6]) +AT_KEYWORDS([ippool_v6]) +cat $abs_srcdir/lib/ippool_v6_test.ok > expout +cat $abs_srcdir/lib/ippool_v6_test.err > experr +AT_CHECK([$abs_top_builddir/tests/lib/ippool_test -v6], [], [expout], [experr]) +AT_CLEANUP + AT_SETUP([in46a]) AT_KEYWORDS([in46a]) cat $abs_srcdir/lib/in46a_test.ok > expout AT_CHECK([$abs_top_builddir/tests/lib/in46a_test], [], [expout], []) AT_CLEANUP +AT_SETUP([in46a_v6]) +AT_KEYWORDS([in46a_v6]) +cat $abs_srcdir/lib/in46a_v6_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/lib/in46a_test -v6], [], [expout], []) +AT_CLEANUP + AT_SETUP([gtpie]) AT_KEYWORDS([gtpie]) cat $abs_srcdir/gtp/gtpie_test.ok > expout -- To view, visit https://gerrit.osmocom.org/5162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:11:09 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:11:09 +0000 Subject: [MERGED] osmo-ggsn[master]: Remove unused empty src/Makefile.in In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Remove unused empty src/Makefile.in ...................................................................... Remove unused empty src/Makefile.in Change-Id: I207362e055dbfafc42fad2cfdd0cf1da9dcad88b --- D src/Makefile.in 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index e69de29..0000000 --- a/src/Makefile.in +++ /dev/null -- To view, visit https://gerrit.osmocom.org/5161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I207362e055dbfafc42fad2cfdd0cf1da9dcad88b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:11:10 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:11:10 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn.c: Print version of unhandled ip packet In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: ggsn.c: Print version of unhandled ip packet ...................................................................... ggsn.c: Print version of unhandled ip packet Change-Id: I7e226a12b074c96c572f90e3aaf62716d0cd47c5 --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 0beaef7..763a2c5 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -653,7 +653,7 @@ dst.v6 = ip6h->ip6_dst; pool = apn->v6.pool; } else { - LOGP(DTUN, LOGL_NOTICE, "non-IPv packet received from tun\n"); + LOGP(DTUN, LOGL_NOTICE, "non-IPv%u packet received from tun\n", iph->version); return -1; } -- To view, visit https://gerrit.osmocom.org/5160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e226a12b074c96c572f90e3aaf62716d0cd47c5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:37:04 2017 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Tue, 5 Dec 2017 14:37:04 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 Verified+1 > let's wait for Minh or somebody else to be able to re-test this. I have tested with Osmo-NITB. No crash observed as expected. -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:22 +0000 Subject: [MERGED] osmo-gsm-tester[master]: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn ...................................................................... OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn Change-Id: I777835345355538a945599fb088630af63dc9140 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index d30c1ee..6d4f634 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsTrx(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -33,6 +34,7 @@ lac = None cellid = None proc_bts = None + _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -55,6 +57,11 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + if self._pcu is None: + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -143,6 +150,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -154,6 +165,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5007 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I777835345355538a945599fb088630af63dc9140 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:22 +0000 Subject: [MERGED] osmo-gsm-tester[master]: bts_*: Add incrementing bvci and rac values In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: bts_*: Add incrementing bvci and rac values ...................................................................... bts_*: Add incrementing bvci and rac values Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b --- M selftest/template_test.ok M selftest/template_test.py M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 80 insertions(+), 16 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/template_test.ok b/selftest/template_test.ok index bae21d2..c5471d0 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -51,9 +51,9 @@ ip.access unit_id val_bts.unit_id_bts0 0 oml ip.access stream_id val_bts.stream_id_bts0 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts0 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts0 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts0 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts0 gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts0 @@ -122,9 +122,9 @@ ip.access unit_id val_bts.unit_id_bts1 0 oml ip.access stream_id val_bts.stream_id_bts1 line 0 gprs mode gprs - gprs routing area 0 + gprs routing area val_bts.routing_area_code_bts1 gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci val_bts.bvci_bts1 gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -136,7 +136,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei val_bts.bvci_bts1 gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -144,7 +144,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci val_bts.bvci_bts1 gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip val_bts.sgsn_ip_addr_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 314dd8d..f4f1bd5 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,7 +22,9 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', + 'routing_area_code': 'val_bts.routing_area_code', 'cell_identity': 'val_bts.cell_identity', + 'bvci': 'val_bts.bvci', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 90eeb40..1953e85 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -32,7 +32,9 @@ pcu_sk_tmp_dir = None values = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -169,8 +171,12 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -193,7 +199,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 6d4f634..9b1f077 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -32,7 +32,9 @@ trx = None pcu_sk_tmp_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -147,8 +149,12 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -171,9 +177,15 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 812a247..1d2dbf6 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -31,7 +31,9 @@ remote_env = None remote_dir = None lac = None + rac = None cellid = None + bvci = None proc_bts = None _pcu = None @@ -166,8 +168,12 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) config.overlay(values, self.conf) sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() @@ -190,7 +196,13 @@ def set_lac(self, lac): self.lac = lac + def set_rac(self, rac): + self.rac = rac + def set_cellid(self, cellid): self.cellid = cellid + def set_bvci(self, bvci): + self.bvci = bvci + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 604a9e9..4acf0f6 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -215,9 +215,16 @@ # LAC=0 has special meaning (MS detached), avoid it return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str(((int(x)+1) % pow(2,16)) or 1), origin) + def next_rac(self, origin): + return self.next_persistent_value('rac', '1', schema.uint8, lambda x: str((int(x)+1) % pow(2,8) or 1), origin) + def next_cellid(self, origin): return self.next_persistent_value('cellid', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) + def next_bvci(self, origin): + # BVCI=0 and =1 are reserved, avoid them. + return self.next_persistent_value('bvci', '2', schema.uint16, lambda x: str(int(x)+1) if int(x) < pow(2,16) - 1 else '2', origin) + class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index a78bc63..f92d1db 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint8(val): + n = int(val) + if n < 0: + raise ValueError('Positive value expected instead of %d' % n) + if n > 255: # 2^8 - 1 + raise ValueError('Value %d too big, max value is 255' % n) + def uint16(val): n = int(val) if n < 0: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0d5f97a..e7c68b7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -268,7 +268,9 @@ def bts(self, specifics=None): bts = bts_obj(self, self.reserved_resources.get(resource.R_BTS, specifics=specifics)) bts.set_lac(self.lac()) + bts.set_rac(self.rac()) bts.set_cellid(self.cellid()) + bts.set_bvci(self.bvci()) self.register_for_cleanup(bts) return bts @@ -300,11 +302,21 @@ self.log('using LAC', lac) return lac + def rac(self): + rac = self.resources_pool.next_rac(self) + self.log('using RAC', rac) + return rac + def cellid(self): cellid = self.resources_pool.next_cellid(self) self.log('using CellId', cellid) return cellid + def bvci(self): + bvci = self.resources_pool.next_bvci(self) + self.log('using BVCI', bvci) + return bvci + def poll(self): if self._processes: for process in self._processes: diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 2466f9f..95db16d 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -61,9 +61,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -75,7 +75,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -83,7 +83,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} diff --git a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl index 211b4cc..2c27273 100644 --- a/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl @@ -51,9 +51,9 @@ oml ip.access stream_id ${bts.stream_id} line 0 % if bts.get('sgsn', False): gprs mode gprs - gprs routing area 0 + gprs routing area ${bts.routing_area_code} gprs network-control-order nc1 - gprs cell bvci 1800 + gprs cell bvci ${bts.bvci} gprs cell timer blocking-timer 3 gprs cell timer blocking-retries 3 gprs cell timer unblocking-retries 3 @@ -65,7 +65,7 @@ gprs cell timer resume-retries 3 gprs cell timer capability-update-timer 10 gprs cell timer capability-update-retries 3 - gprs nsei 1800 + gprs nsei ${bts.bvci} gprs ns timer tns-block 3 gprs ns timer tns-block-retries 3 gprs ns timer tns-reset 3 @@ -73,7 +73,7 @@ gprs ns timer tns-test 30 gprs ns timer tns-alive 3 gprs ns timer tns-alive-retries 10 - gprs nsvc 0 nsvci 1800 + gprs nsvc 0 nsvci ${bts.bvci} gprs nsvc 0 local udp port 23020 gprs nsvc 0 remote udp port 23000 gprs nsvc 0 remote ip ${bts.sgsn.ip_address.addr} -- To view, visit https://gerrit.osmocom.org/5068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:22 +0000 Subject: [MERGED] osmo-gsm-tester[master]: default-suites.conf: Add gprs suite In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: default-suites.conf: Add gprs suite ...................................................................... default-suites.conf: Add gprs suite Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 --- M example/default-suites.conf 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/default-suites.conf b/example/default-suites.conf index cc65a53..83dd079 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -3,21 +3,25 @@ - ussd:sysmo - aoip_ussd:sysmo - voice:sysmo +- gprs:sysmo - sms:trx-b200 - aoip_sms:trx-b200 - ussd:trx-b200 - aoip_ussd:trx-b200 - voice:trx-b200 +- gprs:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 - voice:trx-sysmocell5000 +- gprs:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy - aoip_ussd:octphy - voice:octphy +- gprs:octphy - smpp - aoip_smpp - aoip_encryption -- To view, visit https://gerrit.osmocom.org/5013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:23 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suites: gprs: Introduce suite with ping test In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suites: gprs: Introduce suite with ping test ...................................................................... suites: gprs: Introduce suite with ping test Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus we don't test sending data yet here, but at least we can already test pdp context activation. This test will be extended to run ping once we support setting up the GPRS data plane in osmo-gsm-tester. Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b --- M example/resources.conf A suites/gprs/ping.py A suites/gprs/suite.conf 3 files changed, 65 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index d503a48..26e1d80 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -7,6 +7,8 @@ - addr: 10.42.42.5 - addr: 10.42.42.6 - addr: 10.42.42.7 +- addr: 10.42.42.8 +- addr: 10.42.42.9 bts: - label: sysmoBTS 1002 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py new file mode 100755 index 0000000..46ab540 --- /dev/null +++ b/suites/gprs/ping.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +hlr = suite.hlr() +bts = suite.bts() +pcu = bts.pcu() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +mgw_bsc = suite.mgw() +stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) +msc = suite.msc(hlr, mgcpgw, stp) +bsc = suite.bsc(msc, mgw_bsc, stp) +ms = suite.modem() + +bsc.bts_add(bts) +sgsn.bts_add(bts) + +print('start network...') +hlr.start() +stp.start() +ggsn.start() +sgsn.start() +msc.start() +mgcpgw.start() +mgw_bsc.start() +bsc.start() + +bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) +ms.attach() + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('waiting for modems to attach to data services...') +wait(ms.is_attached) +ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) +# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) +# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) +# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v4) diff --git a/suites/gprs/suite.conf b/suites/gprs/suite.conf new file mode 100644 index 0000000..1590b7d --- /dev/null +++ b/suites/gprs/suite.conf @@ -0,0 +1,9 @@ +resources: + ip_address: + - times: 8 # msc, bsc, hlr, stp, mgw*2, sgsn, ggsn + bts: + - times: 1 + modem: + - times: 1 + features: + - gprs -- To view, visit https://gerrit.osmocom.org/5011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:23 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suites: aoip_debug: Start GPRS services In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suites: aoip_debug: Start GPRS services ...................................................................... suites: aoip_debug: Start GPRS services Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 --- M suites/aoip_debug/interactive.py M suites/aoip_debug/suite.conf 2 files changed, 43 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index cad68b7..312083a 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -2,30 +2,40 @@ from osmo_gsm_tester.testenv import * hlr = suite.hlr() bts = suite.bts() +pcu = bts.pcu() mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) mgw_bsc = suite.mgw() stp = suite.stp() +ggsn = suite.ggsn() +sgsn = suite.sgsn(hlr, ggsn) msc = suite.msc(hlr, mgcpgw, stp) bsc = suite.bsc(msc, mgw_bsc, stp) + modems = suite.modems(int(prompt('How many modems?'))) + +bsc.bts_add(bts) +sgsn.bts_add(bts) hlr.start() stp.start() +ggsn.start() +sgsn.start() msc.start() mgcpgw.start() mgw_bsc.start() - -bsc.bts_add(bts) bsc.start() bts.start() +print('Waiting for bts to be ready...') +wait(bts.ready_for_pcu) +pcu.start() for m in modems: hlr.subscriber_add(m) m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd ') + cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -115,5 +125,34 @@ response = ms.ussd_send(ussd_cmd) print('modem %s: response=%r' % (ms.name(), response)) + elif cmd.startswith('data-attach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: attach' % ms.name()) + ms.attach() + wait(ms.is_attached) + print('modem %s: attached' % ms.name()) + + elif cmd.startswith('data-detach'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: detach' % ms.name()) + ms.attach() + wait(lambda: not ms.is_attached()) + print('modem %s: detached' % ms.name()) + + elif cmd.startswith('data-activate'): + if len(params) != 1: + print('wrong format') + continue + for ms in modems: + print('modem %s: activate' % ms.name()) + response = ms.activate_context() + print('modem %s: response=%r' % (ms.name(), response)) + else: print('Unknown command: %s' % cmd) diff --git a/suites/aoip_debug/suite.conf b/suites/aoip_debug/suite.conf index d75cacb..2f36e1d 100644 --- a/suites/aoip_debug/suite.conf +++ b/suites/aoip_debug/suite.conf @@ -1,6 +1,6 @@ resources: ip_address: - - times: 6 + - times: 8 bts: - times: 1 modem: -- To view, visit https://gerrit.osmocom.org/5010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:23 +0000 Subject: [MERGED] osmo-gsm-tester[master]: default-suites.conf: Use same order for sysmocell5000 as for... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: default-suites.conf: Use same order for sysmocell5000 as for other bts ...................................................................... default-suites.conf: Use same order for sysmocell5000 as for other bts Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 --- M example/default-suites.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/default-suites.conf b/example/default-suites.conf index 039ead8..cc65a53 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -10,9 +10,9 @@ - voice:trx-b200 - sms:trx-sysmocell5000 - aoip_sms:trx-sysmocell5000 -- voice:trx-sysmocell5000 - ussd:trx-sysmocell5000 - aoip_ussd:trx-sysmocell5000 +- voice:trx-sysmocell5000 - sms:octphy - aoip_sms:octphy - ussd:octphy -- To view, visit https://gerrit.osmocom.org/5012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:23 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: Add minimal GPRS support In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Add minimal GPRS support ...................................................................... modem: Add minimal GPRS support Up to this point we can test signalling plane: attaching to GPRS network and activating a context. Data plane (sending IP packets through the network) is still not implemented as it requires setting up the network interface provided by ofono as well as routing, and most probably move osmo-ggsn to its own network namespace. Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f --- M src/osmo_gsm_tester/modem.py 1 file changed, 59 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index 0796fa6..206a081 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -37,6 +37,7 @@ I_MODEM = 'org.ofono.Modem' I_NETREG = 'org.ofono.NetworkRegistration' I_SMS = 'org.ofono.MessageManager' +I_CONNMGR = 'org.ofono.ConnectionManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' I_SS = 'org.ofono.SupplementaryServices' @@ -334,6 +335,10 @@ sms_received_list = None _ki = None + CTX_PROT_IPv4 = 'ip' + CTX_PROT_IPv6 = 'ipv6' + CTX_PROT_IPv46 = 'dual' + def __init__(self, conf): self.conf = conf self.path = conf.get('path') @@ -347,6 +352,7 @@ self.dbus.required_signals = { I_SMS: ( ('IncomingMessage', self._on_incoming_message), ), I_NETREG: ( ('PropertyChanged', self._on_netreg_property_changed), ), + I_CONNMGR: ( ('PropertyChanged', self._on_connmgr_property_changed), ), I_CALLMGR: ( ('PropertyChanged', self._on_callmgr_property_changed), ('CallAdded', self._on_callmgr_call_added), ('CallRemoved', self._on_callmgr_call_removed), ), @@ -430,6 +436,7 @@ req_ifaces = (I_NETREG,) req_ifaces += (I_SMS,) if 'sms' in self.features() else () req_ifaces += (I_SS,) if 'ussd' in self.features() else () + req_ifaces += (I_CONNMGR,) if 'gprs' in self.features() else () return req_ifaces def _on_netreg_property_changed(self, name, value): @@ -531,6 +538,8 @@ self.cancellable = Gio.Cancellable.new() def power_off(self): + if self.dbus.has_interface(I_CONNMGR) and self.is_attached(): + self.detach() self.set_online(False) self.set_powered(False) req_ifaces = self._required_ifaces() @@ -562,6 +571,53 @@ else: self.log('Connect to', mcc_mnc if mcc_mnc else 'default network') self.schedule_scan_register(mcc_mnc) + + def is_attached(self): + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.GetProperties() + attached = prop.get('Attached') + self.dbg('attached:', attached) + return attached + + def attach(self, allow_roaming=False): + self.dbg('attach') + if self.is_attached(): + self.detach() + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', allow_roaming)) + prop = connmgr.SetProperty('Powered', Variant('b', True)) + + def detach(self): + self.dbg('detach') + connmgr = self.dbus.interface(I_CONNMGR) + prop = connmgr.SetProperty('RoamingAllowed', Variant('b', False)) + prop = connmgr.SetProperty('Powered', Variant('b', False)) + connmgr.DeactivateAll() + connmgr.ResetContexts() # Requires Powered=false + + def activate_context(self, apn='internet', user='ogt', pwd='', protocol='ip'): + self.dbg('activate_context', apn=apn, user=user) + + connmgr = self.dbus.interface(I_CONNMGR) + ctx_path = connmgr.AddContext('internet') + + ctx = systembus_get(ctx_path) + ctx.SetProperty('AccessPointName', Variant('s', apn)) + ctx.SetProperty('Username', Variant('s', user)) + ctx.SetProperty('Password', Variant('s', pwd)) + ctx.SetProperty('Protocol', Variant('s', protocol)) + + # Activate can only be called after we are attached + ctx.SetProperty('Active', Variant('b', True)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == True) + self.log('context activated', path=ctx_path, apn=apn, user=user, properties=ctx.GetProperties()) + return ctx_path + + def deactivate_context(self, ctx_id): + self.dbg('activate_context', path=ctx_id) + ctx = systembus_get(ctx_id) + ctx.SetProperty('Active', Variant('b', False)) + event_loop.wait(self, lambda: ctx.GetProperties()['Active'] == False) def sms_send(self, to_msisdn_or_modem, *tokens): if isinstance(to_msisdn_or_modem, Modem): @@ -663,6 +719,9 @@ def _on_callmgr_property_changed(self, name, value): self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CALLMGR, name, value)) + def _on_connmgr_property_changed(self, name, value): + self.dbg('%r.PropertyChanged() -> %s=%s' % (I_CONNMGR, name, value)) + def info(self, keys=('Manufacturer', 'Model', 'Revision', 'Serial')): props = self.properties() return ', '.join(['%s: %r'%(k,props.get(k)) for k in keys]) -- To view, visit https://gerrit.osmocom.org/5009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:48:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 14:48:24 +0000 Subject: [MERGED] osmo-gsm-tester[master]: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn ...................................................................... OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index d9ffd6e..90eeb40 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -20,11 +20,12 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop +from . import log, config, util, template, process, event_loop, pcu_osmo class OsmoBtsOctphy(log.Origin): suite_run = None bsc = None + sgsn = None run_dir = None inst = None env = None @@ -33,6 +34,7 @@ lac = None cellid = None proc_bts = None + _pcu = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -55,6 +57,11 @@ except OSError: pass os.rmdir(self.pcu_sk_tmp_dir) + + def pcu(self): + if self._pcu is None: + self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + return self._pcu def pcu_socket_path(self): return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') @@ -165,6 +172,10 @@ if self.cellid is not None: config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + self.dbg(conf=values) return values @@ -176,6 +187,9 @@ def set_bsc(self, bsc): self.bsc = bsc + def set_sgsn(self, sgsn): + self.sgsn = sgsn + def set_lac(self, lac): self.lac = lac -- To view, visit https://gerrit.osmocom.org/5008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54780971d711d47b23976dd044a4a53134dd4299 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:54:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 14:54:58 +0000 Subject: osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 14:54:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 14:54:59 +0000 Subject: [MERGED] osmo-bts[master]: DTX: avoid illegal character contained in DTX FSM allocation... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash ...................................................................... DTX: avoid illegal character contained in DTX FSM allocation which causes BTS crash Problem: lchan->tch.dtx.dl_amr_fsm struct failed to allocate in l1sap_chan_act routine in l1sap.c due to illegal characters contained in lchan->name which are passed to osmo_fsm_inst_alloc routine. As a result, lchan->tch.dtx.dl_amr_fsm is NULL causing BTS crashed (SEG FAULT) when trying to access this struct. Below is snapshot of crash log obtained by GDB: ... Fri Nov 24 18:13:55 2017 <0000> rsl.c:1653 payload type: 98 Fri Nov 24 18:13:55 2017 <0000> rsl.c:1463 (bts=0,trx=0,ts=2,ss=0) RSL Tx IPAC_MDCX_ACK (local 127.0.0.1:11538, remote 127.0.0.1:30012) Program received signal SIGSEGV, Segmentation fault. 0x00031930 in dtx_dl_amr_fsm_step (lchan=lchan at entry=0xb69592a8, rtp_pl=rtp_pl at entry=0x87ae8 " \024\351Y\363_\337\345\351f\177\373\300\210\201\200\210", rtp_pl_len=17, fn=1728481, l1_payload=0x10dd25 "", marker=marker at entry=true, len=len at entry=0x10ddc4 "\024", ft_out=0xbefff7d7 "\002", ft_out at entry=0xbefff7cf "\276\341_\032") at msg_utils.c:233 233 msg_utils.c: No such file or directory. ... Fix: * Use different formatting for lchan name passed to osmo_fsm_inst_alloc routine * Refuse channel activation if FSM could not be generated (as opposed to crash) Related: OS#2606 Reported-by: Minh-Quang Nguyen Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c --- M src/common/l1sap.c 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Minh-Quang Nguyen: Looks good to me, but someone else must approve; Verified Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index d294110..18aee93 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1354,12 +1354,20 @@ return -RSL_ERR_EQUIPMENT_FAIL; /* Init DTX DL FSM if necessary */ - if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) + if (trx->bts->dtxd && lchan->type != GSM_LCHAN_SDCCH) { + char name[32]; + snprintf(name, sizeof(name), "bts%u-trx%u-ts%u-ss%u", lchan->ts->trx->bts->nr, + lchan->ts->trx->nr, lchan->ts->nr, lchan->nr); lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, tall_bts_ctx, lchan, LOGL_DEBUG, - lchan->name); + name); + if (!lchan->tch.dtx.dl_amr_fsm) { + l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); + return -RSL_ERR_EQUIPMENT_FAIL; + } + } return 0; } -- To view, visit https://gerrit.osmocom.org/5030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:14:59 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:14:59 +0000 Subject: [PATCH] libosmocore[master]: counters: add osmo_counters_count() returns the amount of co... Message-ID: Review at https://gerrit.osmocom.org/5189 counters: add osmo_counters_count() returns the amount of counters Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b --- M include/osmocom/core/counter.h M src/counter.c 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/5189/1 diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index e692f7e..259f1ed 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -44,6 +44,8 @@ int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); +int osmo_counters_count(); + struct osmo_counter *osmo_counter_get_by_name(const char *name); int osmo_counter_difference(struct osmo_counter *ctr); diff --git a/src/counter.c b/src/counter.c index 0fa84c8..0fa3166 100644 --- a/src/counter.c +++ b/src/counter.c @@ -77,6 +77,13 @@ return rc; } +/*! Counts the registered counter + * \returns amount of counters */ +int osmo_counters_count() +{ + return llist_count(&counters); +} + /*! Find a counter by its name. * \param[in] name Name used to look-up/search counter * \returns Counter on success; NULL if not found */ -- To view, visit https://gerrit.osmocom.org/5189 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:14:59 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:14:59 +0000 Subject: [PATCH] libosmocore[master]: vty: show asciidoc counters: don't create an empty table for... Message-ID: Review at https://gerrit.osmocom.org/5190 vty: show asciidoc counters: don't create an empty table for osmo_counters When creating asciidocs for osmo_counter an empty is not useful. If there aren't any counter, output a hidden comment Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e --- M src/vty/stats_vty.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/90/5190/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 6c09c38..faa136d 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -393,6 +393,13 @@ static void asciidoc_counter_generate(struct vty *vty) { + if (osmo_counters_count() == 0) + { + vty_out(vty, "// there are no ungrouped osmo_counters%s", + VTY_NEWLINE); + return; + } + vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5190 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:24:51 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:24:51 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC: add rate counter documentation Message-ID: Review at https://gerrit.osmocom.org/5191 OsmoBSC: add rate counter documentation Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a --- A OsmoBSC/chapters/counters.adoc A OsmoBSC/chapters/counters_generated.adoc M OsmoBSC/osmobsc-usermanual.adoc 3 files changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/91/5191/1 diff --git a/OsmoBSC/chapters/counters.adoc b/OsmoBSC/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoBSC/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoBSC/chapters/counters_generated.adoc b/OsmoBSC/chapters/counters_generated.adoc new file mode 100644 index 0000000..d55df07 --- /dev/null +++ b/OsmoBSC/chapters/counters_generated.adoc @@ -0,0 +1,76 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoBSC (OsmoBSC). + +// generating tables for rate_ctr_group +// rate_ctr_group table E1 Input subsystem +.e1inp - E1 Input subsystem +[options="header"] +|=== +| Name | Reference | Description +| hdlc:abort | <> | HDLC abort +| hdlc:bad_fcs | <> | HLDC Bad FCS +| hdlc:overrun | <> | HDLC Overrun +| alarm | <> | Alarm +| removed | <> | Line removed +|=== +// rate_ctr_group table base station controller +.bsc - base station controller +[options="header"] +|=== +| Name | Reference | Description +| chreq:total | <> | Received channel requests. +| chreq:no_channel | <> | Sent to MS no channel available. +| handover:attempted | <> | Received handover attempts. +| handover:no_channel | <> | Sent no channel available responses. +| handover:timeout | <> | Count the amount of timeouts of timer T3103. +| handover:completed | <> | Received handover completed. +| handover:failed | <> | Receive HO FAIL messages. +| paging:attempted | <> | Paging attempts for a MS. +| paging:detached | <> | Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found. +| paging:completed | <> | Paging successful completed. +| paging:expired | <> | Paging Request expired because of timeout T3113. +| chan:rf_fail | <> | Received a RF failure indication from BTS. +| chan:rll_err | <> | Received a RLL failure with T200 cause from BTS. +| bts:oml_fail | <> | Received a TEI down on a OML link. +| bts:rsl_fail | <> | Received a TEI down on a OML link. +| bts:codec_amr_f | <> | Count the usage of AMR/F codec by channel mode requested. +| bts:codec_amr_h | <> | Count the usage of AMR/H codec by channel mode requested. +| bts:codec_efr | <> | Count the usage of EFR codec by channel mode requested. +| bts:codec_fr | <> | Count the usage of FR codec by channel mode requested. +| bts:codec_hr | <> | Count the usage of HR codec by channel mode requested. +|=== +// rate_ctr_group table mobile switching center +.msc - mobile switching center +[options="header"] +|=== +| Name | Reference | Description +| loc_update_type:attach | <> | Received location update imsi attach requests. +| loc_update_type:normal | <> | Received location update normal requests. +| loc_update_type:periodic | <> | Received location update periodic requests. +| loc_update_type:detach | <> | Received location update detach indication. +| loc_update_resp:failed | <> | Rejected location updates. +| loc_update_resp:completed | <> | Successful location updates. +| sms:submitted | <> | Received a RPDU from a MS (MO). +| sms:no_receiver | <> | Counts SMS which couldn't routed because no receiver found. +| sms:delivered | <> | Global SMS Deliver attempts. +| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt. +| sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. +| sms:deliver_unknown_error | <> | Unknown error occured during sms delivery. +| call:mo_setup | <> | Received setup requests from a MS to init a MO call. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mt_setup | <> | Sent setup requests to the MS (MT). +| call:mt_connect | <> | Sent a connect to the MS (MT). +| call:active | <> | Count total amount of calls that ever reached active state. +| call:complete | <> | Count total amount of calls which got terminated by disconnect req or ind after reaching active state. +| call:incomplete | <> | Count total amount of call which got terminated by any other reason after reaching active state. +|=== +// generating tables for osmo_stat_items +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +| msc.active_calls | <> | +|=== + diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index b455897..2ff985d 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -13,6 +13,8 @@ include::chapters/control.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/vty.adoc[] include::../common/chapters/logging.adoc[] -- To view, visit https://gerrit.osmocom.org/5191 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:24:52 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:24:52 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoMSC: add rate counter documentation Message-ID: Review at https://gerrit.osmocom.org/5192 OsmoMSC: add rate counter documentation Change-Id: Idc105fd16511c6ea4f5069a57b217ea3319bdbec --- A OsmoMSC/chapters/counters.adoc A OsmoMSC/chapters/counters_generated.adoc M OsmoMSC/osmomsc-usermanual.adoc 3 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/92/5192/1 diff --git a/OsmoMSC/chapters/counters.adoc b/OsmoMSC/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoMSC/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoMSC/chapters/counters_generated.adoc b/OsmoMSC/chapters/counters_generated.adoc new file mode 100644 index 0000000..afeb8ff --- /dev/null +++ b/OsmoMSC/chapters/counters_generated.adoc @@ -0,0 +1,40 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoMSC UNKNOWN (OsmoMSC). + +// generating tables for rate_ctr_group +// rate_ctr_group table mobile switching center +.msc - mobile switching center +[options="header"] +|=== +| Name | Reference | Description +| loc_update_type:attach | <> | Received location update imsi attach requests. +| loc_update_type:normal | <> | Received location update normal requests. +| loc_update_type:periodic | <> | Received location update periodic requests. +| loc_update_type:detach | <> | Received location update detach indication. +| loc_update_resp:failed | <> | Rejected location updates. +| loc_update_resp:completed | <> | Successful location updates. +| sms:submitted | <> | Received a RPDU from a MS (MO). +| sms:no_receiver | <> | Counts SMS which couldn't routed because no receiver found. +| sms:delivered | <> | Global SMS Deliver attempts. +| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt. +| sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. +| sms:deliver_unknown_error | <> | Unknown error occured during sms delivery. +| call:mo_setup | <> | Received setup requests from a MS to init a MO call. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mt_setup | <> | Sent setup requests to the MS (MT). +| call:mt_connect | <> | Sent a connect to the MS (MT). +| call:active | <> | Count total amount of calls that ever reached active state. +| call:complete | <> | Count total amount of calls which got terminated by disconnect req or ind after reaching active state. +| call:incomplete | <> | Count total amount of call which got terminated by any other reason after reaching active state. +|=== +// generating tables for osmo_stat_items +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +| msc.active_calls | <> | +|=== + + diff --git a/OsmoMSC/osmomsc-usermanual.adoc b/OsmoMSC/osmomsc-usermanual.adoc index 7c20020..6190481 100644 --- a/OsmoMSC/osmomsc-usermanual.adoc +++ b/OsmoMSC/osmomsc-usermanual.adoc @@ -14,6 +14,8 @@ include::chapters/control.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/vty.adoc[] include::../common/chapters/logging.adoc[] -- To view, visit https://gerrit.osmocom.org/5192 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc105fd16511c6ea4f5069a57b217ea3319bdbec Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:24:52 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:24:52 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoPCU: add rate counter documentation Message-ID: Review at https://gerrit.osmocom.org/5193 OsmoPCU: add rate counter documentation Change-Id: Ieb4e1dab415a70ded5c65c21752dca497856e96f --- A OsmoPCU/chapters/counters.adoc A OsmoPCU/chapters/counters_generated.adoc M OsmoPCU/osmopcu-usermanual.adoc 3 files changed, 184 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/93/5193/1 diff --git a/OsmoPCU/chapters/counters.adoc b/OsmoPCU/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoPCU/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoPCU/chapters/counters_generated.adoc b/OsmoPCU/chapters/counters_generated.adoc new file mode 100644 index 0000000..2ee425e --- /dev/null +++ b/OsmoPCU/chapters/counters_generated.adoc @@ -0,0 +1,178 @@ +// autogenerated by show asciidoc counters +These counters and their description based on Osmo-PCU 0.4.0.4-8d55 (Osmo-PCU). + +// generating tables for rate_ctr_group +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table BTS Statistics +.bts - BTS Statistics +[options="header"] +|=== +| Name | Reference | Description +| tbf:dl:alloc | <> | TBF DL Allocated +| tbf:dl:freed | <> | TBF DL Freed +| tbf:dl:aborted | <> | TBF DL Aborted +| tbf:ul:alloc | <> | TBF UL Allocated +| tbf:ul:freed | <> | TBF UL Freed +| tbf:ul:aborted | <> | TBF UL Aborted +| tbf:reused | <> | TBF Reused +| tbf:alloc:algo-a | <> | TBF Alloc Algo A +| tbf:alloc:algo-b | <> | TBF Alloc Algo B +| tbf:failed:egprs-only | <> | TBF Failed EGPRS-only +| rlc:sent | <> | RLC Sent +| rlc:resent | <> | RLC Resent +| rlc:restarted | <> | RLC Restarted +| rlc:stalled | <> | RLC Stalled +| rlc:nacked | <> | RLC Nacked +| rlc:final_block_resent | <> | RLC Final Blk resent +| rlc:ass:timedout | <> | RLC Assign Timeout +| rlc:ass:failed | <> | RLC Assign Failed +| rlc:ack:timedout | <> | RLC Ack Timeout +| rlc:ack:failed | <> | RLC Ack Failed +| rlc:rel:timedout | <> | RLC Release Timeout +| rlc:late-block | <> | RLC Late Block +| rlc:sent-dummy | <> | RLC Sent Dummy +| rlc:sent-control | <> | RLC Sent Control +| rlc:dl_bytes | <> | RLC DL Bytes +| rlc:dl_payload_bytes | <> | RLC DL Payload Bytes +| rlc:ul_bytes | <> | RLC UL Bytes +| rlc:ul_payload_bytes | <> | RLC UL Payload Bytes +| decode:errors | <> | Decode Errors +| sba:allocated | <> | SBA Allocated +| sba:freed | <> | SBA Freed +| sba:timedout | <> | SBA Timeout +| llc:timeout | <> | Timedout Frames +| llc:dropped | <> | Dropped Frames +| llc:scheduled | <> | Scheduled Frames +| llc:dl_bytes | <> | RLC encapsulated PDUs +| llc:ul_bytes | <> | full PDUs received +| rach:requests | <> | RACH requests +| 11bit_rach:requests | <> | 11BIT_RACH requests +| spb:uplink_first_segment | <> | First seg of UL SPB +| spb:uplink_second_segment | <> | Second seg of UL SPB +| spb:downlink_first_segment | <> | First seg of DL SPB +| spb:downlink_second_segment | <> | Second seg of DL SPB +| immediate:assignment_UL | <> | Immediate Assign UL +| immediate:assignment_rej | <> | Immediate Assign Rej +| immediate:assignment_DL | <> | Immediate Assign DL +| channel:request_description | <> | Channel Request Desc +| pkt:ul_assignment | <> | Packet UL Assignment +| pkt:access_reject | <> | Packet Access Reject +| pkt:dl_assignment | <> | Packet DL Assignment +| ul:control | <> | UL control Block +| ul:assignment_poll_timeout | <> | UL Assign Timeout +| ul:assignment_failed | <> | UL Assign Failed +| dl:assignment_timeout | <> | DL Assign Timeout +| dl:assignment_failed | <> | DL Assign Failed +| pkt:ul_ack_nack_timeout | <> | PUAN Poll Timeout +| pkt:ul_ack_nack_failed | <> | PUAN poll Failed +| pkt:dl_ack_nack_timeout | <> | PDAN poll Timeout +| pkt:dl_ack_nack_failed | <> | PDAN poll Failed +| gprs:downlink_cs1 | <> | CS1 downlink +| gprs:downlink_cs2 | <> | CS2 downlink +| gprs:downlink_cs3 | <> | CS3 downlink +| gprs:downlink_cs4 | <> | CS4 downlink +| egprs:downlink_mcs1 | <> | MCS1 downlink +| egprs:downlink_mcs2 | <> | MCS2 downlink +| egprs:downlink_mcs3 | <> | MCS3 downlink +| egprs:downlink_mcs4 | <> | MCS4 downlink +| egprs:downlink_mcs5 | <> | MCS5 downlink +| egprs:downlink_mcs6 | <> | MCS6 downlink +| egprs:downlink_mcs7 | <> | MCS7 downlink +| egprs:downlink_mcs8 | <> | MCS8 downlink +| egprs:downlink_mcs9 | <> | MCS9 downlink +| gprs:uplink_cs1 | <> | CS1 Uplink +| gprs:uplink_cs2 | <> | CS2 Uplink +| gprs:uplink_cs3 | <> | CS3 Uplink +| gprs:uplink_cs4 | <> | CS4 Uplink +| egprs:uplink_mcs1 | <> | MCS1 Uplink +| egprs:uplink_mcs2 | <> | MCS2 Uplink +| egprs:uplink_mcs3 | <> | MCS3 Uplink +| egprs:uplink_mcs4 | <> | MCS4 Uplink +| egprs:uplink_mcs5 | <> | MCS5 Uplink +| egprs:uplink_mcs6 | <> | MCS6 Uplink +| egprs:uplink_mcs7 | <> | MCS7 Uplink +| egprs:uplink_mcs8 | <> | MCS8 Uplink +| egprs:uplink_mcs9 | <> | MCS9 Uplink +|=== +// generating tables for osmo_stat_items +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +BTS Statistics +// osmo_stat_item_group table BTS Statistics +.bts - BTS Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| ms.present | <> | MS Present | +|=== +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +|=== + + diff --git a/OsmoPCU/osmopcu-usermanual.adoc b/OsmoPCU/osmopcu-usermanual.adoc index f47a0a9..a72e947 100644 --- a/OsmoPCU/osmopcu-usermanual.adoc +++ b/OsmoPCU/osmopcu-usermanual.adoc @@ -17,6 +17,8 @@ include::chapters/configuration.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/gb.adoc[] include::../common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/5193 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb4e1dab415a70ded5c65c21752dca497856e96f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:24:52 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:24:52 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoSGSN: add rate counter documentation Message-ID: Review at https://gerrit.osmocom.org/5194 OsmoSGSN: add rate counter documentation Change-Id: I4c5d5744f961a92bc7c8888ca739d1e8a8a0be9c --- A OsmoSGSN/chapters/counters.adoc A OsmoSGSN/chapters/counters_generated.adoc M OsmoSGSN/osmosgsn-usermanual.adoc 3 files changed, 127 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/94/5194/1 diff --git a/OsmoSGSN/chapters/counters.adoc b/OsmoSGSN/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoSGSN/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoSGSN/chapters/counters_generated.adoc b/OsmoSGSN/chapters/counters_generated.adoc new file mode 100644 index 0000000..756a4a5 --- /dev/null +++ b/OsmoSGSN/chapters/counters_generated.adoc @@ -0,0 +1,121 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoSGSN UNKNOWN (OsmoSGSN). + +// generating tables for rate_ctr_group +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table SGSN Overall Statistics +.sgsn - SGSN Overall Statistics +[options="header"] +|=== +| Name | Reference | Description +| llc:dl_bytes | <> | Count sent LLC bytes before giving it to the bssgp layer +| llc:ul_bytes | <> | Count sucessful received LLC bytes (encrypt & fcs correct) +| llc:dl_packets | <> | Count sucessful sent LLC packets before giving it to the bssgp layer +| llc:ul_packets | <> | Count sucessful received LLC packets (encrypt & fcs correct) +| gprs:attach_requested | <> | Received attach requests +| gprs:attach_accepted | <> | Sent attach accepts +| gprs:attach_rejected | <> | Sent attach rejects +| gprs:detach_requested | <> | Received detach requests +| gprs:detach_acked | <> | Sent detach acks +| gprs:routing_area_requested | <> | Received routing area requests +| gprs:routing_area_requested | <> | Sent routing area acks +| gprs:routing_area_requested | <> | Sent routing area rejects +| pdp:activate_requested | <> | Received activate requests +| pdp:activate_rejected | <> | Sent activate rejects +| pdp:activate_accepted | <> | Sent activate accepts +| pdp:request_activated | <> | unused +| pdp:request_activate_rejected | <> | unused +| pdp:modify_requested | <> | unused +| pdp:modify_accepted | <> | unused +| pdp:dl_deactivate_requested | <> | Sent deactivate requests +| pdp:dl_deactivate_accepted | <> | Sent deactivate accepted +| pdp:ul_deactivate_requested | <> | Received deactivate requests +| pdp:ul_deactivate_accepted | <> | Received deactivate accepts +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// generating tables for osmo_stat_items +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +|=== + + diff --git a/OsmoSGSN/osmosgsn-usermanual.adoc b/OsmoSGSN/osmosgsn-usermanual.adoc index 79c94f6..a6a7709 100644 --- a/OsmoSGSN/osmosgsn-usermanual.adoc +++ b/OsmoSGSN/osmosgsn-usermanual.adoc @@ -27,6 +27,8 @@ include::chapters/gsup.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/port_numbers.adoc[] include::../common/chapters/bibliography.adoc[] -- To view, visit https://gerrit.osmocom.org/5194 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c5d5744f961a92bc7c8888ca739d1e8a8a0be9c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:27:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 15:27:51 +0000 Subject: libosmocore[master]: vty: show asciidoc counters: don't create an empty table for... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5190 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:31:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 15:31:08 +0000 Subject: [PATCH] osmo-ggsn[master]: Log APN and tun names for forwarded packets Message-ID: Review at https://gerrit.osmocom.org/5195 Log APN and tun names for forwarded packets Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd --- M ggsn/ggsn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/95/5195/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 763a2c5..1e42030 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -689,7 +689,7 @@ OSMO_ASSERT(tun); OSMO_ASSERT(apn); - LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); + LOGPPDP(LOGL_DEBUG, pdp, "Packet received APN(%s): forwarding to tun %s\n", apn->cfg.name, tun->devname); switch (iph->version) { case 6: -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:34:56 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 15:34:56 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: add rate counter documentation In-Reply-To: References: Message-ID: Patch Set 1: @laforge: I'm unsure if the chapter is at the right position. -- To view, visit https://gerrit.osmocom.org/5191 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 15:48:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 15:48:16 +0000 Subject: [PATCH] osmo-ggsn[master]: Log APN and tun names for packets In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5195 to look at the new patch set (#2). Log APN and tun names for packets Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd --- M ggsn/ggsn.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/95/5195/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 763a2c5..f6a135a 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -661,12 +661,13 @@ if (!pool) return 0; - DEBUGP(DTUN, "Received packet from tun!\n"); + DEBUGP(DTUN, "Received packet APN(%s) from tun %s", apn->cfg.name, tun->devname); if (ippool_getip(pool, &ipm, &dst)) { - DEBUGP(DTUN, "Received packet with no PDP contex!!\n"); + DEBUGPC(DTUN, " with no PDP contex!!\n"); return 0; } + DEBUGPC(DTUN, "\n"); if (ipm->peer) /* Check if a peer protocol is defined */ gtp_data_req(apn->ggsn->gsn, (struct pdp_t *)ipm->peer, pack, len); @@ -689,7 +690,7 @@ OSMO_ASSERT(tun); OSMO_ASSERT(apn); - LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); + LOGPPDP(LOGL_DEBUG, pdp, "Packet received APN(%s): forwarding to tun %s\n", apn->cfg.name, tun->devname); switch (iph->version) { case 6: -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:05:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:05:17 +0000 Subject: libosmocore[master]: vty: show asciidoc counters: don't create an empty table for... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5190 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:05:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:05:27 +0000 Subject: libosmocore[master]: counters: add osmo_counters_count() returns the amount of co... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5189 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:05:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:05:30 +0000 Subject: [MERGED] libosmocore[master]: counters: add osmo_counters_count() returns the amount of co... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: counters: add osmo_counters_count() returns the amount of counters ...................................................................... counters: add osmo_counters_count() returns the amount of counters Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b --- M include/osmocom/core/counter.h M src/counter.c 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/counter.h b/include/osmocom/core/counter.h index e692f7e..259f1ed 100644 --- a/include/osmocom/core/counter.h +++ b/include/osmocom/core/counter.h @@ -44,6 +44,8 @@ int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *), void *data); +int osmo_counters_count(); + struct osmo_counter *osmo_counter_get_by_name(const char *name); int osmo_counter_difference(struct osmo_counter *ctr); diff --git a/src/counter.c b/src/counter.c index 0fa84c8..0fa3166 100644 --- a/src/counter.c +++ b/src/counter.c @@ -77,6 +77,13 @@ return rc; } +/*! Counts the registered counter + * \returns amount of counters */ +int osmo_counters_count() +{ + return llist_count(&counters); +} + /*! Find a counter by its name. * \param[in] name Name used to look-up/search counter * \returns Counter on success; NULL if not found */ -- To view, visit https://gerrit.osmocom.org/5189 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:05:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:05:31 +0000 Subject: [MERGED] libosmocore[master]: vty: show asciidoc counters: don't create an empty table for... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: show asciidoc counters: don't create an empty table for osmo_counters ...................................................................... vty: show asciidoc counters: don't create an empty table for osmo_counters When creating asciidocs for osmo_counter an empty is not useful. If there aren't any counter, output a hidden comment Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e --- M src/vty/stats_vty.c 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 6c09c38..faa136d 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -393,6 +393,13 @@ static void asciidoc_counter_generate(struct vty *vty) { + if (osmo_counters_count() == 0) + { + vty_out(vty, "// there are no ungrouped osmo_counters%s", + VTY_NEWLINE); + return; + } + vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5190 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:05:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:05:48 +0000 Subject: osmo-bts[master]: Log filenames on L1 errors In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5188 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e73374f3f1da662ebed52548d29b6b76443c81b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:07:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 16:07:34 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo Message-ID: Review at https://gerrit.osmocom.org/5196 bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/96/5196/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 1953e85..f25823c 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -62,7 +62,7 @@ def pcu(self): if self._pcu is None: - self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) return self._pcu def pcu_socket_path(self): -- To view, visit https://gerrit.osmocom.org/5196 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:08:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 16:08:07 +0000 Subject: osmo-ggsn[master]: Log APN and tun names for packets In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/5195/2/ggsn/ggsn.c File ggsn/ggsn.c: PS2, Line 664: Received packet APN(%s) from tun %s this is a bit awkward: You're receiving a packet from the tun device _for_ a given APN, but you're not receiving a 'packet APN' from tun. Line 693: LOGPPDP(LOGL_DEBUG, pdp, "Packet received APN(%s): forwarding to tun %s\n", apn->cfg.name, tun->devname); on APN -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:10:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 16:10:15 +0000 Subject: osmo-gsm-tester[master]: bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5196 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:10:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 16:10:16 +0000 Subject: [MERGED] osmo-gsm-tester[master]: bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo ...................................................................... bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved; Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index 1953e85..f25823c 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -62,7 +62,7 @@ def pcu(self): if self._pcu is None: - self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) return self._pcu def pcu_socket_path(self): -- To view, visit https://gerrit.osmocom.org/5196 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 16:34:36 +0000 Subject: [PATCH] osmo-sgsn[master]: Fix display of GTP control addresses Message-ID: Review at https://gerrit.osmocom.org/5197 Fix display of GTP control addresses Previously we've tried to convert addresses manually which lead to wrongly displayed GTP addresses (e. g. '4.0.0.0'). Use libgtp function for conversion to fix it. Change-Id: I695a9c9497d675564a088b002299096e0dcd267d --- M src/gprs/sgsn_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/97/5197/1 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c8dfc43..e9ce199 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -431,12 +431,12 @@ char *sgsn_gtp_ntoa(struct ul16_t *ul) { - if (ul->l == 4) { - struct in_addr *ia = (struct in_addr *) ul; - return inet_ntoa(*ia); - } else { + struct in_addr ia; + + if (gsna2in_addr(&ia, ul) != 0) return "UNKNOWN"; - } + + return inet_ntoa(ia); } static void vty_dump_pdp(struct vty *vty, const char *pfx, -- To view, visit https://gerrit.osmocom.org/5197 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I695a9c9497d675564a088b002299096e0dcd267d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:35:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 16:35:38 +0000 Subject: [PATCH] osmo-pcu[master]: Print error cause of pcu socket connect failure Message-ID: Review at https://gerrit.osmocom.org/5198 Print error cause of pcu socket connect failure Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded --- M src/osmobts_sock.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/98/5198/1 diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 31715d5..d1ff4eb 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -263,7 +263,7 @@ rc = connect(bfd->fd, (struct sockaddr *) &local, namelen); if (rc != 0) { LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the osmo-bts" - " PCU socket, delaying... '%s'\n", local.sun_path); + " PCU socket (%d), delaying... '%s'\n", rc, local.sun_path); pcu_sock_state = state; close(bfd->fd); bfd->fd = -1; -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:40:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 16:40:36 +0000 Subject: [MERGED] osmo-bts[master]: Log filenames on L1 errors In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Log filenames on L1 errors ...................................................................... Log filenames on L1 errors Change-Id: I7e73374f3f1da662ebed52548d29b6b76443c81b --- M src/osmo-bts-sysmo/l1_transp_hw.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-sysmo/l1_transp_hw.c b/src/osmo-bts-sysmo/l1_transp_hw.c index 9c0a514..95e3119 100644 --- a/src/osmo-bts-sysmo/l1_transp_hw.c +++ b/src/osmo-bts-sysmo/l1_transp_hw.c @@ -266,8 +266,8 @@ rc = open(rd_devnames[q], O_RDONLY); if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "unable to open msg_queue: %s\n", - strerror(errno)); + LOGP(DL1C, LOGL_FATAL, "[%d] unable to open %s for reading: %s\n", + q, rd_devnames[q], strerror(errno)); return rc; } read_ofd->fd = rc; @@ -284,8 +284,8 @@ rc = open(wr_devnames[q], O_WRONLY); if (rc < 0) { - LOGP(DL1C, LOGL_FATAL, "unable to open msg_queue: %s\n", - strerror(errno)); + LOGP(DL1C, LOGL_FATAL, "[%d] unable to open %s for writing: %s\n", + q, wr_devnames[q], strerror(errno)); goto out_read; } osmo_wqueue_init(wq, 10); -- To view, visit https://gerrit.osmocom.org/5188 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e73374f3f1da662ebed52548d29b6b76443c81b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:42:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 16:42:31 +0000 Subject: [PATCH] osmo-ggsn[master]: Log APN and tun names for packets In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5195 to look at the new patch set (#3). Log APN and tun names for packets Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd --- M ggsn/ggsn.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/95/5195/3 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 763a2c5..4b4a01f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -661,12 +661,13 @@ if (!pool) return 0; - DEBUGP(DTUN, "Received packet from tun!\n"); + DEBUGP(DTUN, "Received packet for APN(%s) from tun %s", apn->cfg.name, tun->devname); if (ippool_getip(pool, &ipm, &dst)) { - DEBUGP(DTUN, "Received packet with no PDP contex!!\n"); + DEBUGPC(DTUN, " with no PDP contex!!\n"); return 0; } + DEBUGPC(DTUN, "\n"); if (ipm->peer) /* Check if a peer protocol is defined */ gtp_data_req(apn->ggsn->gsn, (struct pdp_t *)ipm->peer, pack, len); @@ -689,7 +690,7 @@ OSMO_ASSERT(tun); OSMO_ASSERT(apn); - LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); + LOGPPDP(LOGL_DEBUG, pdp, "Packet received on APN(%s): forwarding to tun %s\n", apn->cfg.name, tun->devname); switch (iph->version) { case 6: -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:55:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 16:55:13 +0000 Subject: [PATCH] osmo-sgsn[master]: Fix display of GTP addresses In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5197 to look at the new patch set (#2). Fix display of GTP addresses Previously we've tried to convert addresses manually which lead to wrongly displayed GTP addresses (e. g. '4.0.0.0' instead of '127.0.0.2'). Use libgtp function for conversion to fix it. Change-Id: I695a9c9497d675564a088b002299096e0dcd267d --- M src/gprs/sgsn_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/97/5197/2 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c8dfc43..e9ce199 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -431,12 +431,12 @@ char *sgsn_gtp_ntoa(struct ul16_t *ul) { - if (ul->l == 4) { - struct in_addr *ia = (struct in_addr *) ul; - return inet_ntoa(*ia); - } else { + struct in_addr ia; + + if (gsna2in_addr(&ia, ul) != 0) return "UNKNOWN"; - } + + return inet_ntoa(ia); } static void vty_dump_pdp(struct vty *vty, const char *pfx, -- To view, visit https://gerrit.osmocom.org/5197 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I695a9c9497d675564a088b002299096e0dcd267d Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 16:55:14 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 16:55:14 +0000 Subject: [PATCH] osmo-sgsn[master]: Show GTP version for PDP context in vty Message-ID: Review at https://gerrit.osmocom.org/5199 Show GTP version for PDP context in vty Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607 --- M src/gprs/sgsn_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/99/5199/1 diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index e9ce199..c2c03b5 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -453,11 +453,11 @@ vty_out(vty, "%s PDP Address: %s%s", pfx, gprs_pdpaddr2str(pdp->lib->eua.v, pdp->lib->eua.l), VTY_NEWLINE); - vty_out(vty, "%s GTP Local Control(%s / TEIC: 0x%08x) ", pfx, + vty_out(vty, "%s GTPv%d Local Control(%s / TEIC: 0x%08x) ", pfx, pdp->lib->version, sgsn_gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own); vty_out(vty, "Data(%s / TEID: 0x%08x)%s", sgsn_gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE); - vty_out(vty, "%s GTP Remote Control(%s / TEIC: 0x%08x) ", pfx, + vty_out(vty, "%s GTPv%d Remote Control(%s / TEIC: 0x%08x) ", pfx, pdp->lib->version, sgsn_gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn); vty_out(vty, "Data(%s / TEID: 0x%08x)%s", sgsn_gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5199 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:24:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:24:37 +0000 Subject: osmo-sgsn[master]: Fix display of GTP addresses In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5197 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I695a9c9497d675564a088b002299096e0dcd267d Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:24:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:24:55 +0000 Subject: osmo-sgsn[master]: Show GTP version for PDP context in vty In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5199 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:25:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:25:14 +0000 Subject: osmo-ggsn[master]: Log APN and tun names for packets In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:26:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:26:04 +0000 Subject: osmo-pcu[master]: Print error cause of pcu socket connect failure In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5198/1/src/osmobts_sock.cpp File src/osmobts_sock.cpp: Line 263: rc = connect(bfd->fd, (struct sockaddr *) &local, namelen); TURN VALUE If the connection or binding succeeds, zero is returned. On error, -1 is returned, and errno is set appropriately. I think you want to do a strerror here, and not print '-1" all the time, right? -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:26:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:26:29 +0000 Subject: osmo-msc[master]: mncc: remove deprecated commandline option. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5187 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie23d492a839aae85470e39b0d0ad8f57b0d38f7e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:27:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:27:56 +0000 Subject: osmo-msc[master]: sms db: don't attempt to query pending SMS for unset MSISDN In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5183/1/src/libmsc/db.c File src/libmsc/db.c: Line 844: if (*vsub->msisdn == '\0') I would have thought "strlen(vsub->msisdn) == 0" is more readble, but anyway, we an expect people to know how C strings work ;) -- To view, visit https://gerrit.osmocom.org/5183 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:28:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:28:24 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:28:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:28:47 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 strictly speaking, it is "not found" and not "not installed" but ok... -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 17:29:01 +0000 Subject: [MERGED] osmo-sgsn[master]: Show GTP version for PDP context in vty In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Show GTP version for PDP context in vty ...................................................................... Show GTP version for PDP context in vty Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607 --- M src/gprs/sgsn_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index e9ce199..c2c03b5 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -453,11 +453,11 @@ vty_out(vty, "%s PDP Address: %s%s", pfx, gprs_pdpaddr2str(pdp->lib->eua.v, pdp->lib->eua.l), VTY_NEWLINE); - vty_out(vty, "%s GTP Local Control(%s / TEIC: 0x%08x) ", pfx, + vty_out(vty, "%s GTPv%d Local Control(%s / TEIC: 0x%08x) ", pfx, pdp->lib->version, sgsn_gtp_ntoa(&pdp->lib->gsnlc), pdp->lib->teic_own); vty_out(vty, "Data(%s / TEID: 0x%08x)%s", sgsn_gtp_ntoa(&pdp->lib->gsnlu), pdp->lib->teid_own, VTY_NEWLINE); - vty_out(vty, "%s GTP Remote Control(%s / TEIC: 0x%08x) ", pfx, + vty_out(vty, "%s GTPv%d Remote Control(%s / TEIC: 0x%08x) ", pfx, pdp->lib->version, sgsn_gtp_ntoa(&pdp->lib->gsnrc), pdp->lib->teic_gn); vty_out(vty, "Data(%s / TEID: 0x%08x)%s", sgsn_gtp_ntoa(&pdp->lib->gsnru), pdp->lib->teid_gn, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5199 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id1692e99ae0d2b78e9473f6139e6e430fcd6a607 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 17:29:01 +0000 Subject: [MERGED] osmo-sgsn[master]: Fix display of GTP addresses In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix display of GTP addresses ...................................................................... Fix display of GTP addresses Previously we've tried to convert addresses manually which lead to wrongly displayed GTP addresses (e. g. '4.0.0.0' instead of '127.0.0.2'). Use libgtp function for conversion to fix it. Change-Id: I695a9c9497d675564a088b002299096e0dcd267d --- M src/gprs/sgsn_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index c8dfc43..e9ce199 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -431,12 +431,12 @@ char *sgsn_gtp_ntoa(struct ul16_t *ul) { - if (ul->l == 4) { - struct in_addr *ia = (struct in_addr *) ul; - return inet_ntoa(*ia); - } else { + struct in_addr ia; + + if (gsna2in_addr(&ia, ul) != 0) return "UNKNOWN"; - } + + return inet_ntoa(ia); } static void vty_dump_pdp(struct vty *vty, const char *pfx, -- To view, visit https://gerrit.osmocom.org/5197 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I695a9c9497d675564a088b002299096e0dcd267d Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 5 Dec 2017 17:29:10 +0000 Subject: [MERGED] osmo-ggsn[master]: Log APN and tun names for packets In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Log APN and tun names for packets ...................................................................... Log APN and tun names for packets Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd --- M ggsn/ggsn.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 763a2c5..4b4a01f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -661,12 +661,13 @@ if (!pool) return 0; - DEBUGP(DTUN, "Received packet from tun!\n"); + DEBUGP(DTUN, "Received packet for APN(%s) from tun %s", apn->cfg.name, tun->devname); if (ippool_getip(pool, &ipm, &dst)) { - DEBUGP(DTUN, "Received packet with no PDP contex!!\n"); + DEBUGPC(DTUN, " with no PDP contex!!\n"); return 0; } + DEBUGPC(DTUN, "\n"); if (ipm->peer) /* Check if a peer protocol is defined */ gtp_data_req(apn->ggsn->gsn, (struct pdp_t *)ipm->peer, pack, len); @@ -689,7 +690,7 @@ OSMO_ASSERT(tun); OSMO_ASSERT(apn); - LOGPPDP(LOGL_DEBUG, pdp, "Packet received: forwarding to tun\n"); + LOGPPDP(LOGL_DEBUG, pdp, "Packet received on APN(%s): forwarding to tun %s\n", apn->cfg.name, tun->devname); switch (iph->version) { case 6: -- To view, visit https://gerrit.osmocom.org/5195 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f7ce33f6585b2b78e2b8a5c0f7111f0316d6ddd Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:29:19 +0000 Subject: osmo-ggsn[master]: ggsn: Ignore PCO with length 0, don't abort processing In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:29:23 +0000 Subject: osmo-ggsn[master]: ggsn.c: Fix byte order of IPCP IPv4 DNS servers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:29:24 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn.c: Fix byte order of IPCP IPv4 DNS servers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn.c: Fix byte order of IPCP IPv4 DNS servers ...................................................................... ggsn.c: Fix byte order of IPCP IPv4 DNS servers ... this probably didn't show up as 8.8.8.8 is dual-endian. doh! The address was already in network byte order, but msgb_put_u32 "of course" expects host byte order, ending up the wrong way in the actual packets :/ Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Closes: OS#2685 --- M ggsn/ggsn.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 4b4a01f..1507c96 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -436,13 +436,13 @@ if (dns1 && dns1->len == 4) { msgb_put_u8(msg, 0x81); /* DNS1 Tag */ msgb_put_u8(msg, 2 + dns1->len);/* DNS1 Length, incl. TL */ - msgb_put_u32(msg, dns1->v4.s_addr); + msgb_put_u32(msg, ntohl(dns1->v4.s_addr)); } if (dns2 && dns2->len == 4) { msgb_put_u8(msg, 0x83); /* DNS2 Tag */ msgb_put_u8(msg, 2 + dns2->len);/* DNS2 Length, incl. TL */ - msgb_put_u32(msg, dns2->v4.s_addr); + msgb_put_u32(msg, ntohl(dns2->v4.s_addr)); } /* patch in length values */ -- To view, visit https://gerrit.osmocom.org/5151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4bcac5fcebfc24760432eb66be258a01d78f65f Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:29:25 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn: Ignore PCO with length 0, don't abort processing In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn: Ignore PCO with length 0, don't abort processing ...................................................................... ggsn: Ignore PCO with length 0, don't abort processing The existing code would abort iterating over the list of PCO TLVs if a TLV of length zero was encountered. However, there's nothing in the spec that would make a zero-length PCO invalid, so we should continue to iterate over any PCO TLVs after the zero-length one. This issue was discovered while writing test cases in osmo-ttcn3-hacks.git Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 --- M ggsn/ggsn.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1507c96..1c1276f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -400,8 +400,6 @@ uint8_t cur_len = cur[2]; if (cur_prot == prot) return true; - if (cur_len == 0) - break; cur += cur_len + 3; } return false; -- To view, visit https://gerrit.osmocom.org/5176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36660566a8ee2ca80ae6ee99c86e167e7c208df2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:29:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resources.conf: Label modems according to their type Message-ID: Review at https://gerrit.osmocom.org/5200 resources.conf: Label modems according to their type It's difficult to know which path is which, and actually in the prod env gobi_0 is given to gobi 2000 instead of EC20, which means the attributes would be applying to the wrong resource. Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 --- M example/resources.conf 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/00/5200/1 diff --git a/example/resources.conf b/example/resources.conf index 26e1d80..497626d 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -83,7 +83,7 @@ ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd'] -- label: gobi_0 +- label: ec20 path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' @@ -91,7 +91,7 @@ ciphers: [a5_0, a5_1] features: ['sms', 'ussd', 'gprs'] -- label: gobi_3 +- label: gobi2k path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' -- To view, visit https://gerrit.osmocom.org/5200 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:29:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resources.conf: EC20 doesn't support SupplementaryServices Message-ID: Review at https://gerrit.osmocom.org/5201 resources.conf: EC20 doesn't support SupplementaryServices As the interface never appears, tests using the modem fail because we wait for all the interfaces to be available based on the features attribute. Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/5201/1 diff --git a/example/resources.conf b/example/resources.conf index 497626d..c1ab322 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -89,7 +89,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'ussd', 'gprs'] + features: ['sms', 'gprs'] - label: gobi2k path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/5201 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:29:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:29:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: resources.conf: sierra modems support gprs Message-ID: Review at https://gerrit.osmocom.org/5202 resources.conf: sierra modems support gprs At least the signalling support we are currently running, so let's add the gprs feature to them as they can be used to run the current tests. Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9 --- M example/resources.conf 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/02/5202/1 diff --git a/example/resources.conf b/example/resources.conf index c1ab322..1672d91 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -73,7 +73,7 @@ ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice', 'ussd'] + features: ['sms', 'voice', 'ussd', 'gprs'] - label: sierra_2 path: '/sierra_2' @@ -81,7 +81,7 @@ ki: '00969E283349D354A8239E877F2E0866' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice', 'ussd'] + features: ['sms', 'voice', 'ussd', 'gprs'] - label: ec20 path: '/gobi_0' -- To view, visit https://gerrit.osmocom.org/5202 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:30:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:30:23 +0000 Subject: meta-telephony[201705]: libosmo-abis: Split libosmotrau into its own package In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:30:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:30:38 +0000 Subject: meta-telephony[201705]: ortp: Remove unused old ortp 0.16.5 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:31:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:31:00 +0000 Subject: meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:31:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:31:30 +0000 Subject: meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5171/1/recipes-misc/ortp/ortp.inc File recipes-misc/ortp/ortp.inc: PS1, Line 2: LGPLv2.1 attention: libortp changed license recently. It used to be LGPL, now it's GPL! -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:31:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:31:47 +0000 Subject: osmo-gsm-tester[master]: resources.conf: sierra modems support gprs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5202 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:31:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:31:54 +0000 Subject: osmo-gsm-tester[master]: resources.conf: EC20 doesn't support SupplementaryServices In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5201 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:32:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:32:03 +0000 Subject: osmo-gsm-tester[master]: resources.conf: Label modems according to their type In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5200 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:32:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:32:33 +0000 Subject: meta-telephony[201705]: osmo-sgsn: Install example osmo-gtphub config file In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5177 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:32:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 17:32:49 +0000 Subject: meta-telephony[201705]: osmocom: Use CONFFILES for cfg files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5178 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:36:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:36:16 +0000 Subject: osmo-pcu[master]: Print error cause of pcu socket connect failure In-Reply-To: References: Message-ID: Patch Set 1: Wops sorry, you are correct. I thought it returned -errno or similar and got confused by the fact that I received -1 which after a quick look seemed like the error type I was expecting (bad permission or something like that). -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:45:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:45:16 +0000 Subject: [PATCH] osmo-pcu[master]: Print error cause of pcu socket connect failure In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5198 to look at the new patch set (#2). Print error cause of pcu socket connect failure This log is useful to quickly debug scenarions in which pcu never connects to bts. For instance, if bts is started as root and pcu is not, pcu will fail to connect to the socket and will fail with "Permission Denied". Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded --- M src/osmobts_sock.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/98/5198/2 diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 31715d5..577d41e 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -263,7 +263,8 @@ rc = connect(bfd->fd, (struct sockaddr *) &local, namelen); if (rc != 0) { LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the osmo-bts" - " PCU socket, delaying... '%s'\n", local.sun_path); + " PCU socket (%s), delaying... '%s'\n", + strerror(errno), local.sun_path); pcu_sock_state = state; close(bfd->fd); bfd->fd = -1; -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:06 +0000 Subject: meta-telephony[201705]: libosmo-abis: Split libosmotrau into its own package In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:08 +0000 Subject: [MERGED] meta-telephony[201705]: libosmo-abis: Split libosmotrau into its own package In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: libosmo-abis: Split libosmotrau into its own package ...................................................................... libosmo-abis: Split libosmotrau into its own package Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be --- M recipes-osmocom/libosmo-abis/libosmo-abis.inc 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc index 15a512a..3f1ce3c 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis.inc +++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc @@ -10,4 +10,11 @@ inherit autotools pkgconfig -ALLOW_EMPTY_libosmo-abis = "1" +PACKAGES =+ "libosmotrau libosmotrau-dev" + +FILES_libosmotrau = "${libdir}/libosmotrau${SOLIBS}" +FILES_libosmotrau-dev = " \ + ${includedir}/osmocom/trau \ + ${libdir}/pkgconfig/libosmotrau.pc \ + ${libdir}/libosmotrau${SOLIBSDEV} \ + " -- To view, visit https://gerrit.osmocom.org/5169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica8b6c39aed9f3370aeab84e821c8de871d2f0be Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:26 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:26 +0000 Subject: meta-telephony[201705]: osmo-sgsn: Install example osmo-gtphub config file In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5177 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:27 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:27 +0000 Subject: meta-telephony[201705]: osmocom: Use CONFFILES for cfg files In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5178 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:30 +0000 Subject: [MERGED] meta-telephony[201705]: osmocom: Use CONFFILES for cfg files In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmocom: Use CONFFILES for cfg files ...................................................................... osmocom: Use CONFFILES for cfg files Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 --- M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc.inc M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr.inc M recipes-osmocom/osmo-iuh/osmo-iuh.inc M recipes-osmocom/osmo-mgw/osmo-mgw.inc M recipes-osmocom/osmo-msc/osmo-msc.inc M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 8 files changed, 25 insertions(+), 8 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index ed28cea..a335993 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -4,7 +4,7 @@ SRCREV = "54fa75b85c91bb4bb79960942f63968f6423f6a5" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" PV = "0.7.0+gitr${SRCPV}" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" # we require the tests to link to the static libosmo-sigtran library to # access symbols not starting with osmo_* @@ -31,3 +31,4 @@ ${bindir}/osmo-stp \ ${sysconfdir}/osmocom/osmo-stp.cfg \ " +CONFFILES_osmo-stp = "${sysconfdir}/osmocom/osmo-stp.cfg" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc.inc b/recipes-osmocom/osmo-bsc/osmo-bsc.inc index dfa332a..820baf5 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc.inc +++ b/recipes-osmocom/osmo-bsc/osmo-bsc.inc @@ -5,7 +5,7 @@ DEPENDS = "sqlite3 libosmocore libosmo-abis libosmo-sccp libosmo-netif osmo-mgw" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -23,6 +23,8 @@ SYSTEMD_PACKAGES = "osmo-bsc" SYSTEMD_SERVICE_osmo-bsc = "osmo-bsc.service" +CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg" + FILES_ipaccess-utils = " \ ${bindir}/ipaccess-find \ ${bindir}/ipaccess-config \ @@ -33,5 +35,6 @@ ${bindir}/osmo-bsc_nat \ ${sysconfdir}/osmocom/osmo-bsc_nat.cfg \ " +CONFFILES_osmo-bsc-nat = "${sysconfdir}/osmocom/osmo-bsc_nat.cfg" FILES_osmo-bsc-nat-doc = " ${docdir}/osmo-bsc/examples/osmo-bsc_nat " diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 2751985..3aafe13 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -3,7 +3,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" PV = "1.0.0+gitr${SRCPV}" -PR = "r0" +PR = "r1" SRCREV = "859f9b0752419d43928d465bc96a87238c6d7940" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ @@ -35,6 +35,8 @@ INITSCRIPT_NAME_osmo-ggsn = "osmo-ggsn" INITSCRIPT_PARAMS_osmo-ggsn = "defaults 29 29" +CONFFILES_osmo-ggsn = "${sysconfdir}/osmocom/osmo-ggsn.cfg" + FILES_libgtp = "${libdir}/*${SOLIBS}" FILES_libgtp-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la" FILES_libgtp-staticdev = "${libdir}/*.a" diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr.inc b/recipes-osmocom/osmo-hlr/osmo-hlr.inc index 8afe774..7dd6234 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr.inc +++ b/recipes-osmocom/osmo-hlr/osmo-hlr.inc @@ -5,7 +5,7 @@ DEPENDS = "libtalloc libosmocore libosmo-abis sqlite3 sqlite3-native" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -24,3 +24,7 @@ } SYSTEMD_SERVICE_${PN} = "${PN}.service" +CONFFILES_osmo-hlr = "\ + ${sysconfdir}/osmocom/osmo-hlr.cfg \ + ${localstatedir}/lib/osmocom/hlr.db \ + " diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh.inc b/recipes-osmocom/osmo-iuh/osmo-iuh.inc index a5f1cbc..2737412 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh.inc +++ b/recipes-osmocom/osmo-iuh/osmo-iuh.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif libosmo-sccp libasn1c" -INC_PR="r1.${META_TELEPHONY_OSMO_INC}" +INC_PR="r2.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -35,5 +35,6 @@ ${bindir}/osmo-hnbgw \ ${sysconfdir}/osmocom/osmo-hnbgw.cfg \ " +CONFFILES_osmo-hnbgw = "${sysconfdir}/osmocom/osmo-hnbgw.cfg" ALLOW_EMPTY_${PN} = "1" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 45ee338..1b3362f 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -5,7 +5,7 @@ DEPENDS = "libosmocore libosmo-netif bcg729 libgsm" -INC_PR="r0.${META_TELEPHONY_OSMO_INC}" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -20,3 +20,4 @@ } SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" +CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" diff --git a/recipes-osmocom/osmo-msc/osmo-msc.inc b/recipes-osmocom/osmo-msc/osmo-msc.inc index 9be747d..82a51b1 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc.inc +++ b/recipes-osmocom/osmo-msc/osmo-msc.inc @@ -5,7 +5,7 @@ DEPENDS = "libdbi libosmocore libosmo-abis libosmo-sccp libosmo-netif osmo-mgw" -INC_PR="r2.${META_TELEPHONY_OSMO_INC}" +INC_PR="r3.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -28,3 +28,4 @@ } SYSTEMD_SERVICE_${PN} = "${PN}.service" +CONFFILES_osmo-msc = "${sysconfdir}/osmocom/osmo-msc.cfg" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 74a6bd4..8ed6a10 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -5,7 +5,7 @@ DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" -INC_PR="r3.${META_TELEPHONY_OSMO_INC}" +INC_PR="r4.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -29,15 +29,19 @@ SYSTEMD_SERVICE_osmo-sgsn = "osmo-sgsn.service" SYSTEMD_SERVICE_osmo-gbproxy = "osmo-gbproxy.service" +CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg" + FILES_osmo-gbproxy = " \ ${bindir}/osmo-gbproxy \ ${sysconfdir}/osmocom/osmo-gbproxy.cfg \ " +CONFFILES_osmo-gbproxy = "${sysconfdir}/osmocom/osmo-gbproxy.cfg" FILES_osmo-gtphub = " \ ${bindir}/osmo-gtphub \ ${sysconfdir}/osmocom/osmo-gtphub.cfg \ " +CONFFILES_osmo-gtphub = "${sysconfdir}/osmocom/osmo-gtphub.cfg" FILES_osmo-gbproxy-doc = " ${docdir}/osmo-sgsn/examples/osmo-gbproxy " FILES_osmo-gtphub-doc = " ${docdir}/osmo-sgsn/examples/osmo-gtphub " -- To view, visit https://gerrit.osmocom.org/5178 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a4c7d4a5e3e58c413c82b75f442ae9321d64998 Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:47:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:47:30 +0000 Subject: [MERGED] meta-telephony[201705]: osmo-sgsn: Install example osmo-gtphub config file In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-sgsn: Install example osmo-gtphub config file ...................................................................... osmo-sgsn: Install example osmo-gtphub config file Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d --- M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 77029a0..74a6bd4 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -5,7 +5,7 @@ DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" -INC_PR="r2.${META_TELEPHONY_OSMO_INC}" +INC_PR="r3.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd @@ -18,6 +18,7 @@ install -m 0644 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/ install -m 0644 ${S}/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg ${D}${sysconfdir}/osmocom/ + install -m 0644 ${S}/doc/examples/osmo-gtphub/osmo-gtphub.cfg ${D}${sysconfdir}/osmocom/ install -m 0644 ${S}/contrib/systemd/osmo-sgsn.service ${D}${systemd_system_unitdir}/ install -m 0644 ${S}/contrib/systemd/osmo-gbproxy.service ${D}${systemd_system_unitdir}/ -- To view, visit https://gerrit.osmocom.org/5177 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8ee1e4b1e0d0a7ca00764a1906b1ff26b7bea4d Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:48:02 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:48:02 +0000 Subject: meta-telephony[201705]: ortp: Remove unused old ortp 0.16.5 In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:48:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:48:07 +0000 Subject: [MERGED] meta-telephony[201705]: ortp: Remove unused old ortp 0.16.5 In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: ortp: Remove unused old ortp 0.16.5 ...................................................................... ortp: Remove unused old ortp 0.16.5 A new version 0.25.0 was added around 3 years ago and has been used since then, because osmocom stack requires at least 0.22.0. This 0.16.5 version has been unused since then, so we can drop it. Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 --- D recipes-misc/ortp/files/0001-fix-unused-variables.patch D recipes-misc/ortp/files/compile-fixes-newer-gcc.diff D recipes-misc/ortp/ortp_0.16.5.bb 3 files changed, 0 insertions(+), 97 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-misc/ortp/files/0001-fix-unused-variables.patch b/recipes-misc/ortp/files/0001-fix-unused-variables.patch deleted file mode 100644 index a57eaff..0000000 --- a/recipes-misc/ortp/files/0001-fix-unused-variables.patch +++ /dev/null @@ -1,75 +0,0 @@ -From eb4f54377e2560a76a05f62a22c961edbce8f4c2 Mon Sep 17 00:00:00 2001 -From: Simon Morlat -Date: Tue, 31 May 2011 10:52:49 +0200 -Subject: [PATCH] fix unused variables - ---- - src/stun.c | 10 +++++----- - src/tests/rtprecv.c | 6 +++++- - 2 files changed, 10 insertions(+), 6 deletions(-) - -diff --git a/src/stun.c b/src/stun.c -index ccac58f..e0d7c80 100644 ---- a/src/stun.c -+++ b/src/stun.c -@@ -1993,7 +1993,6 @@ stunSendTest( Socket myFd, StunAddress4 *dest, - - bool_t changePort=FALSE; - bool_t changeIP=FALSE; -- bool_t discard=FALSE; - - StunMessage req; - char buf[STUN_MAX_MESSAGE_SIZE]; -@@ -2015,9 +2014,10 @@ stunSendTest( Socket myFd, StunAddress4 *dest, - case 4: - changeIP=TRUE; - break; -- case 5: -+ /* case 5: - discard=TRUE; - break; -+ */ - default: - ortp_error("stun: Test %i is unkown\n", testNum); - return ; /* error */ -@@ -2162,7 +2162,7 @@ stunNatType( StunAddress4 *dest, - - bool_t respTestI=FALSE; - bool_t isNat=TRUE; -- StunAddress4 testIchangedAddr; -+ /*StunAddress4 testIchangedAddr;*/ - StunAddress4 testImappedAddr; - bool_t respTestI2=FALSE; - bool_t mappedIpSame = TRUE; -@@ -2345,8 +2345,8 @@ stunNatType( StunAddress4 *dest, - if ( !respTestI ) - { - -- testIchangedAddr.addr = resp.changedAddress.ipv4.addr; -- testIchangedAddr.port = resp.changedAddress.ipv4.port; -+ /*testIchangedAddr.addr = resp.changedAddress.ipv4.addr; -+ testIchangedAddr.port = resp.changedAddress.ipv4.port;*/ - testImappedAddr.addr = resp.mappedAddress.ipv4.addr; - testImappedAddr.port = resp.mappedAddress.ipv4.port; - -diff --git a/src/tests/rtprecv.c b/src/tests/rtprecv.c -index 1861592..5eee649 100644 ---- a/src/tests/rtprecv.c -+++ b/src/tests/rtprecv.c -@@ -163,8 +163,12 @@ int main(int argc, char*argv[]) - /* this is to avoid to write to disk some silence before the first RTP packet is returned*/ - if ((stream_received) && (err>0)) { - size_t ret = fwrite(buffer,1,err,outfile); -- if (sound_fd>0) -+ if (sound_fd>0){ - ret = write(sound_fd,buffer,err); -+ if (ret==-1){ -+ fprintf(stderr,"write to sound card failed (%s)",strerror(errno)); -+ } -+ } - } - } - ts+=160; --- -1.7.5.4 - diff --git a/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff b/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff deleted file mode 100644 index 94ddde0..0000000 --- a/recipes-misc/ortp/files/compile-fixes-newer-gcc.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: ortp-0.16.5/src/stun.c -=================================================================== ---- ortp-0.16.5.orig/src/stun.c -+++ ortp-0.16.5/src/stun.c -@@ -399,7 +399,7 @@ stunParseMessage( char* buf, unsigned in - char* body; - unsigned int size; - ortp_debug("stun: Received stun message: %i bytes\n", bufLen); -- memset(msg, 0, sizeof(msg)); -+ memset(msg, 0, sizeof(*msg)); - - if (sizeof(StunMsgHdr) > bufLen) - { diff --git a/recipes-misc/ortp/ortp_0.16.5.bb b/recipes-misc/ortp/ortp_0.16.5.bb deleted file mode 100644 index 919405f..0000000 --- a/recipes-misc/ortp/ortp_0.16.5.bb +++ /dev/null @@ -1,9 +0,0 @@ -require ortp.inc -DEPENDS = "glib-2.0 openssl" -PR = "${INC_PR}.1" - -SRC_URI += "file://0001-fix-unused-variables.patch;patch=1 \ - file://compile-fixes-newer-gcc.diff" - -SRC_URI[md5sum] = "94546901d14b85f97342f4ecf39489b1" -SRC_URI[sha256sum] = "3b655a79f9122afd298e9cd702e542908bbd6ea1337c02553110c57e0b3c5835" -- To view, visit https://gerrit.osmocom.org/5170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica158e8ddabf5a8ce2a2254ca4fabdc35e7db668 Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:53:03 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:53:03 +0000 Subject: meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 (1 comment) https://gerrit.osmocom.org/#/c/5171/1/recipes-misc/ortp/ortp.inc File recipes-misc/ortp/ortp.inc: PS1, Line 2: LGPLv2.1 > attention: libortp changed license recently. It used to be LGPL, now it's G Good to know, but it seems the change is done during release of version 1.0.0, so no affected by the change yet. -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:53:18 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:53:18 +0000 Subject: meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:53:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 17:53:22 +0000 Subject: [MERGED] meta-telephony[201705]: ortp: Move DEPENDS to inc file and fix whitespace In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: ortp: Move DEPENDS to inc file and fix whitespace ...................................................................... ortp: Move DEPENDS to inc file and fix whitespace Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c --- M recipes-misc/ortp/ortp.inc M recipes-misc/ortp/ortp_0.25.0.bb 2 files changed, 2 insertions(+), 3 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-misc/ortp/ortp.inc b/recipes-misc/ortp/ortp.inc index 98a52eb..068c4de 100644 --- a/recipes-misc/ortp/ortp.inc +++ b/recipes-misc/ortp/ortp.inc @@ -9,10 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" +DEPENDS = "glib-2.0 openssl" + do_compile_append() { sed -i -e s:${STAGING_DIR_TARGET}::g \ -e s:/${TARGET_SYS}::g \ ortp.pc - } - diff --git a/recipes-misc/ortp/ortp_0.25.0.bb b/recipes-misc/ortp/ortp_0.25.0.bb index 74687a2..b48660b 100644 --- a/recipes-misc/ortp/ortp_0.25.0.bb +++ b/recipes-misc/ortp/ortp_0.25.0.bb @@ -1,5 +1,4 @@ require ortp.inc -DEPENDS = "glib-2.0 openssl" PR = "${INC_PR}.1" SRC_URI[md5sum] = "f44b4ab2a8de32c19abfa584c4426f76" -- To view, visit https://gerrit.osmocom.org/5171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf1c060d8fdbe0a309366ed7bd1e79f40625405c Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 17:54:13 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 17:54:13 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Patch Set 1: will update it -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:33:30 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 5 Dec 2017 18:33:30 +0000 Subject: [PATCH] osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5179 to look at the new patch set (#2). osmocom-nightly/latest: check if osc is installed Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/79/5179/2 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 6933baa..1d17177 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -8,6 +8,11 @@ DT=$(date +%Y%m%d) TOP=$(pwd) +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary not found" + exit 1 +fi + # start with a checkout of the project if [ -d $PROJ ]; then (cd $PROJ && osc up) diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 8c7a732..752162b 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -6,6 +6,11 @@ exit 1 fi +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary not found" + exit 1 +fi + set -x -e git clone git://git.osmocom.org/osmo-sip-connector -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:38:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:38:50 +0000 Subject: osmo-gsm-tester[master]: resources.conf: Label modems according to their type In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5200 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:38:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:38:51 +0000 Subject: osmo-gsm-tester[master]: resources.conf: EC20 doesn't support SupplementaryServices In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5201 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:38:55 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resources.conf: EC20 doesn't support SupplementaryServices In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resources.conf: EC20 doesn't support SupplementaryServices ...................................................................... resources.conf: EC20 doesn't support SupplementaryServices As the interface never appears, tests using the modem fail because we wait for all the interfaces to be available based on the features attribute. Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 497626d..c1ab322 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -89,7 +89,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'ussd', 'gprs'] + features: ['sms', 'gprs'] - label: gobi2k path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/5201 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:38:55 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resources.conf: Label modems according to their type In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resources.conf: Label modems according to their type ...................................................................... resources.conf: Label modems according to their type It's difficult to know which path is which, and actually in the prod env gobi_0 is given to gobi 2000 instead of EC20, which means the attributes would be applying to the wrong resource. Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 --- M example/resources.conf 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 26e1d80..497626d 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -83,7 +83,7 @@ ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd'] -- label: gobi_0 +- label: ec20 path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' @@ -91,7 +91,7 @@ ciphers: [a5_0, a5_1] features: ['sms', 'ussd', 'gprs'] -- label: gobi_3 +- label: gobi2k path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' -- To view, visit https://gerrit.osmocom.org/5200 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:38:55 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:38:55 +0000 Subject: [MERGED] osmo-gsm-tester[master]: resources.conf: sierra modems support gprs In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: resources.conf: sierra modems support gprs ...................................................................... resources.conf: sierra modems support gprs At least the signalling support we are currently running, so let's add the gprs feature to them as they can be used to run the current tests. Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9 --- M example/resources.conf 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index c1ab322..1672d91 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -73,7 +73,7 @@ ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice', 'ussd'] + features: ['sms', 'voice', 'ussd', 'gprs'] - label: sierra_2 path: '/sierra_2' @@ -81,7 +81,7 @@ ki: '00969E283349D354A8239E877F2E0866' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'voice', 'ussd'] + features: ['sms', 'voice', 'ussd', 'gprs'] - label: ec20 path: '/gobi_0' -- To view, visit https://gerrit.osmocom.org/5202 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:10 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: add rate counter documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5191 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:15 +0000 Subject: osmo-gsm-manuals[master]: OsmoMSC: add rate counter documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5192 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc105fd16511c6ea4f5069a57b217ea3319bdbec Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:22 +0000 Subject: osmo-gsm-manuals[master]: OsmoPCU: add rate counter documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5193 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb4e1dab415a70ded5c65c21752dca497856e96f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:23 +0000 Subject: osmo-gsm-manuals[master]: OsmoSGSN: add rate counter documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5194 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c5d5744f961a92bc7c8888ca739d1e8a8a0be9c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:25 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoSGSN: add rate counter documentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoSGSN: add rate counter documentation ...................................................................... OsmoSGSN: add rate counter documentation Change-Id: I4c5d5744f961a92bc7c8888ca739d1e8a8a0be9c --- A OsmoSGSN/chapters/counters.adoc A OsmoSGSN/chapters/counters_generated.adoc M OsmoSGSN/osmosgsn-usermanual.adoc 3 files changed, 127 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoSGSN/chapters/counters.adoc b/OsmoSGSN/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoSGSN/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoSGSN/chapters/counters_generated.adoc b/OsmoSGSN/chapters/counters_generated.adoc new file mode 100644 index 0000000..756a4a5 --- /dev/null +++ b/OsmoSGSN/chapters/counters_generated.adoc @@ -0,0 +1,121 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoSGSN UNKNOWN (OsmoSGSN). + +// generating tables for rate_ctr_group +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table SGSN Overall Statistics +.sgsn - SGSN Overall Statistics +[options="header"] +|=== +| Name | Reference | Description +| llc:dl_bytes | <> | Count sent LLC bytes before giving it to the bssgp layer +| llc:ul_bytes | <> | Count sucessful received LLC bytes (encrypt & fcs correct) +| llc:dl_packets | <> | Count sucessful sent LLC packets before giving it to the bssgp layer +| llc:ul_packets | <> | Count sucessful received LLC packets (encrypt & fcs correct) +| gprs:attach_requested | <> | Received attach requests +| gprs:attach_accepted | <> | Sent attach accepts +| gprs:attach_rejected | <> | Sent attach rejects +| gprs:detach_requested | <> | Received detach requests +| gprs:detach_acked | <> | Sent detach acks +| gprs:routing_area_requested | <> | Received routing area requests +| gprs:routing_area_requested | <> | Sent routing area acks +| gprs:routing_area_requested | <> | Sent routing area rejects +| pdp:activate_requested | <> | Received activate requests +| pdp:activate_rejected | <> | Sent activate rejects +| pdp:activate_accepted | <> | Sent activate accepts +| pdp:request_activated | <> | unused +| pdp:request_activate_rejected | <> | unused +| pdp:modify_requested | <> | unused +| pdp:modify_accepted | <> | unused +| pdp:dl_deactivate_requested | <> | Sent deactivate requests +| pdp:dl_deactivate_accepted | <> | Sent deactivate accepted +| pdp:ul_deactivate_requested | <> | Received deactivate requests +| pdp:ul_deactivate_accepted | <> | Received deactivate accepts +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// generating tables for osmo_stat_items +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +|=== + + diff --git a/OsmoSGSN/osmosgsn-usermanual.adoc b/OsmoSGSN/osmosgsn-usermanual.adoc index 79c94f6..a6a7709 100644 --- a/OsmoSGSN/osmosgsn-usermanual.adoc +++ b/OsmoSGSN/osmosgsn-usermanual.adoc @@ -27,6 +27,8 @@ include::chapters/gsup.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/port_numbers.adoc[] include::../common/chapters/bibliography.adoc[] -- To view, visit https://gerrit.osmocom.org/5194 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c5d5744f961a92bc7c8888ca739d1e8a8a0be9c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:26 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoPCU: add rate counter documentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoPCU: add rate counter documentation ...................................................................... OsmoPCU: add rate counter documentation Change-Id: Ieb4e1dab415a70ded5c65c21752dca497856e96f --- A OsmoPCU/chapters/counters.adoc A OsmoPCU/chapters/counters_generated.adoc M OsmoPCU/osmopcu-usermanual.adoc 3 files changed, 184 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoPCU/chapters/counters.adoc b/OsmoPCU/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoPCU/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoPCU/chapters/counters_generated.adoc b/OsmoPCU/chapters/counters_generated.adoc new file mode 100644 index 0000000..2ee425e --- /dev/null +++ b/OsmoPCU/chapters/counters_generated.adoc @@ -0,0 +1,178 @@ +// autogenerated by show asciidoc counters +These counters and their description based on Osmo-PCU 0.4.0.4-8d55 (Osmo-PCU). + +// generating tables for rate_ctr_group +// rate_ctr_group table BSSGP Peer Statistics +.bssgp:bss_ctx - BSSGP Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at BSSGP Level ( In) +| packets:out | <> | Packets at BSSGP Level (Out) +| bytes:in | <> | Bytes at BSSGP Level ( In) +| bytes:out | <> | Bytes at BSSGP Level (Out) +| blocked | <> | BVC Blocking count +| discarded | <> | BVC LLC Discarded count +| status | <> | BVC Status count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table NSVC Peer Statistics +.ns:nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description +| packets:in | <> | Packets at NS Level ( In) +| packets:out | <> | Packets at NS Level (Out) +| bytes:in | <> | Bytes at NS Level ( In) +| bytes:out | <> | Bytes at NS Level (Out) +| blocked | <> | NS-VC Block count +| dead | <> | NS-VC gone dead count +| replaced | <> | NS-VC replaced other count +| nsei-chg | <> | NS-VC changed NSEI count +| inv-nsvci | <> | NS-VCI was invalid count +| inv-nsei | <> | NSEI was invalid count +| lost:alive | <> | ALIVE ACK missing count +| lost:reset | <> | RESET ACK missing count +|=== +// rate_ctr_group table BTS Statistics +.bts - BTS Statistics +[options="header"] +|=== +| Name | Reference | Description +| tbf:dl:alloc | <> | TBF DL Allocated +| tbf:dl:freed | <> | TBF DL Freed +| tbf:dl:aborted | <> | TBF DL Aborted +| tbf:ul:alloc | <> | TBF UL Allocated +| tbf:ul:freed | <> | TBF UL Freed +| tbf:ul:aborted | <> | TBF UL Aborted +| tbf:reused | <> | TBF Reused +| tbf:alloc:algo-a | <> | TBF Alloc Algo A +| tbf:alloc:algo-b | <> | TBF Alloc Algo B +| tbf:failed:egprs-only | <> | TBF Failed EGPRS-only +| rlc:sent | <> | RLC Sent +| rlc:resent | <> | RLC Resent +| rlc:restarted | <> | RLC Restarted +| rlc:stalled | <> | RLC Stalled +| rlc:nacked | <> | RLC Nacked +| rlc:final_block_resent | <> | RLC Final Blk resent +| rlc:ass:timedout | <> | RLC Assign Timeout +| rlc:ass:failed | <> | RLC Assign Failed +| rlc:ack:timedout | <> | RLC Ack Timeout +| rlc:ack:failed | <> | RLC Ack Failed +| rlc:rel:timedout | <> | RLC Release Timeout +| rlc:late-block | <> | RLC Late Block +| rlc:sent-dummy | <> | RLC Sent Dummy +| rlc:sent-control | <> | RLC Sent Control +| rlc:dl_bytes | <> | RLC DL Bytes +| rlc:dl_payload_bytes | <> | RLC DL Payload Bytes +| rlc:ul_bytes | <> | RLC UL Bytes +| rlc:ul_payload_bytes | <> | RLC UL Payload Bytes +| decode:errors | <> | Decode Errors +| sba:allocated | <> | SBA Allocated +| sba:freed | <> | SBA Freed +| sba:timedout | <> | SBA Timeout +| llc:timeout | <> | Timedout Frames +| llc:dropped | <> | Dropped Frames +| llc:scheduled | <> | Scheduled Frames +| llc:dl_bytes | <> | RLC encapsulated PDUs +| llc:ul_bytes | <> | full PDUs received +| rach:requests | <> | RACH requests +| 11bit_rach:requests | <> | 11BIT_RACH requests +| spb:uplink_first_segment | <> | First seg of UL SPB +| spb:uplink_second_segment | <> | Second seg of UL SPB +| spb:downlink_first_segment | <> | First seg of DL SPB +| spb:downlink_second_segment | <> | Second seg of DL SPB +| immediate:assignment_UL | <> | Immediate Assign UL +| immediate:assignment_rej | <> | Immediate Assign Rej +| immediate:assignment_DL | <> | Immediate Assign DL +| channel:request_description | <> | Channel Request Desc +| pkt:ul_assignment | <> | Packet UL Assignment +| pkt:access_reject | <> | Packet Access Reject +| pkt:dl_assignment | <> | Packet DL Assignment +| ul:control | <> | UL control Block +| ul:assignment_poll_timeout | <> | UL Assign Timeout +| ul:assignment_failed | <> | UL Assign Failed +| dl:assignment_timeout | <> | DL Assign Timeout +| dl:assignment_failed | <> | DL Assign Failed +| pkt:ul_ack_nack_timeout | <> | PUAN Poll Timeout +| pkt:ul_ack_nack_failed | <> | PUAN poll Failed +| pkt:dl_ack_nack_timeout | <> | PDAN poll Timeout +| pkt:dl_ack_nack_failed | <> | PDAN poll Failed +| gprs:downlink_cs1 | <> | CS1 downlink +| gprs:downlink_cs2 | <> | CS2 downlink +| gprs:downlink_cs3 | <> | CS3 downlink +| gprs:downlink_cs4 | <> | CS4 downlink +| egprs:downlink_mcs1 | <> | MCS1 downlink +| egprs:downlink_mcs2 | <> | MCS2 downlink +| egprs:downlink_mcs3 | <> | MCS3 downlink +| egprs:downlink_mcs4 | <> | MCS4 downlink +| egprs:downlink_mcs5 | <> | MCS5 downlink +| egprs:downlink_mcs6 | <> | MCS6 downlink +| egprs:downlink_mcs7 | <> | MCS7 downlink +| egprs:downlink_mcs8 | <> | MCS8 downlink +| egprs:downlink_mcs9 | <> | MCS9 downlink +| gprs:uplink_cs1 | <> | CS1 Uplink +| gprs:uplink_cs2 | <> | CS2 Uplink +| gprs:uplink_cs3 | <> | CS3 Uplink +| gprs:uplink_cs4 | <> | CS4 Uplink +| egprs:uplink_mcs1 | <> | MCS1 Uplink +| egprs:uplink_mcs2 | <> | MCS2 Uplink +| egprs:uplink_mcs3 | <> | MCS3 Uplink +| egprs:uplink_mcs4 | <> | MCS4 Uplink +| egprs:uplink_mcs5 | <> | MCS5 Uplink +| egprs:uplink_mcs6 | <> | MCS6 Uplink +| egprs:uplink_mcs7 | <> | MCS7 Uplink +| egprs:uplink_mcs8 | <> | MCS8 Uplink +| egprs:uplink_mcs9 | <> | MCS9 Uplink +|=== +// generating tables for osmo_stat_items +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +NSVC Peer Statistics +// osmo_stat_item_group table NSVC Peer Statistics +.ns.nsvc - NSVC Peer Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| alive.delay | <> | ALIVE response time | ms +|=== +BTS Statistics +// osmo_stat_item_group table BTS Statistics +.bts - BTS Statistics +[options="header"] +|=== +| Name | Reference | Description | Unit +| ms.present | <> | MS Present | +|=== +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +|=== + + diff --git a/OsmoPCU/osmopcu-usermanual.adoc b/OsmoPCU/osmopcu-usermanual.adoc index f47a0a9..a72e947 100644 --- a/OsmoPCU/osmopcu-usermanual.adoc +++ b/OsmoPCU/osmopcu-usermanual.adoc @@ -17,6 +17,8 @@ include::chapters/configuration.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/gb.adoc[] include::../common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/5193 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb4e1dab415a70ded5c65c21752dca497856e96f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:26 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoMSC: add rate counter documentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoMSC: add rate counter documentation ...................................................................... OsmoMSC: add rate counter documentation Change-Id: Idc105fd16511c6ea4f5069a57b217ea3319bdbec --- A OsmoMSC/chapters/counters.adoc A OsmoMSC/chapters/counters_generated.adoc M OsmoMSC/osmomsc-usermanual.adoc 3 files changed, 46 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoMSC/chapters/counters.adoc b/OsmoMSC/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoMSC/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoMSC/chapters/counters_generated.adoc b/OsmoMSC/chapters/counters_generated.adoc new file mode 100644 index 0000000..afeb8ff --- /dev/null +++ b/OsmoMSC/chapters/counters_generated.adoc @@ -0,0 +1,40 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoMSC UNKNOWN (OsmoMSC). + +// generating tables for rate_ctr_group +// rate_ctr_group table mobile switching center +.msc - mobile switching center +[options="header"] +|=== +| Name | Reference | Description +| loc_update_type:attach | <> | Received location update imsi attach requests. +| loc_update_type:normal | <> | Received location update normal requests. +| loc_update_type:periodic | <> | Received location update periodic requests. +| loc_update_type:detach | <> | Received location update detach indication. +| loc_update_resp:failed | <> | Rejected location updates. +| loc_update_resp:completed | <> | Successful location updates. +| sms:submitted | <> | Received a RPDU from a MS (MO). +| sms:no_receiver | <> | Counts SMS which couldn't routed because no receiver found. +| sms:delivered | <> | Global SMS Deliver attempts. +| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt. +| sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. +| sms:deliver_unknown_error | <> | Unknown error occured during sms delivery. +| call:mo_setup | <> | Received setup requests from a MS to init a MO call. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mt_setup | <> | Sent setup requests to the MS (MT). +| call:mt_connect | <> | Sent a connect to the MS (MT). +| call:active | <> | Count total amount of calls that ever reached active state. +| call:complete | <> | Count total amount of calls which got terminated by disconnect req or ind after reaching active state. +| call:incomplete | <> | Count total amount of call which got terminated by any other reason after reaching active state. +|=== +// generating tables for osmo_stat_items +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +| msc.active_calls | <> | +|=== + + diff --git a/OsmoMSC/osmomsc-usermanual.adoc b/OsmoMSC/osmomsc-usermanual.adoc index 7c20020..6190481 100644 --- a/OsmoMSC/osmomsc-usermanual.adoc +++ b/OsmoMSC/osmomsc-usermanual.adoc @@ -14,6 +14,8 @@ include::chapters/control.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/vty.adoc[] include::../common/chapters/logging.adoc[] -- To view, visit https://gerrit.osmocom.org/5192 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc105fd16511c6ea4f5069a57b217ea3319bdbec Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:26 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBSC: add rate counter documentation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBSC: add rate counter documentation ...................................................................... OsmoBSC: add rate counter documentation Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a --- A OsmoBSC/chapters/counters.adoc A OsmoBSC/chapters/counters_generated.adoc M OsmoBSC/osmobsc-usermanual.adoc 3 files changed, 82 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/chapters/counters.adoc b/OsmoBSC/chapters/counters.adoc new file mode 100644 index 0000000..7fbb10c --- /dev/null +++ b/OsmoBSC/chapters/counters.adoc @@ -0,0 +1,4 @@ +[[counters]] +== Counters + +include::./counters_generated.adoc[] diff --git a/OsmoBSC/chapters/counters_generated.adoc b/OsmoBSC/chapters/counters_generated.adoc new file mode 100644 index 0000000..d55df07 --- /dev/null +++ b/OsmoBSC/chapters/counters_generated.adoc @@ -0,0 +1,76 @@ +// autogenerated by show asciidoc counters +These counters and their description based on OsmoBSC (OsmoBSC). + +// generating tables for rate_ctr_group +// rate_ctr_group table E1 Input subsystem +.e1inp - E1 Input subsystem +[options="header"] +|=== +| Name | Reference | Description +| hdlc:abort | <> | HDLC abort +| hdlc:bad_fcs | <> | HLDC Bad FCS +| hdlc:overrun | <> | HDLC Overrun +| alarm | <> | Alarm +| removed | <> | Line removed +|=== +// rate_ctr_group table base station controller +.bsc - base station controller +[options="header"] +|=== +| Name | Reference | Description +| chreq:total | <> | Received channel requests. +| chreq:no_channel | <> | Sent to MS no channel available. +| handover:attempted | <> | Received handover attempts. +| handover:no_channel | <> | Sent no channel available responses. +| handover:timeout | <> | Count the amount of timeouts of timer T3103. +| handover:completed | <> | Received handover completed. +| handover:failed | <> | Receive HO FAIL messages. +| paging:attempted | <> | Paging attempts for a MS. +| paging:detached | <> | Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found. +| paging:completed | <> | Paging successful completed. +| paging:expired | <> | Paging Request expired because of timeout T3113. +| chan:rf_fail | <> | Received a RF failure indication from BTS. +| chan:rll_err | <> | Received a RLL failure with T200 cause from BTS. +| bts:oml_fail | <> | Received a TEI down on a OML link. +| bts:rsl_fail | <> | Received a TEI down on a OML link. +| bts:codec_amr_f | <> | Count the usage of AMR/F codec by channel mode requested. +| bts:codec_amr_h | <> | Count the usage of AMR/H codec by channel mode requested. +| bts:codec_efr | <> | Count the usage of EFR codec by channel mode requested. +| bts:codec_fr | <> | Count the usage of FR codec by channel mode requested. +| bts:codec_hr | <> | Count the usage of HR codec by channel mode requested. +|=== +// rate_ctr_group table mobile switching center +.msc - mobile switching center +[options="header"] +|=== +| Name | Reference | Description +| loc_update_type:attach | <> | Received location update imsi attach requests. +| loc_update_type:normal | <> | Received location update normal requests. +| loc_update_type:periodic | <> | Received location update periodic requests. +| loc_update_type:detach | <> | Received location update detach indication. +| loc_update_resp:failed | <> | Rejected location updates. +| loc_update_resp:completed | <> | Successful location updates. +| sms:submitted | <> | Received a RPDU from a MS (MO). +| sms:no_receiver | <> | Counts SMS which couldn't routed because no receiver found. +| sms:delivered | <> | Global SMS Deliver attempts. +| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt. +| sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. +| sms:deliver_unknown_error | <> | Unknown error occured during sms delivery. +| call:mo_setup | <> | Received setup requests from a MS to init a MO call. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mt_setup | <> | Sent setup requests to the MS (MT). +| call:mt_connect | <> | Sent a connect to the MS (MT). +| call:active | <> | Count total amount of calls that ever reached active state. +| call:complete | <> | Count total amount of calls which got terminated by disconnect req or ind after reaching active state. +| call:incomplete | <> | Count total amount of call which got terminated by any other reason after reaching active state. +|=== +// generating tables for osmo_stat_items +// generating tables for osmo_counters +// ungrouped osmo_counters +.ungrouped osmo counters +[options="header"] +|=== +| Name | Reference | Description +| msc.active_calls | <> | +|=== + diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index b455897..2ff985d 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -13,6 +13,8 @@ include::chapters/control.adoc[] +include::chapters/counters.adoc[] + include::../common/chapters/vty.adoc[] include::../common/chapters/logging.adoc[] -- To view, visit https://gerrit.osmocom.org/5191 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia8711dd4bc9db36a7121552dc067c7afb1051b0a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:43 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:57 +0000 Subject: osmo-pcu[master]: Print error cause of pcu socket connect failure In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:41:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:41:58 +0000 Subject: [MERGED] osmo-pcu[master]: Print error cause of pcu socket connect failure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Print error cause of pcu socket connect failure ...................................................................... Print error cause of pcu socket connect failure This log is useful to quickly debug scenarions in which pcu never connects to bts. For instance, if bts is started as root and pcu is not, pcu will fail to connect to the socket and will fail with "Permission Denied". Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded --- M src/osmobts_sock.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 31715d5..577d41e 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -263,7 +263,8 @@ rc = connect(bfd->fd, (struct sockaddr *) &local, namelen); if (rc != 0) { LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the osmo-bts" - " PCU socket, delaying... '%s'\n", local.sun_path); + " PCU socket (%s), delaying... '%s'\n", + strerror(errno), local.sun_path); pcu_sock_state = state; close(bfd->fd); bfd->fd = -1; -- To view, visit https://gerrit.osmocom.org/5198 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:42:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:42:23 +0000 Subject: osmo-msc[master]: mncc: re-add lchan members to structs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5186 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:43:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:43:11 +0000 Subject: libosmocore[master]: Embedded: fix sercomm test In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:43:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:43:14 +0000 Subject: [MERGED] libosmocore[master]: Embedded: fix sercomm test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Embedded: fix sercomm test ...................................................................... Embedded: fix sercomm test The external sercomm_drv_[un]lock() functions are defined as stubs in case of non-embedded build only which causes linking issue with sercomm_test. Let's define the same stubs in sercomm_test unconditionally - the implementation details of the locking are irrelevant for the test anyway. Related: OS#2708 Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 --- M tests/sercomm/sercomm_test.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sercomm/sercomm_test.c b/tests/sercomm/sercomm_test.c index 058c9eb..4a40f62 100644 --- a/tests/sercomm/sercomm_test.c +++ b/tests/sercomm/sercomm_test.c @@ -27,6 +27,10 @@ struct osmo_sercomm_inst g_osi; +/* Locking details are not checked by this test anyway */ +void sercomm_drv_lock(unsigned long __attribute__((unused)) *flags) {} +void sercomm_drv_unlock(unsigned long __attribute__((unused)) *flags) {} + static const uint8_t valid_dlci3[] = { 0x7E, 3, 0x03, 'f', 'o', 'o', 0x7E }; static const uint8_t valid_dlci23[] = { 0x7E, 23, 0x03, '2', '3', 0x7E }; static const uint8_t valid_dlci23esc[] = { 0x7E, 23, 0x03, 0x7D, '2' ^ (1 << 5), '3', 0x7E }; -- To view, visit https://gerrit.osmocom.org/5159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3dab4f3348871b66b5d6c9fd10b2e448c61f9e73 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:43:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:43:41 +0000 Subject: osmo-pcu[master]: TBF: fix compiler warning in test In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:44:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:44:10 +0000 Subject: osmo-pcu[master]: TBF: expand timer logging In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:46:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:46:39 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5158/2/src/tbf.h File src/tbf.h: Line 179: void stop_t3169(const char *reason); I'm not the C++ expert here, but to me this looks a lot like copy+paste programming. We fundamentally have an object "a timer" and we want to have multiple instances of this as static members of another object, right? Can't we then simply have a timer class, and a static array of instances of that class, indexed by something like an enum for the T31... value? This way we would avoid having to copy+paste start and stop methods separately for every timer? Once again, those are just my thoughts, I'm not the C++ person here. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:47:13 +0000 Subject: osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:47:17 +0000 Subject: osmo-pcu[master]: TBF: use independent T3169 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5180 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:47:22 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: expand timer logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TBF: expand timer logging ...................................................................... TBF: expand timer logging * log timer values * log start/stop cause * update test output as necessary This simplifies debugging issues with TBF timers. Related: OS#2407 Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 342 insertions(+), 341 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index c323101..341c9d4 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch); + tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); return 0; } @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0); + tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " @@ -1036,7 +1036,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer(); + new_tbf->stop_timer("control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index 831cd97..7b609c8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -394,7 +394,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0); + tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -464,7 +464,7 @@ tbf_name(tbf), get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer(); + tbf->stop_timer("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -529,13 +529,14 @@ }; void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds) + unsigned int seconds, unsigned int microseconds, const char *reason) { - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "%s %sstarting timer %u.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T); + LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, + "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", + tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer %u pending", tbf->T); + LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); @@ -551,14 +552,14 @@ void gprs_rlcmac_tbf::stop_t3191() { - return stop_timer(); + return stop_timer("T3191"); } -void gprs_rlcmac_tbf::stop_timer() +void gprs_rlcmac_tbf::stop_timer(const char *reason) { if (osmo_timer_pending(&timer)) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %u.\n", - tbf_name(this), T); + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", + tbf_name(this), T, reason); osmo_timer_del(&timer); } } @@ -662,7 +663,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0); + tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); return; } /* reschedule UL ack */ @@ -684,7 +685,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -706,7 +707,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -732,7 +733,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0); + tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1192,7 +1193,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer(); + new_dl_tbf->stop_timer("assignment (DL-TBF)"); } @@ -1222,7 +1223,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch); + tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); return msg; diff --git a/src/tbf.h b/src/tbf.h index e9d8df8..80249df 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -174,7 +174,7 @@ int update(); void handle_timeout(); - void stop_timer(); + void stop_timer(const char *reason); void stop_t3191(); int establish_dl_tbf_on_pacch(); @@ -330,7 +330,7 @@ int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds); + unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 3d27883..73708f5 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -488,7 +488,7 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer(); + stop_timer("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -502,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch); + tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); @@ -861,7 +861,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0); + tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); clear_poll_timeout_flag(); @@ -1126,7 +1126,7 @@ /* start T3193 */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000); + (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 81d3b24..0bbb817 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0); + tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 31ab608..f534c54 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -91,7 +91,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -110,16 +110,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -180,7 +180,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Slot Allocation (Algorithm A) for class 45 @@ -199,16 +199,16 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 1 TBFs, USFs = 00, TFIs = 00000001. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -530,10 +530,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING) Destroying MS object, TLLI = 0xffeeddcc @@ -1556,7 +1556,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -1566,7 +1566,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1641,7 +1641,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1661,7 +1661,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1692,7 +1692,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -1725,7 +1725,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1745,7 +1745,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1775,7 +1775,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 1 Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -1791,7 +1791,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -1814,7 +1814,7 @@ - Copying data unit 0 (BSN 0) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654292, TS=7) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654292, TS=7 msg block (BSN 0, CS-4): 0f 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654279 block=10 data=08 01 00 29 52 41 55 5f 41 43 43 45 50 54 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 @@ -1862,7 +1862,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf5667788, not yet confirmed Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1883,7 +1883,7 @@ UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1933,7 +1933,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -1953,7 +1953,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -1983,14 +1983,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2009,7 +2009,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Release pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2030,7 +2030,7 @@ Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN)s start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ @@ -2062,12 +2062,12 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2108,7 +2108,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2128,7 +2128,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2158,14 +2158,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 UL RSSI of TLLI=0xf1223344: 31 dBm TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Software error: Pending downlink assignment in state GPRS_RLCMAC_DL_ASS_SEND_ASS. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX! -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) ********** TBF ends here ********** @@ -2190,7 +2190,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x03, Fn=2654275 (17,31,13) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -2200,7 +2200,7 @@ UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2208,7 +2208,7 @@ Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 01, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** @@ -2261,7 +2261,7 @@ Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. @@ -2281,7 +2281,7 @@ UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -2311,7 +2311,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) append @@ -2366,7 +2366,7 @@ RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3046,7 +3046,7 @@ - V(B): (V(A)=28)""(V(S)-1=27) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid - Final ACK received. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) changes state from FINISHED to WAIT RELEASE -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=1/0 Slot Allocation (Algorithm A) for class 1 @@ -3065,7 +3065,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) Trigger downlink assignment on PACCH Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) exists TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ @@ -3080,12 +3080,12 @@ TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer 3193. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T3193 [freeing TBF] PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 01, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer T0 [control acked (DL-TBF)] Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 Received RTS on disabled PDCH: TRX=0 TS=2 @@ -3315,7 +3315,7 @@ - Copying data unit 0 (BSN 10) - Scheduling Ack/Nack polling, because is was requested explicitly (e.g. first final block sent). TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654461, TS=7) -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer 3191. +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654461, TS=7 msg block (BSN 10, CS-1): 0f 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654448 block=1 data=08 03 14 4d 43 20 50 41 43 4b 45 54 20 30 39 20 28 54 42 46 20 32 29 @@ -3435,7 +3435,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3457,7 +3457,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3491,7 +3491,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b MS requests UL TBF on RACH, so we provide one: ra=0x73 Fn=2654167 qta=31 is_11bit=0: @@ -3529,7 +3529,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -3551,7 +3551,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -3565,7 +3565,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3575,7 +3575,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (1), TFI(0). @@ -3593,7 +3593,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3603,7 +3603,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=2, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (2..65) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (2), TFI(0). @@ -3622,7 +3622,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=1, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(1) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3632,7 +3632,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3642,7 +3642,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=3 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=3, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 3 storing in window (3..66) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (3), TFI(0). @@ -3661,7 +3661,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3671,7 +3671,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3680,7 +3680,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=4 .. V(R)=4) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (4..67) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (4), TFI(0). @@ -3699,7 +3699,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=3, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(3) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3709,7 +3709,7 @@ Got MCS-3 RLC block: R=1, SI=1, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=5 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=5, SPB=2, PI=0, E=1, TI=0, bitoffs=33 - BSN 5 storing in window (5..68) --TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got SPB(2) cs(MCS-3) data block with BSN (5), TFI(0). @@ -3748,7 +3748,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -4101,10 +4101,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4400,10 +4400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4654,10 +4654,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -4869,10 +4869,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5060,10 +5060,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5230,10 +5230,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5394,10 +5394,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5544,10 +5544,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5695,10 +5695,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5749,10 +5749,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5803,10 +5803,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5857,10 +5857,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -5930,10 +5930,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6003,10 +6003,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6076,10 +6076,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6149,10 +6149,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6210,10 +6210,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6271,10 +6271,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6332,10 +6332,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6400,10 +6400,10 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge - Final ACK received. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) changes state from FLOW to WAIT RELEASE -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) starting timer T3193 [release (DL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE EGPRS) changes state from WAIT RELEASE to RELEASING TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer 3193. +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) stopping timer T3193 [freeing TBF] PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=RELEASING EGPRS) Destroying MS object, TLLI = 0xffeeddcc @@ -6444,7 +6444,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6466,7 +6466,7 @@ Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=20, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6480,7 +6480,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6497,7 +6497,7 @@ Got MCS-3 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=329 UL DATA TFI=0 received (V(Q)=2 .. V(R)=2) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-3 RLC data block: CV=7, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (2..65) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=37, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6530,7 +6530,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=11/11 @@ -6620,7 +6620,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -6642,7 +6642,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6656,7 +6656,7 @@ Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=7, BSN=1, SPB=0, PI=0, E=0, TI=0, bitoffs=33 - BSN 1 storing in window (1..64) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -6694,7 +6694,7 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Searching for first unallocated TFI: TRX=0 Found TFI=0. @@ -6866,7 +6866,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6891,7 +6891,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6916,7 +6916,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6941,7 +6941,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6966,7 +6966,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -6991,7 +6991,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7016,7 +7016,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -7080,7 +7080,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) ws(192) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assinment is complete. @@ -7102,7 +7102,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7116,7 +7116,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7126,7 +7126,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7136,7 +7136,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7146,7 +7146,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7156,7 +7156,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7166,7 +7166,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7176,7 +7176,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7186,7 +7186,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7196,7 +7196,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7206,7 +7206,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7216,7 +7216,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7226,7 +7226,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7236,7 +7236,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7246,7 +7246,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7256,7 +7256,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7266,7 +7266,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7276,7 +7276,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7286,7 +7286,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7296,7 +7296,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7307,7 +7307,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=40, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 40 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7317,7 +7317,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=41) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=42, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 42 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7327,7 +7327,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=43) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=44, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 44 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7337,7 +7337,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=45) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=46, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 46 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7347,7 +7347,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=47) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=48, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 48 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7357,7 +7357,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=49) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=50, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 50 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7367,7 +7367,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=51) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=52, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 52 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7377,7 +7377,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=53) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=54, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 54 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7387,7 +7387,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=55) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=56, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 56 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7397,7 +7397,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=57) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=58, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 58 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7407,7 +7407,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=59) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=60, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 60 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7417,7 +7417,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=61) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=62, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 62 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7427,7 +7427,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=63) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7437,7 +7437,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=65) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=66, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 66 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7447,7 +7447,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=67) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=68, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 68 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7457,7 +7457,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=69) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=70, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 70 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7467,7 +7467,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=71) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=72, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 72 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7477,7 +7477,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=73) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=74, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 74 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7487,7 +7487,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=75) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=76, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 76 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7497,7 +7497,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=77) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=78, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 78 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7509,7 +7509,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=79) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7519,7 +7519,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7529,7 +7529,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7539,7 +7539,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7549,7 +7549,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7559,7 +7559,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7569,7 +7569,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7579,7 +7579,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7589,7 +7589,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7599,7 +7599,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7609,7 +7609,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7619,7 +7619,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7629,7 +7629,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7639,7 +7639,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7649,7 +7649,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7659,7 +7659,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7669,7 +7669,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7679,7 +7679,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7689,7 +7689,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7699,7 +7699,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7711,7 +7711,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7721,7 +7721,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7731,7 +7731,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7741,7 +7741,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7751,7 +7751,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7761,7 +7761,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7771,7 +7771,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7781,7 +7781,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7791,7 +7791,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7801,7 +7801,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7811,7 +7811,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7821,7 +7821,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7831,7 +7831,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7841,7 +7841,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7851,7 +7851,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7861,7 +7861,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7871,7 +7871,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7881,7 +7881,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7891,7 +7891,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7901,7 +7901,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7918,7 +7918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 already received Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0 @@ -7948,14 +7948,14 @@ Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Send dowlink assignment on PACCH, because TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) exists TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) changes state from NULL to ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer 0. +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) append Got RLC block, coding scheme: MCS-4, length: 49 (49)) UL data: 28 00 00 80 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 0 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7969,7 +7969,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=1) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=2, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 2 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7979,7 +7979,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=3) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=4, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 4 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7989,7 +7989,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=5) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=6, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 6 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -7999,7 +7999,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=7) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=8, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 8 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8009,7 +8009,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=9) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=10, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 10 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8019,7 +8019,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=11) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=12, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 12 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8029,7 +8029,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=13) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=14, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 14 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8039,7 +8039,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=15) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=16, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 16 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8049,7 +8049,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=17) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=18, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 18 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8059,7 +8059,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=19) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=20, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 20 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8069,7 +8069,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=21) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=22, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 22 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8079,7 +8079,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=23) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=24, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 24 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8089,7 +8089,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=25) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=26, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 26 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8099,7 +8099,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=27) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=28, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 28 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8109,7 +8109,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=29) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=30, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 30 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8119,7 +8119,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=31) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=32, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 32 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8129,7 +8129,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=33) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=34, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 34 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8139,7 +8139,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=35) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=36, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 36 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8150,7 +8150,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=37) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=38, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 38 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8163,7 +8163,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=1 .. V(R)=39) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (1..192) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8183,7 +8183,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=80, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 80 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8193,7 +8193,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=81) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=81, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 81 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8203,7 +8203,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=82) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=82, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 82 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8213,7 +8213,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=83) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=83, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 83 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8223,7 +8223,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=84) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=84, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 84 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8233,7 +8233,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=85) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=85, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 85 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8243,7 +8243,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=86) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=86, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 86 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8253,7 +8253,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=87) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=87, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 87 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8263,7 +8263,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=88) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=88, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 88 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8273,7 +8273,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=89) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=89, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 89 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8283,7 +8283,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=90) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=90, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 90 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8293,7 +8293,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=91) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=91, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 91 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8303,7 +8303,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=92) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=92, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 92 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8313,7 +8313,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=93) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=93, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 93 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8323,7 +8323,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=94) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=94, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 94 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8333,7 +8333,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=95) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=95, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 95 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8343,7 +8343,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=96) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=96, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 96 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8353,7 +8353,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=97) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=97, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 97 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8364,7 +8364,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=98) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=98, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 98 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8374,7 +8374,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=99) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=99, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 99 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8384,7 +8384,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=100) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=100, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 100 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8394,7 +8394,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=101) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=101, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 101 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8404,7 +8404,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=102) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=102, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 102 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8414,7 +8414,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=103) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=103, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 103 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8424,7 +8424,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=104) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=104, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 104 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8434,7 +8434,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=105) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=105, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 105 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8444,7 +8444,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=106) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=106, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 106 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8454,7 +8454,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=107) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=107, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 107 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8464,7 +8464,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=108) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=108, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 108 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8474,7 +8474,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=109) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=109, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 109 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8484,7 +8484,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=110) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=110, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 110 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8494,7 +8494,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=111) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=111, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 111 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8504,7 +8504,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=112) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=112, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 112 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8514,7 +8514,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=113) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=113, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 113 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8524,7 +8524,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=114) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=114, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 114 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8534,7 +8534,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=115) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=115, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 115 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8544,7 +8544,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=116) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=116, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 116 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8554,7 +8554,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=117) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=117, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 117 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8566,7 +8566,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=118) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=118, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 118 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8576,7 +8576,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=119) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=119, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 119 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8586,7 +8586,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=120) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=120, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 120 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8596,7 +8596,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=121) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=121, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 121 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8606,7 +8606,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=122) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=122, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 122 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8616,7 +8616,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=123) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=123, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 123 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8626,7 +8626,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=124) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=124, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 124 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8636,7 +8636,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=125) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=125, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 125 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8646,7 +8646,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=126) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=126, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 126 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8656,7 +8656,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=127) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=127, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 127 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8666,7 +8666,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=128) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=128, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 128 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8676,7 +8676,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=129) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=129, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 129 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8686,7 +8686,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=130) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=130, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 130 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8696,7 +8696,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=131) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=131, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 131 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8706,7 +8706,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=132) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=132, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 132 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8716,7 +8716,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=133) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=133, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 133 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8726,7 +8726,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=134) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=134, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 134 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8736,7 +8736,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=135) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=135, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 135 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8746,7 +8746,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=136) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=136, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 136 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8756,7 +8756,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=137) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=137, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 137 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8768,7 +8768,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=138) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=138, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 138 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8778,7 +8778,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=139) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=139, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 139 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8788,7 +8788,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=140) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=140, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 140 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8798,7 +8798,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=141) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=141, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 141 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8808,7 +8808,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=142) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=142, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 142 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8818,7 +8818,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=143) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=143, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 143 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8828,7 +8828,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=144) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=144, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 144 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8838,7 +8838,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=145) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=145, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 145 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8848,7 +8848,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=146) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=146, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 146 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8858,7 +8858,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=147) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=147, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 147 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8868,7 +8868,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=148) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=148, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 148 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8878,7 +8878,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=149) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=149, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 149 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8888,7 +8888,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=150) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=150, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 150 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8898,7 +8898,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=151) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=151, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 151 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8908,7 +8908,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=152) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=152, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 152 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8918,7 +8918,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=153) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=153, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 153 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8928,7 +8928,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=154) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=154, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 154 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8938,7 +8938,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=155) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=155, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 155 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8948,7 +8948,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=156) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=156, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 156 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8958,7 +8958,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=157) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=157, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 157 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8970,7 +8970,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=158) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=158, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 158 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8980,7 +8980,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=159) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=10, BSN=159, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 159 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=00 80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -8997,7 +8997,7 @@ Got MCS-4 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=385 UL DATA TFI=0 received (V(Q)=0 .. V(R)=160) max_cs_ul cannot be derived (current UL CS: UNKNOWN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer 3169. +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) restarting timer T3169 [acked (data)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): Got MCS-4 RLC data block: CV=0, BSN=64, SPB=0, PI=0, E=1, TI=0, bitoffs=33 - BSN 64 storing in window (0..191) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS): data_length=44, data=80 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 @@ -9049,7 +9049,7 @@ Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x78, Fn=2654167 (17,25,9) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9074,7 +9074,7 @@ Allocated TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x79, Fn=2654167 (17,25,9) TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9099,7 +9099,7 @@ Allocated TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7a, Fn=2654167 (17,25,9) TBF(TFI=2 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9124,7 +9124,7 @@ Allocated TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7b, Fn=2654167 (17,25,9) TBF(TFI=3 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9149,7 +9149,7 @@ Allocated TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7c, Fn=2654167 (17,25,9) TBF(TFI=4 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9174,7 +9174,7 @@ Allocated TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7d, Fn=2654167 (17,25,9) TBF(TFI=5 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9199,7 +9199,7 @@ Allocated TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 80, dl_slots = 00 Modifying MS object, TLLI = 0x00000000, TA 220 -> 7 TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW -TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. +TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer T3169 [RACH (new UL-TBF)] with 0 sec. 0 microsec. TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=31 ra=0x7e, Fn=2654167 (17,25,9) TBF(TFI=6 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) @@ -9232,7 +9232,7 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Received RTS for PDCH: TRX=0 TS=7 FN=2654218 block_nr=8 scheduling USF=0 for required uplink resource of UL TFI=0 -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Destroying MS object, TLLI = 0x00000000 @@ -9240,13 +9240,13 @@ Modifying MS object, UL TLLI: 0x00000000 -> 0xffeeddcc, not yet confirmed TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec. Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) timer 0 expired. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) releasing due to PACCH assignment timeout. TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) free -TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer 0. +TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) stopping timer T0 [freeing TBF] Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) Destroying MS object, TLLI = 0xffeeddcc ********** TBF ends here ********** -- To view, visit https://gerrit.osmocom.org/5120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:47:22 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: fix compiler warning in test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TBF: fix compiler warning in test ...................................................................... TBF: fix compiler warning in test tbf/TbfTest.cpp: In function ?void egprs_spb_to_normal_validation(BTS*, unsigned int, unsigned int)?: tbf/TbfTest.cpp:2788:26: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2788:53: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:26: warning: ?<bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:53: warning: ?<bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:26: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:53: warning: ?<bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 --- M tests/tbf/TbfTest.cpp 1 file changed, 3 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 195bec5..d4b51fe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2785,8 +2785,7 @@ == mcs); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; - bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) - || (egprs2->bsn1_lo); + bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); dl_tbf->m_window.m_v_b.mark_nacked(0); OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); OSMO_ASSERT(bsn1 == 0); @@ -2822,8 +2821,7 @@ egprs3 = (struct gprs_rlc_dl_header_egprs_3 *) msg->data; /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs3->spb == 3); - bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || - (egprs3->bsn1_lo); + bsn2 = (egprs3->bsn1_hi << 9) | (egprs3->bsn1_mid << 1) | (egprs3->bsn1_lo); OSMO_ASSERT(bsn2 == bsn1); /* Table 10.4.8a.3.1 of 44.060 */ @@ -2841,8 +2839,7 @@ /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs2->cps == 0); - bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || - (egprs2->bsn1_lo); + bsn3 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); OSMO_ASSERT(bsn3 == bsn2); tbf_cleanup(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:32 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 5 Dec 2017 18:47:32 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Revert "resources.conf: EC20 doesn't support SupplementarySe... Message-ID: Review at https://gerrit.osmocom.org/5203 Revert "resources.conf: EC20 doesn't support SupplementaryServices" This reverts commit 31b7f0f9dea3f6f00230022a12612b6750018be6. EC20 actually supports the feature. I was wrong mainly due to 2 reasons: - I somehow failed to set the modem Online before checking for the interface, and in that case it is not shown. - The test I saw failing in prod is due to /gobi_0 being actually a gobi2000 there, and the once failing was actually the gobi2000 and not the EC20. Change-Id: I31ad35b718e20168a75930498901015ca2015a52 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/03/5203/1 diff --git a/example/resources.conf b/example/resources.conf index 1672d91..35e3a2d 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -89,7 +89,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'gprs'] + features: ['sms', 'ussd', 'gprs'] - label: gobi2k path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/5203 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31ad35b718e20168a75930498901015ca2015a52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:47:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:47:41 +0000 Subject: osmo-ci[master]: jobs: Fix osmo-ggsn GTP build option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 18:48:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 18:48:01 +0000 Subject: osmo-ci[master]: jobs: Add IPv6 build option to osmo-ggsn job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 fine with me, but we yet have to see if we actually want the #ifdef patch for ipv6 support... -- To view, visit https://gerrit.osmocom.org/5165 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f97bcd163b0458d00c0def7982cdaa349f08747 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 19:15:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 19:15:19 +0000 Subject: [MERGED] osmo-msc[master]: mncc: re-add lchan members to structs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mncc: re-add lchan members to structs ...................................................................... mncc: re-add lchan members to structs The lchan related struct members do not serve any useful purpose in the msc code, since the lchan concept is not in the scope of osmo-msc. However, if removed te struct size will change which will lead into shortened protocol messages as well. This is is detected by osmo-sip-connector and eventually leads into a reject ofthe shortended protocol messages. Re add the missing struct members in order to maintain compatibility This commit reverts the changes made to mncc.h by commit: e2f24d53e4f80b34ec6d656d93127cb598229a96 Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 --- M include/osmocom/msc/mncc.h 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 881e041..49f0c8b 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -155,6 +155,9 @@ int notify; /* 0..127 */ int emergency; char imsi[16]; + + unsigned char lchan_type; + unsigned char lchan_mode; }; struct gsm_data_frame { @@ -176,6 +179,7 @@ uint32_t called_offset; uint32_t signal_offset; uint32_t emergency_offset; + uint32_t lchan_type_offset; }; struct gsm_mncc_rtp { -- To view, visit https://gerrit.osmocom.org/5186 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 19:15:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 19:15:21 +0000 Subject: [MERGED] osmo-msc[master]: mncc: remove deprecated commandline option. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mncc: remove deprecated commandline option. ...................................................................... mncc: remove deprecated commandline option. The commandline option -m has already been deprecated before the split. Use the split as an opportunity to get rid of this option. Change-Id: Ie23d492a839aae85470e39b0d0ad8f57b0d38f7e --- M src/osmo-msc/msc_main.c 1 file changed, 1 insertion(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index b4bafd5..0d23697 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -133,7 +133,6 @@ printf(" -V --version Print the version of OpenBSC.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -M --mncc-sock-path PATH Disable built-in MNCC handler and offer socket.\n"); - printf(" -m --mncc-sock Same as `-M /tmp/bsc_mncc' (deprecated).\n"); printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n"); } @@ -151,13 +150,12 @@ {"timestamp", 0, 0, 'T'}, {"version", 0, 0, 'V' }, {"log-level", 1, 0, 'e'}, - {"mncc-sock", 0, 0, 'm'}, {"mncc-sock-path", 1, 0, 'M'}, {"no-dbcounter", 0, 0, 'C'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:Dsl:TVc:e:mCM:", + c = getopt_long(argc, argv, "hd:Dsl:TVc:e:CM:", long_options, &option_index); if (c == -1) break; @@ -190,9 +188,6 @@ break; case 'M': msc_cmdline_config.mncc_sock_path = optarg; - break; - case 'm': - msc_cmdline_config.mncc_sock_path = "/tmp/bsc_mncc"; break; case 'C': msc_cmdline_config.use_db_counter = 0; -- To view, visit https://gerrit.osmocom.org/5187 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie23d492a839aae85470e39b0d0ad8f57b0d38f7e Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 19:16:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 19:16:30 +0000 Subject: osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 5 19:16:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 19:16:32 +0000 Subject: [MERGED] osmo-msc[master]: Add missing CFLAGS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add missing CFLAGS ...................................................................... Add missing CFLAGS Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 --- M src/libcommon-cs/Makefile.am M src/libcommon/Makefile.am M src/libmsc/Makefile.am M src/libvlr/Makefile.am M src/utils/Makefile.am 5 files changed, 17 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon-cs/Makefile.am b/src/libcommon-cs/Makefile.am index 21c2745..eada698 100644 --- a/src/libcommon-cs/Makefile.am +++ b/src/libcommon-cs/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 0b258c0..18272c5 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -10,6 +10,8 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index fee9f44..998df26 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -15,6 +15,7 @@ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) noinst_HEADERS = \ diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 17ad411..511dfc0 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -1,6 +1,14 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \ - $(COVERAGE_CFLAGS) $(LIBCRYPTO_CFLAGS) +AM_CFLAGS= \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(LIBCRYPTO_CFLAGS) \ + $(NULL) noinst_HEADERS = \ vlr_access_req_fsm.h \ diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index 07b30d9..f1130db 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -123,5 +123,7 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMOSCCP_CFLAGS) \ + $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/5138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67b5d797a80b55e01dcdbb8c782748b049cf9199 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 5 19:16:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 5 Dec 2017 19:16:33 +0000 Subject: [MERGED] osmo-msc[master]: Remove utils imported from openbsc, fix building remaining u... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove utils imported from openbsc, fix building remaining util smpp_mirror ...................................................................... Remove utils imported from openbsc, fix building remaining util smpp_mirror Related: OS#2522 Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 --- M configure.ac M src/utils/Makefile.am D src/utils/meas_db.c D src/utils/meas_db.h D src/utils/meas_json.c D src/utils/meas_pcap2db.c D src/utils/meas_udp2db.c D src/utils/meas_vis.c 8 files changed, 6 insertions(+), 1,197 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 6434869..49d06f5 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) +PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index f1130db..ad3ed3f 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -19,27 +19,10 @@ $(NULL) noinst_HEADERS = \ - meas_db.h \ $(NULL) bin_PROGRAMS = \ - meas_json \ $(NULL) -if HAVE_SQLITE3 -bin_PROGRAMS += \ - osmo-meas-udp2db \ - $(NULL) -if HAVE_PCAP -bin_PROGRAMS += \ - osmo-meas-pcap2db \ - $(NULL) -endif -endif -if HAVE_LIBCDK -bin_PROGRAMS += \ - meas_vis \ - $(NULL) -endif if BUILD_SMPP noinst_PROGRAMS = \ @@ -51,79 +34,15 @@ smpp_mirror.c \ $(NULL) +smpp_mirror_CFLAGS = \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBSMPP34_CFLAGS) \ + $(NULL) + smpp_mirror_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ - $(NULL) - -meas_vis_SOURCES = \ - meas_vis.c \ - $(NULL) - -meas_vis_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - -lcdk \ - -lncurses \ - $(NULL) - -meas_vis_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(NULL) - -osmo_meas_pcap2db_SOURCES = \ - meas_pcap2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_pcap2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - -lpcap \ - $(NULL) - -osmo_meas_pcap2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -osmo_meas_udp2db_SOURCES = \ - meas_udp2db.c \ - meas_db.c \ - $(NULL) - -osmo_meas_udp2db_LDADD = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(SQLITE3_LIBS) \ - $(NULL) - -osmo_meas_udp2db_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -meas_json_SOURCES = \ - meas_json.c \ - $(NULL) - -meas_json_LDADD = \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - -meas_json_CFLAGS = \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ - $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(NULL) diff --git a/src/utils/meas_db.c b/src/utils/meas_db.c deleted file mode 100644 index 8cf27df..0000000 --- a/src/utils/meas_db.c +++ /dev/null @@ -1,330 +0,0 @@ -/* Routines for storing measurement reports in SQLite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "meas_db.h" - -#define INS_MR "INSERT INTO meas_rep (time, imsi, name, scenario, nr, bs_power, ms_timing_offset, fpc, ms_l1_pwr, ms_l1_ta) VALUES (?,?,?,?,?,?,?,?,?,?)" -#define INS_UD "INSERT INTO meas_rep_unidir (meas_id, rx_lev_full, rx_lev_sub, rx_qual_full, rx_qual_sub, dtx, uplink) VALUES (?,?,?,?,?,?,?)" -#define UPD_MR "UPDATE meas_rep SET ul_unidir=?, dl_unidir=? WHERE id=?" - -struct meas_db_state { - sqlite3 *db; - sqlite3_stmt *stmt_ins_ud; - sqlite3_stmt *stmt_ins_mr; - sqlite3_stmt *stmt_upd_mr; -}; - -/* macros to check for SQLite3 result codes */ -#define _SCK_OK(db, call, exp) \ - do { \ - int rc = call; \ - if (rc != exp) { \ - fprintf(stderr,"SQL Error in line %u: %s\n", \ - __LINE__, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) -#define SCK_OK(db, call) _SCK_OK(db, call, SQLITE_OK) -#define SCK_DONE(db, call) _SCK_OK(db, call, SQLITE_DONE) - -static int _insert_ud(struct meas_db_state *st, unsigned long meas_id, int dtx, - int uplink, const struct gsm_meas_rep_unidir *ud) -{ - unsigned long rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 1, meas_id)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 2, - rxlev2dbm(ud->full.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 3, - rxlev2dbm(ud->sub.rx_lev))); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 4, ud->full.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 5, ud->sub.rx_qual)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 6, dtx)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_ud, 7, uplink)); - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_ud)); - - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_ud)); - - return sqlite3_last_insert_rowid(st->db); -err_io: - exit(1); -} - -/* insert a measurement report into the database */ -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr) -{ - int rc; - sqlite3_int64 rowid, ul_rowid, dl_rowid; - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 1, timestamp)); - - if (imsi) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 2, - imsi, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 2)); - - if (name) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 3, - name, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 3)); - - if (scenario) - SCK_OK(st->db, sqlite3_bind_text(st->stmt_ins_mr, 4, - scenario, -1, SQLITE_STATIC)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 4)); - - - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 5, mr->nr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 6, mr->bs_power)); - - if (mr->flags & MEAS_REP_F_MS_TO) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 7, mr->ms_timing_offset)); - else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_ins_mr, 7)); - - if (mr->flags & MEAS_REP_F_FPC) - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 1)); - else - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 8, 0)); - - if (mr->flags & MEAS_REP_F_MS_L1) { - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 9, - mr->ms_l1.pwr)); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_ins_mr, 10, - mr->ms_l1.ta)); - } - - SCK_DONE(st->db, sqlite3_step(st->stmt_ins_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_ins_mr)); - - rowid = sqlite3_last_insert_rowid(st->db); - - /* insert uplink measurement */ - ul_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_UL_DTX, - 1, &mr->ul); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 1, ul_rowid)); - - /* insert downlink measurement, if present */ - if (mr->flags & MEAS_REP_F_DL_VALID) { - dl_rowid = _insert_ud(st, rowid, mr->flags & MEAS_REP_F_DL_DTX, - 0, &mr->dl); - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 2, dl_rowid)); - } else - SCK_OK(st->db, sqlite3_bind_null(st->stmt_upd_mr, 2)); - - /* update meas_rep with the id's of the unidirectional - * measurements */ - SCK_OK(st->db, sqlite3_bind_int(st->stmt_upd_mr, 3, rowid)); - SCK_DONE(st->db, sqlite3_step(st->stmt_upd_mr)); - SCK_OK(st->db, sqlite3_reset(st->stmt_upd_mr)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_begin(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "BEGIN", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -int meas_db_commit(struct meas_db_state *st) -{ - SCK_OK(st->db, sqlite3_exec(st->db, "COMMIT", NULL, NULL, NULL)); - - return 0; - -err_io: - return -EIO; -} - -static const char *create_stmts[] = { - "CREATE TABLE IF NOT EXISTS meas_rep (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "time TIMESTAMP," - "imsi TEXT," - "name TEXT," - "scenario TEXT," - "nr INTEGER," - "bs_power INTEGER NOT NULL," - "ms_timing_offset INTEGER," - "fpc INTEGER NOT NULL DEFAULT 0," - "ul_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "dl_unidir INTEGER REFERENCES meas_rep_unidir(id)," - "ms_l1_pwr INTEGER," - "ms_l1_ta INTEGER" - ")", - "CREATE TABLE IF NOT EXISTS meas_rep_unidir (" - "id INTEGER PRIMARY KEY AUTOINCREMENT," - "meas_id INTEGER NOT NULL REFERENCES meas_rep(id)," - "rx_lev_full INTEGER NOT NULL," - "rx_lev_sub INTEGER NOT NULL," - "rx_qual_full INTEGER NOT NULL," - "rx_qual_sub INTEGER NOT NULL," - "dtx BOOLEAN NOT NULL DEFAULT 0," - "uplink BOOLEAN NOT NULL" - ")", - "CREATE VIEW IF NOT EXISTS path_loss AS " - "SELECT " - "meas_rep.id, " - "datetime(time,'unixepoch') AS timestamp, " - "imsi, " - "name, " - "scenario, " - "ms_timing_offset, " - "ms_l1_ta, " - "fpc, " - "ms_l1_pwr, " - "ud_ul.rx_lev_full AS ul_rx_lev_full, " - "ms_l1_pwr-ud_ul.rx_lev_full AS ul_path_loss_full, " - "ud_ul.rx_lev_sub ul_rx_lev_sub, " - "ms_l1_pwr-ud_ul.rx_lev_sub AS ul_path_loss_sub, " - "ud_ul.rx_qual_full AS ul_rx_qual_full, " - "ud_ul.rx_qual_sub AS ul_rx_qual_sub, " - "bs_power, " - "ud_dl.rx_lev_full AS dl_rx_lev_full, " - "bs_power-ud_dl.rx_lev_full AS dl_path_loss_full, " - "ud_dl.rx_lev_sub AS dl_rx_lev_sub, " - "bs_power-ud_dl.rx_lev_sub AS dl_path_loss_sub, " - "ud_dl.rx_qual_full AS dl_rx_qual_full, " - "ud_dl.rx_qual_sub AS dl_rx_qual_sub " - "FROM " - "meas_rep, " - "meas_rep_unidir AS ud_dl, " - "meas_rep_unidir AS ud_ul " - "WHERE " - "ud_ul.id = meas_rep.ul_unidir AND " - "ud_dl.id = meas_rep.dl_unidir", - "CREATE VIEW IF NOT EXISTS overview AS " - "SELECT " - "id," - "timestamp," - "imsi," - "name," - "scenario," - "ms_l1_pwr," - "ul_rx_lev_full," - "ul_path_loss_full," - "ul_rx_qual_full," - "bs_power," - "dl_rx_lev_full," - "dl_path_loss_full," - "dl_rx_qual_full " - "FROM path_loss", -}; - -static int check_create_tbl(struct meas_db_state *st) -{ - int i, rc; - - for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - SCK_OK(st->db, sqlite3_exec(st->db, create_stmts[i], - NULL, NULL, NULL)); - } - - return 0; -err_io: - return -EIO; -} - - -#define PREP_CHK(db, stmt, ptr) \ - do { \ - int rc; \ - rc = sqlite3_prepare_v2(db, stmt, strlen(stmt)+1, \ - ptr, NULL); \ - if (rc != SQLITE_OK) { \ - fprintf(stderr, "Error during prepare of '%s': %s\n", \ - stmt, sqlite3_errmsg(db)); \ - goto err_io; \ - } \ - } while (0) - -struct meas_db_state *meas_db_open(void *ctx, const char *fname) -{ - int rc; - struct meas_db_state *st = talloc_zero(ctx, struct meas_db_state); - - if (!st) - return NULL; - - rc = sqlite3_open_v2(fname, &st->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, - NULL); - if (rc != SQLITE_OK) { - fprintf(stderr, "Unable to open DB: %s\n", - sqlite3_errmsg(st->db)); - goto err_io; - } - - rc = check_create_tbl(st); - - PREP_CHK(st->db, INS_MR, &st->stmt_ins_mr); - PREP_CHK(st->db, INS_UD, &st->stmt_ins_ud); - PREP_CHK(st->db, UPD_MR, &st->stmt_upd_mr); - - return st; -err_io: - talloc_free(st); - return NULL; -} - -void meas_db_close(struct meas_db_state *st) -{ - if (sqlite3_finalize(st->stmt_ins_mr) != SQLITE_OK) - fprintf(stderr, "DB insert measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_ins_ud) != SQLITE_OK) - fprintf(stderr, "DB insert unidir finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_finalize(st->stmt_upd_mr) != SQLITE_OK) - fprintf(stderr, "DB update measurement report finalize error: %s\n", - sqlite3_errmsg(st->db)); - if (sqlite3_close(st->db) != SQLITE_OK) - fprintf(stderr, "Unable to close DB, abandoning.\n"); - - talloc_free(st); - -} diff --git a/src/utils/meas_db.h b/src/utils/meas_db.h deleted file mode 100644 index 889e902..0000000 --- a/src/utils/meas_db.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENBSC_MEAS_DB_H -#define OPENBSC_MEAS_DB_H - -struct meas_db_state; - -struct meas_db_state *meas_db_open(void *ctx, const char *fname); -void meas_db_close(struct meas_db_state *st); - -int meas_db_begin(struct meas_db_state *st); -int meas_db_commit(struct meas_db_state *st); - -int meas_db_insert(struct meas_db_state *st, const char *imsi, - const char *name, unsigned long timestamp, - const char *scenario, - const struct gsm_meas_rep *mr); - -#endif diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c deleted file mode 100644 index 8db7791..0000000 --- a/src/utils/meas_json.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Convert measurement report feed into JSON feed printed to stdout. - * Each measurement report is printed as a separae JSON root entry. - * All measurement reports are separated by a new line. - */ - -/* (C) 2015 by Alexander Chemeris - * With parts of code adopted from different places in OpenBSC. - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -static void print_meas_rep_uni_json(struct gsm_meas_rep_unidir *mru) -{ - printf("\"RXL-FULL\":%d, \"RXL-SUB\":%d, ", - rxlev2dbm(mru->full.rx_lev), - rxlev2dbm(mru->sub.rx_lev)); - printf("\"RXQ-FULL\":%d, \"RXQ-SUB\":%d", - mru->full.rx_qual, mru->sub.rx_qual); -} - -static void print_meas_rep_json(struct gsm_meas_rep *mr) -{ - int i; - - printf("\"NR\":%d", mr->nr); - - if (mr->flags & MEAS_REP_F_DL_DTX) - printf(", \"DTXd\":true"); - - printf(", \"UL_MEAS\":{"); - print_meas_rep_uni_json(&mr->ul); - printf("}"); - printf(", \"BS_POWER\":%d", mr->bs_power); - if (mr->flags & MEAS_REP_F_MS_TO) - printf(", \"MS_TO\":%d", mr->ms_timing_offset); - - if (mr->flags & MEAS_REP_F_MS_L1) { - printf(", \"L1_MS_PWR\":%d", mr->ms_l1.pwr); - printf(", \"L1_FPC\":%s", - mr->flags & MEAS_REP_F_FPC ? "true" : "false"); - printf(", \"L1_TA\":%u", mr->ms_l1.ta); - } - - if (mr->flags & MEAS_REP_F_UL_DTX) - printf(", \"DTXu\":true"); - if (mr->flags & MEAS_REP_F_BA1) - printf(", \"BA1\":true"); - if (mr->flags & MEAS_REP_F_DL_VALID) { - printf(", \"DL_MEAS\":{"); - print_meas_rep_uni_json(&mr->dl); - printf("}"); - } - - if (mr->num_cell == 7) - return; - printf(", \"NUM_NEIGH\":%u, \"NEIGH\":[", mr->num_cell); - for (i = 0; i < mr->num_cell; i++) { - struct gsm_meas_rep_cell *mrc = &mr->cell[i]; - if (i!=0) printf(", "); - printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}", - mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev)); - } - printf("]"); -} - -static void print_chan_info_json(struct meas_feed_meas *mfm) -{ - printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " - "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), - mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); -} - -static void print_meas_feed_json(struct meas_feed_meas *mfm) -{ - time_t now = time(NULL); - - printf("{"); - printf("\"time\":%ld, \"imsi\":\"%s\", \"name\":\"%s\", \"scenario\":\"%s\", ", - now, mfm->imsi, mfm->name, mfm->scenario); - - switch (mfm->hdr.version) { - case 1: - printf("\"chan_info\":{"); - print_chan_info_json(mfm); - printf("}, "); - /* no break, fall to version 0 */ - case 0: - printf("\"meas_rep\":{"); - print_meas_rep_json(&mfm->mr); - printf("}"); - break; - } - - printf("}\n"); - -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - - print_meas_feed_json(mfm); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - int rc; - struct osmo_fd udp_ofd; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - }; - - exit(0); -} diff --git a/src/utils/meas_pcap2db.c b/src/utils/meas_pcap2db.c deleted file mode 100644 index 0644521..0000000 --- a/src/utils/meas_pcap2db.c +++ /dev/null @@ -1,138 +0,0 @@ -/* read PCAP file with meas_feed data and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include "meas_db.h" - -static struct meas_db_state *db; - -static void handle_mfm(const struct pcap_pkthdr *h, - const struct meas_feed_meas *mfm) -{ - const char *scenario; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, h->ts.tv_sec, - scenario, &mfm->mr); -} - -static void pcap_cb(u_char *user, const struct pcap_pkthdr *h, - const u_char *bytes) -{ - const char *cur = bytes; - const struct iphdr *ip; - const struct udphdr *udp; - const struct meas_feed_meas *mfm; - uint16_t udplen; - - if (h->caplen < 14+20+8) - return; - - /* Check if there is IPv4 in the Ethernet */ - if (cur[12] != 0x08 || cur[13] != 0x00) - return; - - cur += 14; /* ethernet header */ - ip = (struct iphdr *) cur; - - if (ip->version != 4) - return; - cur += ip->ihl * 4; - - if (ip->protocol != IPPROTO_UDP) - return; - - udp = (struct udphdr *) cur; - - if (udp->dest != htons(8888)) - return; - - udplen = ntohs(udp->len); - if (udplen != sizeof(*udp) + sizeof(*mfm)) - return; - cur += sizeof(*udp); - - mfm = (const struct meas_feed_meas *) cur; - - handle_mfm(h, mfm); -} - -int main(int argc, char **argv) -{ - char errbuf[PCAP_ERRBUF_SIZE+1]; - char *pcap_fname, *db_fname; - pcap_t *pc; - int rc; - - if (argc < 3) { - fprintf(stderr, "You need to specify PCAP and database file\n"); - exit(2); - } - - pcap_fname = argv[1]; - db_fname = argv[2]; - - pc = pcap_open_offline(pcap_fname, errbuf); - if (!pc) { - fprintf(stderr, "Cannot open %s: %s\n", pcap_fname, errbuf); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) - exit(0); - - rc = meas_db_begin(db); - if (rc < 0) { - fprintf(stderr, "Error during BEGIN\n"); - exit(1); - } - - pcap_loop(pc, 0 , pcap_cb, NULL); - - meas_db_commit(db); - - exit(0); -} diff --git a/src/utils/meas_udp2db.c b/src/utils/meas_udp2db.c deleted file mode 100644 index c2b5ace..0000000 --- a/src/utils/meas_udp2db.c +++ /dev/null @@ -1,126 +0,0 @@ -/* liesten to meas_feed on UDP and write it to sqlite3 database */ - -/* (C) 2012 by Harald Welte - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include "meas_db.h" - -static struct osmo_fd udp_ofd; -static struct meas_db_state *db; - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - const char *scenario; - time_t now = time(NULL); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - if (mfh->msg_type != MEAS_FEED_MEAS) - return -EINVAL; - - if (strlen(mfm->scenario)) - scenario = mfm->scenario; - else - scenario = NULL; - - meas_db_insert(db, mfm->imsi, mfm->name, now, - scenario, &mfm->mr); - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - -int main(int argc, char **argv) -{ - char *db_fname; - int rc; - - msgb_talloc_ctx_init(NULL, 0); - - if (argc < 2) { - fprintf(stderr, "You have to specify the database file name\n"); - exit(2); - } - - db_fname = argv[1]; - - udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&udp_ofd, AF_INET, SOCK_DGRAM, - IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) { - fprintf(stderr, "Unable to create UDP listen socket\n"); - exit(1); - } - - db = meas_db_open(NULL, db_fname); - if (!db) { - fprintf(stderr, "Unable to open database\n"); - exit(1); - } - - /* FIXME: timer-based BEGIN/COMMIT */ - - while (1) { - osmo_select_main(0); - }; - - meas_db_close(db); - - exit(0); -} - diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c deleted file mode 100644 index 5efb300..0000000 --- a/src/utils/meas_vis.c +++ /dev/null @@ -1,310 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -struct ms_state_uni { - CDKSLIDER *cdk; - CDKLABEL *cdk_label; - - time_t last_update; - char label[32]; - char *_lbl[1]; -}; - - -struct ms_state { - struct llist_head list; - - char name[31+1]; - char imsi[15+1]; - struct gsm_meas_rep mr; - - struct ms_state_uni ul; - struct ms_state_uni dl; -}; - -struct state { - struct osmo_fd udp_ofd; - struct llist_head ms_list; - - CDKSCREEN *cdkscreen; - WINDOW *curses_win; - - CDKLABEL *cdk_title; - char *title; - - CDKLABEL *cdk_header; - char header[256]; -}; - -static struct state g_st; - -struct ms_state *find_ms(const char *imsi) -{ - struct ms_state *ms; - - llist_for_each_entry(ms, &g_st.ms_list, list) { - if (!strcmp(ms->imsi, imsi)) - return ms; - } - return NULL; -} - -static struct ms_state *find_alloc_ms(const char *imsi) -{ - struct ms_state *ms; - - ms = find_ms(imsi); - if (!ms) { - ms = talloc_zero(NULL, struct ms_state); - osmo_strlcpy(ms->imsi, imsi, sizeof(ms->imsi)); - ms->ul._lbl[0] = ms->ul.label; - ms->dl._lbl[0] = ms->dl.label; - llist_add_tail(&ms->list, &g_st.ms_list); - } - - return ms; -} - -static int handle_meas(struct msgb *msg) -{ - struct meas_feed_meas *mfm = (struct meas_feed_meas *) msgb_data(msg); - struct ms_state *ms = find_alloc_ms(mfm->imsi); - time_t now = time(NULL); - - osmo_strlcpy(ms->name, mfm->name, sizeof(ms->name)); - memcpy(&ms->mr, &mfm->mr, sizeof(ms->mr)); - ms->ul.last_update = now; - if (ms->mr.flags & MEAS_REP_F_DL_VALID) - ms->dl.last_update = now; - - /* move to head of list */ - llist_del(&ms->list); - llist_add(&ms->list, &g_st.ms_list); - - return 0; -} - -static int handle_msg(struct msgb *msg) -{ - struct meas_feed_hdr *mfh = (struct meas_feed_hdr *) msgb_data(msg); - - if (mfh->version != MEAS_FEED_VERSION) - return -EINVAL; - - switch (mfh->msg_type) { - case MEAS_FEED_MEAS: - handle_meas(msg); - break; - default: - break; - } - - return 0; -} - -static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what) -{ - int rc; - - if (what & BSC_FD_READ) { - struct msgb *msg = msgb_alloc(1024, "UDP Rx"); - - rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg)); - if (rc < 0) - return rc; - msgb_put(msg, rc); - handle_msg(msg); - msgb_free(msg); - } - - return 0; -} - - -static void destroy_dir(struct ms_state_uni *uni) -{ - if (uni->cdk) { - destroyCDKSlider(uni->cdk); - uni->cdk = NULL; - } - if (uni->cdk_label) { - destroyCDKLabel(uni->cdk_label); - uni->cdk_label = NULL; - } -} - -#define DIR_UL 0 -#define DIR_DL 1 -static const char *dir_str[2] = { - [DIR_UL] = "UL", - [DIR_DL] = "DL", -}; - -static int colpair_by_qual(uint8_t rx_qual) -{ - if (rx_qual == 0) - return 24; - else if (rx_qual <= 4) - return 32; - else - return 16; -} - -static int colpair_by_lev(int rx_lev) -{ - if (rx_lev < -95) - return 16; - else if (rx_lev < -80) - return 32; - else - return 24; -} - - -void write_uni(struct ms_state *ms, struct ms_state_uni *msu, - struct gsm_rx_lev_qual *lq, int dir, int row) -{ - - char label[128]; - time_t now = time(NULL); - int qual_col = colpair_by_qual(lq->rx_qual); - int lev_col = colpair_by_lev(rxlev2dbm(lq->rx_lev)); - int color, pwr; - - if (dir == DIR_UL) { - pwr = ms->mr.ms_l1.pwr; - } else { - pwr = ms->mr.bs_power; - } - - color = A_REVERSE | COLOR_PAIR(lev_col) | ' '; - snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]); - msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color, - COLS-40, rxlev2dbm(lq->rx_lev), -110, -47, - 1, 2, FALSE, FALSE); - //IsVisibleObj(ms->ul.cdk) = FALSE; - snprintf(msu->label, sizeof(msu->label), "%1d %3d %2u %2d %4u", - qual_col, lq->rx_qual, qual_col, pwr, - ms->mr.ms_l1.ta, ms->mr.ms_timing_offset, - now - msu->last_update); - msu->cdk_label = newCDKLabel(g_st.cdkscreen, RIGHT, row, - msu->_lbl, 1, FALSE, FALSE); -} - -static void update_sliders(void) -{ - int num_vis_sliders = 0; - struct ms_state *ms; -#define HEADER_LINES 2 - - /* remove all sliders */ - llist_for_each_entry(ms, &g_st.ms_list, list) { - destroy_dir(&ms->ul); - destroy_dir(&ms->dl); - - } - - llist_for_each_entry(ms, &g_st.ms_list, list) { - struct gsm_rx_lev_qual *lq; - unsigned int row = HEADER_LINES + num_vis_sliders*3; - - if (ms->mr.flags & MEAS_REP_F_UL_DTX) - lq = &ms->mr.ul.sub; - else - lq = &ms->mr.ul.full; - write_uni(ms, &ms->ul, lq, DIR_UL, row); - - if (ms->mr.flags & MEAS_REP_F_DL_DTX) - lq = &ms->mr.dl.sub; - else - lq = &ms->mr.dl.full; - write_uni(ms, &ms->dl, lq, DIR_DL, row+1); - - num_vis_sliders++; - if (num_vis_sliders >= LINES/3) - break; - } - - refreshCDKScreen(g_st.cdkscreen); - -} - -const struct value_string col_strs[] = { - { COLOR_WHITE, "white" }, - { COLOR_RED, "red" }, - { COLOR_GREEN, "green" }, - { COLOR_YELLOW, "yellow" }, - { COLOR_BLUE, "blue" }, - { COLOR_MAGENTA,"magenta" }, - { COLOR_CYAN, "cyan" }, - { COLOR_BLACK, "black" }, - { 0, NULL } -}; - -int main(int argc, char **argv) -{ - int rc; - char *header[1]; - char *title[1]; - - msgb_talloc_ctx_init(NULL, 0); - - printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); - printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); - - INIT_LLIST_HEAD(&g_st.ms_list); - g_st.curses_win = initscr(); - g_st.cdkscreen = initCDKScreen(g_st.curses_win); - initCDKColor(); - - g_st.title = "OpenBSC link quality monitor"; - title[0] = g_st.title; - g_st.cdk_title = newCDKLabel(g_st.cdkscreen, CENTER, 0, title, 1, FALSE, FALSE); - - snprintf(g_st.header, sizeof(g_st.header), "Q Pwr TA TO Time"); - header[0] = g_st.header; - g_st.cdk_header = newCDKLabel(g_st.cdkscreen, RIGHT, 1, header, 1, FALSE, FALSE); - -#if 0 - int i; - for (i = 0; i < 64; i++) { - short f, b; - pair_content(i, &f, &b); - attron(COLOR_PAIR(i)); - printw("%u: %u (%s) ", i, f, get_value_string(col_strs, f)); - printw("%u (%s)\n\r", b, get_value_string(col_strs, b)); - } - refresh(); - getch(); - exit(0); -#endif - - g_st.udp_ofd.cb = udp_fd_cb; - rc = osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND); - if (rc < 0) - exit(1); - - while (1) { - osmo_select_main(0); - update_sliders(); - }; - - exit(0); -} -- To view, visit https://gerrit.osmocom.org/5139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 5 21:05:23 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 5 Dec 2017 21:05:23 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing Message-ID: Review at https://gerrit.osmocom.org/5204 mobile/gsm48_rr.c: fix ACCH System Information parsing According to GSM 04.08, the System Information messages, such as SI5, SI5ter, SI5bis and SI6 (described in sections 9.1.37-40), have no the 'L2 Pseudo Length' (10.5.2.19) field, unlike others. So, previously the ACCH SI messages were ignored due to an implementation error - the gsm48_system_information_type_header struct isn't applicable here, because it assumes the 'l2_plen'. Since there is no (yet?) equivalent struct for the ACCH SI, this change replaces the wrong struct by the 'gsm48_hdr', which satisfies described requirements. Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/04/5204/1 diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index ac27214..994f26a 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -4748,7 +4748,7 @@ struct gsm48_rrlayer *rr = &ms->rrlayer; struct gsm_settings *set = &ms->settings; struct abis_rsl_rll_hdr *rllh = msgb_l2(msg); - struct gsm48_system_information_type_header *sih = msgb_l3(msg); + struct gsm48_hdr *sih = msgb_l3(msg); uint8_t ind_ta, ind_tx_power; if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) { @@ -4772,7 +4772,7 @@ rr->cd_now.ind_tx_power = ind_tx_power; } - switch (sih->system_information) { + switch (sih->msg_type) { case GSM48_MT_RR_SYSINFO_5: return gsm48_rr_rx_sysinfo5(ms, msg); case GSM48_MT_RR_SYSINFO_5bis: @@ -4783,7 +4783,7 @@ return gsm48_rr_rx_sysinfo6(ms, msg); default: LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n", - sih->system_information); + sih->msg_type); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Tue Dec 5 21:31:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 5 Dec 2017 21:31:15 +0000 Subject: osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5184/1/src/libmsc/db.c File src/libmsc/db.c: Line 955: free(q_msisdn); > You shouldn't free memory if dbi_conn_quote_string_copy() failed to allocat Agreed. If you look at this file before this patch, I just copied the scheme from the other db code. So arguably, I am following the local scheme and we should fix all of them in a separate patch? -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 01:30:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 01:30:36 +0000 Subject: [PATCH] osmo-msc[master]: db: wrap dbi querying to log actual SQL on debug and error Message-ID: Review at https://gerrit.osmocom.org/5205 db: wrap dbi querying to log actual SQL on debug and error To be able to tell at all which DB query failed without introspecting the code in gdb or similar, wrap the database query functions in local shims that log the SQL. Related: OS#2667, OS#2706 Change-Id: I4171dad8ffffbf634a75dedde752d82c51ff7803 --- M src/libmsc/db.c 1 file changed, 64 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/5205/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4e4477b..a983976 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -181,6 +181,36 @@ ")", }; +dbi_result query(dbi_conn conn, const char *sql) +{ + dbi_result result; + + LOGP(DDB, LOGL_DEBUG, "Running query: %s\n", sql); + result = dbi_conn_query(conn, sql); + + if (!result) + LOGP(DDB, LOGL_ERROR, "Failed to query: %s\n", sql); + + return result; +} + +dbi_result queryf(dbi_conn conn, const char *format, ...) +{ + va_list args; + char *sql; + dbi_result result; + + va_start(args, format); + sql = talloc_vasprintf(NULL, format, args); + va_end(args); + + result = query(conn, sql); + + talloc_free(sql); + + return result; +} + void db_error_func(dbi_conn conn, void *data) { const char *msg; @@ -193,7 +223,7 @@ { dbi_result result; - result = dbi_conn_query(conn, + result = query(conn, "ALTER TABLE Subscriber " "ADD COLUMN expire_lu " "TIMESTAMP DEFAULT NULL"); @@ -204,7 +234,7 @@ } dbi_result_free(result); - result = dbi_conn_query(conn, + result = query(conn, "UPDATE Meta " "SET value = '3' " "WHERE key = 'revision'"); @@ -245,7 +275,7 @@ snprintf(buf, sizeof(buf), "%llu", sender_id); dbi_conn_quote_string_copy(conn, buf, "ed); - result2 = dbi_conn_queryf(conn, + result2 = queryf(conn, "SELECT extension FROM Subscriber " "WHERE id = %s ", quoted); free(quoted); @@ -285,7 +315,7 @@ LOGP(DDB, LOGL_NOTICE, "Going to migrate from revision 3\n"); - result = dbi_conn_query(conn, "BEGIN EXCLUSIVE TRANSACTION"); + result = query(conn, "BEGIN EXCLUSIVE TRANSACTION"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to begin transaction (upgrade from rev 3)\n"); @@ -294,7 +324,7 @@ dbi_result_free(result); /* Rename old SMS table to be able create a new one */ - result = dbi_conn_query(conn, "ALTER TABLE SMS RENAME TO SMS_3"); + result = query(conn, "ALTER TABLE SMS RENAME TO SMS_3"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to rename the old SMS table (upgrade from rev 3).\n"); @@ -303,7 +333,7 @@ dbi_result_free(result); /* Create new SMS table with all the bells and whistles! */ - result = dbi_conn_query(conn, create_stmts[SCHEMA_SMS]); + result = query(conn, create_stmts[SCHEMA_SMS]); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to create a new SMS table (upgrade from rev 3).\n"); @@ -312,7 +342,7 @@ dbi_result_free(result); /* Cycle through old messages and convert them to the new format */ - result = dbi_conn_query(conn, "SELECT * FROM SMS_3"); + result = query(conn, "SELECT * FROM SMS_3"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed fetch messages from the old SMS table (upgrade from rev 3).\n"); @@ -331,7 +361,7 @@ dbi_result_free(result); /* Remove the temporary table */ - result = dbi_conn_query(conn, "DROP TABLE SMS_3"); + result = query(conn, "DROP TABLE SMS_3"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to drop the old SMS table (upgrade from rev 3).\n"); @@ -340,7 +370,7 @@ dbi_result_free(result); /* We're done. Bump DB Meta revision to 4 */ - result = dbi_conn_query(conn, + result = query(conn, "UPDATE Meta " "SET value = '4' " "WHERE key = 'revision'"); @@ -351,7 +381,7 @@ } dbi_result_free(result); - result = dbi_conn_query(conn, "COMMIT TRANSACTION"); + result = query(conn, "COMMIT TRANSACTION"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to commit the transaction (upgrade from rev 3)\n"); @@ -361,7 +391,7 @@ } /* Shrink DB file size by actually wiping out SMS_3 table data */ - result = dbi_conn_query(conn, "VACUUM"); + result = query(conn, "VACUUM"); if (!result) LOGP(DDB, LOGL_ERROR, "VACUUM failed. Ignoring it (upgrade from rev 3).\n"); @@ -371,7 +401,7 @@ return 0; rollback: - result = dbi_conn_query(conn, "ROLLBACK TRANSACTION"); + result = query(conn, "ROLLBACK TRANSACTION"); if (!result) LOGP(DDB, LOGL_ERROR, "Rollback failed (upgrade from rev 3).\n"); @@ -431,7 +461,7 @@ LOGP(DDB, LOGL_NOTICE, "Going to migrate from revision 4\n"); - result = dbi_conn_query(conn, "BEGIN EXCLUSIVE TRANSACTION"); + result = query(conn, "BEGIN EXCLUSIVE TRANSACTION"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to begin transaction (upgrade from rev 4)\n"); @@ -440,7 +470,7 @@ dbi_result_free(result); /* Rename old SMS table to be able create a new one */ - result = dbi_conn_query(conn, "ALTER TABLE SMS RENAME TO SMS_4"); + result = query(conn, "ALTER TABLE SMS RENAME TO SMS_4"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to rename the old SMS table (upgrade from rev 4).\n"); @@ -449,7 +479,7 @@ dbi_result_free(result); /* Create new SMS table with all the bells and whistles! */ - result = dbi_conn_query(conn, create_stmts[SCHEMA_SMS]); + result = query(conn, create_stmts[SCHEMA_SMS]); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to create a new SMS table (upgrade from rev 4).\n"); @@ -458,7 +488,7 @@ dbi_result_free(result); /* Cycle through old messages and convert them to the new format */ - result = dbi_conn_query(conn, "SELECT * FROM SMS_4"); + result = query(conn, "SELECT * FROM SMS_4"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed fetch messages from the old SMS table (upgrade from rev 4).\n"); @@ -477,7 +507,7 @@ dbi_result_free(result); /* Remove the temporary table */ - result = dbi_conn_query(conn, "DROP TABLE SMS_4"); + result = query(conn, "DROP TABLE SMS_4"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to drop the old SMS table (upgrade from rev 4).\n"); @@ -486,7 +516,7 @@ dbi_result_free(result); /* We're done. Bump DB Meta revision to 4 */ - result = dbi_conn_query(conn, + result = query(conn, "UPDATE Meta " "SET value = '5' " "WHERE key = 'revision'"); @@ -497,7 +527,7 @@ } dbi_result_free(result); - result = dbi_conn_query(conn, "COMMIT TRANSACTION"); + result = query(conn, "COMMIT TRANSACTION"); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to commit the transaction (upgrade from rev 4)\n"); @@ -507,7 +537,7 @@ } /* Shrink DB file size by actually wiping out SMS_4 table data */ - result = dbi_conn_query(conn, "VACUUM"); + result = query(conn, "VACUUM"); if (!result) LOGP(DDB, LOGL_ERROR, "VACUUM failed. Ignoring it (upgrade from rev 4).\n"); @@ -517,7 +547,7 @@ return 0; rollback: - result = dbi_conn_query(conn, "ROLLBACK TRANSACTION"); + result = query(conn, "ROLLBACK TRANSACTION"); if (!result) LOGP(DDB, LOGL_ERROR, "Rollback failed (upgrade from rev 4).\n"); @@ -533,7 +563,7 @@ int db_rev = 0; /* Make a query */ - result = dbi_conn_query(conn, + result = query(conn, "SELECT value FROM Meta " "WHERE key = 'revision'"); @@ -593,7 +623,7 @@ { dbi_result result; - result = dbi_conn_query(conn, + result = query(conn, "PRAGMA synchronous = FULL"); if (!result) return -EINVAL; @@ -647,7 +677,7 @@ int i; for (i = 0; i < ARRAY_SIZE(create_stmts); i++) { - result = dbi_conn_query(conn, create_stmts[i]); + result = query(conn, create_stmts[i]); if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to create some table.\n"); @@ -694,7 +724,7 @@ &q_udata); /* FIXME: correct validity period */ - result = dbi_conn_queryf(conn, + result = queryf(conn, "INSERT INTO SMS " "(created, valid_until, " "reply_path_req, status_rep_req, is_report, " @@ -782,7 +812,7 @@ dbi_result result; struct gsm_sms *sms; - result = dbi_conn_queryf(conn, + result = queryf(conn, "SELECT * FROM SMS WHERE SMS.id = %llu", id); if (!result) return NULL; @@ -806,7 +836,7 @@ dbi_result result; struct gsm_sms *sms; - result = dbi_conn_queryf(conn, + result = queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" " AND id >= %llu" @@ -840,7 +870,7 @@ if (!vsub->lu_complete) return NULL; - result = dbi_conn_queryf(conn, + result = queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" " AND dest_addr=%s" @@ -869,7 +899,7 @@ dbi_result result; struct gsm_sms *sms; - result = dbi_conn_queryf(conn, + result = queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" " AND dest_addr > '%s'" @@ -896,7 +926,7 @@ { dbi_result result; - result = dbi_conn_queryf(conn, + result = queryf(conn, "UPDATE SMS " "SET sent = datetime('now') " "WHERE id = %llu", sms->id); @@ -914,7 +944,7 @@ { dbi_result result; - result = dbi_conn_queryf(conn, + result = queryf(conn, "UPDATE SMS " "SET deliver_attempts = deliver_attempts + 1 " "WHERE id = %llu", sms->id); @@ -934,7 +964,7 @@ dbi_result result; if (!msisdn || !*msisdn) return 0; - result = dbi_conn_queryf(conn, + result = queryf(conn, "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", msisdn, msisdn); if (!result) { @@ -953,7 +983,7 @@ dbi_conn_quote_string_copy(conn, ctr->name, &q_name); - result = dbi_conn_queryf(conn, + result = queryf(conn, "INSERT INTO Counters " "(timestamp,name,value) VALUES " "(datetime('now'),%s,%lu)", q_name, ctr->value); @@ -976,7 +1006,7 @@ dbi_conn_quote_string_copy(conn, ctrg->desc->ctr_desc[num].name, &q_name); - result = dbi_conn_queryf(conn, + result = queryf(conn, "Insert INTO RateCounters " "(timestamp,name,idx,value) VALUES " "(datetime('now'),%s.%s,%u,%"PRIu64")", -- To view, visit https://gerrit.osmocom.org/5205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4171dad8ffffbf634a75dedde752d82c51ff7803 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 6 09:44:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 09:44:40 +0000 Subject: osmo-msc[master]: db: wrap dbi querying to log actual SQL on debug and error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/5205/1/src/libmsc/db.c File src/libmsc/db.c: Line 197: dbi_result queryf(dbi_conn conn, const char *format, ...) That's just SQL injection waiting to happen. Too bad libdbi does not support prepared statements - I wish we could use smth like https://sqlite.org/c3ref/prepare.html -- To view, visit https://gerrit.osmocom.org/5205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4171dad8ffffbf634a75dedde752d82c51ff7803 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 09:46:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 09:46:58 +0000 Subject: osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries In-Reply-To: References: Message-ID: Patch Set 1: What's the point of introducing the error in new code just because old code have it in some other place as well? And than fixing that in another patch. I think you should do the right thing in this patch and than fix other places in a separate patch (as time permits). -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 09:48:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 09:48:57 +0000 Subject: osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 10:57:56 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 6 Dec 2017 10:57:56 +0000 Subject: osmo-gsm-tester[master]: Revert "resources.conf: EC20 doesn't support SupplementarySe... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5203 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31ad35b718e20168a75930498901015ca2015a52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 10:57:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 6 Dec 2017 10:57:58 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Revert "resources.conf: EC20 doesn't support SupplementarySe... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Revert "resources.conf: EC20 doesn't support SupplementaryServices" ...................................................................... Revert "resources.conf: EC20 doesn't support SupplementaryServices" This reverts commit 31b7f0f9dea3f6f00230022a12612b6750018be6. EC20 actually supports the feature. I was wrong mainly due to 2 reasons: - I somehow failed to set the modem Online before checking for the interface, and in that case it is not shown. - The test I saw failing in prod is due to /gobi_0 being actually a gobi2000 there, and the once failing was actually the gobi2000 and not the EC20. Change-Id: I31ad35b718e20168a75930498901015ca2015a52 --- M example/resources.conf 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/resources.conf b/example/resources.conf index 1672d91..35e3a2d 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -89,7 +89,7 @@ ki: 'BB70807226393CDBAC8DD3439FF54252' auth_algo: 'xor' ciphers: [a5_0, a5_1] - features: ['sms', 'gprs'] + features: ['sms', 'ussd', 'gprs'] - label: gobi2k path: '/gobi_3' -- To view, visit https://gerrit.osmocom.org/5203 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31ad35b718e20168a75930498901015ca2015a52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 6 12:15:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 12:15:57 +0000 Subject: [PATCH] osmo-pcu[master]: vty: print class and TBFs for each MS Message-ID: Review at https://gerrit.osmocom.org/5206 vty: print class and TBFs for each MS It's handy for troubleshooting to get quick overview of per-MS TBF allocations and MS [EGPRS] classes. Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96 --- M src/pcu_vty_functions.cpp 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/5206/1 diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 811801f..f1dd25c 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -119,12 +119,16 @@ llist_for_each(ms_iter, &bts->ms_store().ms_list()) { GprsMs *ms = ms_iter->entry(); - vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%zd, " - "IMSI=%s%s", + vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%zd, Cl=%d, E-Cl=%d," + " TBF-UL=%s, TBF-DL=%s, IMSI=%s%s", ms->tlli(), ms->ta(), ms->current_cs_ul().name(), ms->current_cs_dl().name(), ms->llc_queue()->size(), + ms->ms_class(), + ms->egprs_ms_class(), + ms->ul_tbf() ? ms->ul_tbf()->state_name() : "NA", + ms->dl_tbf() ? ms->dl_tbf()->state_name() : "NA", ms->imsi(), VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/5206 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 12:37:10 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 12:37:10 +0000 Subject: [PATCH] osmo-pcu[master]: Make TBF state private Message-ID: Review at https://gerrit.osmocom.org/5207 Make TBF state private Let's make sure no external function can mess with the TBF state. Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1 --- M src/tbf.cpp M src/tbf.h 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/07/5207/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..549dfd5 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -165,7 +165,6 @@ num_T_exp(0), fT(0), num_fT_exp(0), - state(GPRS_RLCMAC_NULL), was_releasing(0), upgrade_to_multislot(0), bts(bts_), @@ -175,6 +174,7 @@ m_ms(NULL), m_ta(GSM48_TA_INVALID), m_ms_class(0), + state(GPRS_RLCMAC_NULL), m_list(this), m_ms_list(this), m_egprs_enabled(false) diff --git a/src/tbf.h b/src/tbf.h index 80249df..a4b613a 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -261,10 +261,6 @@ Meas(); } meas; - /* these should become protected but only after gprs_rlcmac_data.c - * stops to iterate over all tbf in its current form */ - enum gprs_rlcmac_tbf_state state; - /* Remember if the tbf was in wait_release state when we want to * schedule a new dl assignment */ uint8_t was_releasing; @@ -302,6 +298,7 @@ uint8_t m_ms_class; private: + enum gprs_rlcmac_tbf_state state; LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; -- To view, visit https://gerrit.osmocom.org/5207 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 12:51:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 12:51:17 +0000 Subject: [MERGED] osmo-msc[master]: sms db: don't attempt to query pending SMS for unset MSISDN In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: sms db: don't attempt to query pending SMS for unset MSISDN ...................................................................... sms db: don't attempt to query pending SMS for unset MSISDN When the subscriber has no MSISDN, we might construct an invalid SQL statement such as ... AND dest_addr= AND ... Instead, don't even query for empty MSISDNs. Related: OS#2706 Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e --- M src/libmsc/db.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 4e4477b..ca27b6a 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -840,6 +840,10 @@ if (!vsub->lu_complete) return NULL; + /* A subscriber having no phone number cannot possibly receive SMS. */ + if (*vsub->msisdn == '\0') + return NULL; + result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" -- To view, visit https://gerrit.osmocom.org/5183 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d6169d774b2da04b3051957e364fe620feed51e Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:03:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:03:55 +0000 Subject: osmo-msc[master]: db: wrap dbi querying to log actual SQL on debug and error In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5205/1/src/libmsc/db.c File src/libmsc/db.c: Line 197: dbi_result queryf(dbi_conn conn, const char *format, ...) > That's just SQL injection waiting to happen. Too bad libdbi does not suppor Our invocation of libdbi has always worked like this, and libdbi is only here for legacy reasons. We won't spend more time than strictly necessary on dbi now. I needed this to figure out what was going on during two recent error reports, but we're not going to refactor the way dbi works at this point. When calling those dbi quoting functions, presumably code injection is thwarted. Related: https://osmocom.org/issues/1591 -- It looks like we would even rather implement a separate SMSC instead of revamping this to use sqlite directly. -- To view, visit https://gerrit.osmocom.org/5205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4171dad8ffffbf634a75dedde752d82c51ff7803 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:07:34 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:07:34 +0000 Subject: [ABANDON] openbsc[vlr_3G]: contrib: Add osmo-msc service file In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: contrib: Add osmo-msc service file ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/2537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3cb8a90010451bed3a1462ac9ba48275c28d48aa Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: vlr_3G Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:08:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 13:08:16 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log timer invocation source Message-ID: Review at https://gerrit.osmocom.org/5208 TBF: log timer invocation source When troubleshooting TBF timers we're not only interested in timer duration but also in the code which triggered it. Let's use LOGPSRC to log it. Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 20 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/5208/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..42bc641 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); + tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)", __FILE__, __LINE__); return 0; } @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)", __FILE__, __LINE__); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..5d495c8 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -34,6 +34,7 @@ #include #include #include +#include } #include @@ -394,7 +395,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)", __FILE__, __LINE__); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -529,14 +530,14 @@ }; void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason) + unsigned int seconds, unsigned int microseconds, const char *reason, const char *file, int line) { - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, + LOGPSRC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, file, line, "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); + LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, " while old timer T%u pending", tbf->T); LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); @@ -663,7 +664,8 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", + __FILE__, __LINE__); return; } /* reschedule UL ack */ @@ -685,7 +687,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached", __FILE__, __LINE__); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +709,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached", __FILE__, __LINE__); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +735,8 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", + __FILE__, __LINE__); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1223,7 +1226,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); + tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)", __FILE__, __LINE__); return msg; diff --git a/src/tbf.h b/src/tbf.h index 80249df..6ec1551 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -330,7 +330,7 @@ int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason); + unsigned int seconds, unsigned int microseconds, const char *reason, const char *file, int line); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..9a3c08c 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -502,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); + tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)", __FILE__, __LINE__); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); @@ -861,7 +861,8 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)", + __FILE__, __LINE__); clear_poll_timeout_flag(); @@ -1126,7 +1127,7 @@ /* start T3193 */ tbf_timer_start(this, 3193, bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)", __FILE__, __LINE__); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..2fd9fcf 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)", __FILE__, __LINE__); /* Increment RX-counter */ this->m_rx_counter++; -- To view, visit https://gerrit.osmocom.org/5208 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:09:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:09:08 +0000 Subject: osmo-ci[master]: Use stow for dependency management In-Reply-To: References: Message-ID: Patch Set 3: yes, we need a +V vote that someone verifies that the patch works when applied to current master. In the lack of an automatic test on jenkins, someone should run this manually and add V+1 -- To view, visit https://gerrit.osmocom.org/2691 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Alexander Huemer Gerrit-Reviewer: Alexander Huemer Gerrit-Reviewer: Andr? Boddenberg Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: blobb Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:23:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:23:18 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs In-Reply-To: References: Message-ID: Patch Set 2: added feature request https://osmocom.org/issues/2712 -- To view, visit https://gerrit.osmocom.org/4927 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:24:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:24:39 +0000 Subject: osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Patch Set 1: lynxis? -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:25:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:25:33 +0000 Subject: osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Patch Set 1: well I'll just submit it and done. -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:25:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:25:36 +0000 Subject: [MERGED] osmo-bsc[master]: use _NUM_CHREQ_T to define the size of ctype_by_chreq In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: use _NUM_CHREQ_T to define the size of ctype_by_chreq ...................................................................... use _NUM_CHREQ_T to define the size of ctype_by_chreq Make it future compatible for changes. Otherwise it will break when additional enums are adding to chreq in libosmocore. Depends on libosmocore Id67ba8de89dd6288e449197438e9e1c5d7f5a134 Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 91aee43..1ca3bc9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -395,7 +395,7 @@ enum rrlp_mode mode; } rrlp; - enum gsm_chan_t ctype_by_chreq[18]; + enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ int pag_any_tch; -- To view, visit https://gerrit.osmocom.org/4947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2acab2af8d67bccb2bc495512c1f259ae649a832 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:27:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:27:40 +0000 Subject: osmo-pcu[master]: Add function to get max supported MS class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) looks sane enough, but would be nice to hint at a caller, given that there is none in this patch https://gerrit.osmocom.org/#/c/4955/2/src/mslot_class.h File src/mslot_class.h: Line 31: #define MS_NA 255 /* N/A */ unrelated cosmetic -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:28:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:28:47 +0000 Subject: osmo-pcu[master]: Add function to get max supported MS class In-Reply-To: References: Message-ID: Patch Set 2: > hint at a caller actually you do hint at a caller, but can you make it more specific with a file path or function name plz -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:44:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 13:44:01 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log source of state transitions Message-ID: Review at https://gerrit.osmocom.org/5209 TBF: log source of state transitions We use the same approach for osmo_fsm: when state transition happens, it's not very useful to always log the transition function itself, it's much more useful to see where the actual transition comes from. Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 23 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/5209/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..3fcac76 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -679,7 +679,7 @@ failure = true; } else { tbf->set_ta(ta); - tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(tbf, GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", @@ -1034,7 +1034,7 @@ new_tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH); new_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); } - new_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_tbf, GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ new_tbf->stop_timer("control acked (DL-TBF)"); if ((new_tbf->state_flags & @@ -1063,7 +1063,7 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - new_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_tbf, GPRS_RLCMAC_FLOW); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index 549dfd5..fcac803 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -392,7 +392,7 @@ return NULL; } tbf->m_contention_resolution_done = 1; - tbf->set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(tbf, GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); @@ -662,7 +662,7 @@ LOGP(DRLCMAC, LOGL_NOTICE, "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); - ul_tbf->set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(ul_tbf, GPRS_RLCMAC_RELEASING); tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); return; } @@ -684,7 +684,7 @@ bts->pua_poll_timedout(); if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pua_poll_failed(); @@ -706,7 +706,7 @@ bts->pda_poll_timedout(); if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); bts->rlc_ass_failed(); bts->pda_poll_failed(); @@ -732,7 +732,7 @@ } if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - dl_tbf->set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_RELEASING); tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); @@ -1032,7 +1032,7 @@ if (!dl_tbf->upgrade_to_multislot) { /* change state to FLOW, so scheduler * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_FLOW); break; } @@ -1190,7 +1190,7 @@ set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_DL_ASS); } else { dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE; - new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_dl_tbf, GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ new_dl_tbf->stop_timer("assignment (DL-TBF)"); @@ -1470,7 +1470,7 @@ llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); ul_tbf->bts->tbf_ul_created(); - ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(ul_tbf, GPRS_RLCMAC_ASSIGN); ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); ul_tbf->set_ms(ms); diff --git a/src/tbf.h b/src/tbf.h index a4b613a..23d598e 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -146,6 +146,8 @@ #define GPRS_RLCMAC_FLAG_TO_DL_ASS 7 #define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */ +#define TBF_SET_STATE(t, st) do { t->set_state(st, __FILE__, __LINE__); } while(0) + struct gprs_rlcmac_tbf { gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir); @@ -154,7 +156,7 @@ bool state_is(enum gprs_rlcmac_tbf_state rhs) const; bool state_is_not(enum gprs_rlcmac_tbf_state rhs) const; - void set_state(enum gprs_rlcmac_tbf_state new_state); + void set_state(enum gprs_rlcmac_tbf_state new_state, const char *file, int line); const char *state_name() const; const char *name() const; @@ -346,9 +348,9 @@ return tbf_state_name[state]; } -inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state) +inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state, const char *file, int line) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s changes state from %s to %s\n", + LOGPSRC(DRLCMAC, LOGL_DEBUG, file, line, "%s changes state from %s to %s\n", tbf_name(this), tbf_state_name[state], tbf_state_name[new_state]); state = new_state; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..6ee4f66 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -497,7 +497,7 @@ old_tbf->was_releasing = old_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(this, GPRS_RLCMAC_ASSIGN); if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); @@ -509,7 +509,7 @@ was_releasing = state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(this, GPRS_RLCMAC_ASSIGN); state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); /* send immediate assignment */ @@ -624,7 +624,7 @@ if (is_final) { request_dl_ack(); - set_state(GPRS_RLCMAC_FINISHED); + TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED); } /* dequeue next LLC frame, if any */ @@ -1121,7 +1121,7 @@ /* report all outstanding packets as received */ gprs_rlcmac_received_lost(this, received, 0); - set_state(GPRS_RLCMAC_WAIT_RELEASE); + TBF_SET_STATE(this, GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ tbf_timer_start(this, 3193, @@ -1156,7 +1156,7 @@ * (partly) encoded in chunk 1 of block V(A). (optional) */ } - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); /* reset rlc states */ m_window.reset(); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..74ff4ff 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -334,7 +334,7 @@ if (rdbi->cv == 0) { LOGP(DRLCMACUL, LOGL_DEBUG, "- Finished with UL " "TBF\n"); - set_state(GPRS_RLCMAC_FINISHED); + TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED); /* Reset N3103 counter. */ this->m_n3103 = 0; } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..46a9c2a 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -176,7 +176,7 @@ /* "Establish" the DL TBF */ dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_SEND_ASS; - dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_FLOW); dl_tbf->m_wait_confirm = 0; check_tbf(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5209 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 13:47:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 13:47:21 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (6 comments) Looking at this patch I'm almost certain that you haven't tested it sufficiently with both py2 and py3. What is your root motivation to make this usable by py3? Doing so is not trivial, especially concerning encoding issues, and also adding braces to print only works as long as there is a single argument to print... We definitely must not break py2 support here, adding py3 seems to be just a gimmick we can live without? My personal choice here is to move to the osmo_interact_{vty,ctrl}.py / osmo_verify_transcript_*.py code which is firmly py3, and using the transcript file way saves a lot of py coding while writing tests. More complex tests are also possible by using the API directly. https://gerrit.osmocom.org/#/c/5038/2/osmopy/obscvty.py File osmopy/obscvty.py: Line 96: print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ()) -1: this can't be right https://gerrit.osmocom.org/#/c/5038/2/osmopy/osmo_ctrl.py File osmopy/osmo_ctrl.py: Line 25: # FIXME: use argparse instead of deprecated optparse I doubt the value of this comment Line 67: print("Got message:", Ctrl().rem_header(head)) -1: this won't work well in py2, it will print a tuple. same below https://gerrit.osmocom.org/#/c/5038/2/osmopy/osmodumpdoc.py File osmopy/osmodumpdoc.py: Line 51: print("Skipping app %s" % appname, file=sys.stderr) no py2, multiple times https://gerrit.osmocom.org/#/c/5038/2/osmopy/osmotestconfig.py File osmopy/osmotestconfig.py: Line 67: print("Config was\n%s" % open(config).read(), file=sys.stderr) no Line 129: cmd_line, '\n'.join(err_lines)), file=sys.stderr) no -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:36:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:36:20 +0000 Subject: osmo-pcu[master]: Make TBF state private In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5207 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:36:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:36:24 +0000 Subject: osmo-pcu[master]: TBF: log source of state transitions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5209 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:37:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:37:03 +0000 Subject: osmo-pcu[master]: Add tests for find_multi_slots() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/4636 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4174703808335c19341cd5b5f4422496d958967f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:37:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:37:22 +0000 Subject: osmo-pcu[master]: Add function to get max supported MS class In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:38:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:38:27 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:38:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:38:29 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:38:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:38:43 +0000 Subject: osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 14:38:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 6 Dec 2017 14:38:44 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-nightly/latest: document which debian packages are r... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-nightly/latest: document which debian packages are required ...................................................................... osmocom-nightly/latest: document which debian packages are required Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 6933baa..bcc83de 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -1,5 +1,8 @@ #!/bin/sh +# requirements +# apt install git-buildpackage osc git + set -e # OBS project name diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 8c7a732..a00cad1 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -1,5 +1,8 @@ #!/bin/sh +# requirements +# apt install devscripts git-buildpackage osc git + # rather than including a dangerous 'rm -rf *' here, lets delegate to the user: if [ -n "$(ls)" ]; then echo "ERROR: I need to run in an empty directory." -- To view, visit https://gerrit.osmocom.org/5181 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If127d0e852ea8e321461d6aa709621167a0a8ecb Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 16:02:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 16:02:58 +0000 Subject: libosmocore[master]: Add function to estimate elapsed time In-Reply-To: References: Message-ID: Patch Set 4: (2 comments) https://gerrit.osmocom.org/#/c/5103/4/src/timer.c File src/timer.c: Line 202: if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) { some while ago, we added a clock wrapper to be able to set artificial times for unit tests. Have you made sure that applying this to gprs_ns in the next patch isn't breaking any tests that rely on artificial time? I guess it would be nice to provide a fake-time wrapper around monotonic clocks as well for unit tests. (which would also serve to test this function itself, see below) Line 214: return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns); are you sure this is actually correct? from = 1s 500000ns t_now = 2s 490000ns OSMO_SEC2MS(2-1) = 1 * 1000 OSMO_NSEC2MS(490k - 500k) = -10k / 1000 return 1000 - 10 ok seems legit ... still would be nice to have it unit testable and go through various cases there. -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 16:45:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 16:45:47 +0000 Subject: osmo-ci[master]: jobs: Fix osmo-ggsn GTP build option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5164/1/jobs/gerrit-verifications.yml File jobs/gerrit-verifications.yml: Line 109: cmd: GTP="$GTP" ./contrib/jenkins.sh interesting though to pass in the GTP env var as the contents of the GTP env var :) ... doesn't that propagate to jenkins.sh anyway? Either way, explicit is better than implicit. -- To view, visit https://gerrit.osmocom.org/5164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:11:33 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Dec 2017 17:11:33 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: fix wrong comment Message-ID: Review at https://gerrit.osmocom.org/5210 cosmetic: fix wrong comment Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 --- M tests/meas/meas_test.c M tests/meas/meas_test.ok 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/5210/1 diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c index 6c514ca..acebab5 100644 --- a/tests/meas/meas_test.c +++ b/tests/meas/meas_test.c @@ -125,7 +125,7 @@ printf("\n"); printf("***********************\n"); - printf("*** FULL RATE TESTS ***\n"); + printf("*** HALF RATE TESTS ***\n"); printf("***********************\n"); /* Test half rate */ diff --git a/tests/meas/meas_test.ok b/tests/meas/meas_test.ok index 2b76604..6dbda54 100644 --- a/tests/meas/meas_test.ok +++ b/tests/meas/meas_test.ok @@ -180,7 +180,7 @@ Testing: ts[7]->lchan[0], fn=12167=>012167/09/25/29/31, fn%104=103, rc=1, delta=13 *********************** -*** FULL RATE TESTS *** +*** HALF RATE TESTS *** *********************** -- To view, visit https://gerrit.osmocom.org/5210 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:11:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Dec 2017 17:11:37 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove excess whitespaces in Makefile.am Message-ID: Review at https://gerrit.osmocom.org/5211 cosmetic: remove excess whitespaces in Makefile.am Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/5211/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 18b8ce6..1eb28d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,22 +21,22 @@ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' - + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) TESTSUITE = $(srcdir)/testsuite DISTCLEANFILES = atconfig - + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) - + installcheck-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ $(TESTSUITEFLAGS) - + clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean - + AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:11:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Dec 2017 17:11:37 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove unused variable Message-ID: Review at https://gerrit.osmocom.org/5212 cosmetic: remove unused variable Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 --- M tests/power/power_test.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/5212/1 diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 3099217..295f638 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -39,7 +39,6 @@ struct gsm_bts_trx trx; struct gsm_bts_trx_ts ts; struct gsm_lchan *lchan; - int ret; memset(&bts, 0, sizeof(bts)); memset(&btsb, 0, sizeof(btsb)); -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:11:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Dec 2017 17:11:37 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove unused variable Message-ID: Review at https://gerrit.osmocom.org/5213 cosmetic: remove unused variable Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 --- M tests/agch/agch_test.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/5213/1 diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 7c4e6cd..b5094af 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -31,10 +31,6 @@ static struct gsm_bts *bts; static struct gsm_bts_role_bts *btsb; -static const uint8_t static_ilv[] = { - 0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19 -}; - static int count_imm_ass_rej_refs(struct gsm48_imm_ass_rej *rej) { int count = 0; -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:11:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Dec 2017 17:11:37 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR Message-ID: Review at https://gerrit.osmocom.org/5214 osmo-bts-trx: add error concealment unit for GSM-FR When a bad GSM-FR voice frame is received, the frame replaced ith a slince frame. This may cause unpleasant audio effects. Add a function to craft a replacement frame from the last known good frame. Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M configure.ac M include/osmo-bts/Makefile.am A include/osmo-bts/ecu_fr.h M include/osmo-bts/gsm_data_shared.h M src/common/Makefile.am A src/common/ecu_fr.c M src/osmo-bts-trx/scheduler_trx.c M tests/Makefile.am A tests/ecu_fr/Makefile.am A tests/ecu_fr/ecu_fr_test.c A tests/ecu_fr/ecu_fr_test.ok M tests/testsuite.at 12 files changed, 839 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/1 diff --git a/configure.ac b/configure.ac index e3ea9ca..0d1a882 100644 --- a/configure.ac +++ b/configure.ac @@ -180,4 +180,5 @@ tests/tx_power/Makefile tests/power/Makefile tests/meas/Makefile + tests/ecu_fr/Makefile Makefile) diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index a15ce3d..86bcdf1 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -2,4 +2,4 @@ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ power_control.h scheduler.h scheduler_backend.h phy_link.h \ - dtx_dl_amr_fsm.h + dtx_dl_amr_fsm.h ecu_fr.h diff --git a/include/osmo-bts/ecu_fr.h b/include/osmo-bts/ecu_fr.h new file mode 100644 index 0000000..da6281e --- /dev/null +++ b/include/osmo-bts/ecu_fr.h @@ -0,0 +1,30 @@ +/* (C) 2017 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +/* Context information for the full rate ECU states */ +struct ecu_fr_ctx { + bool subsequent_lost_frame; + uint8_t frame_backup[GSM_FR_BYTES]; +}; + +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame); +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..cfd7709 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -17,8 +17,8 @@ #include #include #include - #include +#include #ifndef ROLE_BSC #include @@ -381,6 +381,8 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + struct ecu_fr_ctx ecu_fr_ctx; #endif }; diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 67f3e80..d2d6ec6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -12,6 +12,6 @@ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ l1sap.c cbch.c power_control.c main.c phy_link.c \ - dtx_dl_amr_fsm.c + dtx_dl_amr_fsm.c ecu_fr.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/ecu_fr.c b/src/common/ecu_fr.c new file mode 100644 index 0000000..fb5840d --- /dev/null +++ b/src/common/ecu_fr.c @@ -0,0 +1,416 @@ +/* (C) 2017 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* See also GSM 6.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/* See also RFC 3551 Table 3: GSM payload format: */ +enum gsm610_bit_offsets { + GSM610_SIGNATURE_0, + GSM610_SIGNATURE_1, + GSM610_SIGNATURE_2, + GSM610_SIGNATURE_3, + GSM610_LARc0_0, + GSM610_LARc0_1, + GSM610_LARc0_2, + GSM610_LARc0_3, + GSM610_LARc0_4, + GSM610_LARc0_5, + GSM610_LARc1_0, + GSM610_LARc1_1, + GSM610_LARc1_2, + GSM610_LARc1_3, + GSM610_LARc1_4, + GSM610_LARc1_5, + GSM610_LARc2_0, + GSM610_LARc2_1, + GSM610_LARc2_2, + GSM610_LARc2_3, + GSM610_LARc2_4, + GSM610_LARc3_0, + GSM610_LARc3_1, + GSM610_LARc3_2, + GSM610_LARc3_3, + GSM610_LARc3_4, + GSM610_LARc4_0, + GSM610_LARc4_1, + GSM610_LARc4_2, + GSM610_LARc4_3, + GSM610_LARc5_0, + GSM610_LARc5_1, + GSM610_LARc5_2, + GSM610_LARc5_3, + GSM610_LARc6_0, + GSM610_LARc6_1, + GSM610_LARc6_2, + GSM610_LARc7_0, + GSM610_LARc7_1, + GSM610_LARc7_2, + GSM610_Nc0_0, + GSM610_Nc0_1, + GSM610_Nc0_2, + GSM610_Nc0_3, + GSM610_Nc0_4, + GSM610_Nc0_5, + GSM610_Nc0_6, + GSM610_bc0_0, + GSM610_bc0_1, + GSM610_Mc0_0, + GSM610_Mc0_1, + GSM610_xmaxc00, + GSM610_xmaxc01, + GSM610_xmaxc02, + GSM610_xmaxc03, + GSM610_xmaxc04, + GSM610_xmaxc05, + GSM610_xmc0_0, + GSM610_xmc0_1, + GSM610_xmc0_2, + GSM610_xmc1_0, + GSM610_xmc1_1, + GSM610_xmc1_2, + GSM610_xmc2_0, + GSM610_xmc2_1, + GSM610_xmc2_2, + GSM610_xmc3_0, + GSM610_xmc3_1, + GSM610_xmc3_2, + GSM610_xmc4_0, + GSM610_xmc4_1, + GSM610_xmc4_2, + GSM610_xmc5_0, + GSM610_xmc5_1, + GSM610_xmc5_2, + GSM610_xmc6_0, + GSM610_xmc6_1, + GSM610_xmc6_2, + GSM610_xmc7_0, + GSM610_xmc7_1, + GSM610_xmc7_2, + GSM610_xmc8_0, + GSM610_xmc8_1, + GSM610_xmc8_2, + GSM610_xmc9_0, + GSM610_xmc9_1, + GSM610_xmc9_2, + GSM610_xmc10_0, + GSM610_xmc10_1, + GSM610_xmc10_2, + GSM610_xmc11_0, + GSM610_xmc11_1, + GSM610_xmc11_2, + GSM610_xmc12_0, + GSM610_xmc12_1, + GSM610_xcm12_2, + GSM610_Nc1_0, + GSM610_Nc1_1, + GSM610_Nc1_2, + GSM610_Nc1_3, + GSM610_Nc1_4, + GSM610_Nc1_5, + GSM610_Nc1_6, + GSM610_bc1_0, + GSM610_bc1_1, + GSM610_Mc1_0, + GSM610_Mc1_1, + GSM610_xmaxc10, + GSM610_xmaxc11, + GSM610_xmaxc12, + GSM610_xmaxc13, + GSM610_xmaxc14, + GSM610_xmax15, + GSM610_xmc13_0, + GSM610_xmc13_1, + GSM610_xmc13_2, + GSM610_xmc14_0, + GSM610_xmc14_1, + GSM610_xmc14_2, + GSM610_xmc15_0, + GSM610_xmc15_1, + GSM610_xmc15_2, + GSM610_xmc16_0, + GSM610_xmc16_1, + GSM610_xmc16_2, + GSM610_xmc17_0, + GSM610_xmc17_1, + GSM610_xmc17_2, + GSM610_xmc18_0, + GSM610_xmc18_1, + GSM610_xmc18_2, + GSM610_xmc19_0, + GSM610_xmc19_1, + GSM610_xmc19_2, + GSM610_xmc20_0, + GSM610_xmc20_1, + GSM610_xmc20_2, + GSM610_xmc21_0, + GSM610_xmc21_1, + GSM610_xmc21_2, + GSM610_xmc22_0, + GSM610_xmc22_1, + GSM610_xmc22_2, + GSM610_xmc23_0, + GSM610_xmc23_1, + GSM610_xmc23_2, + GSM610_xmc24_0, + GSM610_xmc24_1, + GSM610_xmc24_2, + GSM610_xmc25_0, + GSM610_xmc25_1, + GSM610_xmc25_2, + GSM610_Nc2_0, + GSM610_Nc2_1, + GSM610_Nc2_2, + GSM610_Nc2_3, + GSM610_Nc2_4, + GSM610_Nc2_5, + GSM610_Nc2_6, + GSM610_bc2_0, + GSM610_bc2_1, + GSM610_Mc2_0, + GSM610_Mc2_1, + GSM610_xmaxc20, + GSM610_xmaxc21, + GSM610_xmaxc22, + GSM610_xmaxc23, + GSM610_xmaxc24, + GSM610_xmaxc25, + GSM610_xmc26_0, + GSM610_xmc26_1, + GSM610_xmc26_2, + GSM610_xmc27_0, + GSM610_xmc27_1, + GSM610_xmc27_2, + GSM610_xmc28_0, + GSM610_xmc28_1, + GSM610_xmc28_2, + GSM610_xmc29_0, + GSM610_xmc29_1, + GSM610_xmc29_2, + GSM610_xmc30_0, + GSM610_xmc30_1, + GSM610_xmc30_2, + GSM610_xmc31_0, + GSM610_xmc31_1, + GSM610_xmc31_2, + GSM610_xmc32_0, + GSM610_xmc32_1, + GSM610_xmc32_2, + GSM610_xmc33_0, + GSM610_xmc33_1, + GSM610_xmc33_2, + GSM610_xmc34_0, + GSM610_xmc34_1, + GSM610_xmc34_2, + GSM610_xmc35_0, + GSM610_xmc35_1, + GSM610_xmc35_2, + GSM610_xmc36_0, + GSM610_Xmc36_1, + GSM610_xmc36_2, + GSM610_xmc37_0, + GSM610_xmc37_1, + GSM610_xmc37_2, + GSM610_xmc38_0, + GSM610_xmc38_1, + GSM610_xmc38_2, + GSM610_Nc3_0, + GSM610_Nc3_1, + GSM610_Nc3_2, + GSM610_Nc3_3, + GSM610_Nc3_4, + GSM610_Nc3_5, + GSM610_Nc3_6, + GSM610_bc3_0, + GSM610_bc3_1, + GSM610_Mc3_0, + GSM610_Mc3_1, + GSM610_xmaxc30, + GSM610_xmaxc31, + GSM610_xmaxc32, + GSM610_xmaxc33, + GSM610_xmaxc34, + GSM610_xmaxc35, + GSM610_xmc39_0, + GSM610_xmc39_1, + GSM610_xmc39_2, + GSM610_xmc40_0, + GSM610_xmc40_1, + GSM610_xmc40_2, + GSM610_xmc41_0, + GSM610_xmc41_1, + GSM610_xmc41_2, + GSM610_xmc42_0, + GSM610_xmc42_1, + GSM610_xmc42_2, + GSM610_xmc43_0, + GSM610_xmc43_1, + GSM610_xmc43_2, + GSM610_xmc44_0, + GSM610_xmc44_1, + GSM610_xmc44_2, + GSM610_xmc45_0, + GSM610_xmc45_1, + GSM610_xmc45_2, + GSM610_xmc46_0, + GSM610_xmc46_1, + GSM610_xmc46_2, + GSM610_xmc47_0, + GSM610_xmc47_1, + GSM610_xmc47_2, + GSM610_xmc48_0, + GSM610_xmc48_1, + GSM610_xmc48_2, + GSM610_xmc49_0, + GSM610_xmc49_1, + GSM610_xmc49_2, + GSM610_xmc50_0, + GSM610_xmc50_1, + GSM610_xmc50_2, + GSM610_xmc51_0, + GSM610_xmc51_1, + GSM610_xmc51_2 +}; + +/* Helper function to reduce the XMAXC field. When the XMAXC field reaches + * zero, then the function will return true */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, unsigned int index) +{ + unsigned int field_index; + uint64_t field; + bool silent = true; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + if (field != 0) + silent = false; + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return silent; +} + +/* Helper function to reduce the XMAXC fields. When all XMAXC fields reach + * zero, then the function will return true */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_xmaxc00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_xmaxc10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_xmaxc20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_xmaxc30)) + silent = true; + return silent; +} + +/* Helper function to use certain modifications to conceal + * the errors in a full rate frame */ +static void conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + bool silent; + int rc; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) { + goto abort_nofree; + } + + /* Convert to bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) { + LOGP(DL1P, LOGL_ERROR, "No memory for bitvec!\n"); + goto abort_nofree; + } + rc = bitvec_unpack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Wrong number of bits unpacked!\n"); + goto abort; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0, GSM_FR_BYTES); + frame[0] = 0xd0; + goto abort; + } + + /* Convert back to packed byte form */ + rc = bitvec_pack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + goto abort; + LOGP(DL1P, LOGL_ERROR, "Wrong number of bits packed!\n"); + } + +abort: + bitvec_free(frame_bitvec); +abort_nofree: + return; +} + +/* To be called whan a good frame is received. This function will then create + * a backup of the frame and reset its internal state */ +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + ctx->subsequent_lost_frame = false; + memcpy(ctx->frame_backup, frame, sizeof(ctx->frame_backup)); +} + +/* To be called when a bad frame is received. This function will then generate + * a replacement frame that can be used to conceal the dropout */ +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup. */ + if (ctx->subsequent_lost_frame) { + conceal_frame(ctx->frame_backup); + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, ctx->frame_backup, sizeof(ctx->frame_backup)); + ctx->subsequent_lost_frame = true; +} diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..46c76ee 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -968,6 +968,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1059,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1082,7 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + ecu_fr_conceal(&lchan->ecu_fr_ctx, tch_data); rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1110,9 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + if (bfi_flag == false && tch_mode == GSM48_CMODE_SPEECH_V1) + ecu_fr_reset(&lchan->ecu_fr_ctx, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); diff --git a/tests/Makefile.am b/tests/Makefile.am index 1eb28d6..e77a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = paging cipher agch misc handover tx_power power meas +SUBDIRS = paging cipher agch misc handover tx_power power meas ecu_fr if ENABLE_SYSMOBTS SUBDIRS += sysmobts diff --git a/tests/ecu_fr/Makefile.am b/tests/ecu_fr/Makefile.am new file mode 100644 index 0000000..6dc7549 --- /dev/null +++ b/tests/ecu_fr/Makefile.am @@ -0,0 +1,8 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) +noinst_PROGRAMS = ecu_fr_test +EXTRA_DIST = ecu_fr_test.ok + +ecu_fr_test_SOURCES = ecu_fr_test.c +ecu_fr_test_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD) diff --git a/tests/ecu_fr/ecu_fr_test.c b/tests/ecu_fr/ecu_fr_test.c new file mode 100644 index 0000000..bc1cc56 --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +/* Set with sample fullrate voice frames and some intentional dropouts. */ +char *fr_voice[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Start with a good voice frame and then simulate 20 consecutive bad frames, + * watch how the error concealment decreases the XMAXC parameters */ +void test_fr_concealment(void *ctx) +{ + char frame_hex[] = + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + uint8_t *frame; + unsigned int len; + int i; + struct ecu_fr_ctx ecu_fr_ctx; + + len = strlen(frame_hex); + frame = talloc_zero_size(ctx, GSM_FR_BYTES); + len = osmo_hexparse(frame_hex, frame, GSM_FR_BYTES); + OSMO_ASSERT(len == GSM_FR_BYTES); + + printf(" Start with: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Reset the ECU with the proposed known good frame */ + ecu_fr_reset(&ecu_fr_ctx, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf("conceal: %02i, result: %s\n", i, + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } + + talloc_free(frame); +} + +/* Simulate a real life situation, voce frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + uint8_t frame[GSM_FR_BYTES]; + unsigned int len; + unsigned int id = 0; + struct ecu_fr_ctx ecu_fr_ctx; + + while (1) { + /* Detect end of test samples */ + if (fr_voice[id] == NULL) + return; + + printf("Frame No. %03i:\n", id); + len = strlen(fr_voice[id]) / 2; + + if (len != GSM_FR_BYTES) { + memset(frame, 0, GSM_FR_BYTES); + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf(" * input: (bad)\n"); + } else { + osmo_hexparse(fr_voice[id], frame, GSM_FR_BYTES); + printf(" * input: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + ecu_fr_reset(&ecu_fr_ctx, frame); + } + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + id++; + } +} + +int main(int argc, char **argv) +{ + void *tall_bts_ctx; + + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + bts_log_init(NULL); + osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG; + + test_fr_concealment(tall_bts_ctx); + test_fr_concealment_realistic(); + + printf("Success\n"); + talloc_report_full(tall_bts_ctx, stderr); + printf("Talloc total blocks: %lu\n", talloc_total_blocks(tall_bts_ctx)); + OSMO_ASSERT(talloc_total_blocks(tall_bts_ctx) == 2); + + return 0; +} diff --git a/tests/ecu_fr/ecu_fr_test.ok b/tests/ecu_fr/ecu_fr_test.ok new file mode 100644 index 0000000..fab883e --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.ok @@ -0,0 +1,194 @@ + Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 +Success +Talloc total blocks: 2 diff --git a/tests/testsuite.at b/tests/testsuite.at index 2d1cefd..c6196a5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -49,3 +49,9 @@ cat $abs_srcdir/meas/meas_test.ok > expout AT_CHECK([$abs_top_builddir/tests/meas/meas_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([ecu_fr]) +AT_KEYWORDS([ecu_fr]) +cat $abs_srcdir/ecu_fr/ecu_fr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/ecu_fr/ecu_fr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 6 17:12:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 6 Dec 2017 17:12:32 +0000 Subject: python/osmo-python-tests[master]: Print additional debug info for extended tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 osmopy should actually be installed in /var/lib/python/ or /usr/local/lib/python/, only the runnable scripts go to /usr/local/bin. See setup.py This patch will not help you in any way, since the contents of /usr/local/bin do not change while the tests are running, and osmopy is not expected to be present there. Here is your ls command run on two of the build slaves: root at build-1 ~ # ls /usr/local/bin/ osmo_ctrl.py osmodumpdoc.py osmo_interact_ctrl.py osmo_interact_vty.py osmo_ipa.py osmotestconfig.py osmotestvty.py osmo_verify_transcript_ctrl.py osmo_verify_transcript_vty.py soap.py twisted_ipa.py root at build-1 ~ # lxc-attach -n d deb9docker-template docker root at build-1 ~ # lxc-attach -n docker root at docker:~# ls /usr/local/bin/ osmo_ctrl.py osmodumpdoc.py osmo_interact_ctrl.py osmo_interact_vty.py osmo_ipa.py osmotestconfig.py osmotestvty.py osmo_verify_transcript_ctrl.py osmo_verify_transcript_vty.py soap.py twisted_ipa.py Here is the location of osmopy: # ls /usr/local/lib/python2.7/dist-packages/osmopy/ -l total 236 -rw-r--r-- 1 osmocom-build osmocom-build 416 Nov 27 14:10 __init__.py -rw-r--r-- 1 osmocom-build osmocom-build 519 Nov 27 14:10 __init__.pyc -rw-r--r-- 1 osmocom-build osmocom-build 8085 Nov 24 09:10 obscvty.py -rw-r--r-- 1 osmocom-build osmocom-build 7396 Nov 24 09:10 obscvty.pyc -rw-r--r-- 1 osmocom-build osmocom-build 4427 Nov 27 14:10 osmo_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 4516 Nov 27 14:10 osmo_ctrl.pyc -rw-r--r-- 1 osmocom-build osmocom-build 2784 Nov 24 09:10 osmodumpdoc.py -rw-r--r-- 1 osmocom-build osmocom-build 2765 Nov 24 09:10 osmodumpdoc.pyc -rw-r--r-- 1 osmocom-build osmocom-build 15191 Nov 29 17:35 osmo_interact_common.py -rw-r--r-- 1 osmocom-build osmocom-build 3332 Nov 24 09:10 osmo_interact_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 3735 Nov 24 09:10 osmo_interact_ctrl.pyc -rw-r--r-- 1 osmocom-build osmocom-build 6978 Nov 24 09:10 osmo_interact_vty.py -rw-r--r-- 1 osmocom-build osmocom-build 6120 Nov 24 09:10 osmo_interact_vty.pyc -rw-r--r-- 1 osmocom-build osmocom-build 9034 Nov 24 09:10 osmo_ipa.py -rw-r--r-- 1 osmocom-build osmocom-build 12829 Nov 24 09:10 osmo_ipa.pyc -rw-r--r-- 1 osmocom-build osmocom-build 6683 Nov 24 09:10 osmotestconfig.py -rw-r--r-- 1 osmocom-build osmocom-build 6520 Nov 24 09:10 osmotestconfig.pyc -rw-r--r-- 1 osmocom-build osmocom-build 3311 Nov 24 09:10 osmotestvty.py -rw-r--r-- 1 osmocom-build osmocom-build 3537 Nov 24 09:10 osmotestvty.pyc -rw-r--r-- 1 osmocom-build osmocom-build 3211 Nov 24 09:10 osmoutil.py -rw-r--r-- 1 osmocom-build osmocom-build 2677 Nov 24 09:10 osmoutil.pyc -rw-r--r-- 1 osmocom-build osmocom-build 11752 Oct 17 01:05 osmo_verify_transcript_common.py -rw-r--r-- 1 osmocom-build osmocom-build 2008 Nov 24 09:10 osmo_verify_transcript_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 1396 Nov 24 09:10 osmo_verify_transcript_ctrl.pyc -rw-r--r-- 1 osmocom-build osmocom-build 2051 Nov 24 09:10 osmo_verify_transcript_vty.py -rw-r--r-- 1 osmocom-build osmocom-build 1490 Nov 24 09:10 osmo_verify_transcript_vty.pyc -rw-r--r-- 1 osmocom-build osmocom-build 9155 Nov 27 14:10 soap.py -rw-r--r-- 1 osmocom-build osmocom-build 10477 Nov 27 14:10 soap.pyc -rw-r--r-- 1 osmocom-build osmocom-build 13970 Nov 27 14:10 twisted_ipa.py -rw-r--r-- 1 osmocom-build osmocom-build 19108 Nov 27 14:10 twisted_ipa.pyc and also root at docker:/usr/local/lib/python2.7/dist-packages# ls /usr/local/lib/python3.5/dist-packages/osmopy/ -l total 132 -rw-r--r-- 1 osmocom-build osmocom-build 416 Nov 27 14:10 __init__.py -rw-r--r-- 1 osmocom-build osmocom-build 8085 Nov 24 09:10 obscvty.py -rw-r--r-- 1 osmocom-build osmocom-build 4427 Nov 27 14:10 osmo_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 2784 Nov 24 09:10 osmodumpdoc.py -rw-r--r-- 1 osmocom-build osmocom-build 15191 Nov 29 17:35 osmo_interact_common.py -rw-r--r-- 1 osmocom-build osmocom-build 3332 Nov 24 09:10 osmo_interact_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 6978 Nov 24 09:10 osmo_interact_vty.py -rw-r--r-- 1 osmocom-build osmocom-build 9034 Nov 24 09:10 osmo_ipa.py -rw-r--r-- 1 osmocom-build osmocom-build 6683 Nov 24 09:10 osmotestconfig.py -rw-r--r-- 1 osmocom-build osmocom-build 3311 Nov 24 09:10 osmotestvty.py -rw-r--r-- 1 osmocom-build osmocom-build 3211 Nov 24 09:10 osmoutil.py -rw-r--r-- 1 osmocom-build osmocom-build 11752 Oct 17 01:05 osmo_verify_transcript_common.py -rw-r--r-- 1 osmocom-build osmocom-build 2008 Nov 24 09:10 osmo_verify_transcript_ctrl.py -rw-r--r-- 1 osmocom-build osmocom-build 2051 Nov 24 09:10 osmo_verify_transcript_vty.py drwxr-sr-x 2 osmocom-build osmocom-build 4096 Nov 29 17:35 __pycache__ -rw-r--r-- 1 osmocom-build osmocom-build 9155 Nov 27 14:10 soap.py -rw-r--r-- 1 osmocom-build osmocom-build 13970 Nov 27 14:10 twisted_ipa.py -- To view, visit https://gerrit.osmocom.org/5042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f3ef3665352c4e74affff2c2e8d345a408a2f52 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 6 18:26:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 6 Dec 2017 18:26:58 +0000 Subject: [PATCH] osmo-pcu[master]: Introduce LOGTBF* for consistent logging Message-ID: Review at https://gerrit.osmocom.org/5215 Introduce LOGTBF* for consistent logging When troubleshooting complex issues with TBF lifecycle, it's much easier to follow the logs which are consistently formatted. Add LOGTBF*() macro similar to struct-specific log routines we use in other Osmocom project and use it to log TBF-related messages in a unified way. Tweak test output accordingly. Related: OS#2407 Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 960 insertions(+), 989 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/5215/1 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 6 19:19:10 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 6 Dec 2017 19:19:10 +0000 Subject: [PATCH] osmo-ggsn[master]: Add support for IPv4v6 User End Addresses Message-ID: Review at https://gerrit.osmocom.org/5216 Add support for IPv4v6 User End Addresses Before this commit, when an MS requested an ipv4v6 context osmo-ggsn returned an error stating the type was unknown, and this text was printed in the log: Processing create PDP context request for APN 'ims' Cannot decode EUA from MS/SGSN: f1 8d This patch has been tested with an MS running the 3 types of addresses: - IPv4 and IPv6: no regressions observed, the context is activated and packets are sent to the ggsn. - IPv4v6: Wireshark correctly parses request and reponse, and then ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and IPv6 DNS addresses advertised and TCP traffic over IPv4 (because probably my IPv6 network setup is not correct). I also checked I can disable/enable data (pdp ctx delete and activate) several times without any issue. Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 --- M ggsn/ggsn.c M ggsn/icmpv6.c M gtp/pdp.h M lib/in46_addr.c M lib/in46_addr.h M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c M tests/lib/in46a_v6_test.ok 8 files changed, 218 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5216/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1c1276f..eba7c2a 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -335,17 +335,23 @@ static int delete_context(struct pdp_t *pdp) { struct gsn_t *gsn = pdp->gsn; - struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; struct apn_ctx *apn = pdp->priv; + struct ippoolm_t *member; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); - struct ippoolm_t *member = pdp->peer; - if (pdp->peer) { + if (pdp->peer[0]) { + member = pdp->peer[0]; send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ - ippool_freeip(ipp->pool, ipp); + ippool_freeip(member->pool, member); } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + + if (pdp->peer[1]) { /* ipv4v6 */ + member = pdp->peer[1]; + send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ + ippool_freeip(member->pool, member); + } if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", @@ -512,10 +518,10 @@ static char name_buf[256]; struct gsn_t *gsn = pdp->gsn; struct ggsn_ctx *ggsn = gsn->priv; - struct in46_addr addr; - struct ippoolm_t *member; + struct in46_addr addr[2]; + struct ippoolm_t *member = NULL; struct apn_ctx *apn; - int rc; + int rc, num_addr, i; osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); @@ -550,55 +556,63 @@ memcpy(pdp->qos_neg.v, pdp->qos_req.v, pdp->qos_req.l); /* TODO */ pdp->qos_neg.l = pdp->qos_req.l; - if (in46a_from_eua(&pdp->eua, &addr)) { + memset(addr, 0, sizeof(addr[0])*2); + if ((num_addr = in46a_from_eua(&pdp->eua, addr)) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot decode EUA from MS/SGSN: %s\n", osmo_hexdump(pdp->eua.v, pdp->eua.l)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_UNKNOWN_PDP); return 0; } - if (addr.len == sizeof(struct in_addr)) { - /* does this APN actually have an IPv4 pool? */ - if (!apn_supports_ipv4(apn)) - goto err_wrong_af; + /* Allocate dynamic addresses from the pool */ + for (i = 0; i < num_addr; i++) { + if (addr[i].len == sizeof(struct in_addr)) { + /* does this APN actually have an IPv4 pool? */ + if (!apn_supports_ipv4(apn)) + goto err_wrong_af; - rc = ippool_newip(apn->v4.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - in46a_to_eua(&member->addr, &pdp->eua); + rc = ippool_newip(apn->v4.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + /* copy back */ + memcpy(&addr[i].v4.s_addr, &member->addr.v4, 4); + } else if (addr[i].len == sizeof(struct in6_addr)) { + + /* does this APN actually have an IPv6 pool? */ + if (!apn_supports_ipv6(apn)) + goto err_wrong_af; + + rc = ippool_newip(apn->v6.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + + /* IPv6 doesn't really send the real/allocated address at this point, but just + * the link-identifier which the MS shall use for router solicitation */ + /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ + memcpy(addr[i].v6.s6_addr, &member->addr.v6, 8); + /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ + memcpy(addr[i].v6.s6_addr+8, &member->addr.v6, 8); + } else + OSMO_ASSERT(0); + + pdp->peer[i] = member; + member->peer = pdp; + } + + in46a_to_eua(addr, num_addr, &pdp->eua); + + if (apn_supports_ipv4(apn)) { /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } - } else if (addr.len == sizeof(struct in6_addr)) { - struct in46_addr tmp; + } - /* does this APN actually have an IPv6 pool? */ - if (!apn_supports_ipv6(apn)) - goto err_wrong_af; - - rc = ippool_newip(apn->v6.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - - /* IPv6 doesn't really send the real/allocated address at this point, but just - * the link-identifier which the MS shall use for router solicitation */ - tmp.len = addr.len; - /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ - memcpy(tmp.v6.s6_addr, &member->addr.v6, 8); - /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ - memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); - in46a_to_eua(&tmp, &pdp->eua); - } else - OSMO_ASSERT(0); - - pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ pdp->priv = apn; - member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index 11ced24..6564a54 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -183,12 +183,17 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *own_ll_addr, const uint8_t *pack, unsigned len) { - struct ippoolm_t *member = pdp->peer; + struct ippoolm_t *member; const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; const struct icmpv6_hdr *ic6h = (struct icmpv6_hdr *) (pack + sizeof(*ip6h)); struct msgb *msg; OSMO_ASSERT(pdp); + + member = pdp->peer[0]; + OSMO_ASSERT(member); + if (member->addr.len == sizeof(struct in_addr)) /* ipv4v6 context */ + member = pdp->peer[1]; OSMO_ASSERT(member); if (len < sizeof(*ip6h)) { diff --git a/gtp/pdp.h b/gtp/pdp.h index f1d8ad6..b581952 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -26,6 +26,7 @@ #define PDP_EUA_ORG_IETF 0xF1 #define PDP_EUA_TYPE_v4 0x21 #define PDP_EUA_TYPE_v6 0x57 +#define PDP_EUA_TYPE_v4v6 0x8D /* GTP Information elements from 29.060 v3.9.0 7.7 Information Elements */ /* Also covers version 0. Note that version 0 6: QOS Profile was superceded * @@ -121,7 +122,7 @@ /* Parameters shared by all PDP context belonging to the same MS */ void *ipif; /* IP network interface */ - void *peer; /* Pointer to peer protocol */ + void *peer[2]; /* Pointer to peer protocol */ void *asap; /* Application specific service access point */ uint64_t imsi; /* International Mobile Subscriber Identity. */ diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..49431c2 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -253,33 +253,54 @@ } } -/*! Convert given PDP End User Address to in46_addr +/*! Convert given array of in46_addr to PDP End User Address + * \param[in] dst Array containing 1 or 2 in46_addr + * \param[out] eua End User Address structure to fill * \returns 0 on success; negative on error */ -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua) +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua) { - switch (src->len) { - case 4: - eua->l = 6; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v4; - memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ - break; - case 8: - case 16: - eua->l = 18; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v6; - memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ - break; - default: - OSMO_ASSERT(0); - return -1; + const struct in46_addr *src_v4, *src_v6; + if (size == 1) { + switch (src->len) { + case 4: + eua->l = 6; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4; + memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ + break; + case 8: + case 16: + eua->l = 18; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v6; + memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ + break; + default: + OSMO_ASSERT(0); + return -1; + } + return 0; } + + if (src[0].len == src[1].len) + return -1; /* we should have a v4 and a v6 address */ + + src_v4 = (src[0].len == 4) ? &src[0] : &src[1]; + src_v6 = (src[0].len == 4) ? &src[1] : &src[0]; + + eua->l = 22; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4v6; + memcpy(&eua->v[2], &src_v4->v4, 4); + memcpy(&eua->v[6], &src_v6->v6, 16); + return 0; } -/*! Convert given in46_addr to PDP End User Address - * \returns 0 on success; negative on error */ +/*! Convert given PDP End User Address to an array of in46_addr + * \param[in] eua End User Address structure to parse + * \param[out] dst Array containing 2 in46_addr + * \returns number of parsed addresses on success; negative on error */ int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst) { if (eua->l < 2) @@ -295,22 +316,46 @@ memcpy(&dst->v4, &eua->v[2], 4); /* Copy a 4 byte address */ else dst->v4.s_addr = 0; - break; + return 1; case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) memcpy(&dst->v6, &eua->v[2], 16); /* Copy a 16 byte address */ else memset(&dst->v6, 0, 16); - break; + return 1; + case PDP_EUA_TYPE_v4v6: + /* 3GPP TS 29 00, section 7.7.27 */ + switch (eua->l) { + case 2: /* v4 & v6 dynamic */ + dst[0].v4.s_addr = 0; + memset(&dst[1].v6, 0, 16); + break; + case 6: /* v4 static, v6 dynamic */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memset(&dst[1].v6, 0, 16); + break; + case 18: /* v4 dynamic, v6 static */ + dst[0].v4.s_addr = 0; + memcpy(&dst[1].v6, &eua->v[2], 16); + break; + case 22: /* v4 & v6 static */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memcpy(&dst[1].v6, &eua->v[6], 16); + break; + default: + return -1; + } + dst[0].len = 4; + dst[1].len = 16; + return 2; default: return -1; } - return 0; default_to_dyn_v4: /* assume dynamic IPv4 by default */ dst->len = 4; dst->v4.s_addr = 0; - return 0; + return 1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..e4654cc 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -29,5 +29,5 @@ extern int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen); unsigned int in46a_netmasklen(const struct in46_addr *netmask); -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua); +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..300183b 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1617,7 +1617,7 @@ /* Otherwise it is deallocated by gtplib */ pdp_newpdp(&pdp, myimsi, options.nsapi, NULL); - pdp->peer = &iparr[n]; + pdp->peer[0] = &iparr[n]; /* FIXME: support v4v6, have 2 peers */ pdp->ipif = tun; /* TODO */ iparr[n].pdp = pdp; diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index c0bb670..b22da16 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -137,7 +137,7 @@ #endif /* IPv4 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia4, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); @@ -154,7 +154,7 @@ printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); @@ -173,14 +173,14 @@ /* unspecified V4 */ memcpy(eua.v, v4_unspec, sizeof(v4_unspec)); eua.l = sizeof(v4_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); /* specified V4 */ memcpy(eua.v, v4_spec, sizeof(v4_spec)); eua.l = sizeof(v4_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); } @@ -278,19 +278,41 @@ }; struct ul66_t eua; - printf("testing in46a_to_eua() with IPv6 addresses\n"); + printf("Testing in46a_to_eua() with IPv6 addresses\n"); /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia6, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_to_eua_v4v6() { + const struct in46_addr ia_v4v6[2] = { + { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }, + { + .len = 4, + .v4.s_addr = 0x0d0c0b0a, + } + }; + struct ul66_t eua; + printf("Testing in46a_to_eua() with IPv4v6 addresses\n"); + + /* IPv4 address */ + OSMO_ASSERT(in46a_to_eua(ia_v4v6, 2, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4v6); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); + OSMO_ASSERT(!memcmp(&eua.v[6], &g_ia6.v6, 16)); } static void test_in46a_from_eua_v6(void) @@ -308,16 +330,65 @@ /* unspecified V6 */ memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); /* specified V6 */ memcpy(eua.v, v6_spec, sizeof(v6_spec)); eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_from_eua_v4v6(void) { + struct in46_addr ia[2]; + struct ul66_t eua; + const uint8_t v4_unspec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6 }; + const uint8_t v4_spec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4 }; + const uint8_t v4_unspec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + const uint8_t v4_spec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv4v6 addresses\n"); + + /* unspecified V4 & V6 */ + memcpy(eua.v, v4_unspec_v6_unspec, sizeof(v4_unspec_v6_unspec)); + eua.l = sizeof(v4_unspec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* specified V4, unspecified V6 */ + memcpy(eua.v, v4_spec_v6_unspec, sizeof(v4_spec_v6_unspec)); + eua.l = sizeof(v4_spec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* unspecified V4, specified V6 */ + memcpy(eua.v, v4_unspec_v6_spec, sizeof(v4_unspec_v6_spec)); + eua.l = sizeof(v4_unspec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_unspec_v6_spec+2, ia[1].len)); + + /* specified V4, specified V6 */ + memcpy(eua.v, v4_spec_v6_spec, sizeof(v4_spec_v6_spec)); + eua.l = sizeof(v4_spec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_spec_v6_spec+6, ia[1].len)); } static void test_in46a_netmasklen_v6(void) @@ -378,6 +449,8 @@ test_in46a_equal_v6(); test_in46a_to_eua_v6(); test_in46a_from_eua_v6(); + test_in46a_to_eua_v4v6(); + test_in46a_from_eua_v4v6(); test_in46a_netmasklen_v6(); } return 0; diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok index d092591..10dc7f4 100644 --- a/tests/lib/in46a_v6_test.ok +++ b/tests/lib/in46a_v6_test.ok @@ -3,6 +3,8 @@ Testing in46a_ntop() with IPv6 addresses res = 102:304:506:708:90a:b0c:d0e:f10 Testing in46a_equal() with IPv6 addresses -testing in46a_to_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv6 addresses Testing in46a_from_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv4v6 addresses +Testing in46a_from_eua() with IPv4v6 addresses Testing in46a_netmasklen() with IPv6 addresses -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 6 19:23:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 6 Dec 2017 19:23:43 +0000 Subject: [PATCH] osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5216 to look at the new patch set (#2). Add support for IPv4v6 End User Addresses Before this commit, when an MS requested an ipv4v6 context osmo-ggsn returned an error stating the type was unknown, and this text was printed in the log: Processing create PDP context request for APN 'ims' Cannot decode EUA from MS/SGSN: f1 8d This patch has been tested with an MS running the 3 types of addresses: - IPv4 and IPv6: no regressions observed, the context is activated and packets are sent to the ggsn. - IPv4v6: Wireshark correctly parses request and reponse, and then ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and IPv6 DNS addresses advertised and TCP traffic over IPv4 (because probably my IPv6 network setup is not correct). I also checked I can disable/enable data (pdp ctx delete and activate) several times without any issue. Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 --- M ggsn/ggsn.c M ggsn/icmpv6.c M gtp/pdp.h M lib/in46_addr.c M lib/in46_addr.h M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c M tests/lib/in46a_v6_test.ok 8 files changed, 218 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5216/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1c1276f..eba7c2a 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -335,17 +335,23 @@ static int delete_context(struct pdp_t *pdp) { struct gsn_t *gsn = pdp->gsn; - struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; struct apn_ctx *apn = pdp->priv; + struct ippoolm_t *member; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); - struct ippoolm_t *member = pdp->peer; - if (pdp->peer) { + if (pdp->peer[0]) { + member = pdp->peer[0]; send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ - ippool_freeip(ipp->pool, ipp); + ippool_freeip(member->pool, member); } else LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + + if (pdp->peer[1]) { /* ipv4v6 */ + member = pdp->peer[1]; + send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ + ippool_freeip(member->pool, member); + } if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", @@ -512,10 +518,10 @@ static char name_buf[256]; struct gsn_t *gsn = pdp->gsn; struct ggsn_ctx *ggsn = gsn->priv; - struct in46_addr addr; - struct ippoolm_t *member; + struct in46_addr addr[2]; + struct ippoolm_t *member = NULL; struct apn_ctx *apn; - int rc; + int rc, num_addr, i; osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); @@ -550,55 +556,63 @@ memcpy(pdp->qos_neg.v, pdp->qos_req.v, pdp->qos_req.l); /* TODO */ pdp->qos_neg.l = pdp->qos_req.l; - if (in46a_from_eua(&pdp->eua, &addr)) { + memset(addr, 0, sizeof(addr[0])*2); + if ((num_addr = in46a_from_eua(&pdp->eua, addr)) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot decode EUA from MS/SGSN: %s\n", osmo_hexdump(pdp->eua.v, pdp->eua.l)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_UNKNOWN_PDP); return 0; } - if (addr.len == sizeof(struct in_addr)) { - /* does this APN actually have an IPv4 pool? */ - if (!apn_supports_ipv4(apn)) - goto err_wrong_af; + /* Allocate dynamic addresses from the pool */ + for (i = 0; i < num_addr; i++) { + if (addr[i].len == sizeof(struct in_addr)) { + /* does this APN actually have an IPv4 pool? */ + if (!apn_supports_ipv4(apn)) + goto err_wrong_af; - rc = ippool_newip(apn->v4.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - in46a_to_eua(&member->addr, &pdp->eua); + rc = ippool_newip(apn->v4.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + /* copy back */ + memcpy(&addr[i].v4.s_addr, &member->addr.v4, 4); + } else if (addr[i].len == sizeof(struct in6_addr)) { + + /* does this APN actually have an IPv6 pool? */ + if (!apn_supports_ipv6(apn)) + goto err_wrong_af; + + rc = ippool_newip(apn->v6.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + + /* IPv6 doesn't really send the real/allocated address at this point, but just + * the link-identifier which the MS shall use for router solicitation */ + /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ + memcpy(addr[i].v6.s6_addr, &member->addr.v6, 8); + /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ + memcpy(addr[i].v6.s6_addr+8, &member->addr.v6, 8); + } else + OSMO_ASSERT(0); + + pdp->peer[i] = member; + member->peer = pdp; + } + + in46a_to_eua(addr, num_addr, &pdp->eua); + + if (apn_supports_ipv4(apn)) { /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } - } else if (addr.len == sizeof(struct in6_addr)) { - struct in46_addr tmp; + } - /* does this APN actually have an IPv6 pool? */ - if (!apn_supports_ipv6(apn)) - goto err_wrong_af; - - rc = ippool_newip(apn->v6.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - - /* IPv6 doesn't really send the real/allocated address at this point, but just - * the link-identifier which the MS shall use for router solicitation */ - tmp.len = addr.len; - /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ - memcpy(tmp.v6.s6_addr, &member->addr.v6, 8); - /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ - memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); - in46a_to_eua(&tmp, &pdp->eua); - } else - OSMO_ASSERT(0); - - pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ pdp->priv = apn; - member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index 11ced24..6564a54 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -183,12 +183,17 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *own_ll_addr, const uint8_t *pack, unsigned len) { - struct ippoolm_t *member = pdp->peer; + struct ippoolm_t *member; const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; const struct icmpv6_hdr *ic6h = (struct icmpv6_hdr *) (pack + sizeof(*ip6h)); struct msgb *msg; OSMO_ASSERT(pdp); + + member = pdp->peer[0]; + OSMO_ASSERT(member); + if (member->addr.len == sizeof(struct in_addr)) /* ipv4v6 context */ + member = pdp->peer[1]; OSMO_ASSERT(member); if (len < sizeof(*ip6h)) { diff --git a/gtp/pdp.h b/gtp/pdp.h index f1d8ad6..b581952 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -26,6 +26,7 @@ #define PDP_EUA_ORG_IETF 0xF1 #define PDP_EUA_TYPE_v4 0x21 #define PDP_EUA_TYPE_v6 0x57 +#define PDP_EUA_TYPE_v4v6 0x8D /* GTP Information elements from 29.060 v3.9.0 7.7 Information Elements */ /* Also covers version 0. Note that version 0 6: QOS Profile was superceded * @@ -121,7 +122,7 @@ /* Parameters shared by all PDP context belonging to the same MS */ void *ipif; /* IP network interface */ - void *peer; /* Pointer to peer protocol */ + void *peer[2]; /* Pointer to peer protocol */ void *asap; /* Application specific service access point */ uint64_t imsi; /* International Mobile Subscriber Identity. */ diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..dda2ef9 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -253,33 +253,54 @@ } } -/*! Convert given PDP End User Address to in46_addr +/*! Convert given array of in46_addr to PDP End User Address + * \param[in] dst Array containing 1 or 2 in46_addr + * \param[out] eua End User Address structure to fill * \returns 0 on success; negative on error */ -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua) +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua) { - switch (src->len) { - case 4: - eua->l = 6; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v4; - memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ - break; - case 8: - case 16: - eua->l = 18; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v6; - memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ - break; - default: - OSMO_ASSERT(0); - return -1; + const struct in46_addr *src_v4, *src_v6; + if (size == 1) { + switch (src->len) { + case 4: + eua->l = 6; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4; + memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ + break; + case 8: + case 16: + eua->l = 18; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v6; + memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ + break; + default: + OSMO_ASSERT(0); + return -1; + } + return 0; } + + if (src[0].len == src[1].len) + return -1; /* we should have a v4 and a v6 address */ + + src_v4 = (src[0].len == 4) ? &src[0] : &src[1]; + src_v6 = (src[0].len == 4) ? &src[1] : &src[0]; + + eua->l = 22; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4v6; + memcpy(&eua->v[2], &src_v4->v4, 4); + memcpy(&eua->v[6], &src_v6->v6, 16); + return 0; } -/*! Convert given in46_addr to PDP End User Address - * \returns 0 on success; negative on error */ +/*! Convert given PDP End User Address to an array of in46_addr + * \param[in] eua End User Address structure to parse + * \param[out] dst Array containing 2 in46_addr + * \returns number of parsed addresses on success; negative on error */ int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst) { if (eua->l < 2) @@ -295,22 +316,46 @@ memcpy(&dst->v4, &eua->v[2], 4); /* Copy a 4 byte address */ else dst->v4.s_addr = 0; - break; + return 1; case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) memcpy(&dst->v6, &eua->v[2], 16); /* Copy a 16 byte address */ else memset(&dst->v6, 0, 16); - break; + return 1; + case PDP_EUA_TYPE_v4v6: + /* 3GPP TS 29.060, section 7.7.27 */ + switch (eua->l) { + case 2: /* v4 & v6 dynamic */ + dst[0].v4.s_addr = 0; + memset(&dst[1].v6, 0, 16); + break; + case 6: /* v4 static, v6 dynamic */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memset(&dst[1].v6, 0, 16); + break; + case 18: /* v4 dynamic, v6 static */ + dst[0].v4.s_addr = 0; + memcpy(&dst[1].v6, &eua->v[2], 16); + break; + case 22: /* v4 & v6 static */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memcpy(&dst[1].v6, &eua->v[6], 16); + break; + default: + return -1; + } + dst[0].len = 4; + dst[1].len = 16; + return 2; default: return -1; } - return 0; default_to_dyn_v4: /* assume dynamic IPv4 by default */ dst->len = 4; dst->v4.s_addr = 0; - return 0; + return 1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..e4654cc 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -29,5 +29,5 @@ extern int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen); unsigned int in46a_netmasklen(const struct in46_addr *netmask); -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua); +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..300183b 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1617,7 +1617,7 @@ /* Otherwise it is deallocated by gtplib */ pdp_newpdp(&pdp, myimsi, options.nsapi, NULL); - pdp->peer = &iparr[n]; + pdp->peer[0] = &iparr[n]; /* FIXME: support v4v6, have 2 peers */ pdp->ipif = tun; /* TODO */ iparr[n].pdp = pdp; diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index c0bb670..b22da16 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -137,7 +137,7 @@ #endif /* IPv4 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia4, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); @@ -154,7 +154,7 @@ printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); @@ -173,14 +173,14 @@ /* unspecified V4 */ memcpy(eua.v, v4_unspec, sizeof(v4_unspec)); eua.l = sizeof(v4_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); /* specified V4 */ memcpy(eua.v, v4_spec, sizeof(v4_spec)); eua.l = sizeof(v4_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); } @@ -278,19 +278,41 @@ }; struct ul66_t eua; - printf("testing in46a_to_eua() with IPv6 addresses\n"); + printf("Testing in46a_to_eua() with IPv6 addresses\n"); /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia6, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_to_eua_v4v6() { + const struct in46_addr ia_v4v6[2] = { + { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }, + { + .len = 4, + .v4.s_addr = 0x0d0c0b0a, + } + }; + struct ul66_t eua; + printf("Testing in46a_to_eua() with IPv4v6 addresses\n"); + + /* IPv4 address */ + OSMO_ASSERT(in46a_to_eua(ia_v4v6, 2, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4v6); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); + OSMO_ASSERT(!memcmp(&eua.v[6], &g_ia6.v6, 16)); } static void test_in46a_from_eua_v6(void) @@ -308,16 +330,65 @@ /* unspecified V6 */ memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); /* specified V6 */ memcpy(eua.v, v6_spec, sizeof(v6_spec)); eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_from_eua_v4v6(void) { + struct in46_addr ia[2]; + struct ul66_t eua; + const uint8_t v4_unspec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6 }; + const uint8_t v4_spec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4 }; + const uint8_t v4_unspec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + const uint8_t v4_spec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv4v6 addresses\n"); + + /* unspecified V4 & V6 */ + memcpy(eua.v, v4_unspec_v6_unspec, sizeof(v4_unspec_v6_unspec)); + eua.l = sizeof(v4_unspec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* specified V4, unspecified V6 */ + memcpy(eua.v, v4_spec_v6_unspec, sizeof(v4_spec_v6_unspec)); + eua.l = sizeof(v4_spec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* unspecified V4, specified V6 */ + memcpy(eua.v, v4_unspec_v6_spec, sizeof(v4_unspec_v6_spec)); + eua.l = sizeof(v4_unspec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_unspec_v6_spec+2, ia[1].len)); + + /* specified V4, specified V6 */ + memcpy(eua.v, v4_spec_v6_spec, sizeof(v4_spec_v6_spec)); + eua.l = sizeof(v4_spec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_spec_v6_spec+6, ia[1].len)); } static void test_in46a_netmasklen_v6(void) @@ -378,6 +449,8 @@ test_in46a_equal_v6(); test_in46a_to_eua_v6(); test_in46a_from_eua_v6(); + test_in46a_to_eua_v4v6(); + test_in46a_from_eua_v4v6(); test_in46a_netmasklen_v6(); } return 0; diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok index d092591..10dc7f4 100644 --- a/tests/lib/in46a_v6_test.ok +++ b/tests/lib/in46a_v6_test.ok @@ -3,6 +3,8 @@ Testing in46a_ntop() with IPv6 addresses res = 102:304:506:708:90a:b0c:d0e:f10 Testing in46a_equal() with IPv6 addresses -testing in46a_to_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv6 addresses Testing in46a_from_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv4v6 addresses +Testing in46a_from_eua() with IPv4v6 addresses Testing in46a_netmasklen() with IPv6 addresses -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 02:07:12 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 7 Dec 2017 02:07:12 +0000 Subject: [PATCH] osmocom-bb[master]: target/firmware: fix Mediatek firmware compilation Message-ID: Review at https://gerrit.osmocom.org/5217 target/firmware: fix Mediatek firmware compilation The existing Makefile.mtk isn't compatible with the current Makefile scheme, so nothing would happen when it was called. This change updates the Makefile.mtk, so the Mediatek firmware can be successfully compiled again. Change-Id: Iecd619ed862f4d825095292ffde50544e647f6ff --- M src/target/firmware/Makefile.mtk 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/5217/1 diff --git a/src/target/firmware/Makefile.mtk b/src/target/firmware/Makefile.mtk index 30fa2fc..927e31a 100644 --- a/src/target/firmware/Makefile.mtk +++ b/src/target/firmware/Makefile.mtk @@ -4,14 +4,16 @@ # List of all applications (meant to be overridden on command line) APPLICATIONS?=loader_mtk -mtkram_LDS=board/mediatek/ram.lds -mtkram_OBJS=board/mediatek/start.ram.o +APP_loader_mtk_ENVIRONMENTS=mtkram + +ENV_mtkram_LDS=board/mediatek/ram.lds +ENV_mtkram_OBJS=board/mediatek/start.ram.o mtk_COMMON_OBJS=board/mediatek/uart.o # Mediatek MT62xx -mt62xx_OBJS=$(mtk_COMMON_OBJS) board/mt62xx/init.o -mt62xx_ENVIRONMENTS=mtkram +BOARD_mt62xx_OBJS=$(mtk_COMMON_OBJS) board/mt62xx/init.o +BOARD_mt62xx_ENVIRONMENTS=mtkram # Global include path INCLUDES=-Iinclude/ -I../../../include -I../../shared/libosmocore/include -- To view, visit https://gerrit.osmocom.org/5217 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecd619ed862f4d825095292ffde50544e647f6ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Dec 7 03:10:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 03:10:33 +0000 Subject: osmo-bsc[master]: mgcp: cosmetic fixups In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 03:28:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 03:28:05 +0000 Subject: osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Patch Set 1: (6 comments) seems to me a lot of nice tries but no firm grip on the problem. BTW, parallel build of osmo-bsc hasn't failed for me (TM) yet. Is there a particular reason why it started failing for you? https://gerrit.osmocom.org/#/c/5084/1//COMMIT_MSG Commit Message: Line 10: libcommon-cs but neither libbsc itself nor tests using it are actually AFAIK linking happens only when compiling an executable like osmo-bsc, and for compiling libbsc the ordering doesn't matter. What you want is that all the libs are built before the tests are built? https://gerrit.osmocom.org/#/c/5084/1/src/Makefile.am File src/Makefile.am: Line 25: libcommon-cs \ > I'm not 100% sure but I think that parallel make takes this into account. A did you mean "make -j"? It must be "coincidence", i.e. libcommon-cs comes up a bit sooner and hence may already be built when linking a test. It is not a guarantee to work. I don't know a sure way of tying dependencies in other dirs for parallel builds... I think at some point I did a '$(make) -C ../foo target' but that's ugly. One way to un-parallelize is used in some Makefile.am for external tests: have a single make target running the parts in sequence explicitly. Unfortunately not an option for SUBDIRS. https://gerrit.osmocom.org/#/c/5084/1/src/libbsc/Makefile.am File src/libbsc/Makefile.am: Line 20: libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a We're not linking dependencies when building a library, are we? https://gerrit.osmocom.org/#/c/5084/1/src/libbsc/gsm_04_08_utils.c File src/libbsc/gsm_04_08_utils.c: Line 32: #include does this fix compiler warnings? Otherwise it's not necessary. https://gerrit.osmocom.org/#/c/5084/1/tests/abis/Makefile.am File tests/abis/Makefile.am: Line 30: $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ if any build worked before linking this, then how is it necessary to link this now? https://gerrit.osmocom.org/#/c/5084/1/tests/nanobts_omlattr/Makefile.am File tests/nanobts_omlattr/Makefile.am: Line 29: $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ if any build worked before linking this, then how is it necessary to link this now? -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 7 03:29:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 03:29:03 +0000 Subject: osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5084/1//COMMIT_MSG Commit Message: Line 7: Fix tests linking BTW, summary is too general / not accurate -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 7 10:47:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 10:47:56 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-DL: fix misleading idle time check Message-ID: Review at https://gerrit.osmocom.org/5218 TBF-DL: fix misleading idle time check The dl_tbf_idle_msec is uint32_t so it cannot be < 0. Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/5218/1 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..193b749 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1252,7 +1252,7 @@ { int keep_time_frames; - if (bts_data()->dl_tbf_idle_msec <= 0) + if (!bts_data()->dl_tbf_idle_msec) return false; keep_time_frames = msecs_to_frames(bts_data()->dl_tbf_idle_msec); -- To view, visit https://gerrit.osmocom.org/5218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 7 11:09:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 11:09:11 +0000 Subject: [PATCH] osmo-bsc[master]: OML: expand status reporting checks In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5092 to look at the new patch set (#3). OML: expand status reporting checks * check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked than report it as degraded * check TRX usability: use already available function to check that TRX is actually usable when reporting OML status via CTRL * fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is defined in libcommon-cs but neither libbsc itself nor tests using it are actually linked against libcommon-cs Related: OS#2486 Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc --- M src/libbsc/Makefile.am M src/libbsc/abis_nm.c M tests/abis/Makefile.am M tests/nanobts_omlattr/Makefile.am 4 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/5092/3 diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..fc12d05 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -17,6 +17,8 @@ libbsc.a \ $(NULL) +libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a + libbsc_a_SOURCES = \ abis_nm.c \ abis_nm_vty.c \ diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index 2c84ba7..33af213 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -46,6 +46,7 @@ #include #include #include +#include #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -691,9 +692,25 @@ if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) return false; + if (bts->gprs.mode != BTS_GPRS_NONE) { + if (bts->gprs.cell.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nse.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nsvc[0].mo.nm_state.administrative == NM_STATE_LOCKED && + bts->gprs.nsvc[1].mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + } + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + + if (!trx_is_usable(trx)) + return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) return false; } diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 1c5dede..8dc6248 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -27,6 +27,7 @@ abis_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 8b5e116..4b49518 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -26,6 +26,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 11:09:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 11:09:55 +0000 Subject: [ABANDON] osmo-bsc[master]: OML: check TRX usability when reporting In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: OML: check TRX usability when reporting ...................................................................... Abandoned Superseded. -- To view, visit https://gerrit.osmocom.org/5085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3f5f95b9d6cd00fa437bfbe89cc7ecdd87d2801a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 11:10:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 11:10:27 +0000 Subject: [ABANDON] osmo-bsc[master]: Fix tests linking In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Fix tests linking ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Dec 7 11:12:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 11:12:29 +0000 Subject: [PATCH] osmo-bsc[master]: OML: expand status reporting checks In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5092 to look at the new patch set (#4). OML: expand status reporting checks * check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked than report it as degraded * check TRX usability: use already available function to check that TRX is actually usable when reporting OML status via CTRL * fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is defined in libcommon-cs but neither libbsc itself nor tests using it are actually linked against libcommon-cs Related: OS#2486 Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc --- M src/Makefile.am M src/libbsc/Makefile.am M src/libbsc/abis_nm.c M tests/abis/Makefile.am M tests/nanobts_omlattr/Makefile.am 5 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/5092/4 diff --git a/src/Makefile.am b/src/Makefile.am index dd1ad3d..454bf26 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,10 +22,10 @@ # Libraries SUBDIRS = \ libcommon \ + libcommon-cs \ libbsc \ libtrau \ libfilter \ - libcommon-cs \ $(NULL) # Programs diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..fc12d05 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -17,6 +17,8 @@ libbsc.a \ $(NULL) +libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a + libbsc_a_SOURCES = \ abis_nm.c \ abis_nm_vty.c \ diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index 2c84ba7..33af213 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -46,6 +46,7 @@ #include #include #include +#include #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -691,9 +692,25 @@ if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) return false; + if (bts->gprs.mode != BTS_GPRS_NONE) { + if (bts->gprs.cell.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nse.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nsvc[0].mo.nm_state.administrative == NM_STATE_LOCKED && + bts->gprs.nsvc[1].mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + } + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + + if (!trx_is_usable(trx)) + return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) return false; } diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 1c5dede..8dc6248 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -27,6 +27,7 @@ abis_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 8b5e116..4b49518 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -26,6 +26,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 12:59:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 12:59:21 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: meas_test: fix section comment In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5210 to look at the new patch set (#2). cosmetic: meas_test: fix section comment Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 --- M tests/meas/meas_test.c M tests/meas/meas_test.ok 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/5210/2 diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c index 6c514ca..acebab5 100644 --- a/tests/meas/meas_test.c +++ b/tests/meas/meas_test.c @@ -125,7 +125,7 @@ printf("\n"); printf("***********************\n"); - printf("*** FULL RATE TESTS ***\n"); + printf("*** HALF RATE TESTS ***\n"); printf("***********************\n"); /* Test half rate */ diff --git a/tests/meas/meas_test.ok b/tests/meas/meas_test.ok index 2b76604..6dbda54 100644 --- a/tests/meas/meas_test.ok +++ b/tests/meas/meas_test.ok @@ -180,7 +180,7 @@ Testing: ts[7]->lchan[0], fn=12167=>012167/09/25/29/31, fn%104=103, rc=1, delta=13 *********************** -*** FULL RATE TESTS *** +*** HALF RATE TESTS *** *********************** -- To view, visit https://gerrit.osmocom.org/5210 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 12:59:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 12:59:26 +0000 Subject: osmo-bts[master]: cosmetic: meas_test: fix section comment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5210 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 12:59:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 12:59:28 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: meas_test: fix section comment In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: meas_test: fix section comment ...................................................................... cosmetic: meas_test: fix section comment Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 --- M tests/meas/meas_test.c M tests/meas/meas_test.ok 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c index 6c514ca..acebab5 100644 --- a/tests/meas/meas_test.c +++ b/tests/meas/meas_test.c @@ -125,7 +125,7 @@ printf("\n"); printf("***********************\n"); - printf("*** FULL RATE TESTS ***\n"); + printf("*** HALF RATE TESTS ***\n"); printf("***********************\n"); /* Test half rate */ diff --git a/tests/meas/meas_test.ok b/tests/meas/meas_test.ok index 2b76604..6dbda54 100644 --- a/tests/meas/meas_test.ok +++ b/tests/meas/meas_test.ok @@ -180,7 +180,7 @@ Testing: ts[7]->lchan[0], fn=12167=>012167/09/25/29/31, fn%104=103, rc=1, delta=13 *********************** -*** FULL RATE TESTS *** +*** HALF RATE TESTS *** *********************** -- To view, visit https://gerrit.osmocom.org/5210 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id228620ccf5a40c8089ae1914d59b19e808ea151 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 13:00:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 13:00:30 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: tests/Makefile.am: remove excess whitespace In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5211 to look at the new patch set (#2). cosmetic: tests/Makefile.am: remove excess whitespace Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/5211/2 diff --git a/tests/Makefile.am b/tests/Makefile.am index 18b8ce6..1eb28d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,22 +21,22 @@ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' - + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) TESTSUITE = $(srcdir)/testsuite DISTCLEANFILES = atconfig - + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) - + installcheck-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ $(TESTSUITEFLAGS) - + clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean - + AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 13:00:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 13:00:33 +0000 Subject: osmo-bts[master]: cosmetic: tests/Makefile.am: remove excess whitespace In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 13:01:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 13:01:22 +0000 Subject: osmo-bts[master]: cosmetic: remove unused variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5212/1//COMMIT_MSG Commit Message: Line 7: cosmetic: remove unused variable I edited the other two patches but stopping now: please have more concise summaries, at least name the rough area of the code. -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 7 13:01:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 13:01:41 +0000 Subject: osmo-bts[master]: cosmetic: remove unused variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 summary: ETOOGENERAL -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 13:15:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 13:15:26 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (12 comments) mostly just a bunch of less important cosmetic comments, but one -1 near the end https://gerrit.osmocom.org/#/c/5214/1//COMMIT_MSG Commit Message: Line 10: ith a slince frame. This may cause unpleasant audio effects. ith slince? Line 12: Add a function to craft a replacement frame from the last ideally name the function Line 13: known good frame. Add ecu_fr_test. https://gerrit.osmocom.org/#/c/5214/1/include/osmo-bts/ecu_fr.h File include/osmo-bts/ecu_fr.h: Line 19: */ (usually no license header in .h files, but a short summary would be nice) https://gerrit.osmocom.org/#/c/5214/1/include/osmo-bts/gsm_data_shared.h File include/osmo-bts/gsm_data_shared.h: Line 19: #include (unrelated ws) https://gerrit.osmocom.org/#/c/5214/1/src/common/ecu_fr.c File src/common/ecu_fr.c: Line 1: /* (C) 2017 by sysmocom s.f.m.c. GmbH from Harald's recent comment we should put a dash before s.f.m.c. Line 303: /* Helper function to reduce the XMAXC field. When the XMAXC field reaches (almost any API is a "helper function" :) -- just say what it does, same below) Line 364: LOGP(DL1P, LOGL_ERROR, "Wrong number of bits unpacked!\n"); a bit more context, like at least say we failed to unpack an FR frame Line 377: goto abort; semantically it's not an abort, right? Line 383: goto abort; -1: unreachable code, the goto is not useful anyhow Line 384: LOGP(DL1P, LOGL_ERROR, "Wrong number of bits packed!\n"); context https://gerrit.osmocom.org/#/c/5214/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: Line 1113: if (bfi_flag == false && tch_mode == GSM48_CMODE_SPEECH_V1) if (!bfi_flag... -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:07:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 14:07:56 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5158 to look at the new patch set (#3). TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. The test output tweaking is required due to T3169 change. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 7 files changed, 171 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/3 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..9a559f9 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..8bd0d29 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -56,6 +57,14 @@ OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), { 0, NULL } +}; + +static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T3169), + OSMO_VALUE_STRING(T3191), + OSMO_VALUE_STRING(T3193), + OSMO_VALUE_STRING(T3195), + { 0, NULL } }; static const struct rate_ctr_desc tbf_ctr_description[] = { @@ -183,6 +192,7 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T31, 0, sizeof(T31)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -394,7 +404,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -465,6 +475,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -550,9 +561,24 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { - return stop_timer("T3191"); + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to stop unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (osmo_timer_pending(&T31[t])) { + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + osmo_timer_del(&T31[t]); + } +} + +void gprs_rlcmac_tbf::stop_timers(const char *reason) { + uint8_t i; + for (i = 0; i < T_MAX; i++) + t_stop((enum tbf_timers)i, reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -562,6 +588,61 @@ tbf_name(this), T, reason); osmo_timer_del(&timer); } +} + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) +{ + LOGP(DRLCMAC, LOGL_NOTICE, "%s %s timeout expired, freeing TBF\n", + tbf_name(tbf), get_value_string(tbf_timers_names, t)); + + if (run_diag) + tbf->rlcmac_diag(); + + tbf_free(tbf); +} + +#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); } + +T_CBACK(T3169, true) +T_CBACK(T3191, true) +T_CBACK(T3193, false) +T_CBACK(T3195, true) + +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +{ + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to start unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (!force && osmo_timer_pending(&T31[t])) + return; + + LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", + tbf_name(this), osmo_timer_pending(&T31[t]) ? "re" : "", + get_value_string(tbf_timers_names, t), reason, sec, microsec); + + T31[t].data = this; + + switch(t) { + case T3169: + T31[t].cb = cb_T3169; + break; + case T3191: + T31[t].cb = cb_T3191; + break; + case T3193: + T31[t].cb = cb_T3193; + break; + case T3195: + T31[t].cb = cb_T3195; + break; + default: + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + osmo_timer_schedule(&T31[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -663,7 +744,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -685,7 +766,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +788,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +814,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1004,6 +1085,7 @@ tbf->handle_timeout(); } +/* FIXME: remove this once the switch over to t_start*()/t_stop*() is complete */ void gprs_rlcmac_tbf::handle_timeout() { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", @@ -1011,64 +1093,51 @@ num_T_exp++; - switch (T) { - case 0: /* assignment */ - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { - if (state_is(GPRS_RLCMAC_ASSIGN)) { - LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " - "PACCH assignment timeout.\n", tbf_name(this)); - tbf_free(this); - return; - } else - LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not " - "in assign state\n", tbf_name(this)); - } - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { - gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); - dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { - tbf_assign_control_ts(dl_tbf); - - if (!dl_tbf->upgrade_to_multislot) { - /* change state to FLOW, so scheduler - * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); - break; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - dl_tbf->update(); - - dl_tbf->trigger_ass(dl_tbf); - } else - LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after " - "IMM.ASS confirm\n", tbf_name(dl_tbf)); - } - break; - case 3169: - case 3191: - case 3195: - LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " - "transsmission\n", tbf_name(this), T); - rlcmac_diag(); - /* fall through */ - case 3193: - LOGP(DRLCMAC, LOGL_DEBUG, - "%s will be freed due to timeout\n", tbf_name(this)); - /* free TBF */ - tbf_free(this); + if (T) { + LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", + tbf_name(this), T); return; - break; - default: - LOGP(DRLCMAC, LOGL_ERROR, - "%s timer expired in unknown mode: %u\n", tbf_name(this), T); + } + + /* assignment */ + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { + if (state_is(GPRS_RLCMAC_ASSIGN)) { + LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to PACCH assignment timeout.\n", + tbf_name(this)); + tbf_free(this); + return; + } else + LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not in assign state\n", + tbf_name(this)); + } + + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); + dl_tbf->m_wait_confirm = 0; + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { + tbf_assign_control_ts(dl_tbf); + + if (!dl_tbf->upgrade_to_multislot) { + /* change state to FLOW, so scheduler + * will start transmission */ + dl_tbf->set_state(GPRS_RLCMAC_FLOW); + return; + } + + /* This tbf can be upgraded to use multiple DL + * timeslots and now that there is already one + * slot assigned send another DL assignment via + * PDCH. */ + + /* keep to flags */ + dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + dl_tbf->update(); + + dl_tbf->trigger_ass(dl_tbf); + } else + LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after IMM.ASS confirm\n", + tbf_name(dl_tbf)); } } diff --git a/src/tbf.h b/src/tbf.h index 80249df..cdb4858 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -136,6 +136,24 @@ TBF_CTR_EGPRS_UL_MCS9, }; +enum tbf_timers { + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + T3169, + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + T3191, + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + T3193, + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + T3195, + T_MAX +}; + #define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */ #define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */ #define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */ @@ -175,7 +193,9 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + void t_stop(enum tbf_timers t, const char *reason); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -248,6 +268,8 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ unsigned int num_T_exp; /* number of consecutive T expirations */ + + struct osmo_timer_list T31[T_MAX]; /* T31xx timers */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..eb4334c 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -489,6 +489,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -658,7 +659,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + t_stop(T3191, "ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -861,7 +862,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1124,9 +1125,8 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - tbf_timer_start(this, 3193, - bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + "release (DL-TBF)", true); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..c2cedc7 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..18d8444 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,7 +51,7 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(osmo_timer_pending(&tbf->T31[T3191]) || osmo_timer_pending(&tbf->T31[T3193])); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) OSMO_ASSERT(tbf->T != 0); } diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f534c54..f09f732 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1897,8 +1897,15 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) IMSI 0011223344: moving DL TBF to new MS object Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Attaching TBF to MS object, TLLI = 0xf5667788, TBF = TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) +UL RSSI of TLLI=0xf1223344: 31 dBm +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) stopping timer T3169 [freeing TBF] +PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 1 TBFs, USFs = 02, TFIs = 00000002. +Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) +********** TBF ends here ********** Modifying MS object, TLLI = 0xf5667788, IMSI '' -> '0011223344' Clearing MS object, TLLI: 0xf1223344, IMSI: '0011223344' +Destroying MS object, TLLI = 0x00000000 TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) append Modifying MS object, TLLI: 0xf5667788 confirmed New MS: TLLI = 0xf5667788, TA = 7, IMSI = 0011223344, LLC = 1 -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:07:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 14:07:56 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5182 to look at the new patch set (#2). TBF: add N3101 counter Properly reset the counter when receiving valid RLCMAC block and update it when no data is received as per 3GPP TS 44.060 ?8.1.1.1 Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Fixes: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h 3 files changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/5182/2 diff --git a/src/bts.cpp b/src/bts.cpp index 9a559f9..29b743c 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -994,6 +994,10 @@ ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); LOGP(DRLCMAC, LOGL_DEBUG, "RX: [PCU <- BTS] %s Packet Control Ack\n", tbf_name(tbf)); @@ -1186,6 +1190,9 @@ return; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + if (tbf->handle_ack_nack()) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered downlink ack for %s\n", tbf_name(tbf)); @@ -1249,6 +1256,9 @@ "wrong TFI=%d, ignoring!\n", tfi); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; if (tbf->handle_ack_nack()) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered EGPRS downlink ack for %s\n", tbf_name(tbf)); @@ -1422,6 +1432,9 @@ LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n", tbf_name(dl_tbf)); + + /* Reset N3101 counter: */ + dl_tbf->m_n3101 = 0; } else { struct gprs_rlcmac_ul_tbf *ul_tbf; int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI; @@ -1433,6 +1446,9 @@ LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n", tbf_name(ul_tbf)); + + /* Reset N3101 counter: */ + ul_tbf->m_n3101 = 0; } } @@ -1585,6 +1601,9 @@ return 0; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas); } diff --git a/src/tbf.cpp b/src/tbf.cpp index 8bd0d29..2d4c037 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -178,6 +178,7 @@ was_releasing(0), upgrade_to_multislot(0), bts(bts_), + m_n3101(0), m_tfi(0), m_created_ts(0), m_ctrs(NULL), @@ -730,6 +731,14 @@ poll_state = GPRS_RLCMAC_POLL_NONE; + m_n3101++; + if (m_n3101 == bts->bts_data()->n3101) { + LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); + set_state(GPRS_RLCMAC_RELEASING); + t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + return; + } + if (ul_tbf && ul_tbf->handle_ctrl_ack()) { if (!ul_tbf->ctrl_ack_to_toggle()) { LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK\n"); diff --git a/src/tbf.h b/src/tbf.h index cdb4858..be0a40e 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -297,6 +297,8 @@ /* store the BTS this TBF belongs to */ BTS *bts; + uint8_t m_n3101; /* N3101 counter */ + /* * private fields. We can't make it private as it is breaking the * llist macros. -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:23:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 14:23:44 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: remove unused variable Message-ID: Review at https://gerrit.osmocom.org/5219 TBF: remove unused variable The num_T_exp is write-only so it can be safely dropped. Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 --- M src/tbf.cpp M src/tbf.h 2 files changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/5219/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 2d4c037..1e07b2d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -171,7 +171,6 @@ poll_ts(0), n3105(0), T(0), - num_T_exp(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -553,7 +552,6 @@ LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); tbf->T = T; - tbf->num_T_exp = 0; /* Tunning timers can be safely re-scheduled. */ tbf->timer.data = tbf; @@ -1099,8 +1097,6 @@ { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", tbf_name(this), T); - - num_T_exp++; if (T) { LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", diff --git a/src/tbf.h b/src/tbf.h index be0a40e..5c75faf 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -267,7 +267,6 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ - unsigned int num_T_exp; /* number of consecutive T expirations */ struct osmo_timer_list T31[T_MAX]; /* T31xx timers */ -- To view, visit https://gerrit.osmocom.org/5219 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:33:18 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 7 Dec 2017 14:33:18 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#10). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 14 files changed, 1,227 insertions(+), 321 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/10 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..0ccd838 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,52 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer + * needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..2901df6 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -41,6 +41,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..d0b24eb 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -596,11 +597,7 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + msc_mgcp_ass_complete(conn, osmo_ntohs(rtp_addr_in->sin_port), inet_ntoa(rtp_addr_in->sin_addr)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..57ed08c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #ifdef BUILD_IU @@ -78,6 +79,7 @@ #include #include +#include #include @@ -1328,8 +1330,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teadown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1387,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1419,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1762,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1804,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2688,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2729,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2745,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2772,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2788,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = osmo_htonl(rtp->ip); + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..736ed0b 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,21 @@ #include #include +#include #include #include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +200,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = inet_addr(conn->rtp.local_addr_ran); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..e6bd7bd --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1065 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 +#define MGCP_ASS_TIMEOUT 10 /* in seconds */ +#define MGCP_ASS_TIMEOUT_TIMER_NR 4 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_ASS_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "call could not be completed in time (RAN)"}, + {MGCP_ERR_ASS_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_ASS_COMPL, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and we + * may now forward IP/Port of the remote call leg to the MGW*/ + EV_ASSIGN, + + /* External event: Notify that the Call is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* Note: If the logic that controls the RAN is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Note: Under normal conditions, the MSC logic should + * always command to release the call at some point. + * However, the release may be missing due to errors + * in the MSC logic and we may have reached ST_HALT + * because of cascading errors and timeouts. In this + * and only in this case we will allow ST_HALT to + * free all context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_ASS_TIMEOUT_TIMER_NR) { + /* Note: There may be rare cases in which the MSC + * is unable to complete the call assignment */ + handle_error(mgcp_ctx, MGCP_ERR_ASS_TIMEOUT); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_ASS_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_ASS_COMPL: wait for mgw response, check if assignment is complete */ +static void fsm_ass_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_subscriber_connection *conn; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Enter MDCX phase */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); + + /* If we already have a valid remote port and IP-Address from the RAN side + * call leg, the assignment has been completed before we got here, so we + * may move on immediately */ + if (conn->rtp.remote_port_ran != 0 || strlen(conn->rtp.remote_addr_ran) > 0) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: wait for assignment completion, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_ASSIGN: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASS_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* Check if the assignment has been completed and the remote leg + * address/port combination has become valid. If not, wait until + * the assignment is completed */ + [ST_ASS_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_ASS_COMPL), + .action = fsm_ass_compl_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Inform the FSM that the assignment (RAN connection) is now complete + * Parameter: + * conn: subscriber connection context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, assignment completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, assignmnet completion failed.\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + /* Memorize port and IP-Address of the remote RAN call leg. We need this + * information at latest when we enter the MDCX phase for the RAN side. */ + conn->rtp.remote_port_ran = port; + osmo_strlcpy(conn->rtp.remote_addr_ran, addr, sizeof(conn->rtp.remote_addr_ran)); + + /* Note: We only dispatch the event if we are really waiting for the + * assignment, if we are not yet waiting, there is no need to loudly + * broadcast an event that the all other states do not understand anyway */ + if (mgcp_ctx->fsm->state == ST_MDCX_RAN) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already have passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: connection context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 10 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:42:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 14:42:31 +0000 Subject: osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (5 comments) minor things I'd let pass, but if you'd like to fix them... https://gerrit.osmocom.org/#/c/5215/1/src/tbf.cpp File src/tbf.cpp: Line 477: (tbf->direction != GPRS_RLCMAC_UL_TBF) ? "DL" : "UL"); (change unrelated) Line 489: LOGP(DRLCMAC, LOGL_DEBUG, "********** DL-TBF update **********\n"); (change unrelated) Line 939: LOGP(DRLCMAC, LOGL_DEBUG, "********** DL-TBF starts here **********\n"); (change unrelated) Line 941: ms_class, egprs_ms_class); (change unrelated) https://gerrit.osmocom.org/#/c/5215/1/src/tbf.h File src/tbf.h: Line 139: #define LOGPTBF(level, tbf, fmt, args...) LOGP(DRLCMAC, level, "%s " fmt, tbf_name(tbf), ## args) (our usual pattern here would be LOGPFOO(foo, level, ...), i.e. the object first, see LOGPFSM for example) -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 7 14:57:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 14:57:33 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: Update CTRL example Message-ID: Review at https://gerrit.osmocom.org/5220 Update CTRL example Use proper script new and repository location. Change-Id: I3c16f38ade6fcfadffd8d2573f71828119da055c --- M common/chapters/control_if.adoc 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/20/5220/1 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index c4d38d7..682483a 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -173,10 +173,10 @@ so its use is discouraged. There might still be some applications not yet converted to rate_ctr. -=== Control Interface python example: `bsc_control.py` +=== Control Interface python example: `osmo_ctrl.py` -In the `openbsc.git` repository, there is an example python script -called `openbsc/contrib/bsc_control.py` which implements the Osmocom +In the `osmo-python-tests` repository, there is an example python script +called `osmopy/osmo_ctrl.py` which implements the Osmocom control interface protocol. You can use this tool either stand-alone to perform control interface @@ -186,27 +186,27 @@ ==== Setting a value -.Example: Use `bsc_control.py` to set the short network name of OsmoNITB +.Example: Use `osmo_ctrl.py` to set the short network name of OsmoBSC ---- -$ ./bsc_control.py -d localhost -s short-name 32C3 +$ ./osmo_ctrl.py -d localhost -s short-name 32C3 Got message: SET_REPLY 1 short-name 32C3 ---- ==== Getting a value -.Example: Use `bsc_control.py` to get the mnc of OsmoNITB +.Example: Use `osmo_ctrl.py` to get the mnc of OsmoBSC ---- -$ ./bsc_control.py -d localhost -g mnc +$ ./osmo_ctrl.py -d localhost -g mnc Got message: GET_REPLY 1 mnc 262 ---- ==== Listening for traps -You can use `bsc_control.py` to listen for traps the following way: +You can use `osmo_ctrl.py` to listen for traps the following way: -.Example: Using `bsc_control.py` to listen for traps: +.Example: Using `osmo_ctrl.py` to listen for traps: ---- -$ ./bsc_control.py -d localhost -m +$ ./osmo_ctrl.py -d localhost -m <1> ---- <1> the command will not return and wait for any TRAP messages to arrive -- To view, visit https://gerrit.osmocom.org/5220 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c16f38ade6fcfadffd8d2573f71828119da055c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 7 15:11:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 7 Dec 2017 15:11:58 +0000 Subject: [PATCH] libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4893 to look at the new patch set (#4). ss7: Re-bind xUA server socket after setting new IP In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" was actually not being applied, because the server was created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP was changed but the server was not re-bound using the new IP, so it kept listening at 0.0.0.0. With this patch, we defer binding the socket to "local-ip" cmd time, after the IP has been applied. As a result, if no "local-ip" command is provided, then the bind never happens, which means it is now mandatory that users of osmo_ss7_xua_server_create API not using osmo_ss7_xua_server_set_local_host call new provided API osmo_ss7_xua_server_bind. Another new API osmo_ss7_bind_all_instances is provided to easily make sure all servers are bound after configuration process. This is specially important for servers which doesn't contain the "local-ip" parameter. Users of osmo_sccp_simple_server API are not affected by this change, and they not requrie to call any new API. Furthermore, using osmo_ss7_xua_server_bind in VTY code ensures the xUA server is automatically bound to the new address if the operator changes the "local-ip" cmd at runtime. Related: OS#2647 Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c M stp/stp_main.c 5 files changed, 66 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/4893/4 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 71c2022..94d5e8a 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -108,6 +108,8 @@ void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst); int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst, uint8_t c0, uint8_t c1, uint8_t c2); +int osmo_ss7_instance_bind(struct osmo_ss7_instance *inst); +int osmo_ss7_bind_all_instances(); /*********************************************************************** * MTP Users (Users of MTP, such as SCCP or ISUP) @@ -441,6 +443,9 @@ uint16_t local_port, const char *local_host); int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); + +int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 86fb45c..7f82f6e 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -423,6 +423,42 @@ return 0; } +/*! \brief bind all xUA servers belonging to an SS7 Instance + * \param[in] inst SS7 Instance to apply the socket binding (and start listening) + * \returns 0 on success; negative value on error */ +int osmo_ss7_instance_bind(struct osmo_ss7_instance *inst) +{ + struct osmo_xua_server *oxs; + int rc = 0; + + llist_for_each_entry(oxs, &inst->xua_servers, list) { + if (osmo_ss7_xua_server_bind(oxs) < 0) { + LOGSS7(inst, LOGL_ERROR, "Unable to bind xUA server %s:%u\n", + oxs->cfg.local.host, oxs->cfg.local.port); + rc = -1; + } + } + return rc; +} + +/*! \brief bind all xUA servers on each of the stored SS7 instances + * \returns 0 on success; negative value on error */ +int osmo_ss7_bind_all_instances() +{ + OSMO_ASSERT(ss7_initialized); + + struct osmo_ss7_instance *inst; + int rc = 0; + + llist_for_each_entry(inst, &osmo_ss7_instances, list) { + if (osmo_ss7_instance_bind(inst) < 0 ) { + LOGSS7(inst, LOGL_ERROR, "Unable to bind all xUA servers in ss7 instance\n"); + rc = -1; + } + } + return rc; +} + /*********************************************************************** * MTP Users (Users of MTP, such as SCCP or ISUP) ***********************************************************************/ @@ -1745,7 +1781,7 @@ return NULL; } -/*! \brief create a new xUA server listening to given ip/port +/*! \brief create a new xUA server configured with given ip/port * \param[in] ctx talloc allocation context * \param[in] proto protocol (xUA variant) to use * \param[in] local_port local SCTP port to bind/listen to @@ -1757,7 +1793,6 @@ uint16_t local_port, const char *local_host) { struct osmo_xua_server *oxs = talloc_zero(inst, struct osmo_xua_server); - int rc; OSMO_ASSERT(ss7_initialized); if (!oxs) @@ -1781,13 +1816,6 @@ osmo_stream_srv_link_set_port(oxs->server, oxs->cfg.local.port); osmo_stream_srv_link_set_proto(oxs->server, asp_proto_to_ip_proto(proto)); - rc = osmo_stream_srv_link_open(oxs->server); - if (rc < 0) { - osmo_stream_srv_link_destroy(oxs->server); - oxs->server = NULL; - talloc_free(oxs); - } - oxs->inst = inst; llist_add_tail(&oxs->list, &inst->xua_servers); @@ -1798,6 +1826,19 @@ return oxs; } +/*! \brief Set the xUA server to bind/listen to the currently configured ip/port + * \param[in] xs xUA server to operate + * \returns 0 on success, negative value on error. + */ +int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs) +{ + LOGP(DLSS7, LOGL_INFO, "(Re)binding %s Server to %s:%u\n", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host, xs->cfg.local.port); + return osmo_stream_srv_link_open(xs->server); +} + int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host) { diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index cbbb9e3..8c2d5c6 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -467,6 +467,10 @@ struct osmo_xua_server *xs = vty->index; osmo_ss7_xua_server_set_local_host(xs, argv[0]); + if (osmo_ss7_xua_server_bind(xs) < 0) { + vty_out(vty, "Unable to bind xUA server to IP %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } diff --git a/src/sccp_user.c b/src/sccp_user.c index d9de8d7..cd89c88 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -521,6 +521,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_xua_server *xs; + int rc; if (local_port < 0) local_port = osmo_ss7_asp_protocol_port(prot); @@ -535,6 +536,10 @@ if (!xs) goto out_ss7; + rc = osmo_ss7_xua_server_bind(xs); + if (rc < 0) + goto out_xs; + /* Allocate SCCP stack */ ss7->sccp = osmo_sccp_instance_create(ss7, NULL); if (!ss7->sccp) diff --git a/stp/stp_main.c b/stp/stp_main.c index 69d26b5..3216101 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -183,6 +183,8 @@ exit(1); } + osmo_ss7_bind_all_instances(); + rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { perror("Erro binding VTY port\n"); -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 15:50:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 15:50:26 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: CTRL: add rate counter dumper to examples Message-ID: Review at https://gerrit.osmocom.org/5221 CTRL: add rate counter dumper to examples This describe rate counter dumper added to osmo-python-tests in I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 31 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/21/5221/1 diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index 682483a..dd6938a 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -173,7 +173,7 @@ so its use is discouraged. There might still be some applications not yet converted to rate_ctr. -=== Control Interface python example: `osmo_ctrl.py` +=== Control Interface python examples In the `osmo-python-tests` repository, there is an example python script called `osmopy/osmo_ctrl.py` which implements the Osmocom @@ -184,6 +184,36 @@ for developing your own python software talking to the control interface. +Another implementation is in `osmopy/rate_ctr2csv.py` which will retrieve performance counters +for a given Osmocom program and output it in csv format. This can be used to periodically (using systemd timer +for example) retrieve data to build KPI and evaluate how it changes over time. + +Internally it uses "+rate_ctr.*+" variable described in <> to get the list of counter groups +and than request all the counters in each group. Applications interested in individual metrics can request it +directly using `rate_ctr2csv.py` as an example. + +==== Getting rate counters + +.Example: Use `rate_ctr2csv.py` to get rate counters from OsmoBSC +---- +$ ./osmopy/rate_ctr2csv.py --header +Connecting to localhost:4249... +Getting rate counter groups info... +"group","counter","absolute","second","minute","hour","day" +"e1inp.0","hdlc:abort","0","0","0","0","0" +"e1inp.0","hdlc:bad_fcs","0","0","0","0","0" +"e1inp.0","hdlc:overrun","0","0","0","0","0" +"e1inp.0","alarm","0","0","0","0","0" +"e1inp.0","removed","0","0","0","0","0" +"bsc.0","chreq:total","0","0","0","0","0" +"bsc.0","chreq:no_channel","0","0","0","0","0" +... +"msc.0","call:active","0","0","0","0","0" +"msc.0","call:complete","0","0","0","0","0" +"msc.0","call:incomplete","0","0","0","0","0" +Completed: 44 counters from 3 groups received. +---- + ==== Setting a value .Example: Use `osmo_ctrl.py` to set the short network name of OsmoBSC -- To view, visit https://gerrit.osmocom.org/5221 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:00:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 16:00:01 +0000 Subject: [ABANDON] osmo-pcu[master]: TBF: use independent T3169 In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: TBF: use independent T3169 ...................................................................... Abandoned Superseded. -- To view, visit https://gerrit.osmocom.org/5180 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I7ba28b8771b12a4a924ac05937051ade47622e51 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:00:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 16:00:55 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 Ready for review, not ready for merge: need to double-check for corner case with MS merge first. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:09:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 7 Dec 2017 16:09:09 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Print additional debug info for extended tests In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Print additional debug info for extended tests ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I7f3ef3665352c4e74affff2c2e8d345a408a2f52 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:10:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 16:10:02 +0000 Subject: osmo-gsm-manuals[master]: Update CTRL example In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5220 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c16f38ade6fcfadffd8d2573f71828119da055c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:10:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 16:10:13 +0000 Subject: osmo-gsm-manuals[master]: CTRL: add rate counter dumper to examples In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5221 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:10:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 16:10:14 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: CTRL: add rate counter dumper to examples In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: CTRL: add rate counter dumper to examples ...................................................................... CTRL: add rate counter dumper to examples This describe rate counter dumper added to osmo-python-tests in I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb Related: OS#2550 --- M common/chapters/control_if.adoc 1 file changed, 31 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index 682483a..dd6938a 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -173,7 +173,7 @@ so its use is discouraged. There might still be some applications not yet converted to rate_ctr. -=== Control Interface python example: `osmo_ctrl.py` +=== Control Interface python examples In the `osmo-python-tests` repository, there is an example python script called `osmopy/osmo_ctrl.py` which implements the Osmocom @@ -184,6 +184,36 @@ for developing your own python software talking to the control interface. +Another implementation is in `osmopy/rate_ctr2csv.py` which will retrieve performance counters +for a given Osmocom program and output it in csv format. This can be used to periodically (using systemd timer +for example) retrieve data to build KPI and evaluate how it changes over time. + +Internally it uses "+rate_ctr.*+" variable described in <> to get the list of counter groups +and than request all the counters in each group. Applications interested in individual metrics can request it +directly using `rate_ctr2csv.py` as an example. + +==== Getting rate counters + +.Example: Use `rate_ctr2csv.py` to get rate counters from OsmoBSC +---- +$ ./osmopy/rate_ctr2csv.py --header +Connecting to localhost:4249... +Getting rate counter groups info... +"group","counter","absolute","second","minute","hour","day" +"e1inp.0","hdlc:abort","0","0","0","0","0" +"e1inp.0","hdlc:bad_fcs","0","0","0","0","0" +"e1inp.0","hdlc:overrun","0","0","0","0","0" +"e1inp.0","alarm","0","0","0","0","0" +"e1inp.0","removed","0","0","0","0","0" +"bsc.0","chreq:total","0","0","0","0","0" +"bsc.0","chreq:no_channel","0","0","0","0","0" +... +"msc.0","call:active","0","0","0","0","0" +"msc.0","call:complete","0","0","0","0","0" +"msc.0","call:incomplete","0","0","0","0","0" +Completed: 44 counters from 3 groups received. +---- + ==== Setting a value .Example: Use `osmo_ctrl.py` to set the short network name of OsmoBSC -- To view, visit https://gerrit.osmocom.org/5221 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52d735f373f2e7aa1f12941fc450c0e9740ccdeb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:10:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 16:10:15 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: Update CTRL example In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Update CTRL example ...................................................................... Update CTRL example Use proper script new and repository location. Change-Id: I3c16f38ade6fcfadffd8d2573f71828119da055c --- M common/chapters/control_if.adoc 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index c4d38d7..682483a 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -173,10 +173,10 @@ so its use is discouraged. There might still be some applications not yet converted to rate_ctr. -=== Control Interface python example: `bsc_control.py` +=== Control Interface python example: `osmo_ctrl.py` -In the `openbsc.git` repository, there is an example python script -called `openbsc/contrib/bsc_control.py` which implements the Osmocom +In the `osmo-python-tests` repository, there is an example python script +called `osmopy/osmo_ctrl.py` which implements the Osmocom control interface protocol. You can use this tool either stand-alone to perform control interface @@ -186,27 +186,27 @@ ==== Setting a value -.Example: Use `bsc_control.py` to set the short network name of OsmoNITB +.Example: Use `osmo_ctrl.py` to set the short network name of OsmoBSC ---- -$ ./bsc_control.py -d localhost -s short-name 32C3 +$ ./osmo_ctrl.py -d localhost -s short-name 32C3 Got message: SET_REPLY 1 short-name 32C3 ---- ==== Getting a value -.Example: Use `bsc_control.py` to get the mnc of OsmoNITB +.Example: Use `osmo_ctrl.py` to get the mnc of OsmoBSC ---- -$ ./bsc_control.py -d localhost -g mnc +$ ./osmo_ctrl.py -d localhost -g mnc Got message: GET_REPLY 1 mnc 262 ---- ==== Listening for traps -You can use `bsc_control.py` to listen for traps the following way: +You can use `osmo_ctrl.py` to listen for traps the following way: -.Example: Using `bsc_control.py` to listen for traps: +.Example: Using `osmo_ctrl.py` to listen for traps: ---- -$ ./bsc_control.py -d localhost -m +$ ./osmo_ctrl.py -d localhost -m <1> ---- <1> the command will not return and wait for any TRAP messages to arrive -- To view, visit https://gerrit.osmocom.org/5220 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c16f38ade6fcfadffd8d2573f71828119da055c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:10:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 16:10:49 +0000 Subject: osmo-pcu[master]: TBF: remove unused variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5219 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:22:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 16:22:22 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: adjust preface to mention the current state of the O... Message-ID: Review at https://gerrit.osmocom.org/5222 common: adjust preface to mention the current state of the Osmocom art Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 --- M common/chapters/preface.adoc 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/22/5222/1 diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index d85e318..ed913e6 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -22,12 +22,12 @@ despite its ubiquity had not yet seen and Free / Open Source software implementations. -`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and into -what is today known as its 'OsmoNITB' variant: A minimal implementation +`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and its +'OsmoNITB' variant: A minimal implementation of all the required functionality of an entire GSM network, exposing A-bis towards the BTS. The project attracted more interested -developers, and surprisingly quick also commercial interest, -contribution and adoption. This added support for more BTS models +developers, and surprisingly quickly also commercial interest, +contribution and adoption. This allowed adding support for more BTS models. After having implemented the network-side GSM protocol stack in 2008 and 2009, in 2010 the same group of people set out to create a @@ -40,10 +40,17 @@ telephony, GMR satellite telephony, some SDR hardware, a SIM card protocol tracer and many others. -It has been a most exciting ride during the last seven years. I -wouldn't want to miss it under any circumstances. +Increasing commercial interest particularly in the BSS and core network +components has lead the way to Osmocom now supporting 3G, as well as the split +of the minimal 'OsmoNITB' implementation into separate and fully featured +network components: OsmoBSC, OsmoMSC, OsmoHLR, OsmoMGW and OsmoSTP (among +others), which allow seamless scaling from a simple "Network In The Box" to a +distributed installation that is able to handle serious load. --- Harald Welte, Osmocom.org and OpenBSC founder, January 2016. +It has been a most exciting ride during the last eight-odd years. I would not +have wanted to miss it under any circumstances. + +-- Harald Welte, Osmocom.org and OpenBSC founder, December 2017. === Acknowledgements -- To view, visit https://gerrit.osmocom.org/5222 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:22:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 16:22:23 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: preface: minor tweaks Message-ID: Review at https://gerrit.osmocom.org/5223 common: preface: minor tweaks Change-Id: Icfc3dee5fa5e6cc0f6a6e80b122206deeceff102 --- M common/chapters/preface.adoc 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/23/5223/1 diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index ed913e6..6f68b53 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -137,10 +137,11 @@ === Osmocom and sysmocom -Some of the founders of the Osmocom project have established sysmocom as -a company to provide products and services related to Osmocom. +Some of the founders of the Osmocom project have established 'sysmocom - +systems for mobile communications GmbH' as a company to provide products and +services related to Osmocom. -sysmocom and its staff have by far contributed the largest part of development +sysmocom and its staff have contributed by far the largest part of development and maintenance to the Osmocom mobile network infrastructure projects. As part of this work, sysmocom has also created the manual you are -- To view, visit https://gerrit.osmocom.org/5223 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfc3dee5fa5e6cc0f6a6e80b122206deeceff102 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:22:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 16:22:23 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: preface: spectrum license: also mention UMTS Message-ID: Review at https://gerrit.osmocom.org/5224 common: preface: spectrum license: also mention UMTS Change-Id: I496f56c05f873a7d9d1cdf2bc95231c7957cf51b --- M common/chapters/preface.adoc 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/24/5224/1 diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index 6f68b53..61e5f72 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -166,9 +166,9 @@ ==== Spectrum License -As GSM operates in licensed spectrum, please always double-check that -you have all required licenses and that you do not transmit on any ARFCN -that is not explicitly allocated to you by the applicable regulatory +As GSM and UMTS operate in licensed spectrum, please always double-check that +you have all required licenses and that you do not transmit on any ARFCN or +UARFCN that is not explicitly allocated to you by the applicable regulatory authority in your country. WARNING: Depending on your jurisdiction, operating a radio transmitter -- To view, visit https://gerrit.osmocom.org/5224 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I496f56c05f873a7d9d1cdf2bc95231c7957cf51b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:43:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 16:43:37 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: adjust preface to mention the current state of the O... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5222 to look at the new patch set (#2). common: adjust preface to mention the current state of the Osmocom art Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 --- M common/chapters/preface.adoc 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/22/5222/2 diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index d85e318..fd77d99 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -22,12 +22,12 @@ despite its ubiquity had not yet seen and Free / Open Source software implementations. -`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and into -what is today known as its 'OsmoNITB' variant: A minimal implementation +`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and its +'OsmoNITB' variant: A minimal implementation of all the required functionality of an entire GSM network, exposing A-bis towards the BTS. The project attracted more interested -developers, and surprisingly quick also commercial interest, -contribution and adoption. This added support for more BTS models +developers, and surprisingly quickly also commercial interest, +contribution and adoption. This allowed adding support for more BTS models. After having implemented the network-side GSM protocol stack in 2008 and 2009, in 2010 the same group of people set out to create a @@ -40,10 +40,17 @@ telephony, GMR satellite telephony, some SDR hardware, a SIM card protocol tracer and many others. -It has been a most exciting ride during the last seven years. I -wouldn't want to miss it under any circumstances. +Increasing commercial interest particularly in the BSS and core network +components has lead the way to 3G support in Osmocom, as well as the split +of the minimal 'OsmoNITB' implementation into separate and fully featured +network components: OsmoBSC, OsmoMSC, OsmoHLR, OsmoMGW and OsmoSTP (among +others), which allow seamless scaling from a simple "Network In The Box" to a +distributed installation for serious load. --- Harald Welte, Osmocom.org and OpenBSC founder, January 2016. +It has been a most exciting ride during the last eight-odd years. I would not +have wanted to miss it under any circumstances. + +-- Harald Welte, Osmocom.org and OpenBSC founder, December 2017. === Acknowledgements -- To view, visit https://gerrit.osmocom.org/5222 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 16:43:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 16:43:42 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoHLR: update section 'Bootstrap the Database' Message-ID: Review at https://gerrit.osmocom.org/5225 OsmoHLR: update section 'Bootstrap the Database' Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db --- M OsmoHLR/chapters/running.adoc 1 file changed, 6 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/25/5225/1 diff --git a/OsmoHLR/chapters/running.adoc b/OsmoHLR/chapters/running.adoc index 09388c0..44b66f2 100644 --- a/OsmoHLR/chapters/running.adoc +++ b/OsmoHLR/chapters/running.adoc @@ -41,23 +41,13 @@ === Bootstrap the Database -Before first launching OsmoHLR, you need to create a database, which can be -done with these commands: +If no database exists yet, OsmoHLR will automatically create and bootstrap a +database file with empty tables. If no `-l` command-line option is provided, +this database file will be created in the current working directory. ----- -mkdir -p /var/lib/osmocom -sqlite3 /var/lib/osmocom/hlr.db < /usr/share/doc/osmo-hlr/hlr.sql ----- - -Depending on your installation choices, you will probably find `hlr.sql` in one -of these locations: - -- `/usr/share/doc/osmo-hlr/hlr.sql` -- `/usr/local/share/doc/osmo-hlr/hlr.sql` -- in `osmo-hlr.git`'s source tree at `sql/hlr.sql` - -NOTE: At the time of writing, OsmoHLR does not create an initial empty database -automatically, like OsmoNITB did. This behavior may be added in the future. +Alternatively, you may use the `osmo-hlr-db-tool`, which is installed along +with `osmo-hlr`, to bootstrap an empty database, or to migrate subscriber data +from an old 'OsmoNITB' database. See `osmo-hlr-db-tool --help`. === Multiple instances -- To view, visit https://gerrit.osmocom.org/5225 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:56 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA Message-ID: Review at https://gerrit.osmocom.org/5226 OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA Change-Id: I1f105b3febd4f99f4491e217ff1b1d0b28912980 --- M OsmoBSC/chapters/overview.adoc 1 file changed, 100 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/26/5226/1 diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 3bb22cc..9b619fb 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -7,111 +7,125 @@ [[intro_overview]] === About OsmoBSC -OsmoBSC is one particular version of the OpenBSC software suite. +OsmoBSC is the Osmocom implementation of a Base Station Controller. It +implements: -Unlike the highly integrated OmsoNITB, OsmoBSC implements a more classic -GSM Base Station Controller with A-bis interface towards BTSs and A -interface towards a MSC. - -The difference between classic GSM network architecture and -the OsmoNITB based GSM network architecture is illustrated in -<> and <>. - -[[fig-gsm-classic]] -.Classic GSM network architecture (simplified) -[graphviz] ----- -digraph G { - rankdir=LR; - MS0 [label="MS"]; - MS1 [label="MS"]; - MS2 [label="MS"]; - MS3 [label="MS"]; - BTS0 [label="BTS"]; - BTS1 [label="BTS"]; - BSC; - MSC [label="MSC/VLR"]; - HLR [label="HLR/AUC"]; - EIR; - SMSC; - MS0->BTS0 [label="Um"]; - MS1->BTS0 [label="Um"]; - MS2->BTS1 [label="Um"]; - MS3->BTS1 [label="Um"]; - BTS0->BSC [label="Abis"]; - BTS1->BSC [label="Abis"]; - BSC->MSC [label="A"]; - MSC->HLR [label="C"]; - MSC->EIR [label="F"]; - MSC->SMSC; -} ----- - -[[fig-gsm-nitb]] -.GSM system architecture using OsmoNITB -[graphviz] ----- -digraph G { - rankdir=LR; - MS0 [label="MS"]; - MS1 [label="MS"]; - MS2 [label="MS"]; - MS3 [label="MS"]; - BTS0 [label="BTS"]; - BTS1 [label="BTS"]; - EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; - MS0->BTS0 [label="Um"]; - MS1->BTS0 [label="Um"]; - MS2->BTS1 [label="Um"]; - MS3->BTS1 [label="Um"]; - BTS0->BSC [label="Abis"]; - BTS1->BSC [label="Abis"]; - subgraph cluster_nitb { - label = "OsmoNITB"; - BSC; - MSC [label="MSC/VLR"]; - SMSC; - EIR; - HLR [label="HLR/AUC"]; - BSC->MSC; - MSC->HLR; - MSC->EIR; - MSC->SMSC; - } - MSC -> EXTMNCC [label="external MNCC"]; -} ----- - +- an 'A-bis' interface towards BTSs and +- an 'A' interface towards an MSC. It is important to be aware that there are + two variants of the 'A' interface, see <>. === Software Components OsmoBSC contains a variety of different software components, which -we'll quickly describe in this section. +we'll briefly describe in this section. ==== A-bis Implementation -OsmoBSC implements the ETSI/3GPP specified A-bis interface, including -TS 08.56 (LAPD), TS 08.58 (RSL) and TS 12.21 (OML). In addition, it -supports a variety of vendor-specific extensions and dialects in order -to communicate with BTSs from Siemens, Nokia, Ericsson, ip.access and -sysmocom. +OsmoBSC implements the ETSI/3GPP specified A-bis interface, including TS 08.56 +(LAPD), TS 08.58 (RSL) and TS 12.21 (OML). In addition, it supports a variety +of vendor-specific extensions and dialects in order to communicate with BTSs +from Siemens, Nokia, Ericsson, ip.access, Octasic and sysmocom, as well as +various USRP based BTS implementations, using OsmoBTS and OsmoTRX (like the +Ettus B200 series, the Fairwaves XTRX or the LimeSDR, to name a few). For more information, see <> and <>. +[[a-interface]] ==== A Implementation -OsmoBSC implements a minimal sub-set of the GSM A interface as specified -in TS 08.08. +OsmoBSC implements a sub-set of the GSM A interface as specified in TS 08.08 +(BSSAP) and TS 04.08 (DTAP). -Unlike classic A interface implementations for E1 interfacs, OsmoBSC -implements a variant of encapsulating the A interface over IP. To do -so, the SCCP messages are wrapped in an IPA multiplex and then +Osmocom offers two variants of the 'A' interface's protocol stacking: + +- 'A/SCCPlite' +- 'A/SCCP/M3UA' + +Traditionally, OsmoBSC only implemented the A/SCCPlite protocol, but since a +proper M3UA implementation is available from 'libosmo-sigtran' +('libosmo-sccp.git'), the stock OsmoBSC now supports only A/SCCP/M3UA. (The +idea is that SCCPlite support may be added to libosmo-sigtran at some point +in the future, after which the new `osmo-bsc` would support both variants of +the A interface.) + +The difference between an A/SCCPlite and A/SCCP/M3UA is illustrated in +<> and <>. + +===== A/SCCPlite + +Unlike classic A interface implementations for E1 interfacs, +`osmo-bsc-sccplite` implements a variant of encapsulating the A interface over +IP. To do so, the SCCP messages are wrapped in an IPA multiplex and then communicated over TCP. The audio channels are mapped to RTP streams. This protocol stacking is sometimes called "SCCPlite". -For more information, see <>. +At the time of writing, if you would like to use the old A/SCCPlite protocol, +look for binary packages named `osmo-bsc-sccplite`, or compile `osmo-bsc` from +the 'openbsc.git' repository. +[[fig-sccplite]] +.`osmo-bsc-sccplite` operation using 'A/SCCPlite' +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC-SCCPlite"]; + MSC [label="3rd party MSC"]; + {MS0,MS1}->BTS0 [label="Um"]; + {MS2,MS3}->BTS1 [label="Um"]; + {BTS0,BTS1}->BSC [label="Abis\nTCP\nIP"]; + BSC->MSC [label="A\nSCCP\nTCP\nIP"]; +} +---- + +===== A/SCCP/M3UA + +The default OsmoBSC's A interface uses the M3UA variant of SIGTRAN protocol +stacking: + +|===== +|A +|SCCP +|M3UA +|SCTP +|IP +|===== + +To use the now-default A/SCCP/M3UA protocol, look for binary packages named +`osmo-bsc`, or compile `osmo-bsc` from the 'osmo-bsc.git' repository. It is +recommended to use the M3UA variant, which is required to operate with OsmoMSC. + +To route SCCP/M3UA messages between OsmoBSC and and MSC, an STP instance like +OsmoSTP is required. + +[[fig-sccp-m3ua]] +.`osmo-bsc` operation using 'A/SCCP/M3UA' +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC"]; + STP [label="OsmoSTP"]; + MSC [label="OsmoMSC\n(or 3rd-party MSC)"]; + {MS0,MS1}->BTS0 [label="Um"]; + {MS2,MS3}->BTS1 [label="Um"]; + {BTS0,BTS1}->BSC [label="Abis\nTCP\nIP"]; + BSC->STP->MSC [label="A\nSCCP\nM3UA\nSCTP\nIP"]; +} +---- ==== BSC Implementation -- To view, visit https://gerrit.osmocom.org/5226 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f105b3febd4f99f4491e217ff1b1d0b28912980 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common / OsmoBSC: drop unused alink.adoc Message-ID: Review at https://gerrit.osmocom.org/5227 common / OsmoBSC: drop unused alink.adoc Change-Id: Ia3219359be891c161d20eccb7bbcb65af35ef42b --- D OsmoBSC/chapters/alink.adoc M OsmoBSC/osmobsc-usermanual.adoc 2 files changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/27/5227/1 diff --git a/OsmoBSC/chapters/alink.adoc b/OsmoBSC/chapters/alink.adoc deleted file mode 100644 index 0321c0e..0000000 --- a/OsmoBSC/chapters/alink.adoc +++ /dev/null @@ -1,15 +0,0 @@ -== A-link including SCCP/BSSAP/DTAP - -OsmoBSC implements a minimal sub-set of the GSM A interface as specified -in TS 08.08. - -Unlike classic A interface implementations for E1 interfaces, OsmoBSC -implements a variant of encapsulating the A interface over IP. To do -so, the SCCP messages are wrapped in an IPA multiplex and then -communicated over TCP. The audio channels are mapped to RTP streams. - -This protocol stacking is sometimes called "SCCPlite". - -=== - -FIXME diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index 2ff985d..e3eadaf 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -27,8 +27,6 @@ include::../common/chapters/abis.adoc[] -#include::../common/chapters/alink.adoc[] - include::../common/chapters/control_if.adoc[] include::../common/chapters/cell-broadcast.adoc[] -- To view, visit https://gerrit.osmocom.org/5227 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3219359be891c161d20eccb7bbcb65af35ef42b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: dyn ts: drop special meaning for OsmoBSC vs Osm... Message-ID: Review at https://gerrit.osmocom.org/5228 common: bts: dyn ts: drop special meaning for OsmoBSC vs OsmoNITB Change-Id: I70da58bee08e531babfe78852cc82a1177f9b7b2 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/28/5228/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 80c91d6..97c2894 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -277,8 +277,7 @@ voice calls need to be served. This is a tremendous improvement in service over statically assigning a fixed number of timeslots for voice and data. -Dynamic timeslots work both with OsmoNITB as well as with OsmoBSC driven by a -third-party MSC. The causality is as follows: to establish a voice call, the +The causality is as follows: to establish a voice call, the MSC requests a logical channel of a given TCH kind from the BSC. The BSC assigns such a channel from a BTS' TRX's timeslot of its choice. The knowledge that a given timeslot is dynamic exists only on the BSC level. When the MSC -- To view, visit https://gerrit.osmocom.org/5228 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70da58bee08e531babfe78852cc82a1177f9b7b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: dyn ts: mark octasic as supported Message-ID: Review at https://gerrit.osmocom.org/5229 common: bts: dyn ts: mark octasic as supported Supported since osmo-bts 69ec4a419edee4f00a104c59a78b530eaf85382a / Ia109d4bfade7bc28442127581f4bb0289146ea71 Change-Id: Iab21573ab308b1e243bd6b56c9e3b1977a7f69fe --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/29/5229/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 97c2894..b8d9f1b 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -300,7 +300,7 @@ |sysmoBTS using _osmo-bts-sysmo_ |supported |supported |various SDR platforms using _osmo-bts-trx_ |supported |supported |Nutaq Litecell 1.5 using _osmo-bts-litecell15_ |supported |supported -|Octasic OctBTS using _osmo-bts-octphy_ | - | - +|Octasic OctBTS using _osmo-bts-octphy_ | supported | supported |=== The _OsmoBTS Abis Protocol Specification_ <> describes the -- To view, visit https://gerrit.osmocom.org/5229 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab21573ab308b1e243bd6b56c9e3b1977a7f69fe Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC... Message-ID: Review at https://gerrit.osmocom.org/5230 common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC viewpoint Change-Id: If9425b16216f353515890a7b2de8590bdfa1ff38 --- M common/chapters/bts.adoc 1 file changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/30/5230/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index b8d9f1b..116b69d 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -317,9 +317,20 @@ BTS models supporting this timeslot kind are shown in <>. -NOTE: At the time of writing, OsmoNITB disables TCH/F on this timeslot type due -to transcoding limitations. Operation of OsmoBSC with a third-party MSC is not -affected by this limitation. See https://osmocom.org/issues/1778. +In the lack of transcoding capabilities, this timeslot type may cause +mismatching codecs to be selected for two parties of the same call, which would +cause call routing to fail ("`Cannot patch through call with different channel +types: local = TCH_F, remote = TCH_H`"). A workaround is to disable TCH/F on +this timeslot type, i.e. to allow only TCH/H. To disable TCH/F on Osmocom +style dynamic timeslots, use a configuration of + +---- +network + dyn_ts_allow_tch_f 0 +---- + +In OsmoNITB, disabling TCH/F on Osmocom dynamic timeslots is the default. In +OsmoBSC, the default is to allow both. ==== ip.access Style Dynamic Timeslots (TCH/F_PDCH) -- To view, visit https://gerrit.osmocom.org/5230 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9425b16216f353515890a7b2de8590bdfa1ff38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: dyn ts: example: mention both osmo-bsc and osmo... Message-ID: Review at https://gerrit.osmocom.org/5231 common: bts: dyn ts: example: mention both osmo-bsc and osmo-nitb Change-Id: Ie3218fd1449493a252a54f0b5356e8647df619e1 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/31/5231/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 116b69d..475b683 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -348,7 +348,7 @@ ==== Dynamic Timeslot Configuration Examples -This is an extract of an _osmo-nitb_ or _openbsc_ config file. A timeslot +This is an extract of an @osmo-bsc@ or @osmo-nitb@ config file. A timeslot configuration with five Osmocom style dynamic timeslots and one dedicated PDCH may look like this: -- To view, visit https://gerrit.osmocom.org/5231 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3218fd1449493a252a54f0b5356e8647df619e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: add blank line to separate a code block Message-ID: Review at https://gerrit.osmocom.org/5232 common: bts: add blank line to separate a code block Change-Id: I6072253a9293e5000465039d7dcd0c6e2b9966a3 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/32/5232/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 475b683..9fbbd51 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -76,6 +76,7 @@ In order to provision BTSs, you have to enter the BTS config node of the VTY. In order to configure BTS 0, you can issue the following sequence of commands: + ---- OpenBSC> enable OpenBSC# configure terminal -- To view, visit https://gerrit.osmocom.org/5232 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6072253a9293e5000465039d7dcd0c6e2b9966a3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 18:45:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 7 Dec 2017 18:45:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: bts: tweak BTS config example to show config, not te... Message-ID: Review at https://gerrit.osmocom.org/5233 common: bts: tweak BTS config example to show config, not telnet VTY Change-Id: I9dda76cee8dfef6fc91099bcb3f90bed6c00b794 --- M common/chapters/bts.adoc 1 file changed, 38 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/33/5233/1 diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 9fbbd51..81ca1a2 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -88,51 +88,51 @@ At this point, you have a plethora of commands, in fact an entire hierarchy of commands to configure all aspects of the BTS, as well as each of its TRX and each timeslot within each TRX. For a full -reference, please consult the respective chapter in the VTY reference of -OpenBSC. +reference, please consult the telnet VTY integrated help or the respective +chapter in the VTY reference. BTS configuration depends quite a bit on the specific BTS vendor and model. The section below provides just one possible example for the case of a sysmoBTS. +Note that from the `configure terminal` command onwards, the telnet VTY +commands above are identical to configuration file settings, for details see +<>. + +Starting with `network` as above, your complete sysmoBTS configuration may look +like this: ---- -OpenBSC(config-net-bts)# type sysmobts -OpenBSC(config-net-bts)# band DCS1800 -OpenBSC(config-net-bts)# description The new BTS in Baikonur -OpenBSC(config-net-bts)# location_area_code 2342 -OpenBSC(config-net-bts)# cell_identity 5 -OpenBSC(config-net-bts)# base_station_id_code 63 -OpenBSC(config-net-bts)# ip.access unit_id 8888 0 -OpenBSC(config-net-bts)# ms max power 40 -OpenBSC(config-net-bts)# trx 0 -OpenBSC(config-net-bts-trx)# arfcn 871 -OpenBSC(config-net-bts-trx)# nominal power 23 -OpenBSC(config-net-bts-trx)# max_power_red 0 -OpenBSC(config-net-bts-trx)# timeslot 0 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config CCCH+SDCCH4 -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 1 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 2 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 3 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 4 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 5 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 6 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 7 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config PDCH -OpenBSC(config-net-bts-trx-ts)# exit +network + bts 0 + type sysmobts + band DCS1800 + description The new BTS in Baikonur + location_area_code 2342 + cell_identity 5 + base_station_id_code 63 + ip.access unit_id 8888 0 + ms max power 40 + trx 0 + arfcn 871 + nominal power 23 + max_power_red 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + timeslot 1 + phys_chan_config TCH/F + timeslot 2 + phys_chan_config TCH/F + timeslot 3 + phys_chan_config TCH/F + timeslot 4 + phys_chan_config TCH/F + timeslot 5 + phys_chan_config TCH/F + timeslot 6 + phys_chan_config TCH/F + timeslot 7 + phys_chan_config PDCH ---- -- To view, visit https://gerrit.osmocom.org/5233 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9dda76cee8dfef6fc91099bcb3f90bed6c00b794 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:27:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:27:48 +0000 Subject: osmo-gsm-manuals[master]: common: bts: add blank line to separate a code block In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5232 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6072253a9293e5000465039d7dcd0c6e2b9966a3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:29:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:29:08 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5226 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f105b3febd4f99f4491e217ff1b1d0b28912980 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:29:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:29:24 +0000 Subject: osmo-gsm-manuals[master]: common / OsmoBSC: drop unused alink.adoc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5227 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3219359be891c161d20eccb7bbcb65af35ef42b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:29:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:29:34 +0000 Subject: osmo-gsm-manuals[master]: common: bts: dyn ts: drop special meaning for OsmoBSC vs Osm... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5228 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70da58bee08e531babfe78852cc82a1177f9b7b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:29:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:29:46 +0000 Subject: osmo-gsm-manuals[master]: common: bts: dyn ts: mark octasic as supported In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5229 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab21573ab308b1e243bd6b56c9e3b1977a7f69fe Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:09 +0000 Subject: osmo-gsm-manuals[master]: common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5230 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9425b16216f353515890a7b2de8590bdfa1ff38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:20 +0000 Subject: osmo-gsm-manuals[master]: common: bts: dyn ts: example: mention both osmo-bsc and osmo... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5231 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie3218fd1449493a252a54f0b5356e8647df619e1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:39 +0000 Subject: osmo-gsm-manuals[master]: common: bts: tweak BTS config example to show config, not te... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5233 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dda76cee8dfef6fc91099bcb3f90bed6c00b794 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:42 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: tweak BTS config example to show config, not te... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: tweak BTS config example to show config, not telnet VTY ...................................................................... common: bts: tweak BTS config example to show config, not telnet VTY Change-Id: I9dda76cee8dfef6fc91099bcb3f90bed6c00b794 --- M common/chapters/bts.adoc 1 file changed, 38 insertions(+), 38 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 9fbbd51..81ca1a2 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -88,51 +88,51 @@ At this point, you have a plethora of commands, in fact an entire hierarchy of commands to configure all aspects of the BTS, as well as each of its TRX and each timeslot within each TRX. For a full -reference, please consult the respective chapter in the VTY reference of -OpenBSC. +reference, please consult the telnet VTY integrated help or the respective +chapter in the VTY reference. BTS configuration depends quite a bit on the specific BTS vendor and model. The section below provides just one possible example for the case of a sysmoBTS. +Note that from the `configure terminal` command onwards, the telnet VTY +commands above are identical to configuration file settings, for details see +<>. + +Starting with `network` as above, your complete sysmoBTS configuration may look +like this: ---- -OpenBSC(config-net-bts)# type sysmobts -OpenBSC(config-net-bts)# band DCS1800 -OpenBSC(config-net-bts)# description The new BTS in Baikonur -OpenBSC(config-net-bts)# location_area_code 2342 -OpenBSC(config-net-bts)# cell_identity 5 -OpenBSC(config-net-bts)# base_station_id_code 63 -OpenBSC(config-net-bts)# ip.access unit_id 8888 0 -OpenBSC(config-net-bts)# ms max power 40 -OpenBSC(config-net-bts)# trx 0 -OpenBSC(config-net-bts-trx)# arfcn 871 -OpenBSC(config-net-bts-trx)# nominal power 23 -OpenBSC(config-net-bts-trx)# max_power_red 0 -OpenBSC(config-net-bts-trx)# timeslot 0 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config CCCH+SDCCH4 -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 1 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 2 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 3 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 4 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 5 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 6 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F -OpenBSC(config-net-bts-trx-ts)# exit -OpenBSC(config-net-bts-trx)# timeslot 7 -OpenBSC(config-net-bts-trx-ts)# phys_chan_config PDCH -OpenBSC(config-net-bts-trx-ts)# exit +network + bts 0 + type sysmobts + band DCS1800 + description The new BTS in Baikonur + location_area_code 2342 + cell_identity 5 + base_station_id_code 63 + ip.access unit_id 8888 0 + ms max power 40 + trx 0 + arfcn 871 + nominal power 23 + max_power_red 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + timeslot 1 + phys_chan_config TCH/F + timeslot 2 + phys_chan_config TCH/F + timeslot 3 + phys_chan_config TCH/F + timeslot 4 + phys_chan_config TCH/F + timeslot 5 + phys_chan_config TCH/F + timeslot 6 + phys_chan_config TCH/F + timeslot 7 + phys_chan_config PDCH ---- -- To view, visit https://gerrit.osmocom.org/5233 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dda76cee8dfef6fc91099bcb3f90bed6c00b794 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:43 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: dyn ts: example: mention both osmo-bsc and osmo... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: dyn ts: example: mention both osmo-bsc and osmo-nitb ...................................................................... common: bts: dyn ts: example: mention both osmo-bsc and osmo-nitb Change-Id: Ie3218fd1449493a252a54f0b5356e8647df619e1 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 116b69d..475b683 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -348,7 +348,7 @@ ==== Dynamic Timeslot Configuration Examples -This is an extract of an _osmo-nitb_ or _openbsc_ config file. A timeslot +This is an extract of an @osmo-bsc@ or @osmo-nitb@ config file. A timeslot configuration with five Osmocom style dynamic timeslots and one dedicated PDCH may look like this: -- To view, visit https://gerrit.osmocom.org/5231 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3218fd1449493a252a54f0b5356e8647df619e1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:43 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC viewpoint ...................................................................... common: bts: dyn ts: explain dyn_ts_allow_tch_f from OsmoBSC viewpoint Change-Id: If9425b16216f353515890a7b2de8590bdfa1ff38 --- M common/chapters/bts.adoc 1 file changed, 14 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index b8d9f1b..116b69d 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -317,9 +317,20 @@ BTS models supporting this timeslot kind are shown in <>. -NOTE: At the time of writing, OsmoNITB disables TCH/F on this timeslot type due -to transcoding limitations. Operation of OsmoBSC with a third-party MSC is not -affected by this limitation. See https://osmocom.org/issues/1778. +In the lack of transcoding capabilities, this timeslot type may cause +mismatching codecs to be selected for two parties of the same call, which would +cause call routing to fail ("`Cannot patch through call with different channel +types: local = TCH_F, remote = TCH_H`"). A workaround is to disable TCH/F on +this timeslot type, i.e. to allow only TCH/H. To disable TCH/F on Osmocom +style dynamic timeslots, use a configuration of + +---- +network + dyn_ts_allow_tch_f 0 +---- + +In OsmoNITB, disabling TCH/F on Osmocom dynamic timeslots is the default. In +OsmoBSC, the default is to allow both. ==== ip.access Style Dynamic Timeslots (TCH/F_PDCH) -- To view, visit https://gerrit.osmocom.org/5230 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9425b16216f353515890a7b2de8590bdfa1ff38 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:44 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: dyn ts: mark octasic as supported In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: dyn ts: mark octasic as supported ...................................................................... common: bts: dyn ts: mark octasic as supported Supported since osmo-bts 69ec4a419edee4f00a104c59a78b530eaf85382a / Ia109d4bfade7bc28442127581f4bb0289146ea71 Change-Id: Iab21573ab308b1e243bd6b56c9e3b1977a7f69fe --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 97c2894..b8d9f1b 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -300,7 +300,7 @@ |sysmoBTS using _osmo-bts-sysmo_ |supported |supported |various SDR platforms using _osmo-bts-trx_ |supported |supported |Nutaq Litecell 1.5 using _osmo-bts-litecell15_ |supported |supported -|Octasic OctBTS using _osmo-bts-octphy_ | - | - +|Octasic OctBTS using _osmo-bts-octphy_ | supported | supported |=== The _OsmoBTS Abis Protocol Specification_ <> describes the -- To view, visit https://gerrit.osmocom.org/5229 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab21573ab308b1e243bd6b56c9e3b1977a7f69fe Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:44 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: dyn ts: drop special meaning for OsmoBSC vs Osm... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: dyn ts: drop special meaning for OsmoBSC vs OsmoNITB ...................................................................... common: bts: dyn ts: drop special meaning for OsmoBSC vs OsmoNITB Change-Id: I70da58bee08e531babfe78852cc82a1177f9b7b2 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 80c91d6..97c2894 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -277,8 +277,7 @@ voice calls need to be served. This is a tremendous improvement in service over statically assigning a fixed number of timeslots for voice and data. -Dynamic timeslots work both with OsmoNITB as well as with OsmoBSC driven by a -third-party MSC. The causality is as follows: to establish a voice call, the +The causality is as follows: to establish a voice call, the MSC requests a logical channel of a given TCH kind from the BSC. The BSC assigns such a channel from a BTS' TRX's timeslot of its choice. The knowledge that a given timeslot is dynamic exists only on the BSC level. When the MSC -- To view, visit https://gerrit.osmocom.org/5228 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70da58bee08e531babfe78852cc82a1177f9b7b2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:44 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common / OsmoBSC: drop unused alink.adoc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common / OsmoBSC: drop unused alink.adoc ...................................................................... common / OsmoBSC: drop unused alink.adoc Change-Id: Ia3219359be891c161d20eccb7bbcb65af35ef42b --- D OsmoBSC/chapters/alink.adoc M OsmoBSC/osmobsc-usermanual.adoc 2 files changed, 0 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/chapters/alink.adoc b/OsmoBSC/chapters/alink.adoc deleted file mode 100644 index 0321c0e..0000000 --- a/OsmoBSC/chapters/alink.adoc +++ /dev/null @@ -1,15 +0,0 @@ -== A-link including SCCP/BSSAP/DTAP - -OsmoBSC implements a minimal sub-set of the GSM A interface as specified -in TS 08.08. - -Unlike classic A interface implementations for E1 interfaces, OsmoBSC -implements a variant of encapsulating the A interface over IP. To do -so, the SCCP messages are wrapped in an IPA multiplex and then -communicated over TCP. The audio channels are mapped to RTP streams. - -This protocol stacking is sometimes called "SCCPlite". - -=== - -FIXME diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index 2ff985d..e3eadaf 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -27,8 +27,6 @@ include::../common/chapters/abis.adoc[] -#include::../common/chapters/alink.adoc[] - include::../common/chapters/control_if.adoc[] include::../common/chapters/cell-broadcast.adoc[] -- To view, visit https://gerrit.osmocom.org/5227 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3219359be891c161d20eccb7bbcb65af35ef42b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:44 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA ...................................................................... OsmoBSC: update overview to explain both SCCPlite and SCCP/M3UA Change-Id: I1f105b3febd4f99f4491e217ff1b1d0b28912980 --- M OsmoBSC/chapters/overview.adoc 1 file changed, 100 insertions(+), 86 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 3bb22cc..9b619fb 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -7,111 +7,125 @@ [[intro_overview]] === About OsmoBSC -OsmoBSC is one particular version of the OpenBSC software suite. +OsmoBSC is the Osmocom implementation of a Base Station Controller. It +implements: -Unlike the highly integrated OmsoNITB, OsmoBSC implements a more classic -GSM Base Station Controller with A-bis interface towards BTSs and A -interface towards a MSC. - -The difference between classic GSM network architecture and -the OsmoNITB based GSM network architecture is illustrated in -<> and <>. - -[[fig-gsm-classic]] -.Classic GSM network architecture (simplified) -[graphviz] ----- -digraph G { - rankdir=LR; - MS0 [label="MS"]; - MS1 [label="MS"]; - MS2 [label="MS"]; - MS3 [label="MS"]; - BTS0 [label="BTS"]; - BTS1 [label="BTS"]; - BSC; - MSC [label="MSC/VLR"]; - HLR [label="HLR/AUC"]; - EIR; - SMSC; - MS0->BTS0 [label="Um"]; - MS1->BTS0 [label="Um"]; - MS2->BTS1 [label="Um"]; - MS3->BTS1 [label="Um"]; - BTS0->BSC [label="Abis"]; - BTS1->BSC [label="Abis"]; - BSC->MSC [label="A"]; - MSC->HLR [label="C"]; - MSC->EIR [label="F"]; - MSC->SMSC; -} ----- - -[[fig-gsm-nitb]] -.GSM system architecture using OsmoNITB -[graphviz] ----- -digraph G { - rankdir=LR; - MS0 [label="MS"]; - MS1 [label="MS"]; - MS2 [label="MS"]; - MS3 [label="MS"]; - BTS0 [label="BTS"]; - BTS1 [label="BTS"]; - EXTMNCC [label="Linux Call Router / SoftSwitch / PBX\n(optional)"]; - MS0->BTS0 [label="Um"]; - MS1->BTS0 [label="Um"]; - MS2->BTS1 [label="Um"]; - MS3->BTS1 [label="Um"]; - BTS0->BSC [label="Abis"]; - BTS1->BSC [label="Abis"]; - subgraph cluster_nitb { - label = "OsmoNITB"; - BSC; - MSC [label="MSC/VLR"]; - SMSC; - EIR; - HLR [label="HLR/AUC"]; - BSC->MSC; - MSC->HLR; - MSC->EIR; - MSC->SMSC; - } - MSC -> EXTMNCC [label="external MNCC"]; -} ----- - +- an 'A-bis' interface towards BTSs and +- an 'A' interface towards an MSC. It is important to be aware that there are + two variants of the 'A' interface, see <>. === Software Components OsmoBSC contains a variety of different software components, which -we'll quickly describe in this section. +we'll briefly describe in this section. ==== A-bis Implementation -OsmoBSC implements the ETSI/3GPP specified A-bis interface, including -TS 08.56 (LAPD), TS 08.58 (RSL) and TS 12.21 (OML). In addition, it -supports a variety of vendor-specific extensions and dialects in order -to communicate with BTSs from Siemens, Nokia, Ericsson, ip.access and -sysmocom. +OsmoBSC implements the ETSI/3GPP specified A-bis interface, including TS 08.56 +(LAPD), TS 08.58 (RSL) and TS 12.21 (OML). In addition, it supports a variety +of vendor-specific extensions and dialects in order to communicate with BTSs +from Siemens, Nokia, Ericsson, ip.access, Octasic and sysmocom, as well as +various USRP based BTS implementations, using OsmoBTS and OsmoTRX (like the +Ettus B200 series, the Fairwaves XTRX or the LimeSDR, to name a few). For more information, see <> and <>. +[[a-interface]] ==== A Implementation -OsmoBSC implements a minimal sub-set of the GSM A interface as specified -in TS 08.08. +OsmoBSC implements a sub-set of the GSM A interface as specified in TS 08.08 +(BSSAP) and TS 04.08 (DTAP). -Unlike classic A interface implementations for E1 interfacs, OsmoBSC -implements a variant of encapsulating the A interface over IP. To do -so, the SCCP messages are wrapped in an IPA multiplex and then +Osmocom offers two variants of the 'A' interface's protocol stacking: + +- 'A/SCCPlite' +- 'A/SCCP/M3UA' + +Traditionally, OsmoBSC only implemented the A/SCCPlite protocol, but since a +proper M3UA implementation is available from 'libosmo-sigtran' +('libosmo-sccp.git'), the stock OsmoBSC now supports only A/SCCP/M3UA. (The +idea is that SCCPlite support may be added to libosmo-sigtran at some point +in the future, after which the new `osmo-bsc` would support both variants of +the A interface.) + +The difference between an A/SCCPlite and A/SCCP/M3UA is illustrated in +<> and <>. + +===== A/SCCPlite + +Unlike classic A interface implementations for E1 interfacs, +`osmo-bsc-sccplite` implements a variant of encapsulating the A interface over +IP. To do so, the SCCP messages are wrapped in an IPA multiplex and then communicated over TCP. The audio channels are mapped to RTP streams. This protocol stacking is sometimes called "SCCPlite". -For more information, see <>. +At the time of writing, if you would like to use the old A/SCCPlite protocol, +look for binary packages named `osmo-bsc-sccplite`, or compile `osmo-bsc` from +the 'openbsc.git' repository. +[[fig-sccplite]] +.`osmo-bsc-sccplite` operation using 'A/SCCPlite' +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC-SCCPlite"]; + MSC [label="3rd party MSC"]; + {MS0,MS1}->BTS0 [label="Um"]; + {MS2,MS3}->BTS1 [label="Um"]; + {BTS0,BTS1}->BSC [label="Abis\nTCP\nIP"]; + BSC->MSC [label="A\nSCCP\nTCP\nIP"]; +} +---- + +===== A/SCCP/M3UA + +The default OsmoBSC's A interface uses the M3UA variant of SIGTRAN protocol +stacking: + +|===== +|A +|SCCP +|M3UA +|SCTP +|IP +|===== + +To use the now-default A/SCCP/M3UA protocol, look for binary packages named +`osmo-bsc`, or compile `osmo-bsc` from the 'osmo-bsc.git' repository. It is +recommended to use the M3UA variant, which is required to operate with OsmoMSC. + +To route SCCP/M3UA messages between OsmoBSC and and MSC, an STP instance like +OsmoSTP is required. + +[[fig-sccp-m3ua]] +.`osmo-bsc` operation using 'A/SCCP/M3UA' +[graphviz] +---- +digraph G { + rankdir=LR; + MS0 [label="MS"]; + MS1 [label="MS"]; + MS2 [label="MS"]; + MS3 [label="MS"]; + BTS0 [label="BTS"]; + BTS1 [label="BTS"]; + BSC [label="OsmoBSC"]; + STP [label="OsmoSTP"]; + MSC [label="OsmoMSC\n(or 3rd-party MSC)"]; + {MS0,MS1}->BTS0 [label="Um"]; + {MS2,MS3}->BTS1 [label="Um"]; + {BTS0,BTS1}->BSC [label="Abis\nTCP\nIP"]; + BSC->STP->MSC [label="A\nSCCP\nM3UA\nSCTP\nIP"]; +} +---- ==== BSC Implementation -- To view, visit https://gerrit.osmocom.org/5226 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f105b3febd4f99f4491e217ff1b1d0b28912980 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:30:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:30:45 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: bts: add blank line to separate a code block In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: bts: add blank line to separate a code block ...................................................................... common: bts: add blank line to separate a code block Change-Id: I6072253a9293e5000465039d7dcd0c6e2b9966a3 --- M common/chapters/bts.adoc 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/bts.adoc b/common/chapters/bts.adoc index 475b683..9fbbd51 100644 --- a/common/chapters/bts.adoc +++ b/common/chapters/bts.adoc @@ -76,6 +76,7 @@ In order to provision BTSs, you have to enter the BTS config node of the VTY. In order to configure BTS 0, you can issue the following sequence of commands: + ---- OpenBSC> enable OpenBSC# configure terminal -- To view, visit https://gerrit.osmocom.org/5232 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6072253a9293e5000465039d7dcd0c6e2b9966a3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:31:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:31:03 +0000 Subject: osmo-gsm-manuals[master]: OsmoHLR: update section 'Bootstrap the Database' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5225 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:31:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:31:31 +0000 Subject: osmo-gsm-manuals[master]: common: adjust preface to mention the current state of the O... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5222 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:31:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:31:47 +0000 Subject: osmo-gsm-manuals[master]: common: preface: minor tweaks In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5223 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icfc3dee5fa5e6cc0f6a6e80b122206deeceff102 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:32:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:32:11 +0000 Subject: osmo-gsm-manuals[master]: common: preface: spectrum license: also mention UMTS In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5224 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I496f56c05f873a7d9d1cdf2bc95231c7957cf51b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:32:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:32:14 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: preface: spectrum license: also mention UMTS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: preface: spectrum license: also mention UMTS ...................................................................... common: preface: spectrum license: also mention UMTS Change-Id: I496f56c05f873a7d9d1cdf2bc95231c7957cf51b --- M common/chapters/preface.adoc 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index 21ba761..60bb219 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -166,9 +166,9 @@ ==== Spectrum License -As GSM operates in licensed spectrum, please always double-check that -you have all required licenses and that you do not transmit on any ARFCN -that is not explicitly allocated to you by the applicable regulatory +As GSM and UMTS operate in licensed spectrum, please always double-check that +you have all required licenses and that you do not transmit on any ARFCN or +UARFCN that is not explicitly allocated to you by the applicable regulatory authority in your country. WARNING: Depending on your jurisdiction, operating a radio transmitter -- To view, visit https://gerrit.osmocom.org/5224 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I496f56c05f873a7d9d1cdf2bc95231c7957cf51b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:32:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:32:14 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: preface: minor tweaks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: preface: minor tweaks ...................................................................... common: preface: minor tweaks Change-Id: Icfc3dee5fa5e6cc0f6a6e80b122206deeceff102 --- M common/chapters/preface.adoc 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index fd77d99..21ba761 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -137,10 +137,11 @@ === Osmocom and sysmocom -Some of the founders of the Osmocom project have established sysmocom as -a company to provide products and services related to Osmocom. +Some of the founders of the Osmocom project have established 'sysmocom - +systems for mobile communications GmbH' as a company to provide products and +services related to Osmocom. -sysmocom and its staff have by far contributed the largest part of development +sysmocom and its staff have contributed by far the largest part of development and maintenance to the Osmocom mobile network infrastructure projects. As part of this work, sysmocom has also created the manual you are -- To view, visit https://gerrit.osmocom.org/5223 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfc3dee5fa5e6cc0f6a6e80b122206deeceff102 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:32:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:32:14 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: adjust preface to mention the current state of the O... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: adjust preface to mention the current state of the Osmocom art ...................................................................... common: adjust preface to mention the current state of the Osmocom art Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 --- M common/chapters/preface.adoc 1 file changed, 14 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index d85e318..fd77d99 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -22,12 +22,12 @@ despite its ubiquity had not yet seen and Free / Open Source software implementations. -`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and into -what is today known as its 'OsmoNITB' variant: A minimal implementation +`bs11-abis` quickly turned into `bsc-hack`, then 'OpenBSC' and its +'OsmoNITB' variant: A minimal implementation of all the required functionality of an entire GSM network, exposing A-bis towards the BTS. The project attracted more interested -developers, and surprisingly quick also commercial interest, -contribution and adoption. This added support for more BTS models +developers, and surprisingly quickly also commercial interest, +contribution and adoption. This allowed adding support for more BTS models. After having implemented the network-side GSM protocol stack in 2008 and 2009, in 2010 the same group of people set out to create a @@ -40,10 +40,17 @@ telephony, GMR satellite telephony, some SDR hardware, a SIM card protocol tracer and many others. -It has been a most exciting ride during the last seven years. I -wouldn't want to miss it under any circumstances. +Increasing commercial interest particularly in the BSS and core network +components has lead the way to 3G support in Osmocom, as well as the split +of the minimal 'OsmoNITB' implementation into separate and fully featured +network components: OsmoBSC, OsmoMSC, OsmoHLR, OsmoMGW and OsmoSTP (among +others), which allow seamless scaling from a simple "Network In The Box" to a +distributed installation for serious load. --- Harald Welte, Osmocom.org and OpenBSC founder, January 2016. +It has been a most exciting ride during the last eight-odd years. I would not +have wanted to miss it under any circumstances. + +-- Harald Welte, Osmocom.org and OpenBSC founder, December 2017. === Acknowledgements -- To view, visit https://gerrit.osmocom.org/5222 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5690e7b5f0bd1483b5451f284a758b4b09c80d95 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:32:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:32:15 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoHLR: update section 'Bootstrap the Database' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoHLR: update section 'Bootstrap the Database' ...................................................................... OsmoHLR: update section 'Bootstrap the Database' Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db --- M OsmoHLR/chapters/running.adoc 1 file changed, 6 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoHLR/chapters/running.adoc b/OsmoHLR/chapters/running.adoc index 09388c0..44b66f2 100644 --- a/OsmoHLR/chapters/running.adoc +++ b/OsmoHLR/chapters/running.adoc @@ -41,23 +41,13 @@ === Bootstrap the Database -Before first launching OsmoHLR, you need to create a database, which can be -done with these commands: +If no database exists yet, OsmoHLR will automatically create and bootstrap a +database file with empty tables. If no `-l` command-line option is provided, +this database file will be created in the current working directory. ----- -mkdir -p /var/lib/osmocom -sqlite3 /var/lib/osmocom/hlr.db < /usr/share/doc/osmo-hlr/hlr.sql ----- - -Depending on your installation choices, you will probably find `hlr.sql` in one -of these locations: - -- `/usr/share/doc/osmo-hlr/hlr.sql` -- `/usr/local/share/doc/osmo-hlr/hlr.sql` -- in `osmo-hlr.git`'s source tree at `sql/hlr.sql` - -NOTE: At the time of writing, OsmoHLR does not create an initial empty database -automatically, like OsmoNITB did. This behavior may be added in the future. +Alternatively, you may use the `osmo-hlr-db-tool`, which is installed along +with `osmo-hlr`, to bootstrap an empty database, or to migrate subscriber data +from an old 'OsmoNITB' database. See `osmo-hlr-db-tool --help`. === Multiple instances -- To view, visit https://gerrit.osmocom.org/5225 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b7b99cc77d8cd8cce42e7cf93f5e2cd3c2344db Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:34:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:34:12 +0000 Subject: osmo-pcu[master]: TBF: log timer invocation source In-Reply-To: References: Message-ID: Patch Set 1: Why not simply introduce the macro in this patch to avoid introducing explicit __FILE__ etc in all places? -- To view, visit https://gerrit.osmocom.org/5208 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:35:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:35:34 +0000 Subject: [MERGED] osmo-ci[master]: osmocom-nightly/latest: check if osc is installed In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmocom-nightly/latest: check if osc is installed ...................................................................... osmocom-nightly/latest: check if osc is installed Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index bcc83de..bf20cfe 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -11,6 +11,11 @@ DT=$(date +%Y%m%d) TOP=$(pwd) +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary not found" + exit 1 +fi + # start with a checkout of the project if [ -d $PROJ ]; then (cd $PROJ && osc up) diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index a00cad1..c2b603b 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -9,6 +9,11 @@ exit 1 fi +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary not found" + exit 1 +fi + set -x -e git clone git://git.osmocom.org/osmo-sip-connector -- To view, visit https://gerrit.osmocom.org/5179 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10ce91eab415c19bb811fbb2fd617d5ce2b58d41 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:36:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:36:18 +0000 Subject: osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 7 22:36:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 7 Dec 2017 22:36:44 +0000 Subject: [MERGED] osmo-msc[master]: sms db: properly quote MSISDN in various SQL queries In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sms db: properly quote MSISDN in various SQL queries ...................................................................... sms db: properly quote MSISDN in various SQL queries Related: OS#2706 Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 --- M src/libmsc/db.c 1 file changed, 18 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Objections: Max: I would prefer this is not merged as is diff --git a/src/libmsc/db.c b/src/libmsc/db.c index ca27b6a..eba4b1b 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -836,6 +836,7 @@ struct gsm_network *net = vsub->vlr->user_ctx; dbi_result result; struct gsm_sms *sms; + char *q_msisdn; if (!vsub->lu_complete) return NULL; @@ -844,13 +845,16 @@ if (*vsub->msisdn == '\0') return NULL; + dbi_conn_quote_string_copy(conn, vsub->msisdn, &q_msisdn); result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" - " AND dest_addr=%s" + " AND dest_addr = %s" " AND deliver_attempts <= %u" " ORDER BY id LIMIT 1", - vsub->msisdn, max_failed); + q_msisdn, max_failed); + free(q_msisdn); + if (!result) return NULL; @@ -872,14 +876,18 @@ { dbi_result result; struct gsm_sms *sms; + char *q_last_msisdn; + dbi_conn_quote_string_copy(conn, last_msisdn, &q_last_msisdn); result = dbi_conn_queryf(conn, "SELECT * FROM SMS" " WHERE sent IS NULL" - " AND dest_addr > '%s'" + " AND dest_addr > %s" " AND deliver_attempts <= %u" " ORDER BY dest_addr, id LIMIT 1", - last_msisdn, max_failed); + q_last_msisdn, max_failed); + free(q_last_msisdn); + if (!result) return NULL; @@ -936,11 +944,16 @@ int db_sms_delete_by_msisdn(const char *msisdn) { dbi_result result; + char *q_msisdn; if (!msisdn || !*msisdn) return 0; + + dbi_conn_quote_string_copy(conn, msisdn, &q_msisdn); result = dbi_conn_queryf(conn, "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - msisdn, msisdn); + q_msisdn, q_msisdn); + free(q_msisdn); + if (!result) { LOGP(DDB, LOGL_ERROR, "Failed to delete SMS for %s\n", msisdn); -- To view, visit https://gerrit.osmocom.org/5184 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I793a3863e6f4ccbabafc7dabaff97a8c79bbd8e0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 11:04:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 11:04:24 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5158 to look at the new patch set (#4). TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 183 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/4 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..9a559f9 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..240b5b5 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -56,6 +57,14 @@ OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), { 0, NULL } +}; + +static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T3169), + OSMO_VALUE_STRING(T3191), + OSMO_VALUE_STRING(T3193), + OSMO_VALUE_STRING(T3195), + { 0, NULL } }; static const struct rate_ctr_desc tbf_ctr_description[] = { @@ -183,6 +192,7 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T31, 0, sizeof(T31)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -324,7 +334,7 @@ /* Clean up the old MS object */ /* TODO: Use timer? */ - if (old_ms->ul_tbf() && old_ms->ul_tbf()->T == 0) { + if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending()) { if (old_ms->ul_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -335,7 +345,7 @@ tbf_free(old_ms->ul_tbf()); } } - if (old_ms->dl_tbf() && old_ms->dl_tbf()->T == 0) { + if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending()) { if (old_ms->dl_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -394,7 +404,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -465,6 +475,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -550,9 +561,37 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { - return stop_timer("T3191"); + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to stop unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (osmo_timer_pending(&T31[t])) { + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + osmo_timer_del(&T31[t]); + } +} + +/* check if any of T31xx timers are pending */ +bool gprs_rlcmac_tbf::timers_pending() +{ + uint8_t i; + + for (i = T3169; i < T_MAX; i++) + if (osmo_timer_pending(&T31[i])) + return true; + + return false; +} + +void gprs_rlcmac_tbf::stop_timers(const char *reason) +{ + uint8_t i; + for (i = 0; i < T_MAX; i++) + t_stop((enum tbf_timers)i, reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -562,6 +601,61 @@ tbf_name(this), T, reason); osmo_timer_del(&timer); } +} + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) +{ + LOGP(DRLCMAC, LOGL_NOTICE, "%s %s timeout expired, freeing TBF\n", + tbf_name(tbf), get_value_string(tbf_timers_names, t)); + + if (run_diag) + tbf->rlcmac_diag(); + + tbf_free(tbf); +} + +#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); } + +T_CBACK(T3169, true) +T_CBACK(T3191, true) +T_CBACK(T3193, false) +T_CBACK(T3195, true) + +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +{ + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to start unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (!force && osmo_timer_pending(&T31[t])) + return; + + LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", + tbf_name(this), osmo_timer_pending(&T31[t]) ? "re" : "", + get_value_string(tbf_timers_names, t), reason, sec, microsec); + + T31[t].data = this; + + switch(t) { + case T3169: + T31[t].cb = cb_T3169; + break; + case T3191: + T31[t].cb = cb_T3191; + break; + case T3193: + T31[t].cb = cb_T3193; + break; + case T3195: + T31[t].cb = cb_T3195; + break; + default: + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + osmo_timer_schedule(&T31[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -663,7 +757,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -685,7 +779,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +801,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +827,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1004,6 +1098,7 @@ tbf->handle_timeout(); } +/* FIXME: remove this once the switch over to t_start*()/t_stop*() is complete */ void gprs_rlcmac_tbf::handle_timeout() { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", @@ -1011,64 +1106,51 @@ num_T_exp++; - switch (T) { - case 0: /* assignment */ - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { - if (state_is(GPRS_RLCMAC_ASSIGN)) { - LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " - "PACCH assignment timeout.\n", tbf_name(this)); - tbf_free(this); - return; - } else - LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not " - "in assign state\n", tbf_name(this)); - } - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { - gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); - dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { - tbf_assign_control_ts(dl_tbf); - - if (!dl_tbf->upgrade_to_multislot) { - /* change state to FLOW, so scheduler - * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); - break; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - dl_tbf->update(); - - dl_tbf->trigger_ass(dl_tbf); - } else - LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after " - "IMM.ASS confirm\n", tbf_name(dl_tbf)); - } - break; - case 3169: - case 3191: - case 3195: - LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " - "transsmission\n", tbf_name(this), T); - rlcmac_diag(); - /* fall through */ - case 3193: - LOGP(DRLCMAC, LOGL_DEBUG, - "%s will be freed due to timeout\n", tbf_name(this)); - /* free TBF */ - tbf_free(this); + if (T) { + LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", + tbf_name(this), T); return; - break; - default: - LOGP(DRLCMAC, LOGL_ERROR, - "%s timer expired in unknown mode: %u\n", tbf_name(this), T); + } + + /* assignment */ + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { + if (state_is(GPRS_RLCMAC_ASSIGN)) { + LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to PACCH assignment timeout.\n", + tbf_name(this)); + tbf_free(this); + return; + } else + LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not in assign state\n", + tbf_name(this)); + } + + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); + dl_tbf->m_wait_confirm = 0; + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { + tbf_assign_control_ts(dl_tbf); + + if (!dl_tbf->upgrade_to_multislot) { + /* change state to FLOW, so scheduler + * will start transmission */ + dl_tbf->set_state(GPRS_RLCMAC_FLOW); + return; + } + + /* This tbf can be upgraded to use multiple DL + * timeslots and now that there is already one + * slot assigned send another DL assignment via + * PDCH. */ + + /* keep to flags */ + dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + dl_tbf->update(); + + dl_tbf->trigger_ass(dl_tbf); + } else + LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after IMM.ASS confirm\n", + tbf_name(dl_tbf)); } } diff --git a/src/tbf.h b/src/tbf.h index 80249df..2ac3455 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -136,6 +136,24 @@ TBF_CTR_EGPRS_UL_MCS9, }; +enum tbf_timers { + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + T3169, + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + T3191, + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + T3193, + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + T3195, + T_MAX +}; + #define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */ #define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */ #define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */ @@ -175,7 +193,10 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + bool timers_pending(); + void t_stop(enum tbf_timers t, const char *reason); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -248,6 +269,8 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ unsigned int num_T_exp; /* number of consecutive T expirations */ + + struct osmo_timer_list T31[T_MAX]; /* T31xx timers */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..9dba2e3 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -219,9 +219,9 @@ } /* Clean up the old MS object */ /* TODO: Put this into a separate function, use timer? */ - if (ms_old->ul_tbf() && ms_old->ul_tbf()->T == 0) + if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending()) tbf_free(ms_old->ul_tbf()); - if (ms_old->dl_tbf() && ms_old->dl_tbf()->T == 0) + if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending()) tbf_free(ms_old->dl_tbf()); ms->merge_old_ms(ms_old); @@ -489,6 +489,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -658,7 +659,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + t_stop(T3191, "ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -861,7 +862,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1124,9 +1125,8 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - tbf_timer_start(this, 3193, - bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + "release (DL-TBF)", true); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..c2cedc7 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..b466d1b 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,9 +51,9 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(osmo_timer_pending(&tbf->T31[T3191]) || osmo_timer_pending(&tbf->T31[T3193])); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) - OSMO_ASSERT(tbf->T != 0); + OSMO_ASSERT(tbf->timers_pending()); } static void test_tbf_base() -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 8 12:07:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 12:07:41 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: unify timer handling Message-ID: Review at https://gerrit.osmocom.org/5234 TBF: unify timer handling Use generic timer handling infrastracture to handle assignment/reject internal timer as well. Rename timer array accordingly. Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 5 files changed, 41 insertions(+), 79 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5234/1 diff --git a/src/bts.cpp b/src/bts.cpp index 29b743c..d01b234 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); + dl_tbf->t_start(T0, Tassign_agch, "assignment (AGCH)", true); return 0; } @@ -1040,7 +1040,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer("control acked (DL-TBF)"); + new_tbf->t_stop(T0, "control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index f2b8055..35d93a5 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -60,6 +60,7 @@ }; static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T0), OSMO_VALUE_STRING(T3169), OSMO_VALUE_STRING(T3191), OSMO_VALUE_STRING(T3193), @@ -170,7 +171,6 @@ poll_fn(0), poll_ts(0), n3105(0), - T(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -191,8 +191,7 @@ /* The classes of these members do not have proper constructors yet. * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); - memset(&timer, 0, sizeof(timer)); - memset(&T31, 0, sizeof(T31)); + memset(&T, 0, sizeof(T)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -334,7 +333,7 @@ /* Clean up the old MS object */ /* TODO: Use timer? */ - if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending()) { + if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending(T_MAX)) { if (old_ms->ul_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -345,7 +344,7 @@ tbf_free(old_ms->ul_tbf()); } } - if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending()) { + if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending(T_MAX)) { if (old_ms->dl_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -474,7 +473,7 @@ tbf_name(tbf), get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); @@ -539,27 +538,6 @@ "RELEASING", }; -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason) -{ - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, - "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); - - if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); - - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); - - tbf->T = T; - - /* Tunning timers can be safely re-scheduled. */ - tbf->timer.data = tbf; - tbf->timer.cb = &tbf_timer_cb; - - osmo_timer_schedule(&tbf->timer, seconds, microseconds); -} - void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { if (t >= T_MAX) { @@ -567,20 +545,24 @@ tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - if (osmo_timer_pending(&T31[t])) { + if (osmo_timer_pending(&T[t])) { LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); - osmo_timer_del(&T31[t]); + osmo_timer_del(&T[t]); } } /* check if any of T31xx timers are pending */ -bool gprs_rlcmac_tbf::timers_pending() +bool gprs_rlcmac_tbf::timers_pending(enum tbf_timers t) { uint8_t i; + if (t != T_MAX) + return osmo_timer_pending(&T[t]); + + /* we don't start with T0 because it's internal timer which requires special handling */ for (i = T3169; i < T_MAX; i++) - if (osmo_timer_pending(&T31[i])) + if (osmo_timer_pending(&T[i])) return true; return false; @@ -589,17 +571,9 @@ void gprs_rlcmac_tbf::stop_timers(const char *reason) { uint8_t i; - for (i = 0; i < T_MAX; i++) + /* we start with T0 because timer reset does not require any special handling */ + for (i = T0; i < T_MAX; i++) t_stop((enum tbf_timers)i, reason); -} - -void gprs_rlcmac_tbf::stop_timer(const char *reason) -{ - if (osmo_timer_pending(&timer)) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", - tbf_name(this), T, reason); - osmo_timer_del(&timer); - } } static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) @@ -627,34 +601,37 @@ tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - if (!force && osmo_timer_pending(&T31[t])) + if (!force && osmo_timer_pending(&T[t])) return; LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", - tbf_name(this), osmo_timer_pending(&T31[t]) ? "re" : "", + tbf_name(this), osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); - T31[t].data = this; + T[t].data = this; switch(t) { + case T0: + T[t].cb = tbf_timer_cb; + break; case T3169: - T31[t].cb = cb_T3169; + T[t].cb = cb_T3169; break; case T3191: - T31[t].cb = cb_T3191; + T[t].cb = cb_T3191; break; case T3193: - T31[t].cb = cb_T3193; + T[t].cb = cb_T3193; break; case T3195: - T31[t].cb = cb_T3195; + T[t].cb = cb_T3195; break; default: LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - osmo_timer_schedule(&T31[t], sec, microsec); + osmo_timer_schedule(&T[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -1105,17 +1082,9 @@ tbf->handle_timeout(); } -/* FIXME: remove this once the switch over to t_start*()/t_stop*() is complete */ void gprs_rlcmac_tbf::handle_timeout() { - LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", - tbf_name(this), T); - - if (T) { - LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", - tbf_name(this), T); - return; - } + LOGP(DRLCMAC, LOGL_DEBUG, "%s timer 0 expired.\n", tbf_name(this)); /* assignment */ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { @@ -1280,7 +1249,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer("assignment (DL-TBF)"); + new_dl_tbf->t_stop(T0, "assignment (DL-TBF)"); } @@ -1310,7 +1279,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); + t_start(T0, Treject_pacch, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index 05a4313..2e8a2ba 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -137,6 +137,9 @@ }; enum tbf_timers { + /* internal assign/reject timer */ + T0, + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ T3169, @@ -192,9 +195,8 @@ int update(); void handle_timeout(); - void stop_timer(const char *reason); void stop_timers(const char *reason); - bool timers_pending(); + bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); @@ -265,11 +267,6 @@ gprs_rlc m_rlc; uint8_t n3105; /* N3105 counter */ - - struct osmo_timer_list timer; - unsigned int T; /* Txxxx number */ - - struct osmo_timer_list T31[T_MAX]; /* T31xx timers */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ @@ -329,7 +326,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - + struct osmo_timer_list T[T_MAX]; mutable char m_name_buf[60]; }; @@ -352,9 +349,6 @@ GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); - -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 9dba2e3..87a0dce 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -219,9 +219,9 @@ } /* Clean up the old MS object */ /* TODO: Put this into a separate function, use timer? */ - if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending()) + if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->ul_tbf()); - if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending()) + if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->dl_tbf()); ms->merge_old_ms(ms_old); @@ -488,7 +488,6 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer("assignment (DL-TBF)"); stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ @@ -503,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); + t_start(T0, Tassign_pacch, "assignment (PACCH)", true); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index b466d1b..18bbc76 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,9 +51,9 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(osmo_timer_pending(&tbf->T31[T3191]) || osmo_timer_pending(&tbf->T31[T3193])); + OSMO_ASSERT(tbf->timers_pending(T3191) || tbf->timers_pending(T3193)); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) - OSMO_ASSERT(tbf->timers_pending()); + OSMO_ASSERT(tbf->timers_pending(T_MAX)); } static void test_tbf_base() -- To view, visit https://gerrit.osmocom.org/5234 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 8 13:11:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 13:11:53 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: unify timer handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5234 to look at the new patch set (#2). TBF: unify timer handling Use generic timer handling infrastracture to handle assignment/reject internal timer as well. Rename timer array accordingly. Use defines with explicit second/microsecond values to make it more readable. Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 4 files changed, 34 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5234/2 diff --git a/src/bts.cpp b/src/bts.cpp index 29b743c..00c2016 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); + dl_tbf->t_start(T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); return 0; } @@ -1040,7 +1040,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer("control acked (DL-TBF)"); + new_tbf->t_stop(T0, "control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index ce26754..12a335d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -60,6 +60,7 @@ }; static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T0), OSMO_VALUE_STRING(T3169), OSMO_VALUE_STRING(T3191), OSMO_VALUE_STRING(T3193), @@ -170,7 +171,6 @@ poll_fn(0), poll_ts(0), n3105(0), - T(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -191,8 +191,7 @@ /* The classes of these members do not have proper constructors yet. * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); - memset(&timer, 0, sizeof(timer)); - memset(&T31, 0, sizeof(T31)); + memset(&T, 0, sizeof(T)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -474,7 +473,7 @@ tbf_name(tbf), get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); @@ -539,27 +538,6 @@ "RELEASING", }; -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason) -{ - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, - "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); - - if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); - - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); - - tbf->T = T; - - /* Tunning timers can be safely re-scheduled. */ - tbf->timer.data = tbf; - tbf->timer.cb = &tbf_timer_cb; - - osmo_timer_schedule(&tbf->timer, seconds, microseconds); -} - void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { if (t >= T_MAX) { @@ -567,10 +545,10 @@ tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - if (osmo_timer_pending(&T31[t])) { + if (osmo_timer_pending(&T[t])) { LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); - osmo_timer_del(&T31[t]); + osmo_timer_del(&T[t]); } } @@ -580,10 +558,11 @@ uint8_t i; if (t != T_MAX) - return osmo_timer_pending(&T31[t]); + return osmo_timer_pending(&T[t]); + /* we don't start with T0 because it's internal timer which requires special handling */ for (i = T3169; i < T_MAX; i++) - if (osmo_timer_pending(&T31[i])) + if (osmo_timer_pending(&T[i])) return true; return false; @@ -592,17 +571,9 @@ void gprs_rlcmac_tbf::stop_timers(const char *reason) { uint8_t i; - for (i = 0; i < T_MAX; i++) + /* we start with T0 because timer reset does not require any special handling */ + for (i = T0; i < T_MAX; i++) t_stop((enum tbf_timers)i, reason); -} - -void gprs_rlcmac_tbf::stop_timer(const char *reason) -{ - if (osmo_timer_pending(&timer)) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer T%u [%s]\n", - tbf_name(this), T, reason); - osmo_timer_del(&timer); - } } static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) @@ -630,34 +601,37 @@ tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - if (!force && osmo_timer_pending(&T31[t])) + if (!force && osmo_timer_pending(&T[t])) return; LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", - tbf_name(this), osmo_timer_pending(&T31[t]) ? "re" : "", + tbf_name(this), osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); - T31[t].data = this; + T[t].data = this; switch(t) { + case T0: + T[t].cb = tbf_timer_cb; + break; case T3169: - T31[t].cb = cb_T3169; + T[t].cb = cb_T3169; break; case T3191: - T31[t].cb = cb_T3191; + T[t].cb = cb_T3191; break; case T3193: - T31[t].cb = cb_T3193; + T[t].cb = cb_T3193; break; case T3195: - T31[t].cb = cb_T3195; + T[t].cb = cb_T3195; break; default: LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); } - osmo_timer_schedule(&T31[t], sec, microsec); + osmo_timer_schedule(&T[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -1110,14 +1084,7 @@ void gprs_rlcmac_tbf::handle_timeout() { - LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", - tbf_name(this), T); - - if (T) { - LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", - tbf_name(this), T); - return; - } + LOGP(DRLCMAC, LOGL_DEBUG, "%s timer 0 expired.\n", tbf_name(this)); /* assignment */ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { @@ -1282,7 +1249,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer("assignment (DL-TBF)"); + new_dl_tbf->t_stop(T0, "assignment (DL-TBF)"); } @@ -1312,7 +1279,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); + t_start(T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index 392937c..d0334db 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -41,9 +41,9 @@ * TBF instance */ -#define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */ -#define Tassign_pacch 2,0 /* timeout for pacch assigment */ -#define Treject_pacch 0,2000 /* timeout for tbf reject for PRR*/ +#define T_ASS_AGCH_USEC 200000 /* waiting after IMM.ASS confirm */ +#define T_ASS_PACCH_SEC 2 /* timeout for pacch assigment */ +#define T_REJ_PACCH_USEC 2000 /* timeout for tbf reject for PRR*/ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ @@ -137,6 +137,9 @@ }; enum tbf_timers { + /* internal assign/reject timer */ + T0, + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ T3169, @@ -192,7 +195,6 @@ int update(); void handle_timeout(); - void stop_timer(const char *reason); void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); @@ -265,9 +267,6 @@ gprs_rlc m_rlc; uint8_t n3105; /* N3105 counter */ - - struct osmo_timer_list timer; - unsigned int T; /* Txxxx number */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ @@ -327,7 +326,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - struct osmo_timer_list T31[T_MAX]; + struct osmo_timer_list T[T_MAX]; mutable char m_name_buf[60]; }; @@ -350,9 +349,6 @@ GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); - -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 4fc1585..32b1796 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -488,7 +488,6 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer("assignment (DL-TBF)"); stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ @@ -503,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); + t_start(T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); -- To view, visit https://gerrit.osmocom.org/5234 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 8 13:11:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 13:11:53 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: remove unused variable In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5219 to look at the new patch set (#3). TBF: remove unused variable The num_T_exp is write-only so it can be safely dropped. Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 --- M src/tbf.cpp M src/tbf.h 2 files changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/5219/3 diff --git a/src/tbf.cpp b/src/tbf.cpp index a35b4aa..6e59824 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -171,7 +171,6 @@ poll_ts(0), n3105(0), T(0), - num_T_exp(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -552,7 +551,6 @@ LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); tbf->T = T; - tbf->num_T_exp = 0; /* Tunning timers can be safely re-scheduled. */ tbf->timer.data = tbf; @@ -1105,8 +1103,6 @@ { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", tbf_name(this), T); - - num_T_exp++; if (T) { LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", diff --git a/src/tbf.h b/src/tbf.h index 6bd4703..4906245 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -268,7 +268,6 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ - unsigned int num_T_exp; /* number of consecutive T expirations */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ -- To view, visit https://gerrit.osmocom.org/5219 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 8 13:11:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 13:11:53 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5158 to look at the new patch set (#5). TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 184 insertions(+), 79 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/5 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..9a559f9 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..a35b4aa 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -56,6 +57,14 @@ OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), { 0, NULL } +}; + +static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T3169), + OSMO_VALUE_STRING(T3191), + OSMO_VALUE_STRING(T3193), + OSMO_VALUE_STRING(T3195), + { 0, NULL } }; static const struct rate_ctr_desc tbf_ctr_description[] = { @@ -183,6 +192,7 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T31, 0, sizeof(T31)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -324,7 +334,7 @@ /* Clean up the old MS object */ /* TODO: Use timer? */ - if (old_ms->ul_tbf() && old_ms->ul_tbf()->T == 0) { + if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending(T_MAX)) { if (old_ms->ul_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -335,7 +345,7 @@ tbf_free(old_ms->ul_tbf()); } } - if (old_ms->dl_tbf() && old_ms->dl_tbf()->T == 0) { + if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending(T_MAX)) { if (old_ms->dl_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -394,7 +404,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -465,6 +475,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -550,9 +561,40 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { - return stop_timer("T3191"); + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to stop unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (osmo_timer_pending(&T31[t])) { + LOGP(DRLCMAC, LOGL_DEBUG, "%s stopping timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + osmo_timer_del(&T31[t]); + } +} + +/* check if any of T31xx timer(s) are pending */ +bool gprs_rlcmac_tbf::timers_pending(enum tbf_timers t) +{ + uint8_t i; + + if (t != T_MAX) + return osmo_timer_pending(&T31[t]); + + for (i = T3169; i < T_MAX; i++) + if (osmo_timer_pending(&T31[i])) + return true; + + return false; +} + +void gprs_rlcmac_tbf::stop_timers(const char *reason) +{ + uint8_t i; + for (i = 0; i < T_MAX; i++) + t_stop((enum tbf_timers)i, reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -562,6 +604,61 @@ tbf_name(this), T, reason); osmo_timer_del(&timer); } +} + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) +{ + LOGP(DRLCMAC, LOGL_NOTICE, "%s %s timeout expired, freeing TBF\n", + tbf_name(tbf), get_value_string(tbf_timers_names, t)); + + if (run_diag) + tbf->rlcmac_diag(); + + tbf_free(tbf); +} + +#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); } + +T_CBACK(T3169, true) +T_CBACK(T3191, true) +T_CBACK(T3193, false) +T_CBACK(T3195, true) + +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +{ + if (t >= T_MAX) { + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to start unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + if (!force && osmo_timer_pending(&T31[t])) + return; + + LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", + tbf_name(this), osmo_timer_pending(&T31[t]) ? "re" : "", + get_value_string(tbf_timers_names, t), reason, sec, microsec); + + T31[t].data = this; + + switch(t) { + case T3169: + T31[t].cb = cb_T3169; + break; + case T3191: + T31[t].cb = cb_T3191; + break; + case T3193: + T31[t].cb = cb_T3193; + break; + case T3195: + T31[t].cb = cb_T3195; + break; + default: + LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); + } + + osmo_timer_schedule(&T31[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -663,7 +760,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -685,7 +782,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -707,7 +804,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -733,7 +830,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1011,64 +1108,51 @@ num_T_exp++; - switch (T) { - case 0: /* assignment */ - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { - if (state_is(GPRS_RLCMAC_ASSIGN)) { - LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " - "PACCH assignment timeout.\n", tbf_name(this)); - tbf_free(this); - return; - } else - LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not " - "in assign state\n", tbf_name(this)); - } - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { - gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); - dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { - tbf_assign_control_ts(dl_tbf); - - if (!dl_tbf->upgrade_to_multislot) { - /* change state to FLOW, so scheduler - * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); - break; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - dl_tbf->update(); - - dl_tbf->trigger_ass(dl_tbf); - } else - LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after " - "IMM.ASS confirm\n", tbf_name(dl_tbf)); - } - break; - case 3169: - case 3191: - case 3195: - LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout during " - "transsmission\n", tbf_name(this), T); - rlcmac_diag(); - /* fall through */ - case 3193: - LOGP(DRLCMAC, LOGL_DEBUG, - "%s will be freed due to timeout\n", tbf_name(this)); - /* free TBF */ - tbf_free(this); + if (T) { + LOGP(DRLCMAC, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", + tbf_name(this), T); return; - break; - default: - LOGP(DRLCMAC, LOGL_ERROR, - "%s timer expired in unknown mode: %u\n", tbf_name(this), T); + } + + /* assignment */ + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { + if (state_is(GPRS_RLCMAC_ASSIGN)) { + LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to PACCH assignment timeout.\n", + tbf_name(this)); + tbf_free(this); + return; + } else + LOGP(DRLCMAC, LOGL_ERROR, "Error: %s is not in assign state\n", + tbf_name(this)); + } + + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); + dl_tbf->m_wait_confirm = 0; + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { + tbf_assign_control_ts(dl_tbf); + + if (!dl_tbf->upgrade_to_multislot) { + /* change state to FLOW, so scheduler + * will start transmission */ + dl_tbf->set_state(GPRS_RLCMAC_FLOW); + return; + } + + /* This tbf can be upgraded to use multiple DL + * timeslots and now that there is already one + * slot assigned send another DL assignment via + * PDCH. */ + + /* keep to flags */ + dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + dl_tbf->update(); + + dl_tbf->trigger_ass(dl_tbf); + } else + LOGP(DRLCMAC, LOGL_NOTICE, "%s Continue flow after IMM.ASS confirm\n", + tbf_name(dl_tbf)); } } diff --git a/src/tbf.h b/src/tbf.h index 80249df..6bd4703 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -136,6 +136,24 @@ TBF_CTR_EGPRS_UL_MCS9, }; +enum tbf_timers { + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + T3169, + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + T3191, + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + T3193, + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + T3195, + T_MAX +}; + #define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */ #define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */ #define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */ @@ -175,7 +193,10 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + bool timers_pending(enum tbf_timers t); + void t_stop(enum tbf_timers t, const char *reason); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -305,7 +326,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - + struct osmo_timer_list T31[T_MAX]; mutable char m_name_buf[60]; }; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..4fc1585 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -219,9 +219,9 @@ } /* Clean up the old MS object */ /* TODO: Put this into a separate function, use timer? */ - if (ms_old->ul_tbf() && ms_old->ul_tbf()->T == 0) + if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->ul_tbf()); - if (ms_old->dl_tbf() && ms_old->dl_tbf()->T == 0) + if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->dl_tbf()); ms->merge_old_ms(ms_old); @@ -489,6 +489,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -658,7 +659,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + t_stop(T3191, "ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -861,7 +862,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1124,9 +1125,8 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - tbf_timer_start(this, 3193, - bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + "release (DL-TBF)", true); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..c2cedc7 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..18bbc76 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,9 +51,9 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(tbf->timers_pending(T3191) || tbf->timers_pending(T3193)); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) - OSMO_ASSERT(tbf->T != 0); + OSMO_ASSERT(tbf->timers_pending(T_MAX)); } static void test_tbf_base() -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 8 13:48:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 13:48:51 +0000 Subject: [PATCH] libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3258 to look at the new patch set (#2). Fix malformed Abis/RSL messages with extra L3 Information field Some Abis/RSL messages such as "Release Indication" contained 3 extra bytes from an L3 Information header which should not be there according to specs in GSM 08.58 (section 8.3 "Radio link layer management messages"). Other RSL messages were affected by the same issue, except for "Establish Indication", which had already a workaround in send_rslms_dlsap. This commit fixes the issue in a generic way, removes the "Establish Indication" and fixes the test accounting for the bug, as it otherwise fails after applying the changes. Fixes: OS#1635, OS#2336 Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 --- M src/gsm/lapd_core.c M src/gsm/lapdm.c M tests/lapd/lapd_test.c M tests/lapd/lapd_test.ok 4 files changed, 3 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/3258/2 diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 1f1ca83..5db66af 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -376,9 +376,7 @@ static inline int send_dl_simple(uint8_t prim, uint8_t op, struct lapd_msg_ctx *lctx) { - struct msgb *msg = lapd_msgb_alloc(0, "DUMMY"); - - return send_dl_l3(prim, op, lctx, msg); + return send_dl_l3(prim, op, lctx, NULL); } /* send MDL-ERROR INDICATION */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index 7ca2b3e..80c0d17 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -414,11 +414,6 @@ switch (OSMO_PRIM_HDR(&dp->oph)) { case OSMO_PRIM(PRIM_DL_EST, PRIM_OP_INDICATION): - if (dp->oph.msg && dp->oph.msg->len == 0) { - /* omit L3 info by freeing message */ - msgb_free(dp->oph.msg); - dp->oph.msg = NULL; - } rll_msg = RSL_MT_EST_IND; break; case OSMO_PRIM(PRIM_DL_EST, PRIM_OP_CONFIRM): diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index fd92cac..e627ba6 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -350,19 +350,13 @@ struct abis_rsl_rll_hdr hdr; printf("MS: Verifying incoming primitive.\n"); - OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr) + 3); + OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr)); /* verify the header */ memset(&hdr, 0, sizeof(hdr)); rsl_init_rll_hdr(&hdr, RSL_MT_EST_CONF); hdr.c.msg_discr |= ABIS_RSL_MDISC_TRANSP; OSMO_ASSERT(memcmp(msg->data, &hdr, sizeof(hdr)) == 0); - - /* Verify the added RSL_IE_L3_INFO but we have a bug here */ - OSMO_ASSERT(msg->data[6] == RSL_IE_L3_INFO); - #pragma message ("RSL_IE_L3_INFO 16 bit length is wrong") - /* This should be okay but it is actually 0x0, 0x9c on ia-32 */ - /* OSMO_ASSERT(msg->data[7] == 0x0 && msg->data[8] == 0x0); */ } else if (state->ms_read == 1) { printf("MS: Verifying incoming MM message: %d\n", msgb_l3len(msg)); OSMO_ASSERT(msgb_l3len(msg) == 3); diff --git a/tests/lapd/lapd_test.ok b/tests/lapd/lapd_test.ok index e188e27..835ca2b 100644 --- a/tests/lapd/lapd_test.ok +++ b/tests/lapd/lapd_test.ok @@ -7,7 +7,7 @@ Confirming Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b -ms_to_bts_tx_cb: BTS->MS(us) message 9 +ms_to_bts_tx_cb: BTS->MS(us) message 6 MS: Verifying incoming primitive. Sending back to MS -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 8 13:48:52 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 13:48:52 +0000 Subject: [PATCH] libosmocore[master]: cosmetic: Fix trailing whitespace Message-ID: Review at https://gerrit.osmocom.org/5235 cosmetic: Fix trailing whitespace Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 --- M src/gsm/lapd_core.c M src/gsm/lapdm.c 2 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/5235/1 diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index d14063e..1f1ca83 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -548,7 +548,7 @@ msg = lapd_msgb_alloc(0, "DUMMY"); osmo_prim_init(&dp.oph, 0, PRIM_DL_EST, PRIM_OP_REQUEST, msg); - + return lapd_est_req(&dp, &dl->lctx); } @@ -1500,7 +1500,7 @@ LOGP(DLLAPD, LOGL_INFO, "I received in state %s on SAPI(%u) (dl=%p)\n", lapd_state_name(dl->state), lctx->sapi, dl); - + /* G.2.2 Wrong value of the C/R bit */ if (lctx->cr == dl->cr.rem2loc.resp) { LOGP(DLLAPD, LOGL_ERROR, @@ -1781,7 +1781,7 @@ dl->tx_hist[0].more = 0; /* set Vs to 0, because it is used as index when resending SABM */ dl->v_send = 0; - + /* Set states */ dl->own_busy = dl->peer_busy = 0; dl->retrans_ctr = 0; @@ -2008,7 +2008,7 @@ LOGP(DLLAPD, LOGL_INFO, "perform re-establishment (SABM) length=%d (dl=%p)\n", msg->len, dl); - + /* be sure that history is empty */ lapd_dl_flush_hist(dl); @@ -2119,7 +2119,7 @@ dl->tx_hist[0].more = 0; /* set Vs to 0, because it is used as index when resending DISC */ dl->v_send = 0; - + /* Set states */ dl->own_busy = dl->peer_busy = 0; dl->retrans_ctr = 0; @@ -2155,7 +2155,7 @@ } l2downstatelist[] = { /* create and send UI command */ {ALL_STATES, - PRIM_DL_UNIT_DATA, PRIM_OP_REQUEST, + PRIM_DL_UNIT_DATA, PRIM_OP_REQUEST, "DL-UNIT-DATA-REQUEST", lapd_udata_req}, /* create and send SABM command */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index 5efe755..7ca2b3e 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -378,7 +378,7 @@ rllh->data[2] = RSL_IE_MS_POWER; rllh->data[3] = mctx->tx_power_ind; - + return rslms_sendmsg(msg, mctx->dl->entity); } @@ -1086,7 +1086,7 @@ ref->t2 = tm.t2; ref->t3_low = tm.t3 & 0x7; ref->t3_high = tm.t3 >> 3; - + return rslms_sendmsg(msg, le); } -- To view, visit https://gerrit.osmocom.org/5235 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 8 14:34:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 14:34:08 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log timer invocation source In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5208 to look at the new patch set (#2). TBF: log timer invocation source When troubleshooting TBF timers we're not only interested in timer duration but also in the code which triggered it. Let's use LOGPSRC to log it: wrap t_start() in a macro for convenience. Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 24 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/5208/2 diff --git a/src/bts.cpp b/src/bts.cpp index 00c2016..4dd5851 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -548,7 +548,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - dl_tbf->t_start(T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); + T_START(dl_tbf, T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); return 0; } @@ -681,7 +681,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); + T_START(tbf, T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGP(DRLCMAC, LOGL_DEBUG, "%s [UPLINK] START\n", tbf_name(tbf)); LOGP(DRLCMAC, LOGL_DEBUG, "%s RX: [PCU <- BTS] RACH " diff --git a/src/tbf.cpp b/src/tbf.cpp index 12a335d..0393b6d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -35,6 +35,7 @@ #include #include #include +#include } #include @@ -403,7 +404,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); + T_START(tbf, T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -594,17 +595,18 @@ T_CBACK(T3193, false) T_CBACK(T3195, true) -void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force, + const char *file, unsigned line) { if (t >= T_MAX) { - LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to start unknown timer %s [%s]\n", - tbf_name(this), get_value_string(tbf_timers_names, t), reason); + LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to start unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); } if (!force && osmo_timer_pending(&T[t])) return; - LOGP(DRLCMAC, LOGL_DEBUG, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", + LOGPSRC(DRLCMAC, LOGL_DEBUG, file, line, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", tbf_name(this), osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); @@ -627,7 +629,7 @@ T[t].cb = cb_T3195; break; default: - LOGP(DRLCMAC, LOGL_ERROR, "%s attempting to set callback for unknown timer %s [%s]\n", + LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to set callback for unknown timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); } @@ -723,7 +725,7 @@ if (m_n3101 == bts->bts_data()->n3101) { LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + T_START(this, T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); return; } @@ -741,7 +743,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); + T_START(ul_tbf, T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -763,7 +765,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(this, T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -785,7 +787,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(this, T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -811,7 +813,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(dl_tbf, T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1279,7 +1281,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - t_start(T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); + T_START(this, T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index d0334db..cd52ce0 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -167,6 +167,8 @@ #define GPRS_RLCMAC_FLAG_TO_DL_ASS 7 #define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */ +#define T_START(tbf, t, sec, usec, r, f) tbf->t_start(t, sec, usec, r, f, __FILE__, __LINE__) + struct gprs_rlcmac_tbf { gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir); @@ -198,7 +200,8 @@ void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); - void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force, + const char *file, unsigned line); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 32b1796..073edd4 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -502,7 +502,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - t_start(T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); + T_START(this, T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); } else { LOGP(DRLCMACDL, LOGL_DEBUG, "Send dowlink assignment for %s on PCH, no TBF exist (IMSI=%s)\n", tbf_name(this), imsi()); @@ -861,7 +861,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); + T_START(this, T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1124,7 +1124,7 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + T_START(this, T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)", true); /* reset rlc states */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index c2cedc7..7ba0572 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -193,7 +193,7 @@ unsigned int block_idx; /* restart T3169 */ - t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); + T_START(this, T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; -- To view, visit https://gerrit.osmocom.org/5208 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 8 14:34:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 14:34:08 +0000 Subject: [PATCH] osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5215 to look at the new patch set (#2). Introduce LOGTBF* for consistent logging When troubleshooting complex issues with TBF lifecycle, it's much easier to follow the logs which are consistently formatted. Add LOGTBF*() macro similar to struct-specific log routines we use in other Osmocom project and use it to log TBF-related messages in a unified way. Tweak test output accordingly. Related: OS#2407 Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 970 insertions(+), 1,007 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/5215/2 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 14:40:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 14:40:34 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/3258/1/src/gsm/lapdm.c File src/gsm/lapdm.c: Line 422: if (dp->oph.msg && dp->oph.msg->len == 0) { > we introduce three identical copies of the related code. A function should Agree - smth like static l3_info_omit() would be easier to read. -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 14:41:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 14:41:30 +0000 Subject: libosmocore[master]: cosmetic: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5235 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:00:37 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 15:00:37 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/3258/1/src/gsm/lapdm.c File src/gsm/lapdm.c: Line 422: if (dp->oph.msg && dp->oph.msg->len == 0) { > Agree - smth like static l3_info_omit() would be easier to read. Max, have a look at my next version of the patch. This comment makes no sense in the new version I submited because these lines are removed. -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 8 Dec 2017 15:04:01 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove excess whitespaces in Makefile.am In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5211 to look at the new patch set (#3). cosmetic: remove excess whitespaces in Makefile.am Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/5211/3 diff --git a/tests/Makefile.am b/tests/Makefile.am index 18b8ce6..1eb28d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,22 +21,22 @@ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' - + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) TESTSUITE = $(srcdir)/testsuite DISTCLEANFILES = atconfig - + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) - + installcheck-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ $(TESTSUITEFLAGS) - + clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean - + AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 8 Dec 2017 15:04:01 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove unused variable "ret" In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5212 to look at the new patch set (#2). cosmetic: remove unused variable "ret" remove unused variable "ret" in unit test "power" Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 --- M tests/power/power_test.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/5212/2 diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 3099217..295f638 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -39,7 +39,6 @@ struct gsm_bts_trx trx; struct gsm_bts_trx_ts ts; struct gsm_lchan *lchan; - int ret; memset(&bts, 0, sizeof(bts)); memset(&btsb, 0, sizeof(btsb)); -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 8 Dec 2017 15:04:01 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: remove unused variable "static_ilv" In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5213 to look at the new patch set (#2). cosmetic: remove unused variable "static_ilv" remove unused const variable "static_ilv" from unit test "agch" Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 --- M tests/agch/agch_test.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/5213/2 diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 7c4e6cd..b5094af 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -31,10 +31,6 @@ static struct gsm_bts *bts; static struct gsm_bts_role_bts *btsb; -static const uint8_t static_ilv[] = { - 0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19 -}; - static int count_imm_ass_rej_refs(struct gsm48_imm_ass_rej *rej) { int count = 0; -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 8 Dec 2017 15:04:01 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5214 to look at the new patch set (#2). osmo-bts-trx: add error concealment unit for GSM-FR When a bad GSM-FR voice frame is received, the frame replaced ith a silence frame. This may cause unpleasant audio effects. Add a functionality (see ecu_fr.c, ecu_fr_conceal() and ecu_fr_reset() to craft a replacement frame from the last known good frame. Add unit test (ecu_fr_test.c) Integrate into osmo-bts-trx Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M configure.ac M include/osmo-bts/Makefile.am A include/osmo-bts/ecu_fr.h M include/osmo-bts/gsm_data_shared.h M src/common/Makefile.am A src/common/ecu_fr.c M src/osmo-bts-trx/scheduler_trx.c M tests/Makefile.am A tests/ecu_fr/Makefile.am A tests/ecu_fr/ecu_fr_test.c A tests/ecu_fr/ecu_fr_test.ok M tests/testsuite.at 12 files changed, 818 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/2 diff --git a/configure.ac b/configure.ac index e3ea9ca..0d1a882 100644 --- a/configure.ac +++ b/configure.ac @@ -180,4 +180,5 @@ tests/tx_power/Makefile tests/power/Makefile tests/meas/Makefile + tests/ecu_fr/Makefile Makefile) diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index a15ce3d..86bcdf1 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -2,4 +2,4 @@ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ power_control.h scheduler.h scheduler_backend.h phy_link.h \ - dtx_dl_amr_fsm.h + dtx_dl_amr_fsm.h ecu_fr.h diff --git a/include/osmo-bts/ecu_fr.h b/include/osmo-bts/ecu_fr.h new file mode 100644 index 0000000..f33f508 --- /dev/null +++ b/include/osmo-bts/ecu_fr.h @@ -0,0 +1,10 @@ +#pragma once + +/* Context information for the full rate ECU states */ +struct ecu_fr_ctx { + bool subsequent_lost_frame; + uint8_t frame_backup[GSM_FR_BYTES]; +}; + +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame); +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..37d6e0b 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -19,6 +19,7 @@ #include #include +#include #ifndef ROLE_BSC #include @@ -381,6 +382,8 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + struct ecu_fr_ctx ecu_fr_ctx; #endif }; diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 67f3e80..d2d6ec6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -12,6 +12,6 @@ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ l1sap.c cbch.c power_control.c main.c phy_link.c \ - dtx_dl_amr_fsm.c + dtx_dl_amr_fsm.c ecu_fr.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/ecu_fr.c b/src/common/ecu_fr.c new file mode 100644 index 0000000..92228cd --- /dev/null +++ b/src/common/ecu_fr.c @@ -0,0 +1,415 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* See also GSM 6.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/* See also RFC 3551 Table 3: GSM payload format: */ +enum gsm610_bit_offsets { + GSM610_SIGNATURE_0, + GSM610_SIGNATURE_1, + GSM610_SIGNATURE_2, + GSM610_SIGNATURE_3, + GSM610_LARC0_0, + GSM610_LARC0_1, + GSM610_LARC0_2, + GSM610_LARC0_3, + GSM610_LARC0_4, + GSM610_LARC0_5, + GSM610_LARC1_0, + GSM610_LARC1_1, + GSM610_LARC1_2, + GSM610_LARC1_3, + GSM610_LARC1_4, + GSM610_LARC1_5, + GSM610_LARC2_0, + GSM610_LARC2_1, + GSM610_LARC2_2, + GSM610_LARC2_3, + GSM610_LARC2_4, + GSM610_LARC3_0, + GSM610_LARC3_1, + GSM610_LARC3_2, + GSM610_LARC3_3, + GSM610_LARC3_4, + GSM610_LARC4_0, + GSM610_LARC4_1, + GSM610_LARC4_2, + GSM610_LARC4_3, + GSM610_LARC5_0, + GSM610_LARC5_1, + GSM610_LARC5_2, + GSM610_LARC5_3, + GSM610_LARC6_0, + GSM610_LARC6_1, + GSM610_LARC6_2, + GSM610_LARC7_0, + GSM610_LARC7_1, + GSM610_LARC7_2, + GSM610_NC0_0, + GSM610_NC0_1, + GSM610_NC0_2, + GSM610_NC0_3, + GSM610_NC0_4, + GSM610_NC0_5, + GSM610_NC0_6, + GSM610_BC0_0, + GSM610_BC0_1, + GSM610_MC0_0, + GSM610_MC0_1, + GSM610_XMAXC00, + GSM610_XMAXC01, + GSM610_XMAXC02, + GSM610_XMAXC03, + GSM610_XMAXC04, + GSM610_XMAXC05, + GSM610_XMC0_0, + GSM610_XMC0_1, + GSM610_XMC0_2, + GSM610_XMC1_0, + GSM610_XMC1_1, + GSM610_XMC1_2, + GSM610_XMC2_0, + GSM610_XMC2_1, + GSM610_XMC2_2, + GSM610_XMC3_0, + GSM610_XMC3_1, + GSM610_XMC3_2, + GSM610_XMC4_0, + GSM610_XMC4_1, + GSM610_XMC4_2, + GSM610_XMC5_0, + GSM610_XMC5_1, + GSM610_XMC5_2, + GSM610_XMC6_0, + GSM610_XMC6_1, + GSM610_XMC6_2, + GSM610_XMC7_0, + GSM610_XMC7_1, + GSM610_XMC7_2, + GSM610_XMC8_0, + GSM610_XMC8_1, + GSM610_XMC8_2, + GSM610_XMC9_0, + GSM610_XMC9_1, + GSM610_XMC9_2, + GSM610_XMC10_0, + GSM610_XMC10_1, + GSM610_XMC10_2, + GSM610_XMC11_0, + GSM610_XMC11_1, + GSM610_XMC11_2, + GSM610_XMC12_0, + GSM610_XMC12_1, + GSM610_XCM12_2, + GSM610_NC1_0, + GSM610_NC1_1, + GSM610_NC1_2, + GSM610_NC1_3, + GSM610_NC1_4, + GSM610_NC1_5, + GSM610_NC1_6, + GSM610_BC1_0, + GSM610_BC1_1, + GSM610_MC1_0, + GSM610_MC1_1, + GSM610_XMAXC10, + GSM610_XMAXC11, + GSM610_XMAXC12, + GSM610_XMAXC13, + GSM610_XMAXC14, + GSM610_XMAX15, + GSM610_XMC13_0, + GSM610_XMC13_1, + GSM610_XMC13_2, + GSM610_XMC14_0, + GSM610_XMC14_1, + GSM610_XMC14_2, + GSM610_XMC15_0, + GSM610_XMC15_1, + GSM610_XMC15_2, + GSM610_XMC16_0, + GSM610_XMC16_1, + GSM610_XMC16_2, + GSM610_XMC17_0, + GSM610_XMC17_1, + GSM610_XMC17_2, + GSM610_XMC18_0, + GSM610_XMC18_1, + GSM610_XMC18_2, + GSM610_XMC19_0, + GSM610_XMC19_1, + GSM610_XMC19_2, + GSM610_XMC20_0, + GSM610_XMC20_1, + GSM610_XMC20_2, + GSM610_XMC21_0, + GSM610_XMC21_1, + GSM610_XMC21_2, + GSM610_XMC22_0, + GSM610_XMC22_1, + GSM610_XMC22_2, + GSM610_XMC23_0, + GSM610_XMC23_1, + GSM610_XMC23_2, + GSM610_XMC24_0, + GSM610_XMC24_1, + GSM610_XMC24_2, + GSM610_XMC25_0, + GSM610_XMC25_1, + GSM610_XMC25_2, + GSM610_NC2_0, + GSM610_NC2_1, + GSM610_NC2_2, + GSM610_NC2_3, + GSM610_NC2_4, + GSM610_NC2_5, + GSM610_NC2_6, + GSM610_BC2_0, + GSM610_BC2_1, + GSM610_MC2_0, + GSM610_MC2_1, + GSM610_XMAXC20, + GSM610_XMAXC21, + GSM610_XMAXC22, + GSM610_XMAXC23, + GSM610_XMAXC24, + GSM610_XMAXC25, + GSM610_XMC26_0, + GSM610_XMC26_1, + GSM610_XMC26_2, + GSM610_XMC27_0, + GSM610_XMC27_1, + GSM610_XMC27_2, + GSM610_XMC28_0, + GSM610_XMC28_1, + GSM610_XMC28_2, + GSM610_XMC29_0, + GSM610_XMC29_1, + GSM610_XMC29_2, + GSM610_XMC30_0, + GSM610_XMC30_1, + GSM610_XMC30_2, + GSM610_XMC31_0, + GSM610_XMC31_1, + GSM610_XMC31_2, + GSM610_XMC32_0, + GSM610_XMC32_1, + GSM610_XMC32_2, + GSM610_XMC33_0, + GSM610_XMC33_1, + GSM610_XMC33_2, + GSM610_XMC34_0, + GSM610_XMC34_1, + GSM610_XMC34_2, + GSM610_XMC35_0, + GSM610_XMC35_1, + GSM610_XMC35_2, + GSM610_XMC36_0, + GSM610_XMC36_1, + GSM610_XMC36_2, + GSM610_XMC37_0, + GSM610_XMC37_1, + GSM610_XMC37_2, + GSM610_XMC38_0, + GSM610_XMC38_1, + GSM610_XMC38_2, + GSM610_NC3_0, + GSM610_NC3_1, + GSM610_NC3_2, + GSM610_NC3_3, + GSM610_NC3_4, + GSM610_NC3_5, + GSM610_NC3_6, + GSM610_BC3_0, + GSM610_BC3_1, + GSM610_MC3_0, + GSM610_MC3_1, + GSM610_XMAXC30, + GSM610_XMAXC31, + GSM610_XMAXC32, + GSM610_XMAXC33, + GSM610_XMAXC34, + GSM610_XMAXC35, + GSM610_XMC39_0, + GSM610_XMC39_1, + GSM610_XMC39_2, + GSM610_XMC40_0, + GSM610_XMC40_1, + GSM610_XMC40_2, + GSM610_XMC41_0, + GSM610_XMC41_1, + GSM610_XMC41_2, + GSM610_XMC42_0, + GSM610_XMC42_1, + GSM610_XMC42_2, + GSM610_XMC43_0, + GSM610_XMC43_1, + GSM610_XMC43_2, + GSM610_XMC44_0, + GSM610_XMC44_1, + GSM610_XMC44_2, + GSM610_XMC45_0, + GSM610_XMC45_1, + GSM610_XMC45_2, + GSM610_XMC46_0, + GSM610_XMC46_1, + GSM610_XMC46_2, + GSM610_XMC47_0, + GSM610_XMC47_1, + GSM610_XMC47_2, + GSM610_XMC48_0, + GSM610_XMC48_1, + GSM610_XMC48_2, + GSM610_XMC49_0, + GSM610_XMC49_1, + GSM610_XMC49_2, + GSM610_XMC50_0, + GSM610_XMC50_1, + GSM610_XMC50_2, + GSM610_XMC51_0, + GSM610_XMC51_1, + GSM610_XMC51_2 +}; + +/* Reduce the XMAXC field. When the XMAXC field reaches + * zero, then the function will return true */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, unsigned int index) +{ + unsigned int field_index; + uint64_t field; + bool silent = true; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + if (field != 0) + silent = false; + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return silent; +} + +/* Reduce all XMAXC fields in the frame. When all XMAXC fields reach + * zero, then the function will return true */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC30)) + silent = true; + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static void conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + bool silent; + int rc; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) { + goto leave_nofree; + } + + /* Convert to bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, no memory to store the resulting bitvec!\n"); + goto leave_nofree; + } + rc = bitvec_unpack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, wrong number of bits unpacked!\n"); + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + rc = bitvec_pack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Packing GSM-FR frame failed, wrong number of bits packed!\n"); + goto leave; + } + +leave: + bitvec_free(frame_bitvec); +leave_nofree: + return; +} + +/* To be called whan a good frame is received. This function will then create + * a backup of the frame and reset its internal state */ +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + ctx->subsequent_lost_frame = false; + memcpy(ctx->frame_backup, frame, sizeof(ctx->frame_backup)); +} + +/* To be called when a bad frame is received. This function will then generate + * a replacement frame that can be used to conceal the dropout */ +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup. */ + if (ctx->subsequent_lost_frame) { + conceal_frame(ctx->frame_backup); + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, ctx->frame_backup, sizeof(ctx->frame_backup)); + ctx->subsequent_lost_frame = true; +} diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..dfcd031 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -968,6 +968,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1059,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1082,7 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + ecu_fr_conceal(&lchan->ecu_fr_ctx, tch_data); rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1110,9 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) + ecu_fr_reset(&lchan->ecu_fr_ctx, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); diff --git a/tests/Makefile.am b/tests/Makefile.am index 1eb28d6..e77a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = paging cipher agch misc handover tx_power power meas +SUBDIRS = paging cipher agch misc handover tx_power power meas ecu_fr if ENABLE_SYSMOBTS SUBDIRS += sysmobts diff --git a/tests/ecu_fr/Makefile.am b/tests/ecu_fr/Makefile.am new file mode 100644 index 0000000..6dc7549 --- /dev/null +++ b/tests/ecu_fr/Makefile.am @@ -0,0 +1,8 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) +noinst_PROGRAMS = ecu_fr_test +EXTRA_DIST = ecu_fr_test.ok + +ecu_fr_test_SOURCES = ecu_fr_test.c +ecu_fr_test_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD) diff --git a/tests/ecu_fr/ecu_fr_test.c b/tests/ecu_fr/ecu_fr_test.c new file mode 100644 index 0000000..bc1cc56 --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +/* Set with sample fullrate voice frames and some intentional dropouts. */ +char *fr_voice[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Start with a good voice frame and then simulate 20 consecutive bad frames, + * watch how the error concealment decreases the XMAXC parameters */ +void test_fr_concealment(void *ctx) +{ + char frame_hex[] = + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + uint8_t *frame; + unsigned int len; + int i; + struct ecu_fr_ctx ecu_fr_ctx; + + len = strlen(frame_hex); + frame = talloc_zero_size(ctx, GSM_FR_BYTES); + len = osmo_hexparse(frame_hex, frame, GSM_FR_BYTES); + OSMO_ASSERT(len == GSM_FR_BYTES); + + printf(" Start with: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Reset the ECU with the proposed known good frame */ + ecu_fr_reset(&ecu_fr_ctx, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf("conceal: %02i, result: %s\n", i, + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } + + talloc_free(frame); +} + +/* Simulate a real life situation, voce frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + uint8_t frame[GSM_FR_BYTES]; + unsigned int len; + unsigned int id = 0; + struct ecu_fr_ctx ecu_fr_ctx; + + while (1) { + /* Detect end of test samples */ + if (fr_voice[id] == NULL) + return; + + printf("Frame No. %03i:\n", id); + len = strlen(fr_voice[id]) / 2; + + if (len != GSM_FR_BYTES) { + memset(frame, 0, GSM_FR_BYTES); + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf(" * input: (bad)\n"); + } else { + osmo_hexparse(fr_voice[id], frame, GSM_FR_BYTES); + printf(" * input: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + ecu_fr_reset(&ecu_fr_ctx, frame); + } + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + id++; + } +} + +int main(int argc, char **argv) +{ + void *tall_bts_ctx; + + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + bts_log_init(NULL); + osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG; + + test_fr_concealment(tall_bts_ctx); + test_fr_concealment_realistic(); + + printf("Success\n"); + talloc_report_full(tall_bts_ctx, stderr); + printf("Talloc total blocks: %lu\n", talloc_total_blocks(tall_bts_ctx)); + OSMO_ASSERT(talloc_total_blocks(tall_bts_ctx) == 2); + + return 0; +} diff --git a/tests/ecu_fr/ecu_fr_test.ok b/tests/ecu_fr/ecu_fr_test.ok new file mode 100644 index 0000000..fab883e --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.ok @@ -0,0 +1,194 @@ + Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 +Success +Talloc total blocks: 2 diff --git a/tests/testsuite.at b/tests/testsuite.at index 2d1cefd..c6196a5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -49,3 +49,9 @@ cat $abs_srcdir/meas/meas_test.ok > expout AT_CHECK([$abs_top_builddir/tests/meas/meas_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([ecu_fr]) +AT_KEYWORDS([ecu_fr]) +cat $abs_srcdir/ecu_fr/ecu_fr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/ecu_fr/ecu_fr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 8 15:29:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 8 Dec 2017 15:29:19 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:06:58 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 17:06:58 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5214/2/tests/ecu_fr/ecu_fr_test.c File tests/ecu_fr/ecu_fr_test.c: PS2, Line 1: #include : #include : #include : #include : #include : #include : #include : #include : #include : #include : #include : : #include : #include : #include : : #include : #include : #include : #include : : #include : #include : #include So many useless includes... The following set would be enough: #include #include #include #include #include #include #include #include -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:12:58 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 17:12:58 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) Great work, but -1 for some useless includes, CFLAGS and LDADD libs. https://gerrit.osmocom.org/#/c/5214/2/tests/ecu_fr/Makefile.am File tests/ecu_fr/Makefile.am: Line 3: LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) Both LIBOSMOTRAU and LIBOSMOABIS are not required here... -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:25:49 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 17:25:49 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5214/2/include/osmo-bts/ecu_fr.h File include/osmo-bts/ecu_fr.h: Line 2: I think, this header should satisfy at least the following dependences itself: #include #include Regarding to GSM_FR_BYTES, including 'osmo-bts/gsm_data.h' could cause the cross-header reference there... -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:28:11 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 17:28:11 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 2: And finally, sorry for a lot of messages, but what if this would be implemented as a part of libosmocodec? Harald? -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:40:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 17:40:11 +0000 Subject: [PATCH] osmo-bts[master]: bts-trx: trx_ctrl_cmd: Simplify var assignment logic Message-ID: Review at https://gerrit.osmocom.org/5236 bts-trx: trx_ctrl_cmd: Simplify var assignment logic Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/5236/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 7030e3c..1ac21d5 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -189,7 +189,7 @@ { struct trx_ctrl_msg *tcm; va_list ap; - int l, pending = 0; + int l, pending; if (!transceiver_available && !(!strcmp(cmd, "POWEROFF") || !strcmp(cmd, "POWERON"))) { @@ -198,8 +198,7 @@ return -EIO; } - if (!llist_empty(&l1h->trx_ctrl_list)) - pending = 1; + pending = !llist_empty(&l1h->trx_ctrl_list); /* create message */ tcm = talloc_zero(tall_bts_ctx, struct trx_ctrl_msg); -- To view, visit https://gerrit.osmocom.org/5236 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:40:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 17:40:12 +0000 Subject: [PATCH] osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX Message-ID: Review at https://gerrit.osmocom.org/5237 bts-trx: Avoid enqueueing consecutive duplicate messages to TRX While debugging other protocol/timing issues between osmobts-trx and osmo-trx, I found that sometimes two consecutives "POWER OFF" commands are enqueued and sent to osmo-trx. There's no point in doing so, as the write queue already maintains state and retries the command until a RSP is received, then goes for the next one. With this change we hence improve timing response as we don't need to wait for the second command to be processed, and on top we get cleaner logs and simplified states which are easier to debug. Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/37/5237/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 1ac21d5..57fd953 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -214,8 +214,13 @@ tcm->cmd[sizeof(tcm->cmd)-1] = '\0'; tcm->cmd_len = strlen(cmd); tcm->critical = critical; - llist_add_tail(&tcm->list, &l1h->trx_ctrl_list); - LOGP(DTRX, LOGL_INFO, "Enqueuing TRX control command '%s'\n", tcm->cmd); + + /* Avoid adding consecutive duplicate messages, eg: two consecutive POWEROFF */ + if (!pending || + strcmp(tcm->cmd, llist_entry(l1h->trx_ctrl_list.prev, struct trx_ctrl_msg, list)->cmd)) { + LOGP(DTRX, LOGL_INFO, "Enqueuing TRX control command '%s'\n", tcm->cmd); + llist_add_tail(&tcm->list, &l1h->trx_ctrl_list); + } /* send message, if we didn't already have pending messages */ if (!pending) -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 8 17:59:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 17:59:23 +0000 Subject: libosmocore[master]: cosmetic: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5235 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 18:04:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 18:04:28 +0000 Subject: osmo-bts[master]: bts-trx: trx_ctrl_cmd: Simplify var assignment logic In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 ok, if you think it's worth it -- To view, visit https://gerrit.osmocom.org/5236 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 18:22:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 18:22:58 +0000 Subject: osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 I was alsmost sure this introduces a flaw in the logic, but after pondering a few minutes, in the end found it to be correct indeed :) Still I'm wondering, what is the cause for submitting the POWEROFF twice in the first place, is it possible to fix the logic at the cause instead of filtering out the error later? Also we're now filtering any message that occurs twice, is the strcmp sufficient to ensure that the two commands are indeed redundant? Could it be the same cmd string with differing arguments, and we end up filtering out important commands now? Marked -1 just to wait for a reply on these. If you can argue for the patch, I'll +2. -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 18:46:00 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 18:46:00 +0000 Subject: osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 The fix is not fill, will be updated soon... -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 19:04:39 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 19:04:39 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5204 to look at the new patch set (#2). mobile/gsm48_rr.c: fix ACCH System Information parsing According to GSM 04.08, the System Information messages, such as SI5, SI5ter, SI5bis and SI6 (described in sections 9.1.37-40), have no the 'L2 Pseudo Length' (10.5.2.19) field, unlike others. So, previously the ACCH SI messages were ignored due to an implementation error - the gsm48_system_information_type_header struct isn't applicable here, because it assumes the 'l2_plen'. Since there is no (yet?) equivalent struct for the ACCH SI, this change replaces the wrong struct by the 'gsm48_hdr', which satisfies described requirements. Moreover, this change cleans up some gsm48_rr_rx_sysinfo* functions, getting rid of meaningless pionter shifting. Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 11 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/04/5204/2 diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index ac27214..403e32d 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1943,10 +1943,9 @@ /* receive "SYSTEM INFORMATION 5" message (9.1.37) */ static int gsm48_rr_rx_sysinfo5(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5 *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5 " @@ -1973,10 +1972,9 @@ /* receive "SYSTEM INFORMATION 5bis" message (9.1.38) */ static int gsm48_rr_rx_sysinfo5bis(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5bis *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5bis *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5bis" @@ -2004,10 +2002,9 @@ /* receive "SYSTEM INFORMATION 5ter" message (9.1.39) */ static int gsm48_rr_rx_sysinfo5ter(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5ter *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5ter *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5ter" @@ -2035,11 +2032,10 @@ /* receive "SYSTEM INFORMATION 6" message (9.1.39) */ static int gsm48_rr_rx_sysinfo6(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_6 *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_6 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; struct rx_meas_stat *meas = &ms->meas; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 6 " @@ -4748,7 +4744,7 @@ struct gsm48_rrlayer *rr = &ms->rrlayer; struct gsm_settings *set = &ms->settings; struct abis_rsl_rll_hdr *rllh = msgb_l2(msg); - struct gsm48_system_information_type_header *sih = msgb_l3(msg); + struct gsm48_hdr *sih = msgb_l3(msg); uint8_t ind_ta, ind_tx_power; if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) { @@ -4772,7 +4768,7 @@ rr->cd_now.ind_tx_power = ind_tx_power; } - switch (sih->system_information) { + switch (sih->msg_type) { case GSM48_MT_RR_SYSINFO_5: return gsm48_rr_rx_sysinfo5(ms, msg); case GSM48_MT_RR_SYSINFO_5bis: @@ -4783,7 +4779,7 @@ return gsm48_rr_rx_sysinfo6(ms, msg); default: LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n", - sih->system_information); + sih->msg_type); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Dec 8 19:04:39 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 8 Dec 2017 19:04:39 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/gsm48_rr.c: cosmetic: drop wrong comment Message-ID: Review at https://gerrit.osmocom.org/5238 mobile/gsm48_rr.c: cosmetic: drop wrong comment Nothing is actually being skipped in this function. Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/38/5238/1 diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 403e32d..f4b9500 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1911,7 +1911,6 @@ /* receive "SYSTEM INFORMATION 4" message (9.1.36) */ static int gsm48_rr_rx_sysinfo4(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ struct gsm48_system_information_type_4 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; int payload_len = msgb_l3len(msg) - sizeof(*si); -- To view, visit https://gerrit.osmocom.org/5238 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Dec 8 20:24:52 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 8 Dec 2017 20:24:52 +0000 Subject: osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX In-Reply-To: References: Message-ID: Patch Set 1: > I was alsmost sure this introduces a flaw in the logic, but after > pondering a few minutes, in the end found it to be correct indeed > :) > > Still I'm wondering, what is the cause for submitting the POWEROFF > twice in the first place, is it possible to fix the logic at the > cause instead of filtering out the error later? I didn't look in detail because the issue I was investigating was taking my concerns, but basically from what I recall in osmo-bts-trx log, I think osmo-bts-trx sends the first POWEROFF at startup in case it is connected to stop it from emiting while not configured. Then, when BSC connects to BTS and configures it (OML), apparently it first powers it off in order to configure it. I cannot confirm now since I don't have the setup now here, and anyway I'd need to spend some time to verify all this. > > Also we're now filtering any message that occurs twice, is the > strcmp sufficient to ensure that the two commands are indeed > redundant? Could it be the same cmd string with differing > arguments, and we end up filtering out important commands now? > The strcmp should be sufficient because the cmd string field already contain the parameters. -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 20:53:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 20:53:47 +0000 Subject: osmo-bts[master]: cosmetic: remove unused variable "ret" In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5212/2//COMMIT_MSG Commit Message: Line 9: remove unused variable "ret" in unit test "power" so far so good, but I am all the time talking about the *summary line* above. The point is that when you read an endless list of commit log, you want to know what area of code has changed at the first glance. If there are 1000 commits like "added a function" and "removed a variable" you need to open and read every single commit to figure out whether it is related to the bug you're trying to figure out. Hence, cram as much helpful info as fits in ~60 chars on the summary line, best using actual file names or function name prefixes. This is a rule for all commits all the time forever, always has been, and certainly not the first time I'm asking for this either. cosmetic: foo_bar: frobnicated prismotube I hate to block such a trivial commit but really want to make sure to get this point across, which is very basic and quite important to me. Thanks :) -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 20:55:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 20:55:24 +0000 Subject: osmo-bts[master]: cosmetic: remove unused variable "static_ilv" In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5213/2//COMMIT_MSG Commit Message: Line 7: cosmetic: remove unused variable "static_ilv" summary -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 20:56:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 20:56:14 +0000 Subject: osmo-bts[master]: cosmetic: remove excess whitespaces in Makefile.am In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5211/3//COMMIT_MSG Commit Message: Line 7: cosmetic: remove excess whitespaces in Makefile.am now you've removed the detail I added to the commit summary. -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 21:01:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 21:01:28 +0000 Subject: osmo-bts[master]: cosmetic: remove excess whitespaces in Makefile.am In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5211/3//COMMIT_MSG Commit Message: Line 7: cosmetic: remove excess whitespaces in Makefile.am > now you've removed the detail I added to the commit summary. to clarify, we have numerous Makefile.am around everywhere. While it doesn't really matter for whitespace, still follow the habit of *pinpointing* what it is about. Here the unambiguous detail would be 'tests/Makefile.am' as I placed in patch set 2. Again I don't want to appear pedantic on cosmetic nonsense, but the point why I'm cracking up on it now is: I don't want to be the commit summary editor for everyone else, it's trivial enough for everyone to get right the first time themselves. It appears I need to be firm to get the point across... Thanks again :) -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 8 23:17:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 8 Dec 2017 23:17:15 +0000 Subject: osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 I'm not super convinved yet. Anyway, the patch does what it says, and I'd be fine to merge if anyone else is certain enough that this is the right thing to do. -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 8 23:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 8 Dec 2017 23:33:38 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add getopts and option to prevent endless loop Message-ID: Review at https://gerrit.osmocom.org/5239 abisip-find: add getopts and option to prevent endless loop The utility abisip-find runs into an endless loop and detects the BTS over and over again. This makes it hard to use the program from scripts (autodetection and auto-configuration of a single bts in a lab setup) Add proper getops options, usage and help Add option to exit after the first response of from a BTS (one shot) Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 --- M src/ipaccess/abisip-find.c 1 file changed, 73 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/5239/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index c459161..8dfbcf4 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -25,12 +25,22 @@ #include #include +#include +#include +#include #include #include #include #include #include + +char program_name[255]; + +struct bfd_data { + bool oneshot; + bool exit; +}; static int udp_sock(const char *ifname) { @@ -140,18 +150,25 @@ /* 2 bytes length, 1 byte protocol */ if (buf[2] != IPAC_PROTO_IPACCESS) - return 0; + return -EINVAL; if (buf[4] != IPAC_MSGT_ID_RESP) - return 0; + return -EINVAL; return parse_response(buf+6, len-6); } static int bfd_cb(struct osmo_fd *bfd, unsigned int flags) { - if (flags & BSC_FD_READ) - return read_response(bfd->fd); + struct bfd_data *bfd_data = bfd->data; + int rc; + + if (flags & BSC_FD_READ) { + rc = read_response(bfd->fd); + if (bfd_data->oneshot && rc == 0) + bfd_data->exit = true; + return rc; + } if (flags & BSC_FD_WRITE) { bfd->when &= ~BSC_FD_WRITE; return bcast_find(bfd->fd); @@ -170,25 +187,72 @@ osmo_timer_schedule(&timer, 5, 0); } +static void print_usage() +{ + printf("Usage: %s\n", program_name); +} + +static void print_help() +{ + printf(" Some useful help...\n"); + printf(" -h --help this text\n"); + printf(" -i --ifname. Specify outgoing interface\n"); + printf(" -1 --one-shot. no endless loop, only one turn \n"); +} + int main(int argc, char **argv) { struct osmo_fd bfd; char *ifname = NULL; int rc; + struct bfd_data bfd_data; + strncpy(program_name, basename(argv[0]), sizeof(program_name)); + memset(&bfd_data, 0, sizeof(bfd_data)); + printf("abisip-find (C) 2009 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); - if (argc < 2) { + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"ifname", 1, 0, 'i'}, + {"one-shot", 0, 0, '1'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "hi:1", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_usage(); + print_help(); + exit(0); + case 'i': + ifname = optarg; + break; + case '1': + bfd_data.oneshot = true; + break; + default: + /* ignore */ + break; + } + } + + if (ifname == NULL) { fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); - } else { - ifname = argv[1]; } bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; bfd.fd = udp_sock(ifname); + bfd.data = &bfd_data; if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); @@ -209,6 +273,8 @@ rc = osmo_select_main(0); if (rc < 0) exit(3); + if (bfd_data.exit) + break; } exit(0); -- To view, visit https://gerrit.osmocom.org/5239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Sat Dec 9 00:11:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 00:11:37 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit, master, update-osmo-ci: fix build-discarder se... Message-ID: Review at https://gerrit.osmocom.org/5240 jobs: gerrit, master, update-osmo-ci: fix build-discarder section The build-discarder section was silently not working. It needs to be nested below a 'properties' node. Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml M jobs/update-osmo-ci-on-slaves.yml 3 files changed, 16 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/40/5240/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index da80e62..a64fb3a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -187,11 +187,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Pending gerrit code reviews of {repos} diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index b127069..ece5f33 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -271,11 +271,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Automatic jenkins test job of {repos} diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 0ec665e..efa6937 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,9 +6,10 @@ type: slave name: label values: [ OsmocomBuild1 , build1-debian9-lxc ] - build-discarder: - daysToKeep: 30 - numToKeep: 120 + properties: + - build-discarder: + daysToKeep: 30 + numToKeep: 120 scm: - git: url: git://git.osmocom.org/osmo-ci -- To view, visit https://gerrit.osmocom.org/5240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 00:13:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 00:13:55 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit, master, update-osmo-ci: fix build-discarder se... In-Reply-To: References: Message-ID: jobs: gerrit, master, update-osmo-ci: fix build-discarder section The build-discarder section was silently not working. It needs to be nested below a 'properties' node. Also the names need to be dashed and not camelCased. Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml M jobs/update-osmo-ci-on-slaves.yml 3 files changed, 16 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/40/5240/2 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index da80e62..a64fb3a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -187,11 +187,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Pending gerrit code reviews of {repos} diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index b127069..ece5f33 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -271,11 +271,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Automatic jenkins test job of {repos} diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 0ec665e..e0f082f 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,9 +6,10 @@ type: slave name: label values: [ OsmocomBuild1 , build1-debian9-lxc ] - build-discarder: - daysToKeep: 30 - numToKeep: 120 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 scm: - git: url: git://git.osmocom.org/osmo-ci -- To view, visit https://gerrit.osmocom.org/5240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 00:14:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 00:14:42 +0000 Subject: osmo-ci[master]: jobs: gerrit, master, update-osmo-ci: fix build-discarder se... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 00:14:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 00:14:44 +0000 Subject: [MERGED] osmo-ci[master]: jobs: gerrit, master, update-osmo-ci: fix build-discarder se... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: gerrit, master, update-osmo-ci: fix build-discarder section ...................................................................... jobs: gerrit, master, update-osmo-ci: fix build-discarder section The build-discarder section was silently not working. It needs to be nested below a 'properties' node. Also the names need to be dashed and not camelCased. Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml M jobs/update-osmo-ci-on-slaves.yml 3 files changed, 16 insertions(+), 13 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index da80e62..a64fb3a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -187,11 +187,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Pending gerrit code reviews of {repos} diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index b127069..ece5f33 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -271,11 +271,12 @@ concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout - build-discarder: - daysToKeep: 30 - numToKeep: 120 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 description: | Automatic jenkins test job of {repos} diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 0ec665e..e0f082f 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,9 +6,10 @@ type: slave name: label values: [ OsmocomBuild1 , build1-debian9-lxc ] - build-discarder: - daysToKeep: 30 - numToKeep: 120 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 scm: - git: url: git://git.osmocom.org/osmo-ci -- To view, visit https://gerrit.osmocom.org/5240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9503200a8873e616f9195d4bb1d6163c464b305e Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:25:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:25:29 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: fix post-build trigger of downstream jobs Message-ID: Review at https://gerrit.osmocom.org/5241 jobs: master: fix post-build trigger of downstream jobs Firstly, we don't have the downstream-ext plugin installed on our jenkins. We want to use the 'trigger' publisher instead. Secondly, since the jobs created here are called master-*, we also want to trigger master-*. master-libosmocore also triggers SIMtrace and xgoldmon, which aren't covered by this jobs config, hence they don't get a master- prefix. Change-Id: If9e8c4b02fce34fddceb4f07bf024210600f6270 --- M jobs/master-builds.yml 1 file changed, 14 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/41/5241/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index ece5f33..5cec3ab 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -19,6 +19,7 @@ combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh + trigger: # in alphabetical order repos: @@ -36,10 +37,7 @@ - libasn1c - libgtpnl - libosmo-abis: - publishers: - downstream-ext: - projects: - - openbsc + trigger: master-openbsc - libosmo-dsp: cmd: > @@ -48,26 +46,13 @@ ./configure $MAKE $PARALLEL_MAKE $MAKE distcheck - publishers: - downstream-ext: - projects: - - osmo-gmr + trigger: master-osmo-gmr - libosmo-netif: - publishers: - downstream-ext: - projects: - - libosmo-sccp - - openbsc - - osmo-mgw + trigger: master-libosmo-sccp, master-osmo-mgw, master-openbsc - libosmo-sccp: - publishers: - downstream-ext: - projects: - - openbsc - - osmo-iuh - - osmo-bsc + trigger: master-osmo-iuh, master-osmo-bsc, master-openbsc - libosmocore: a1_name: arch @@ -80,27 +65,12 @@ else ./contrib/jenkins.sh fi - publishers: - downstream-ext: - projects: - - libosmo-sccp - - libosmo-abis - - openbsc - - osmo-pcap - - OsmoTETRA - - osmo-pcu - - SIMtrace - - osmo-gmr - - osmo-bts - - OsmocomBB - - xgoldmon + trigger: > + master-libosmo-abis, master-libosmo-sccp, master-openbsc, master-osmo-pcap, master-osmo-tetra, + master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon - libsmpp34: - publishers: - downstream-ext: - projects: - - openbsc - - osmo-msc + trigger: master-osmo-msc, master-openbsc - libtelnet @@ -157,10 +127,7 @@ a1_name: gtp-linux a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh - publishers: - downstream-ext: - projects: - - osmo-sgsn + trigger: master-osmo-sgsn - osmo-gmr @@ -183,11 +150,7 @@ slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] - osmo-iuh: - publishers: - downstream-ext: - projects: - - osmo-msc - - osmo-sgsn + trigger: master-osmo-msc, master-osmo-sgsn - osmo-mgw: a1_name: MGCP @@ -199,11 +162,7 @@ -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh - publishers: - downstream-ext: - projects: - - osmo-msc - - osmo-bsc + trigger: master-osmo-msc, master-osmo-bsc - osmo-msc: a1_name: IU @@ -331,5 +290,7 @@ console-log-parsers: - 'GNU C Compiler 4 (gcc)' resolve-relative-paths: true + - trigger: + project: '{obj:trigger}' # vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9e8c4b02fce34fddceb4f07bf024210600f6270 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:25:29 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:25:29 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: drop unused axis a4 Message-ID: Review at https://gerrit.osmocom.org/5242 jobs: master: drop unused axis a4 Change-Id: I4b9db4077eacca649c679333e24b2eb7338a96e6 --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/42/5242/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 5cec3ab..740af74 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -14,8 +14,6 @@ a2: !!python/tuple [default] a3_name: a3 a3: !!python/tuple [default] - a4_name: a4 - a4: !!python/tuple [default] combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh @@ -262,10 +260,6 @@ type: user-defined name: '{obj:a3_name}' values: '{obj:a3}' - - axis: - type: user-defined - name: '{obj:a4_name}' - values: '{obj:a4}' scm: - git: -- To view, visit https://gerrit.osmocom.org/5242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b9db4077eacca649c679333e24b2eb7338a96e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:25:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:25:53 +0000 Subject: osmo-ci[master]: jobs: master: fix post-build trigger of downstream jobs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9e8c4b02fce34fddceb4f07bf024210600f6270 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:25:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:25:58 +0000 Subject: osmo-ci[master]: jobs: master: drop unused axis a4 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b9db4077eacca649c679333e24b2eb7338a96e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:26:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:26:01 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: drop unused axis a4 In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: drop unused axis a4 ...................................................................... jobs: master: drop unused axis a4 Change-Id: I4b9db4077eacca649c679333e24b2eb7338a96e6 --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 5cec3ab..740af74 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -14,8 +14,6 @@ a2: !!python/tuple [default] a3_name: a3 a3: !!python/tuple [default] - a4_name: a4 - a4: !!python/tuple [default] combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh @@ -262,10 +260,6 @@ type: user-defined name: '{obj:a3_name}' values: '{obj:a3}' - - axis: - type: user-defined - name: '{obj:a4_name}' - values: '{obj:a4}' scm: - git: -- To view, visit https://gerrit.osmocom.org/5242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b9db4077eacca649c679333e24b2eb7338a96e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:26:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:26:01 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: fix post-build trigger of downstream jobs In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: fix post-build trigger of downstream jobs ...................................................................... jobs: master: fix post-build trigger of downstream jobs Firstly, we don't have the downstream-ext plugin installed on our jenkins. We want to use the 'trigger' publisher instead. Secondly, since the jobs created here are called master-*, we also want to trigger master-*. master-libosmocore also triggers SIMtrace and xgoldmon, which aren't covered by this jobs config, hence they don't get a master- prefix. Change-Id: If9e8c4b02fce34fddceb4f07bf024210600f6270 --- M jobs/master-builds.yml 1 file changed, 14 insertions(+), 53 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index ece5f33..5cec3ab 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -19,6 +19,7 @@ combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh + trigger: # in alphabetical order repos: @@ -36,10 +37,7 @@ - libasn1c - libgtpnl - libosmo-abis: - publishers: - downstream-ext: - projects: - - openbsc + trigger: master-openbsc - libosmo-dsp: cmd: > @@ -48,26 +46,13 @@ ./configure $MAKE $PARALLEL_MAKE $MAKE distcheck - publishers: - downstream-ext: - projects: - - osmo-gmr + trigger: master-osmo-gmr - libosmo-netif: - publishers: - downstream-ext: - projects: - - libosmo-sccp - - openbsc - - osmo-mgw + trigger: master-libosmo-sccp, master-osmo-mgw, master-openbsc - libosmo-sccp: - publishers: - downstream-ext: - projects: - - openbsc - - osmo-iuh - - osmo-bsc + trigger: master-osmo-iuh, master-osmo-bsc, master-openbsc - libosmocore: a1_name: arch @@ -80,27 +65,12 @@ else ./contrib/jenkins.sh fi - publishers: - downstream-ext: - projects: - - libosmo-sccp - - libosmo-abis - - openbsc - - osmo-pcap - - OsmoTETRA - - osmo-pcu - - SIMtrace - - osmo-gmr - - osmo-bts - - OsmocomBB - - xgoldmon + trigger: > + master-libosmo-abis, master-libosmo-sccp, master-openbsc, master-osmo-pcap, master-osmo-tetra, + master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon - libsmpp34: - publishers: - downstream-ext: - projects: - - openbsc - - osmo-msc + trigger: master-osmo-msc, master-openbsc - libtelnet @@ -157,10 +127,7 @@ a1_name: gtp-linux a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh - publishers: - downstream-ext: - projects: - - osmo-sgsn + trigger: master-osmo-sgsn - osmo-gmr @@ -183,11 +150,7 @@ slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] - osmo-iuh: - publishers: - downstream-ext: - projects: - - osmo-msc - - osmo-sgsn + trigger: master-osmo-msc, master-osmo-sgsn - osmo-mgw: a1_name: MGCP @@ -199,11 +162,7 @@ -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh - publishers: - downstream-ext: - projects: - - osmo-msc - - osmo-bsc + trigger: master-osmo-msc, master-osmo-bsc - osmo-msc: a1_name: IU @@ -331,5 +290,7 @@ console-log-parsers: - 'GNU C Compiler 4 (gcc)' resolve-relative-paths: true + - trigger: + project: '{obj:trigger}' # vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9e8c4b02fce34fddceb4f07bf024210600f6270 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:58:31 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:58:31 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: drop legacy openggsn (now is osmo-ggsn, also p... Message-ID: Review at https://gerrit.osmocom.org/5243 jobs: master: drop legacy openggsn (now is osmo-ggsn, also present) Change-Id: I219a988f94b465ac8bb77319735aedbe49707c16 --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/43/5243/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 740af74..8f0070a 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -91,11 +91,6 @@ -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - openggsn: - a1_name: GTP - a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] - cmd: GTP="$GTP" ./contrib/jenkins.sh - - osmo-bsc: concurrent: true cmd: > -- To view, visit https://gerrit.osmocom.org/5243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I219a988f94b465ac8bb77319735aedbe49707c16 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:58:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:58:55 +0000 Subject: osmo-ci[master]: jobs: master: drop legacy openggsn (now is osmo-ggsn, also p... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I219a988f94b465ac8bb77319735aedbe49707c16 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:58:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:58:59 +0000 Subject: osmo-ci[master]: jobs: Fix osmo-ggsn GTP build option In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:59:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:59:04 +0000 Subject: [MERGED] osmo-ci[master]: jobs: Fix osmo-ggsn GTP build option In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: Fix osmo-ggsn GTP build option ...................................................................... jobs: Fix osmo-ggsn GTP build option As far as I understand, the variable is populated using the name field. In openggsn build it matches, but it doesn't in osmo-ggsn. Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified Harald Welte: Looks good to me, but someone else must approve diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a64fb3a..a7df5f3 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -104,7 +104,7 @@ cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - osmo-ggsn: - a1_name: gtp-linux + a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 8f0070a..82e84d1 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -117,7 +117,7 @@ cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"' - osmo-ggsn: - a1_name: gtp-linux + a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] cmd: GTP="$GTP" ./contrib/jenkins.sh trigger: master-osmo-sgsn -- To view, visit https://gerrit.osmocom.org/5164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb1a630b77a8c2f442e26dbef8e608882e8f9a71 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 01:59:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 01:59:05 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: drop legacy openggsn (now is osmo-ggsn, also p... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: drop legacy openggsn (now is osmo-ggsn, also present) ...................................................................... jobs: master: drop legacy openggsn (now is osmo-ggsn, also present) Change-Id: I219a988f94b465ac8bb77319735aedbe49707c16 --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 740af74..8f0070a 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -91,11 +91,6 @@ -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - - openggsn: - a1_name: GTP - a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] - cmd: GTP="$GTP" ./contrib/jenkins.sh - - osmo-bsc: concurrent: true cmd: > -- To view, visit https://gerrit.osmocom.org/5243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I219a988f94b465ac8bb77319735aedbe49707c16 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:03:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:03:58 +0000 Subject: [PATCH] libosmocore[master]: vty XML export: avoid repeating common node commands for eac... Message-ID: Review at https://gerrit.osmocom.org/5246 vty XML export: avoid repeating common node commands for each node We use 'show online-help' to generate VTY reference manuals. It is not helpful to include the common node commands on each and every node level, it clutters the actual useful help. Have a separate first section called 'Common Commands', but omit them elsewhere. Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4 --- M src/vty/command.c 1 file changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/5246/1 diff --git a/src/vty/command.c b/src/vty/command.c index 5f7a42c..e5efad2 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -645,6 +645,8 @@ return 0; } +static bool vty_command_is_common(struct cmd_element *cmd); + /* * Dump all nodes and commands associated with a given node as XML to the VTY. */ @@ -654,6 +656,29 @@ int same_name_count; vty_out(vty, "%s", VTY_NEWLINE); + + /* Only once, list all common node commands. Use the CONFIG node to find common node commands. */ + vty_out(vty, " %s", VTY_NEWLINE); + vty_out(vty, " Common Commands%s", VTY_NEWLINE); + vty_out(vty, " These commands are available on all VTY nodes. They are listed" + " here only once, to unclutter the VTY reference.%s", VTY_NEWLINE); + for (i = 0; i < vector_active(cmdvec); ++i) { + struct cmd_node *cnode; + cnode = vector_slot(cmdvec, i); + if (!cnode) + continue; + if (cnode->node != CONFIG_NODE) + continue; + + for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { + struct cmd_element *elem; + elem = vector_slot(cnode->cmd_vector, j); + if (!vty_command_is_common(elem)) + continue; + vty_dump_element(elem, vty); + } + } + vty_out(vty, " %s", VTY_NEWLINE); for (i = 0; i < vector_active(cmdvec); ++i) { struct cmd_node *cnode; @@ -682,6 +707,8 @@ for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { struct cmd_element *elem; elem = vector_slot(cnode->cmd_vector, j); + if (vty_command_is_common(elem)) + continue; vty_dump_element(elem, vty); } @@ -3648,6 +3675,24 @@ } } +/*! Return true if a node is installed by install_basic_node_commands(), so + * that we can avoid repeating them for each and every node during 'show + * running-config' */ +static bool vty_command_is_common(struct cmd_element *cmd) +{ + if (cmd == &config_help_cmd + || cmd == &config_list_cmd + || cmd == &config_write_terminal_cmd + || cmd == &config_write_file_cmd + || cmd == &config_write_memory_cmd + || cmd == &config_write_cmd + || cmd == &show_running_config_cmd + || cmd == &config_exit_cmd + || cmd == &config_end_cmd) + return true; + return false; +} + /** * Write the current running config to a given file * \param[in] vty the vty of the code -- To view, visit https://gerrit.osmocom.org/5246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:03:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:03:59 +0000 Subject: [PATCH] libosmocore[master]: VTY reference: do not list empty nodes Message-ID: Review at https://gerrit.osmocom.org/5247 VTY reference: do not list empty nodes In 'show online-help' output, don't list nodes that have no commands (the 'Password' node). Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c --- M src/vty/command.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/5247/1 diff --git a/src/vty/command.c b/src/vty/command.c index e5efad2..7395711 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -685,6 +685,8 @@ cnode = vector_slot(cmdvec, i); if (!cnode) continue; + if (vector_active(cnode->cmd_vector) < 1) + continue; /* De-dup node IDs: how many times has this same name been used before? Count the first * occurence as _1 and omit that first suffix, so that the first occurence is called -- To view, visit https://gerrit.osmocom.org/5247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:00 +0000 Subject: [PATCH] libosmocore[master]: VTY reference: use node names as section names Message-ID: Review at https://gerrit.osmocom.org/5248 VTY reference: use node names as section names In 'show online-help' output, add the node names (currently all derived from the prompt) as entry, so that in the osmo-gsm-manuals, each section of node commands gets a title. So far, each section of commands has no name at all, and it is entirely up for guessing which part of the VTY the commands are about. Node section names, e.g. for OsmoHLR, will be like 1 VTY reference 1.4 config 1.5 config-log 1.6 config-line 1.7 config-ctrl 1.8 config-hlr 1.9 config-hlr-gsup Before this patch, all but '1 VTY reference' were plain empty. A better solution would be to list the actual command name that enters the node, and to nest the commands identically to VTY node nesting, but since this information is currently hidden in node command implementations, it is impossible to derive it. So we should actually make the VTY reflect the node nesting structure in its data model, which would resolve both the accurate node name problem as well as produce well-structured output to generate the VTY references from. This patch is a workaround for lack of a more profound fix of the VTY data model. At least it makes the VTY references' sections even remotely useful. Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe --- M src/vty/command.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/5248/1 diff --git a/src/vty/command.c b/src/vty/command.c index 7395711..55284ee 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -705,6 +705,7 @@ if (same_name_count > 1 || !*cnode->name) vty_out(vty, "_%d", same_name_count); vty_out(vty, "'>%s", VTY_NEWLINE); + vty_out(vty, " %s%s", cnode->name, VTY_NEWLINE); for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { struct cmd_element *elem; -- To view, visit https://gerrit.osmocom.org/5248 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:00 +0000 Subject: [PATCH] libosmocore[master]: vty: set name for VIEW+ENABLE nodes, for VTY reference Message-ID: Review at https://gerrit.osmocom.org/5249 vty: set name for VIEW+ENABLE nodes, for VTY reference This leaves no unnamed chapters in future VTY reference documents. Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f --- M src/vty/command.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/5249/1 diff --git a/src/vty/command.c b/src/vty/command.c index 55284ee..71f6a71 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -68,21 +68,25 @@ struct cmd_node auth_node = { AUTH_NODE, "Password: ", + .name = "auth", }; struct cmd_node view_node = { VIEW_NODE, "%s> ", + .name = "view", }; struct cmd_node auth_enable_node = { AUTH_ENABLE_NODE, "Password: ", + .name = "auth-enable", }; struct cmd_node enable_node = { ENABLE_NODE, "%s# ", + .name = "enable", }; struct cmd_node config_node = { -- To view, visit https://gerrit.osmocom.org/5249 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:01 +0000 Subject: [PATCH] libosmocore[master]: vty reference: merge_doc.xsl: do not omit description tag Message-ID: Review at https://gerrit.osmocom.org/5250 vty reference: merge_doc.xsl: do not omit description tag vty_additions.xml files provide s for tags, but for unknown reasons, merge_doc.xsl explicitly omits description tags. Do not omit s so that they show up in the merged document. This will take effect when next building the osmo-gsm-manuals using this file. Change-Id: I418e61705043d4df047d8038c5d61623ba64f2e0 --- M doc/vty/merge_doc.xsl 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/5250/1 diff --git a/doc/vty/merge_doc.xsl b/doc/vty/merge_doc.xsl index adbc1c1..d75c499 100644 --- a/doc/vty/merge_doc.xsl +++ b/doc/vty/merge_doc.xsl @@ -18,9 +18,7 @@ - - - + -- To view, visit https://gerrit.osmocom.org/5250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I418e61705043d4df047d8038c5d61623ba64f2e0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:01 +0000 Subject: [PATCH] libosmocore[master]: comment: utils: more accurately describe OSMO_STRINGIFY macro Message-ID: Review at https://gerrit.osmocom.org/5251 comment: utils: more accurately describe OSMO_STRINGIFY macro Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c --- M include/osmocom/core/utils.h 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/5251/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index c5cc138..0a3805d 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -15,7 +15,9 @@ #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b)) /*! Return the minimum of two specified values */ #define OSMO_MIN(a, b) ((a) >= (b) ? (b) : (a)) -/*! Stringify the contents of a macro, e.g. a port number */ +/*! Stringify the name of a macro x, e.g. an FSM event name. + * Note: if nested within another preprocessor macro, this will + * stringify the value of x instead of its name. */ #define OSMO_STRINGIFY(x) #x /*! Make a value_string entry from an enum value name */ #define OSMO_VALUE_STRING(x) { x, #x } -- To view, visit https://gerrit.osmocom.org/5251 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:01 +0000 Subject: [PATCH] libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... Message-ID: Review at https://gerrit.osmocom.org/5252 logging vty: describe 'logging set-log-mask' command, add OSMO_STRINGIFY_VAL() Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f --- M include/osmocom/core/utils.h M src/vty/logging_vty.c 2 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/5252/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0a3805d..5c660cd 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -19,6 +19,8 @@ * Note: if nested within another preprocessor macro, this will * stringify the value of x instead of its name. */ #define OSMO_STRINGIFY(x) #x +/*! Stringify the value of a macro x, e.g. a port number. */ +#define OSMO_STRINGIFY_VAL(x) OSMO_STRINGIFY(x) /*! Make a value_string entry from an enum value name */ #define OSMO_VALUE_STRING(x) { x, #x } /*! Number of bytes necessary to store given BITS */ diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 215394f..c39017b 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -247,7 +247,15 @@ "logging set-log-mask MASK", LOGGING_STR "Set the logmask of this logging target\n" - "The logmask to use\n") + "List of logging categories to log, e.g. 'abc:mno:xyz'. Available log categories depend on the specific" + " application, refer to the 'logging level' command. Optionally add individual log levels like" + " 'abc,1:mno,3:xyz,5', where the level numbers are" + " " OSMO_STRINGIFY(LOGL_DEBUG) "=" OSMO_STRINGIFY_VAL(LOGL_DEBUG) + " " OSMO_STRINGIFY(LOGL_INFO) "=" OSMO_STRINGIFY_VAL(LOGL_INFO) + " " OSMO_STRINGIFY(LOGL_NOTICE) "=" OSMO_STRINGIFY_VAL(LOGL_NOTICE) + " " OSMO_STRINGIFY(LOGL_ERROR) "=" OSMO_STRINGIFY_VAL(LOGL_ERROR) + " " OSMO_STRINGIFY(LOGL_FATAL) "=" OSMO_STRINGIFY_VAL(LOGL_FATAL) + "\n") { struct log_target *tgt = osmo_log_vty2tgt(vty); @@ -263,7 +271,8 @@ "logging set log mask MASK", LOGGING_STR "Decide which categories to output.\n" - "Log commands\n" "Mask commands\n" "The logmask to use\n"); + "Log commands\n" "Mask commands\n" + "'set log mask' is deprecated, please refer to the docs of 'set-log-mask' instead\n"); DEFUN(diable_logging, -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:02 +0000 Subject: [PATCH] libosmocore[master]: logging vty: tweak general 'logging' command doc Message-ID: Review at https://gerrit.osmocom.org/5253 logging vty: tweak general 'logging' command doc 'logging' is not only for terminals, also for stderr and other log targets. Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 --- M include/osmocom/vty/logging.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/5253/1 diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h index 9bafb98..1baa3f8 100644 --- a/include/osmocom/vty/logging.h +++ b/include/osmocom/vty/logging.h @@ -2,7 +2,7 @@ #pragma once -#define LOGGING_STR "Configure log message to this terminal\n" +#define LOGGING_STR "Configure logging\n" #define FILTER_STR "Filter log messages\n" struct log_info; -- To view, visit https://gerrit.osmocom.org/5253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:04:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:04:02 +0000 Subject: [PATCH] libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node Message-ID: Review at https://gerrit.osmocom.org/5254 logging vty: add 'logging set-log-mask' command to log node So far the set-log-mask is only published on the VIEW and ENABLE nodes. It appears to have been forgotten from the actual log target node where it could be quite useful in config files. The command is like logging set-log-mask mm,1:cc,3:rsl,3 There also is a deprecated alias 'set log mask' without dashes, do not add that one, since it makes no sense to add a deprecated alias to a node where it was never present. Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a --- M src/vty/logging_vty.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/5254/1 diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index c39017b..fe5625c 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -799,6 +799,7 @@ install_element(CFG_LOG_NODE, &logging_prnt_timestamp_cmd); install_element(CFG_LOG_NODE, &logging_prnt_ext_timestamp_cmd); install_element(CFG_LOG_NODE, &logging_prnt_cat_cmd); + install_element(CFG_LOG_NODE, &logging_set_category_mask_cmd); install_element(CFG_LOG_NODE, &logging_level_cmd); install_element(CONFIG_NODE, &cfg_log_stderr_cmd); -- To view, visit https://gerrit.osmocom.org/5254 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:10:21 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN VTY ref: prep: convert newlines to unix Message-ID: Review at https://gerrit.osmocom.org/5255 OsmoGGSN VTY ref: prep: convert newlines to unix To omit whitespace changes in an upcoming patch that updates the VTY reference and will use '\n' line breaks, convert line breaks from '\r\n' to '\n' without any other changes. Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28 --- M OsmoGGSN/vty/ggsn_vty_reference.xml 1 file changed, 1,480 insertions(+), 1,480 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/55/5255/1 diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml b/OsmoGGSN/vty/ggsn_vty_reference.xml index 6809ead..696f1f2 100644 --- a/OsmoGGSN/vty/ggsn_vty_reference.xml +++ b/OsmoGGSN/vty/ggsn_vty_reference.xml @@ -1,1480 +1,1480 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5255 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:10:21 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN vty: update VTY reference Message-ID: Review at https://gerrit.osmocom.org/5256 OsmoGGSN vty: update VTY reference Apply VTY reference changes from libosmocore: change node IDs from index numbers to meaningful names from VTY node prompts. Introduce section with common commands, do not repeat the common commands on each child node. Populate section names (so far empty). Add apn / gpdu VTY reference. This is generated using the recent libosmocore vty doc patches that conclude in libosmocore change-id Iedd67750539b676271de0e0e9316d4e6f794406a. Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727 --- M OsmoGGSN/vty/ggsn_vty_reference.xml 1 file changed, 120 insertions(+), 395 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/56/5256/1 diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml b/OsmoGGSN/vty/ggsn_vty_reference.xml index 696f1f2..76a55c1 100644 --- a/OsmoGGSN/vty/ggsn_vty_reference.xml +++ b/OsmoGGSN/vty/ggsn_vty_reference.xml @@ -1,7 +1,59 @@ - + + Common Commands + These commands are available on all VTY nodes. They are listed here only once, to unclutter the VTY reference. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + view @@ -12,21 +64,6 @@ - - - - - - - - - - - - - - - @@ -67,19 +104,19 @@ - + - + - + @@ -88,7 +125,7 @@ - + @@ -96,7 +133,7 @@ - + @@ -104,7 +141,7 @@ - + @@ -113,7 +150,7 @@ - + @@ -122,23 +159,23 @@ - + - + - + - + - + @@ -234,53 +271,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + enable @@ -363,19 +355,19 @@ - + - + - + @@ -384,7 +376,7 @@ - + @@ -392,7 +384,7 @@ - + @@ -400,7 +392,7 @@ - + @@ -409,7 +401,7 @@ - + @@ -418,23 +410,23 @@ - + - + - + - + - + @@ -530,56 +522,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config @@ -827,59 +771,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-log - + @@ -888,7 +784,7 @@ - + @@ -896,7 +792,7 @@ - + @@ -904,7 +800,7 @@ - + @@ -913,16 +809,23 @@ - + + + + + + + + - + @@ -956,56 +859,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-stats @@ -1073,56 +928,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-line @@ -1141,7 +948,8 @@ - + + config-ctrl @@ -1149,56 +957,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-ggsn @@ -1278,56 +1038,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-ggsn-apn @@ -1476,5 +1188,18 @@ + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5256 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:10:21 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoGGSN: fix VTY additions' node IDs Message-ID: Review at https://gerrit.osmocom.org/5257 OsmoGGSN: fix VTY additions' node IDs Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453 --- M OsmoGGSN/vty/ggsn_vty_additions.xml 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/57/5257/1 diff --git a/OsmoGGSN/vty/ggsn_vty_additions.xml b/OsmoGGSN/vty/ggsn_vty_additions.xml index 1bbeb81..b0e8a39 100644 --- a/OsmoGGSN/vty/ggsn_vty_additions.xml +++ b/OsmoGGSN/vty/ggsn_vty_additions.xml @@ -1,27 +1,27 @@ - - + + Telnet/VTY Configuration Node Configure parameters of the Telnet/VTY Interface, such as to which IP address it should bind/listen to. - - + + CTRL Configuration Node Configure parameters of the CTRL Interface, such as to which IP address it should bind/listen to. - - + + GGSN Instance Configuration Node Configure an Instance of a (virtual) GGSN - - + + APN Configuration Node Configure an Access Point Name (APN) inside a GGSN Instance -- To view, visit https://gerrit.osmocom.org/5257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 05:10:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 9 Dec 2017 05:10:22 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: vty_additions: use proper node IDs, tweak node descr... Message-ID: Review at https://gerrit.osmocom.org/5258 common: vty_additions: use proper node IDs, tweak node descriptions Depends on the ENABLE and VIEW nodes to be named, as in a recent libosmocore patch. Depends: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f (libosmocore) Change-Id: Ic2f3b18cced72db6fa5bad02ae58c602bb2c0213 --- M common/vty_additions.xml 1 file changed, 31 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/58/5258/1 diff --git a/common/vty_additions.xml b/common/vty_additions.xml index d32cea2..ef442f5 100644 --- a/common/vty_additions.xml +++ b/common/vty_additions.xml @@ -5,31 +5,30 @@ - - Show Node for introspection - This is the default node when connecting to the + + The view node is the default node when connecting to the VTY interface. This node does not require any additional permission and allows to introspect the application. - - Enable Node for admin commands - This is a privileged node allowing to make changes - to the configuration and allow to access more commands. Everything - available on the show node should be available here. + + The enable node is a privileged node, allowing to make changes + to the configuration and to access further commands like 'configure'. + All commands seen on the view node are also available here. - - Configuration Node for configuration - This is the base node for all configuration nodes. It - allows to enter BTS and logging node to configure them. + + The config node is the root for all configuration commands, + which are identical to the config file format. Changes made on the telnet + VTY can be made persistent with the 'write file' command. - - - Logging Node for logging configuration - This is the node is a child of the configuration node and - is responsible for configuring the logging framework including the - log targets and log levels. + + + The log node is commonly available in all Osmocom programs and + allows configuring logging to stderr and/or log files, including logging + category and level filtering as well as output formatting options. + Note that the 'logging enable' command is required to make logging commands + available on the telnet VTY. @@ -39,10 +38,21 @@ + + This command is required to make logging commands available + on the telnet VTY. + - The logging framework has the concept of filters. This can - be used to only show log messages that apply to a given timeslot or - subscriber. The all filter allows all messages to pass unfiltered. + Disable/enable general log output on a given target. + Typically, 'logging filter all 1' allows to see the usual log output on a + given target. Setting to '0' can be useful when logging to the telnet VTY + console: mute all log output to allow typing VTY commands on the telnet + prompt without interference from log output; 'logging filter all 1' then + re-enables logging in the same log output configuration as before. + + Some applications provide more specific filters, e.g. to log a given IMSI + only. To employ such filters, set 'logging filter all 0' to disable + general logging, and then enable a more specific filter instead. -- To view, visit https://gerrit.osmocom.org/5258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2f3b18cced72db6fa5bad02ae58c602bb2c0213 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 9 13:06:26 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 9 Dec 2017 13:06:26 +0000 Subject: [PATCH] libosmocore[master]: license: Fix the license to GPL Message-ID: Review at https://gerrit.osmocom.org/5259 license: Fix the license to GPL This was always intended to be GPL and not AGPL. "kat" did the development as part of an internship paid by me and we agreed to shared copyright. Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c --- M debian/copyright M tests/fr/fr_test.c M tests/logging/logging_test.c M tests/loggingrb/loggingrb_test.c 4 files changed, 16 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/5259/1 diff --git a/debian/copyright b/debian/copyright index e763039..b119569 100644 --- a/debian/copyright +++ b/debian/copyright @@ -87,7 +87,7 @@ tests/loggingrb/loggingrb_test.c Copyright: 2008,2009,2012 Holger Hans Peter Freyther 2012-2013 Katerina Barone-Adesi -License: AGPL-3+ +License: GPL-3+ Files: tests/strrb/strrb_test.c tests/vty/vty_test.c @@ -172,17 +172,3 @@ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -License: AGPL-3+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . diff --git a/tests/fr/fr_test.c b/tests/fr/fr_test.c index 980259b..4d472b5 100644 --- a/tests/fr/fr_test.c +++ b/tests/fr/fr_test.c @@ -3,8 +3,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -12,8 +12,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ diff --git a/tests/logging/logging_test.c b/tests/logging/logging_test.c index ce8aac8..8fd71d0 100644 --- a/tests/logging/logging_test.c +++ b/tests/logging/logging_test.c @@ -4,8 +4,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -13,8 +13,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ diff --git a/tests/loggingrb/loggingrb_test.c b/tests/loggingrb/loggingrb_test.c index 2e2c717..3372c0c 100644 --- a/tests/loggingrb/loggingrb_test.c +++ b/tests/loggingrb/loggingrb_test.c @@ -5,8 +5,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -14,8 +14,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ -- To view, visit https://gerrit.osmocom.org/5259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Dec 9 13:24:05 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 9 Dec 2017 13:24:05 +0000 Subject: libosmocore[master]: license: Fix the license to GPL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 9 13:28:16 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 9 Dec 2017 13:28:16 +0000 Subject: osmo-bsc[master]: abisip-find: add getopts and option to prevent endless loop In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5239/1/src/ipaccess/abisip-find.c File src/ipaccess/abisip-find.c: Line 212: ws fix... -- To view, visit https://gerrit.osmocom.org/5239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Dec 9 22:12:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 9 Dec 2017 22:12:08 +0000 Subject: [PATCH] osmo-bsc[master]: Move many counters from BSC-global to per-BTS granularity Message-ID: Review at https://gerrit.osmocom.org/5260 Move many counters from BSC-global to per-BTS granularity We used to have a lot of counters only globlly per BSC, but they're much more useful on a per-BTS level. Change-Id: I954b9dda72b83b91d46a934c221a8b3375743599 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libbsc/abis_rsl.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon/gsm_data_shared.c M src/osmo-bsc_nat/Makefile.am 7 files changed, 69 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/5260/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 1ca3bc9..cc08483 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -185,10 +185,43 @@ #include "gsm_data_shared.h" +enum { + BTS_CTR_CHREQ_TOTAL, + BTS_CTR_CHREQ_NO_CHANNEL, + BTS_CTR_CHAN_RF_FAIL, + BTS_CTR_CHAN_RLL_ERR, + BTS_CTR_BTS_OML_FAIL, + BTS_CTR_BTS_RSL_FAIL, + BTS_CTR_CODEC_AMR_F, + BTS_CTR_CODEC_AMR_H, + BTS_CTR_CODEC_EFR, + BTS_CTR_CODEC_V1_FR, + BTS_CTR_CODEC_V1_HR, +}; + +static const struct rate_ctr_desc bts_ctr_description[] = { + [BTS_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, + [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, + [BTS_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, + [BTS_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, + [BTS_CTR_BTS_OML_FAIL] = {"oml_fail", "Received a TEI down on a OML link."}, + [BTS_CTR_BTS_RSL_FAIL] = {"rsl_fail", "Received a TEI down on a OML link."}, + [BTS_CTR_CODEC_AMR_F] = {"codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_H] = {"codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BTS_CTR_CODEC_EFR] = {"codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_FR] = {"codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_HR] = {"codec_hr", "Count the usage of HR codec by channel mode requested."}, +}; + +static const struct rate_ctr_group_desc bts_ctrg_desc = { + "bts", + "base transceiver station", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(bts_ctr_description), + bts_ctr_description, +}; enum { - BSC_CTR_CHREQ_TOTAL, - BSC_CTR_CHREQ_NO_CHANNEL, BSC_CTR_HANDOVER_ATTEMPTED, BSC_CTR_HANDOVER_NO_CHANNEL, BSC_CTR_HANDOVER_TIMEOUT, @@ -198,20 +231,9 @@ BSC_CTR_PAGING_DETACHED, BSC_CTR_PAGING_COMPLETED, BSC_CTR_PAGING_EXPIRED, - BSC_CTR_CHAN_RF_FAIL, - BSC_CTR_CHAN_RLL_ERR, - BSC_CTR_BTS_OML_FAIL, - BSC_CTR_BTS_RSL_FAIL, - BSC_CTR_CODEC_AMR_F, - BSC_CTR_CODEC_AMR_H, - BSC_CTR_CODEC_EFR, - BSC_CTR_CODEC_V1_FR, - BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { - [BSC_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, - [BSC_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover.attempted", "Received handover attempts."}, [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover.no_channel", "Sent no channel available responses."}, [BSC_CTR_HANDOVER_TIMEOUT] = {"handover.timeout", "Count the amount of timeouts of timer T3103."}, @@ -221,15 +243,6 @@ [BSC_CTR_PAGING_DETACHED] = {"paging.detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, [BSC_CTR_PAGING_COMPLETED] = {"paging.completed", "Paging successful completed."}, [BSC_CTR_PAGING_EXPIRED] = {"paging.expired", "Paging Request expired because of timeout T3113."}, - [BSC_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, - [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, - [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, - [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, - [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, - [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, - [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, - [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, - [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index d7514ca..e762c24 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -807,6 +807,8 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + + struct rate_ctr_group *bts_ctrs; }; diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 9968602..fbaaf09 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -91,10 +91,10 @@ if (lchan->type == GSM_LCHAN_TCH_H) { switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_AMR_H]); break; case GSM48_CMODE_SPEECH_V1: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_V1_HR]); break; default: break; @@ -102,13 +102,13 @@ } else if (lchan->type == GSM_LCHAN_TCH_F) { switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_AMR_F]); break; case GSM48_CMODE_SPEECH_V1: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_V1_FR]); break; case GSM48_CMODE_SPEECH_EFR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_EFR]); break; default: break; @@ -1366,7 +1366,7 @@ TLVP_LEN(&tp, RSL_IE_CAUSE)); LOGPC(DRSL, LOGL_NOTICE, "\n"); - rate_ctr_inc(&msg->lchan->ts->trx->bts->network->bsc_ctrs->ctr[BSC_CTR_CHAN_RF_FAIL]); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL]); return rsl_rf_chan_release_err(msg->lchan); } @@ -1872,7 +1872,7 @@ * request reference RA */ lctype = get_ctype_by_chreq(bts->network, rqd_ref->ra); - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CHREQ_TOTAL]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CHREQ_TOTAL]); /* * We want LOCATION UPDATES to succeed and will assign a TCH @@ -1885,7 +1885,7 @@ if (!lchan) { LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n", msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra); - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CHREQ_NO_CHANNEL]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CHREQ_NO_CHANNEL]); /* FIXME gather multiple CHAN RQD and reject up to 4 at the same time */ if (bts->network->T3122) rsl_send_imm_ass_rej(bts, 1, rqd_ref, bts->network->T3122 & 0xff); @@ -2082,7 +2082,7 @@ rll_indication(msg->lchan, rllh->link_id, BSC_RLLR_IND_ERR_IND); if (rlm_cause == RLL_CAUSE_T200_EXPIRED) { - rate_ctr_inc(&msg->lchan->ts->trx->bts->network->bsc_ctrs->ctr[BSC_CTR_CHAN_RLL_ERR]); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RLL_ERR]); return rsl_rf_chan_release_err(msg->lchan); } diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 1874200..2fb3842 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -399,9 +399,9 @@ LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx); if (isd->link_type == E1INP_SIGN_OML) - rate_ctr_inc(&trx->bts->network->bsc_ctrs->ctr[BSC_CTR_BTS_OML_FAIL]); + rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]); else if (isd->link_type == E1INP_SIGN_RSL) - rate_ctr_inc(&trx->bts->network->bsc_ctrs->ctr[BSC_CTR_BTS_RSL_FAIL]); + rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]); /* * free all allocated channels. change the nm_state so the diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3f3935c..42b7165 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -321,6 +321,19 @@ bts_chan_load(&pl, bts); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); + + vty_out(vty, "Channel Requests : %"PRIu64" total, %"PRIu64" no channel%s", + bts->bts_ctrs->ctr[BTS_CTR_CHREQ_TOTAL].current, + bts->bts_ctrs->ctr[BTS_CTR_CHREQ_NO_CHANNEL].current, + VTY_NEWLINE); + vty_out(vty, "Channel Failures : %"PRIu64" rf_failures, %"PRIu64" rll failures%s", + bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL].current, + bts->bts_ctrs->ctr[BTS_CTR_CHAN_RLL_ERR].current, + VTY_NEWLINE); + vty_out(vty, "BTS failures : %"PRIu64" OML, %"PRIu64" RSL%s", + bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL].current, + bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current, + VTY_NEWLINE); } DEFUN(show_bts, show_bts_cmd, "show bts [<0-255>]", @@ -3781,22 +3794,10 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) { - vty_out(vty, "Channel Requests : %"PRIu64" total, %"PRIu64" no channel%s", - net->bsc_ctrs->ctr[BSC_CTR_CHREQ_TOTAL].current, - net->bsc_ctrs->ctr[BSC_CTR_CHREQ_NO_CHANNEL].current, - VTY_NEWLINE); - vty_out(vty, "Channel Failures : %"PRIu64" rf_failures, %"PRIu64" rll failures%s", - net->bsc_ctrs->ctr[BSC_CTR_CHAN_RF_FAIL].current, - net->bsc_ctrs->ctr[BSC_CTR_CHAN_RLL_ERR].current, - VTY_NEWLINE); vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s", net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current, net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current, net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current, - VTY_NEWLINE); - vty_out(vty, "BTS failures : %"PRIu64" OML, %"PRIu64" RSL%s", - net->bsc_ctrs->ctr[BSC_CTR_BTS_OML_FAIL].current, - net->bsc_ctrs->ctr[BSC_CTR_BTS_RSL_FAIL].current, VTY_NEWLINE); } diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index e4ae339..2f7e7e3 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -346,9 +346,17 @@ memcpy(&bts->gprs.cell.rlc_cfg, &rlc_cfg_default, sizeof(bts->gprs.cell.rlc_cfg)); + /* init statistics */ + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + if (!bts->bts_ctrs) { + talloc_free(bts); + return NULL; + } + /* create our primary TRX */ bts->c0 = gsm_bts_trx_alloc(bts); if (!bts->c0) { + talloc_free(bts->bts_ctrs); talloc_free(bts); return NULL; } diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index 23c2b67..dd20ddb 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -50,7 +50,6 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ - $(LIBOSMOLEGACYMGCP_LIBS) \ $(LIBCRYPTO_LIBS) \ $(LIBRARY_GSM) \ -lrt \ -- To view, visit https://gerrit.osmocom.org/5260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I954b9dda72b83b91d46a934c221a8b3375743599 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 9 22:12:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 9 Dec 2017 22:12:09 +0000 Subject: [PATCH] osmo-bsc[master]: rate_ctr: Use ':' as separator, not '.' Message-ID: Review at https://gerrit.osmocom.org/5261 rate_ctr: Use ':' as separator, not '.' In more recent versions of libosmocore, we are converting any '.' in [rate] counter names to ':' to avoid clashes with the special meaning of '.' in the CTRL interface. Let's avoid any conversion and use the proper name already here. This also changes the codec_foo counters to codec:foo to follow the notation of other counters. Change-Id: I18916abbfc706b86bd211e7cca1a0ca3099826e9 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/61/5261/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cc08483..7b7aa23 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -200,17 +200,17 @@ }; static const struct rate_ctr_desc bts_ctr_description[] = { - [BTS_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, - [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, - [BTS_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, - [BTS_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, + [BTS_CTR_CHREQ_TOTAL] = {"chreq:total", "Received channel requests."}, + [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq:no_channel", "Sent to MS no channel available."}, + [BTS_CTR_CHAN_RF_FAIL] = {"chan:rf_fail", "Received a RF failure indication from BTS."}, + [BTS_CTR_CHAN_RLL_ERR] = {"chan:rll_err", "Received a RLL failure with T200 cause from BTS."}, [BTS_CTR_BTS_OML_FAIL] = {"oml_fail", "Received a TEI down on a OML link."}, [BTS_CTR_BTS_RSL_FAIL] = {"rsl_fail", "Received a TEI down on a OML link."}, - [BTS_CTR_CODEC_AMR_F] = {"codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, - [BTS_CTR_CODEC_AMR_H] = {"codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, - [BTS_CTR_CODEC_EFR] = {"codec_efr", "Count the usage of EFR codec by channel mode requested."}, - [BTS_CTR_CODEC_V1_FR] = {"codec_fr", "Count the usage of FR codec by channel mode requested."}, - [BTS_CTR_CODEC_V1_HR] = {"codec_hr", "Count the usage of HR codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_F] = {"codec:amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_H] = {"codec:amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BTS_CTR_CODEC_EFR] = {"codec:efr", "Count the usage of EFR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_FR] = {"codec:fr", "Count the usage of FR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -234,15 +234,15 @@ }; static const struct rate_ctr_desc bsc_ctr_description[] = { - [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover.attempted", "Received handover attempts."}, - [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover.no_channel", "Sent no channel available responses."}, - [BSC_CTR_HANDOVER_TIMEOUT] = {"handover.timeout", "Count the amount of timeouts of timer T3103."}, - [BSC_CTR_HANDOVER_COMPLETED] = {"handover.completed", "Received handover completed."}, - [BSC_CTR_HANDOVER_FAILED] = {"handover.failed", "Receive HO FAIL messages."}, - [BSC_CTR_PAGING_ATTEMPTED] = {"paging.attempted", "Paging attempts for a MS."}, - [BSC_CTR_PAGING_DETACHED] = {"paging.detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, - [BSC_CTR_PAGING_COMPLETED] = {"paging.completed", "Paging successful completed."}, - [BSC_CTR_PAGING_EXPIRED] = {"paging.expired", "Paging Request expired because of timeout T3113."}, + [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover:attempted", "Received handover attempts."}, + [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover:no_channel", "Sent no channel available responses."}, + [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Count the amount of timeouts of timer T3103."}, + [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Received handover completed."}, + [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Receive HO FAIL messages."}, + [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a MS."}, + [BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, + [BSC_CTR_PAGING_COMPLETED] = {"paging:completed", "Paging successful completed."}, + [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; enum { -- To view, visit https://gerrit.osmocom.org/5261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18916abbfc706b86bd211e7cca1a0ca3099826e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 9 22:16:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 9 Dec 2017 22:16:32 +0000 Subject: [PATCH] osmo-bsc[master]: Remove 'msc' counter group from BSC Message-ID: Review at https://gerrit.osmocom.org/5262 Remove 'msc' counter group from BSC This is left over from the OsmoNITB days. We're defining and allocating these MSC counters, but never actually using them. This also means that the automatic counter export will list them, raising the expectation at users that such counters could be used in OsmoBSC. Let's remove them. They are in OsmoMSC, but not OsmoBSC. Change-Id: I5bd9e6e333b1c396beae46630986b17e7f8b82ef --- M include/osmocom/bsc/gsm_data.h M src/libcommon-cs/common_cs.c 2 files changed, 0 insertions(+), 59 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/62/5262/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7b7aa23..a9512f5 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -245,50 +245,6 @@ [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; -enum { - MSC_CTR_LOC_UPDATE_TYPE_ATTACH, - MSC_CTR_LOC_UPDATE_TYPE_NORMAL, - MSC_CTR_LOC_UPDATE_TYPE_PERIODIC, - MSC_CTR_LOC_UPDATE_TYPE_DETACH, - MSC_CTR_LOC_UPDATE_FAILED, - MSC_CTR_LOC_UPDATE_COMPLETED, - MSC_CTR_SMS_SUBMITTED, - MSC_CTR_SMS_NO_RECEIVER, - MSC_CTR_SMS_DELIVERED, - MSC_CTR_SMS_RP_ERR_MEM, - MSC_CTR_SMS_RP_ERR_OTHER, - MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR, - MSC_CTR_CALL_MO_SETUP, - MSC_CTR_CALL_MO_CONNECT_ACK, - MSC_CTR_CALL_MT_SETUP, - MSC_CTR_CALL_MT_CONNECT, - MSC_CTR_CALL_ACTIVE, - MSC_CTR_CALL_COMPLETE, - MSC_CTR_CALL_INCOMPLETE, -}; - -static const struct rate_ctr_desc msc_ctr_description[] = { - [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type.attach", "Received location update imsi attach requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type.normal", "Received location update normal requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type.periodic", "Received location update periodic requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type.detach", "Received location update detach indication."}, - [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp.failed", "Rejected location updates."}, - [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp.completed", "Successful location updates."}, - [MSC_CTR_SMS_SUBMITTED] = {"sms.submitted", "Received a RPDU from a MS (MO)."}, - [MSC_CTR_SMS_NO_RECEIVER] = {"sms.no_receiver", "Counts SMS which couldn't routed because no receiver found."}, - [MSC_CTR_SMS_DELIVERED] = {"sms.delivered", "Global SMS Deliver attempts."}, - [MSC_CTR_SMS_RP_ERR_MEM] = {"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, - [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."}, - [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms.deliver_unknown_error", "Unknown error occured during sms delivery."}, - /* FIXME: count also sms delivered */ - [MSC_CTR_CALL_MO_SETUP] = {"call.mo_setup", "Received setup requests from a MS to init a MO call."}, - [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, - [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, - [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, - [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, - [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, - [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, -}; static const struct rate_ctr_group_desc bsc_ctrg_desc = { @@ -297,14 +253,6 @@ OSMO_STATS_CLASS_GLOBAL, ARRAY_SIZE(bsc_ctr_description), bsc_ctr_description, -}; - -static const struct rate_ctr_group_desc msc_ctrg_desc = { - "msc", - "mobile switching center", - OSMO_STATS_CLASS_GLOBAL, - ARRAY_SIZE(msc_ctr_description), - msc_ctr_description, }; enum gsm_auth_policy { @@ -368,7 +316,6 @@ } handover; struct rate_ctr_group *bsc_ctrs; - struct rate_ctr_group *msc_ctrs; struct osmo_counter *active_calls; /* layer 4 */ diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index b3037c6..2ac2612 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -61,12 +61,6 @@ net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); - /* init statistics */ - net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); - if (!net->msc_ctrs) { - talloc_free(net); - return NULL; - } net->active_calls = osmo_counter_alloc("msc.active_calls"); net->mncc_recv = mncc_recv; -- To view, visit https://gerrit.osmocom.org/5262 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bd9e6e333b1c396beae46630986b17e7f8b82ef Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:17:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:17:09 +0000 Subject: [PATCH] libosmo-sccp[master]: sccp_helpers: don't return msgb with l2h set Message-ID: Review at https://gerrit.osmocom.org/5263 sccp_helpers: don't return msgb with l2h set It's a bad idea to use sccp_msgb_alloc() for SCCP User Primitive msgbs. The rationale is quite simple: The SCU msgb's are used for wrapping osmo_prim. The user payload data (e.g. BSSAP) in such primitives is found at msgb->l2h. However, user payload data is optional. So in a SCU primitive without user data, we must have msgb->l2h == NULL. The old behavior resulted in bogus data (actually the sccp_user_prim) to be contained in the DATA section of SCCP messages such as RLSD/RLC. Also, the old implementation of scu_msgb_alloc() discarded the 'name' argument and replaced it with a static "SCU" which was of course another bug. Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426 Related: OS#2732 --- M src/sccp_helpers.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/63/5263/1 diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 078ca2b..1a67488 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -33,9 +33,12 @@ #include "sccp_internal.h" +#define SCU_MSG_SIZE 2048 +#define SCU_MSG_HEADROOM 0 + static struct msgb *scu_msgb_alloc(const char *name) { - return sccp_msgb_alloc("SCU"); + return msgb_alloc_headroom(SCU_MSG_SIZE+SCU_MSG_HEADROOM, SCU_MSG_HEADROOM, name); } void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn) -- To view, visit https://gerrit.osmocom.org/5263 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:23:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:23:34 +0000 Subject: libosmo-sccp[master]: sccp_helpers: don't return msgb with l2h set In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5263 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:23:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:23:35 +0000 Subject: [MERGED] libosmo-sccp[master]: sccp_helpers: don't return msgb with l2h set In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sccp_helpers: don't return msgb with l2h set ...................................................................... sccp_helpers: don't return msgb with l2h set It's a bad idea to use sccp_msgb_alloc() for SCCP User Primitive msgbs. The rationale is quite simple: The SCU msgb's are used for wrapping osmo_prim. The user payload data (e.g. BSSAP) in such primitives is found at msgb->l2h. However, user payload data is optional. So in a SCU primitive without user data, we must have msgb->l2h == NULL. The old behavior resulted in bogus data (actually the sccp_user_prim) to be contained in the DATA section of SCCP messages such as RLSD/RLC. Also, the old implementation of scu_msgb_alloc() discarded the 'name' argument and replaced it with a static "SCU" which was of course another bug. Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426 Related: OS#2732 --- M src/sccp_helpers.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 078ca2b..1a67488 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -33,9 +33,12 @@ #include "sccp_internal.h" +#define SCU_MSG_SIZE 2048 +#define SCU_MSG_HEADROOM 0 + static struct msgb *scu_msgb_alloc(const char *name) { - return sccp_msgb_alloc("SCU"); + return msgb_alloc_headroom(SCU_MSG_SIZE+SCU_MSG_HEADROOM, SCU_MSG_HEADROOM, name); } void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn) -- To view, visit https://gerrit.osmocom.org/5263 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19cb83302aaa404ab1a2d92e6f2aec43d0380426 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:14 +0000 Subject: osmo-bsc[master]: Move many counters from BSC-global to per-BTS granularity In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I954b9dda72b83b91d46a934c221a8b3375743599 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:24 +0000 Subject: osmo-bsc[master]: rate_ctr: Use ':' as separator, not '.' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18916abbfc706b86bd211e7cca1a0ca3099826e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:25 +0000 Subject: osmo-bsc[master]: Remove 'msc' counter group from BSC In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5262 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bd9e6e333b1c396beae46630986b17e7f8b82ef Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:26 +0000 Subject: [MERGED] osmo-bsc[master]: Remove 'msc' counter group from BSC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove 'msc' counter group from BSC ...................................................................... Remove 'msc' counter group from BSC This is left over from the OsmoNITB days. We're defining and allocating these MSC counters, but never actually using them. This also means that the automatic counter export will list them, raising the expectation at users that such counters could be used in OsmoBSC. Let's remove them. They are in OsmoMSC, but not OsmoBSC. Change-Id: I5bd9e6e333b1c396beae46630986b17e7f8b82ef --- M include/osmocom/bsc/gsm_data.h M src/libcommon-cs/common_cs.c 2 files changed, 0 insertions(+), 59 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7b7aa23..a9512f5 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -245,50 +245,6 @@ [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; -enum { - MSC_CTR_LOC_UPDATE_TYPE_ATTACH, - MSC_CTR_LOC_UPDATE_TYPE_NORMAL, - MSC_CTR_LOC_UPDATE_TYPE_PERIODIC, - MSC_CTR_LOC_UPDATE_TYPE_DETACH, - MSC_CTR_LOC_UPDATE_FAILED, - MSC_CTR_LOC_UPDATE_COMPLETED, - MSC_CTR_SMS_SUBMITTED, - MSC_CTR_SMS_NO_RECEIVER, - MSC_CTR_SMS_DELIVERED, - MSC_CTR_SMS_RP_ERR_MEM, - MSC_CTR_SMS_RP_ERR_OTHER, - MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR, - MSC_CTR_CALL_MO_SETUP, - MSC_CTR_CALL_MO_CONNECT_ACK, - MSC_CTR_CALL_MT_SETUP, - MSC_CTR_CALL_MT_CONNECT, - MSC_CTR_CALL_ACTIVE, - MSC_CTR_CALL_COMPLETE, - MSC_CTR_CALL_INCOMPLETE, -}; - -static const struct rate_ctr_desc msc_ctr_description[] = { - [MSC_CTR_LOC_UPDATE_TYPE_ATTACH] = {"loc_update_type.attach", "Received location update imsi attach requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_NORMAL] = {"loc_update_type.normal", "Received location update normal requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_PERIODIC] = {"loc_update_type.periodic", "Received location update periodic requests."}, - [MSC_CTR_LOC_UPDATE_TYPE_DETACH] = {"loc_update_type.detach", "Received location update detach indication."}, - [MSC_CTR_LOC_UPDATE_FAILED] = {"loc_update_resp.failed", "Rejected location updates."}, - [MSC_CTR_LOC_UPDATE_COMPLETED] = {"loc_update_resp.completed", "Successful location updates."}, - [MSC_CTR_SMS_SUBMITTED] = {"sms.submitted", "Received a RPDU from a MS (MO)."}, - [MSC_CTR_SMS_NO_RECEIVER] = {"sms.no_receiver", "Counts SMS which couldn't routed because no receiver found."}, - [MSC_CTR_SMS_DELIVERED] = {"sms.delivered", "Global SMS Deliver attempts."}, - [MSC_CTR_SMS_RP_ERR_MEM] = {"sms.rp_err_mem", "CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt."}, - [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms.rp_err_other", "Other error of MS responses on a sms delive attempt."}, - [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms.deliver_unknown_error", "Unknown error occured during sms delivery."}, - /* FIXME: count also sms delivered */ - [MSC_CTR_CALL_MO_SETUP] = {"call.mo_setup", "Received setup requests from a MS to init a MO call."}, - [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, - [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, - [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, - [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, - [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, - [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, -}; static const struct rate_ctr_group_desc bsc_ctrg_desc = { @@ -297,14 +253,6 @@ OSMO_STATS_CLASS_GLOBAL, ARRAY_SIZE(bsc_ctr_description), bsc_ctr_description, -}; - -static const struct rate_ctr_group_desc msc_ctrg_desc = { - "msc", - "mobile switching center", - OSMO_STATS_CLASS_GLOBAL, - ARRAY_SIZE(msc_ctr_description), - msc_ctr_description, }; enum gsm_auth_policy { @@ -368,7 +316,6 @@ } handover; struct rate_ctr_group *bsc_ctrs; - struct rate_ctr_group *msc_ctrs; struct osmo_counter *active_calls; /* layer 4 */ diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index b3037c6..2ac2612 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -61,12 +61,6 @@ net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); - /* init statistics */ - net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); - if (!net->msc_ctrs) { - talloc_free(net); - return NULL; - } net->active_calls = osmo_counter_alloc("msc.active_calls"); net->mncc_recv = mncc_recv; -- To view, visit https://gerrit.osmocom.org/5262 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bd9e6e333b1c396beae46630986b17e7f8b82ef Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:27 +0000 Subject: [MERGED] osmo-bsc[master]: rate_ctr: Use ':' as separator, not '.' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rate_ctr: Use ':' as separator, not '.' ...................................................................... rate_ctr: Use ':' as separator, not '.' In more recent versions of libosmocore, we are converting any '.' in [rate] counter names to ':' to avoid clashes with the special meaning of '.' in the CTRL interface. Let's avoid any conversion and use the proper name already here. This also changes the codec_foo counters to codec:foo to follow the notation of other counters. Change-Id: I18916abbfc706b86bd211e7cca1a0ca3099826e9 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 18 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cc08483..7b7aa23 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -200,17 +200,17 @@ }; static const struct rate_ctr_desc bts_ctr_description[] = { - [BTS_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, - [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, - [BTS_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, - [BTS_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, + [BTS_CTR_CHREQ_TOTAL] = {"chreq:total", "Received channel requests."}, + [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq:no_channel", "Sent to MS no channel available."}, + [BTS_CTR_CHAN_RF_FAIL] = {"chan:rf_fail", "Received a RF failure indication from BTS."}, + [BTS_CTR_CHAN_RLL_ERR] = {"chan:rll_err", "Received a RLL failure with T200 cause from BTS."}, [BTS_CTR_BTS_OML_FAIL] = {"oml_fail", "Received a TEI down on a OML link."}, [BTS_CTR_BTS_RSL_FAIL] = {"rsl_fail", "Received a TEI down on a OML link."}, - [BTS_CTR_CODEC_AMR_F] = {"codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, - [BTS_CTR_CODEC_AMR_H] = {"codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, - [BTS_CTR_CODEC_EFR] = {"codec_efr", "Count the usage of EFR codec by channel mode requested."}, - [BTS_CTR_CODEC_V1_FR] = {"codec_fr", "Count the usage of FR codec by channel mode requested."}, - [BTS_CTR_CODEC_V1_HR] = {"codec_hr", "Count the usage of HR codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_F] = {"codec:amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_H] = {"codec:amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BTS_CTR_CODEC_EFR] = {"codec:efr", "Count the usage of EFR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_FR] = {"codec:fr", "Count the usage of FR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -234,15 +234,15 @@ }; static const struct rate_ctr_desc bsc_ctr_description[] = { - [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover.attempted", "Received handover attempts."}, - [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover.no_channel", "Sent no channel available responses."}, - [BSC_CTR_HANDOVER_TIMEOUT] = {"handover.timeout", "Count the amount of timeouts of timer T3103."}, - [BSC_CTR_HANDOVER_COMPLETED] = {"handover.completed", "Received handover completed."}, - [BSC_CTR_HANDOVER_FAILED] = {"handover.failed", "Receive HO FAIL messages."}, - [BSC_CTR_PAGING_ATTEMPTED] = {"paging.attempted", "Paging attempts for a MS."}, - [BSC_CTR_PAGING_DETACHED] = {"paging.detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, - [BSC_CTR_PAGING_COMPLETED] = {"paging.completed", "Paging successful completed."}, - [BSC_CTR_PAGING_EXPIRED] = {"paging.expired", "Paging Request expired because of timeout T3113."}, + [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover:attempted", "Received handover attempts."}, + [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover:no_channel", "Sent no channel available responses."}, + [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Count the amount of timeouts of timer T3103."}, + [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Received handover completed."}, + [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Receive HO FAIL messages."}, + [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a MS."}, + [BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, + [BSC_CTR_PAGING_COMPLETED] = {"paging:completed", "Paging successful completed."}, + [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; enum { -- To view, visit https://gerrit.osmocom.org/5261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18916abbfc706b86bd211e7cca1a0ca3099826e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:24:27 +0000 Subject: [MERGED] osmo-bsc[master]: Move many counters from BSC-global to per-BTS granularity In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Move many counters from BSC-global to per-BTS granularity ...................................................................... Move many counters from BSC-global to per-BTS granularity We used to have a lot of counters only globlly per BSC, but they're much more useful on a per-BTS level. Change-Id: I954b9dda72b83b91d46a934c221a8b3375743599 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libbsc/abis_rsl.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon/gsm_data_shared.c M src/osmo-bsc_nat/Makefile.am 7 files changed, 69 insertions(+), 46 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 1ca3bc9..cc08483 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -185,10 +185,43 @@ #include "gsm_data_shared.h" +enum { + BTS_CTR_CHREQ_TOTAL, + BTS_CTR_CHREQ_NO_CHANNEL, + BTS_CTR_CHAN_RF_FAIL, + BTS_CTR_CHAN_RLL_ERR, + BTS_CTR_BTS_OML_FAIL, + BTS_CTR_BTS_RSL_FAIL, + BTS_CTR_CODEC_AMR_F, + BTS_CTR_CODEC_AMR_H, + BTS_CTR_CODEC_EFR, + BTS_CTR_CODEC_V1_FR, + BTS_CTR_CODEC_V1_HR, +}; + +static const struct rate_ctr_desc bts_ctr_description[] = { + [BTS_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, + [BTS_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, + [BTS_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, + [BTS_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, + [BTS_CTR_BTS_OML_FAIL] = {"oml_fail", "Received a TEI down on a OML link."}, + [BTS_CTR_BTS_RSL_FAIL] = {"rsl_fail", "Received a TEI down on a OML link."}, + [BTS_CTR_CODEC_AMR_F] = {"codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BTS_CTR_CODEC_AMR_H] = {"codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BTS_CTR_CODEC_EFR] = {"codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_FR] = {"codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BTS_CTR_CODEC_V1_HR] = {"codec_hr", "Count the usage of HR codec by channel mode requested."}, +}; + +static const struct rate_ctr_group_desc bts_ctrg_desc = { + "bts", + "base transceiver station", + OSMO_STATS_CLASS_GLOBAL, + ARRAY_SIZE(bts_ctr_description), + bts_ctr_description, +}; enum { - BSC_CTR_CHREQ_TOTAL, - BSC_CTR_CHREQ_NO_CHANNEL, BSC_CTR_HANDOVER_ATTEMPTED, BSC_CTR_HANDOVER_NO_CHANNEL, BSC_CTR_HANDOVER_TIMEOUT, @@ -198,20 +231,9 @@ BSC_CTR_PAGING_DETACHED, BSC_CTR_PAGING_COMPLETED, BSC_CTR_PAGING_EXPIRED, - BSC_CTR_CHAN_RF_FAIL, - BSC_CTR_CHAN_RLL_ERR, - BSC_CTR_BTS_OML_FAIL, - BSC_CTR_BTS_RSL_FAIL, - BSC_CTR_CODEC_AMR_F, - BSC_CTR_CODEC_AMR_H, - BSC_CTR_CODEC_EFR, - BSC_CTR_CODEC_V1_FR, - BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { - [BSC_CTR_CHREQ_TOTAL] = {"chreq.total", "Received channel requests."}, - [BSC_CTR_CHREQ_NO_CHANNEL] = {"chreq.no_channel", "Sent to MS no channel available."}, [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover.attempted", "Received handover attempts."}, [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover.no_channel", "Sent no channel available responses."}, [BSC_CTR_HANDOVER_TIMEOUT] = {"handover.timeout", "Count the amount of timeouts of timer T3103."}, @@ -221,15 +243,6 @@ [BSC_CTR_PAGING_DETACHED] = {"paging.detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, [BSC_CTR_PAGING_COMPLETED] = {"paging.completed", "Paging successful completed."}, [BSC_CTR_PAGING_EXPIRED] = {"paging.expired", "Paging Request expired because of timeout T3113."}, - [BSC_CTR_CHAN_RF_FAIL] = {"chan.rf_fail", "Received a RF failure indication from BTS."}, - [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, - [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, - [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, - [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, - [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, - [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, - [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, - [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index d7514ca..e762c24 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -807,6 +807,8 @@ /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; + + struct rate_ctr_group *bts_ctrs; }; diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 9968602..fbaaf09 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -91,10 +91,10 @@ if (lchan->type == GSM_LCHAN_TCH_H) { switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_AMR_H]); break; case GSM48_CMODE_SPEECH_V1: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_V1_HR]); break; default: break; @@ -102,13 +102,13 @@ } else if (lchan->type == GSM_LCHAN_TCH_F) { switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_AMR_F]); break; case GSM48_CMODE_SPEECH_V1: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_V1_FR]); break; case GSM48_CMODE_SPEECH_EFR: - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CODEC_EFR]); break; default: break; @@ -1366,7 +1366,7 @@ TLVP_LEN(&tp, RSL_IE_CAUSE)); LOGPC(DRSL, LOGL_NOTICE, "\n"); - rate_ctr_inc(&msg->lchan->ts->trx->bts->network->bsc_ctrs->ctr[BSC_CTR_CHAN_RF_FAIL]); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL]); return rsl_rf_chan_release_err(msg->lchan); } @@ -1872,7 +1872,7 @@ * request reference RA */ lctype = get_ctype_by_chreq(bts->network, rqd_ref->ra); - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CHREQ_TOTAL]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CHREQ_TOTAL]); /* * We want LOCATION UPDATES to succeed and will assign a TCH @@ -1885,7 +1885,7 @@ if (!lchan) { LOGP(DRSL, LOGL_NOTICE, "BTS %d CHAN RQD: no resources for %s 0x%x\n", msg->lchan->ts->trx->bts->nr, gsm_lchant_name(lctype), rqd_ref->ra); - rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CHREQ_NO_CHANNEL]); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CHREQ_NO_CHANNEL]); /* FIXME gather multiple CHAN RQD and reject up to 4 at the same time */ if (bts->network->T3122) rsl_send_imm_ass_rej(bts, 1, rqd_ref, bts->network->T3122 & 0xff); @@ -2082,7 +2082,7 @@ rll_indication(msg->lchan, rllh->link_id, BSC_RLLR_IND_ERR_IND); if (rlm_cause == RLL_CAUSE_T200_EXPIRED) { - rate_ctr_inc(&msg->lchan->ts->trx->bts->network->bsc_ctrs->ctr[BSC_CTR_CHAN_RLL_ERR]); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RLL_ERR]); return rsl_rf_chan_release_err(msg->lchan); } diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 1874200..2fb3842 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -399,9 +399,9 @@ LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx); if (isd->link_type == E1INP_SIGN_OML) - rate_ctr_inc(&trx->bts->network->bsc_ctrs->ctr[BSC_CTR_BTS_OML_FAIL]); + rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]); else if (isd->link_type == E1INP_SIGN_RSL) - rate_ctr_inc(&trx->bts->network->bsc_ctrs->ctr[BSC_CTR_BTS_RSL_FAIL]); + rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]); /* * free all allocated channels. change the nm_state so the diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 3f3935c..42b7165 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -321,6 +321,19 @@ bts_chan_load(&pl, bts); vty_out(vty, " Current Channel Load:%s", VTY_NEWLINE); dump_pchan_load_vty(vty, " ", &pl); + + vty_out(vty, "Channel Requests : %"PRIu64" total, %"PRIu64" no channel%s", + bts->bts_ctrs->ctr[BTS_CTR_CHREQ_TOTAL].current, + bts->bts_ctrs->ctr[BTS_CTR_CHREQ_NO_CHANNEL].current, + VTY_NEWLINE); + vty_out(vty, "Channel Failures : %"PRIu64" rf_failures, %"PRIu64" rll failures%s", + bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL].current, + bts->bts_ctrs->ctr[BTS_CTR_CHAN_RLL_ERR].current, + VTY_NEWLINE); + vty_out(vty, "BTS failures : %"PRIu64" OML, %"PRIu64" RSL%s", + bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL].current, + bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current, + VTY_NEWLINE); } DEFUN(show_bts, show_bts_cmd, "show bts [<0-255>]", @@ -3781,22 +3794,10 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) { - vty_out(vty, "Channel Requests : %"PRIu64" total, %"PRIu64" no channel%s", - net->bsc_ctrs->ctr[BSC_CTR_CHREQ_TOTAL].current, - net->bsc_ctrs->ctr[BSC_CTR_CHREQ_NO_CHANNEL].current, - VTY_NEWLINE); - vty_out(vty, "Channel Failures : %"PRIu64" rf_failures, %"PRIu64" rll failures%s", - net->bsc_ctrs->ctr[BSC_CTR_CHAN_RF_FAIL].current, - net->bsc_ctrs->ctr[BSC_CTR_CHAN_RLL_ERR].current, - VTY_NEWLINE); vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s", net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current, net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current, net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current, - VTY_NEWLINE); - vty_out(vty, "BTS failures : %"PRIu64" OML, %"PRIu64" RSL%s", - net->bsc_ctrs->ctr[BSC_CTR_BTS_OML_FAIL].current, - net->bsc_ctrs->ctr[BSC_CTR_BTS_RSL_FAIL].current, VTY_NEWLINE); } diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index e4ae339..2f7e7e3 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -346,9 +346,17 @@ memcpy(&bts->gprs.cell.rlc_cfg, &rlc_cfg_default, sizeof(bts->gprs.cell.rlc_cfg)); + /* init statistics */ + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + if (!bts->bts_ctrs) { + talloc_free(bts); + return NULL; + } + /* create our primary TRX */ bts->c0 = gsm_bts_trx_alloc(bts); if (!bts->c0) { + talloc_free(bts->bts_ctrs); talloc_free(bts); return NULL; } diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index 23c2b67..dd20ddb 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -50,7 +50,6 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ - $(LIBOSMOLEGACYMGCP_LIBS) \ $(LIBCRYPTO_LIBS) \ $(LIBRARY_GSM) \ -lrt \ -- To view, visit https://gerrit.osmocom.org/5260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I954b9dda72b83b91d46a934c221a8b3375743599 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:25:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:25:18 +0000 Subject: libosmocore[master]: license: Fix the license to GPL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:25:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:25:19 +0000 Subject: [MERGED] libosmocore[master]: license: Fix the license to GPL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: license: Fix the license to GPL ...................................................................... license: Fix the license to GPL This was always intended to be GPL and not AGPL. "kat" did the development as part of an internship paid by me and we agreed to shared copyright. Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c --- M debian/copyright M tests/fr/fr_test.c M tests/logging/logging_test.c M tests/loggingrb/loggingrb_test.c 4 files changed, 16 insertions(+), 27 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/copyright b/debian/copyright index e763039..b119569 100644 --- a/debian/copyright +++ b/debian/copyright @@ -87,7 +87,7 @@ tests/loggingrb/loggingrb_test.c Copyright: 2008,2009,2012 Holger Hans Peter Freyther 2012-2013 Katerina Barone-Adesi -License: AGPL-3+ +License: GPL-3+ Files: tests/strrb/strrb_test.c tests/vty/vty_test.c @@ -172,17 +172,3 @@ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -License: AGPL-3+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . diff --git a/tests/fr/fr_test.c b/tests/fr/fr_test.c index 980259b..4d472b5 100644 --- a/tests/fr/fr_test.c +++ b/tests/fr/fr_test.c @@ -3,8 +3,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -12,8 +12,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ diff --git a/tests/logging/logging_test.c b/tests/logging/logging_test.c index ce8aac8..8fd71d0 100644 --- a/tests/logging/logging_test.c +++ b/tests/logging/logging_test.c @@ -4,8 +4,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -13,8 +13,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ diff --git a/tests/loggingrb/loggingrb_test.c b/tests/loggingrb/loggingrb_test.c index 2e2c717..3372c0c 100644 --- a/tests/loggingrb/loggingrb_test.c +++ b/tests/loggingrb/loggingrb_test.c @@ -5,8 +5,8 @@ * All Rights Reserved * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -14,8 +14,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ -- To view, visit https://gerrit.osmocom.org/5259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied2041ba20c5737bd967dfaa3017edf72a95b31c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:29:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:29:52 +0000 Subject: libosmocore[master]: vty XML export: avoid repeating common node commands for eac... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:30:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:30:08 +0000 Subject: libosmocore[master]: VTY reference: do not list empty nodes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:30:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:30:28 +0000 Subject: libosmocore[master]: VTY reference: use node names as section names In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5248 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:30:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:30:44 +0000 Subject: libosmocore[master]: vty: set name for VIEW+ENABLE nodes, for VTY reference In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5249 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:31:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:31:06 +0000 Subject: libosmocore[master]: vty reference: merge_doc.xsl: do not omit description tag In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I418e61705043d4df047d8038c5d61623ba64f2e0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:31:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:31:16 +0000 Subject: libosmocore[master]: comment: utils: more accurately describe OSMO_STRINGIFY macro In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5251 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:32:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:32:21 +0000 Subject: libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:33:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:33:17 +0000 Subject: libosmocore[master]: logging vty: tweak general 'logging' command doc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Then we should use different strings for "logging" from configure and view/enable node -- To view, visit https://gerrit.osmocom.org/5253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:25 +0000 Subject: libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node In-Reply-To: References: Message-ID: Patch Set 1: I'm not sure we want this... The logmask is from a time when we didn't have the vty. Its syntax is awkward. I'd rather deprecate it all over the vty than introduce new users. -- To view, visit https://gerrit.osmocom.org/5254 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:36 +0000 Subject: [MERGED] libosmocore[master]: comment: utils: more accurately describe OSMO_STRINGIFY macro In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: comment: utils: more accurately describe OSMO_STRINGIFY macro ...................................................................... comment: utils: more accurately describe OSMO_STRINGIFY macro Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c --- M include/osmocom/core/utils.h 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index c5cc138..0a3805d 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -15,7 +15,9 @@ #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b)) /*! Return the minimum of two specified values */ #define OSMO_MIN(a, b) ((a) >= (b) ? (b) : (a)) -/*! Stringify the contents of a macro, e.g. a port number */ +/*! Stringify the name of a macro x, e.g. an FSM event name. + * Note: if nested within another preprocessor macro, this will + * stringify the value of x instead of its name. */ #define OSMO_STRINGIFY(x) #x /*! Make a value_string entry from an enum value name */ #define OSMO_VALUE_STRING(x) { x, #x } -- To view, visit https://gerrit.osmocom.org/5251 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b057c026f9df90608b7cbd12481ab9e7a41d88c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:36 +0000 Subject: [MERGED] libosmocore[master]: vty reference: merge_doc.xsl: do not omit description tag In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty reference: merge_doc.xsl: do not omit description tag ...................................................................... vty reference: merge_doc.xsl: do not omit description tag vty_additions.xml files provide s for tags, but for unknown reasons, merge_doc.xsl explicitly omits description tags. Do not omit s so that they show up in the merged document. This will take effect when next building the osmo-gsm-manuals using this file. Change-Id: I418e61705043d4df047d8038c5d61623ba64f2e0 --- M doc/vty/merge_doc.xsl 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/vty/merge_doc.xsl b/doc/vty/merge_doc.xsl index adbc1c1..d75c499 100644 --- a/doc/vty/merge_doc.xsl +++ b/doc/vty/merge_doc.xsl @@ -18,9 +18,7 @@ - - - + -- To view, visit https://gerrit.osmocom.org/5250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I418e61705043d4df047d8038c5d61623ba64f2e0 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:37 +0000 Subject: [MERGED] libosmocore[master]: vty: set name for VIEW+ENABLE nodes, for VTY reference In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: set name for VIEW+ENABLE nodes, for VTY reference ...................................................................... vty: set name for VIEW+ENABLE nodes, for VTY reference This leaves no unnamed chapters in future VTY reference documents. Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f --- M src/vty/command.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 55284ee..71f6a71 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -68,21 +68,25 @@ struct cmd_node auth_node = { AUTH_NODE, "Password: ", + .name = "auth", }; struct cmd_node view_node = { VIEW_NODE, "%s> ", + .name = "view", }; struct cmd_node auth_enable_node = { AUTH_ENABLE_NODE, "Password: ", + .name = "auth-enable", }; struct cmd_node enable_node = { ENABLE_NODE, "%s# ", + .name = "enable", }; struct cmd_node config_node = { -- To view, visit https://gerrit.osmocom.org/5249 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:37 +0000 Subject: [MERGED] libosmocore[master]: VTY reference: use node names as section names In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: VTY reference: use node names as section names ...................................................................... VTY reference: use node names as section names In 'show online-help' output, add the node names (currently all derived from the prompt) as entry, so that in the osmo-gsm-manuals, each section of node commands gets a title. So far, each section of commands has no name at all, and it is entirely up for guessing which part of the VTY the commands are about. Node section names, e.g. for OsmoHLR, will be like 1 VTY reference 1.4 config 1.5 config-log 1.6 config-line 1.7 config-ctrl 1.8 config-hlr 1.9 config-hlr-gsup Before this patch, all but '1 VTY reference' were plain empty. A better solution would be to list the actual command name that enters the node, and to nest the commands identically to VTY node nesting, but since this information is currently hidden in node command implementations, it is impossible to derive it. So we should actually make the VTY reflect the node nesting structure in its data model, which would resolve both the accurate node name problem as well as produce well-structured output to generate the VTY references from. This patch is a workaround for lack of a more profound fix of the VTY data model. At least it makes the VTY references' sections even remotely useful. Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe --- M src/vty/command.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 7395711..55284ee 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -705,6 +705,7 @@ if (same_name_count > 1 || !*cnode->name) vty_out(vty, "_%d", same_name_count); vty_out(vty, "'>%s", VTY_NEWLINE); + vty_out(vty, " %s%s", cnode->name, VTY_NEWLINE); for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { struct cmd_element *elem; -- To view, visit https://gerrit.osmocom.org/5248 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:38 +0000 Subject: [MERGED] libosmocore[master]: VTY reference: do not list empty nodes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: VTY reference: do not list empty nodes ...................................................................... VTY reference: do not list empty nodes In 'show online-help' output, don't list nodes that have no commands (the 'Password' node). Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c --- M src/vty/command.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index e5efad2..7395711 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -685,6 +685,8 @@ cnode = vector_slot(cmdvec, i); if (!cnode) continue; + if (vector_active(cnode->cmd_vector) < 1) + continue; /* De-dup node IDs: how many times has this same name been used before? Count the first * occurence as _1 and omit that first suffix, so that the first occurence is called -- To view, visit https://gerrit.osmocom.org/5247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:38 +0000 Subject: [MERGED] libosmocore[master]: vty XML export: avoid repeating common node commands for eac... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty XML export: avoid repeating common node commands for each node ...................................................................... vty XML export: avoid repeating common node commands for each node We use 'show online-help' to generate VTY reference manuals. It is not helpful to include the common node commands on each and every node level, it clutters the actual useful help. Have a separate first section called 'Common Commands', but omit them elsewhere. Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4 --- M src/vty/command.c 1 file changed, 45 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 5f7a42c..e5efad2 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -645,6 +645,8 @@ return 0; } +static bool vty_command_is_common(struct cmd_element *cmd); + /* * Dump all nodes and commands associated with a given node as XML to the VTY. */ @@ -654,6 +656,29 @@ int same_name_count; vty_out(vty, "%s", VTY_NEWLINE); + + /* Only once, list all common node commands. Use the CONFIG node to find common node commands. */ + vty_out(vty, " %s", VTY_NEWLINE); + vty_out(vty, " Common Commands%s", VTY_NEWLINE); + vty_out(vty, " These commands are available on all VTY nodes. They are listed" + " here only once, to unclutter the VTY reference.%s", VTY_NEWLINE); + for (i = 0; i < vector_active(cmdvec); ++i) { + struct cmd_node *cnode; + cnode = vector_slot(cmdvec, i); + if (!cnode) + continue; + if (cnode->node != CONFIG_NODE) + continue; + + for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { + struct cmd_element *elem; + elem = vector_slot(cnode->cmd_vector, j); + if (!vty_command_is_common(elem)) + continue; + vty_dump_element(elem, vty); + } + } + vty_out(vty, " %s", VTY_NEWLINE); for (i = 0; i < vector_active(cmdvec); ++i) { struct cmd_node *cnode; @@ -682,6 +707,8 @@ for (j = 0; j < vector_active(cnode->cmd_vector); ++j) { struct cmd_element *elem; elem = vector_slot(cnode->cmd_vector, j); + if (vty_command_is_common(elem)) + continue; vty_dump_element(elem, vty); } @@ -3648,6 +3675,24 @@ } } +/*! Return true if a node is installed by install_basic_node_commands(), so + * that we can avoid repeating them for each and every node during 'show + * running-config' */ +static bool vty_command_is_common(struct cmd_element *cmd) +{ + if (cmd == &config_help_cmd + || cmd == &config_list_cmd + || cmd == &config_write_terminal_cmd + || cmd == &config_write_file_cmd + || cmd == &config_write_memory_cmd + || cmd == &config_write_cmd + || cmd == &show_running_config_cmd + || cmd == &config_exit_cmd + || cmd == &config_end_cmd) + return true; + return false; +} + /** * Write the current running config to a given file * \param[in] vty the vty of the code -- To view, visit https://gerrit.osmocom.org/5246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:34:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:34:57 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN: fix VTY additions' node IDs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:35:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:35:17 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN VTY ref: prep: convert newlines to unix In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5255 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:35:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:35:43 +0000 Subject: osmo-gsm-manuals[master]: OsmoGGSN vty: update VTY reference In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5256 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:36:00 +0000 Subject: osmo-gsm-manuals[master]: common: vty_additions: use proper node IDs, tweak node descr... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic2f3b18cced72db6fa5bad02ae58c602bb2c0213 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:36:02 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: vty_additions: use proper node IDs, tweak node descr... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: vty_additions: use proper node IDs, tweak node descriptions ...................................................................... common: vty_additions: use proper node IDs, tweak node descriptions Depends on the ENABLE and VIEW nodes to be named, as in a recent libosmocore patch. Depends: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f (libosmocore) Change-Id: Ic2f3b18cced72db6fa5bad02ae58c602bb2c0213 --- M common/vty_additions.xml 1 file changed, 31 insertions(+), 21 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/vty_additions.xml b/common/vty_additions.xml index d32cea2..ef442f5 100644 --- a/common/vty_additions.xml +++ b/common/vty_additions.xml @@ -5,31 +5,30 @@ - - Show Node for introspection - This is the default node when connecting to the + + The view node is the default node when connecting to the VTY interface. This node does not require any additional permission and allows to introspect the application. - - Enable Node for admin commands - This is a privileged node allowing to make changes - to the configuration and allow to access more commands. Everything - available on the show node should be available here. + + The enable node is a privileged node, allowing to make changes + to the configuration and to access further commands like 'configure'. + All commands seen on the view node are also available here. - - Configuration Node for configuration - This is the base node for all configuration nodes. It - allows to enter BTS and logging node to configure them. + + The config node is the root for all configuration commands, + which are identical to the config file format. Changes made on the telnet + VTY can be made persistent with the 'write file' command. - - - Logging Node for logging configuration - This is the node is a child of the configuration node and - is responsible for configuring the logging framework including the - log targets and log levels. + + + The log node is commonly available in all Osmocom programs and + allows configuring logging to stderr and/or log files, including logging + category and level filtering as well as output formatting options. + Note that the 'logging enable' command is required to make logging commands + available on the telnet VTY. @@ -39,10 +38,21 @@ + + This command is required to make logging commands available + on the telnet VTY. + - The logging framework has the concept of filters. This can - be used to only show log messages that apply to a given timeslot or - subscriber. The all filter allows all messages to pass unfiltered. + Disable/enable general log output on a given target. + Typically, 'logging filter all 1' allows to see the usual log output on a + given target. Setting to '0' can be useful when logging to the telnet VTY + console: mute all log output to allow typing VTY commands on the telnet + prompt without interference from log output; 'logging filter all 1' then + re-enables logging in the same log output configuration as before. + + Some applications provide more specific filters, e.g. to log a given IMSI + only. To employ such filters, set 'logging filter all 0' to disable + general logging, and then enable a more specific filter instead. -- To view, visit https://gerrit.osmocom.org/5258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2f3b18cced72db6fa5bad02ae58c602bb2c0213 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:36:03 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN vty: update VTY reference In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN vty: update VTY reference ...................................................................... OsmoGGSN vty: update VTY reference Apply VTY reference changes from libosmocore: change node IDs from index numbers to meaningful names from VTY node prompts. Introduce section with common commands, do not repeat the common commands on each child node. Populate section names (so far empty). Add apn / gpdu VTY reference. This is generated using the recent libosmocore vty doc patches that conclude in libosmocore change-id Iedd67750539b676271de0e0e9316d4e6f794406a. Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727 --- M OsmoGGSN/vty/ggsn_vty_reference.xml 1 file changed, 120 insertions(+), 395 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml b/OsmoGGSN/vty/ggsn_vty_reference.xml index 696f1f2..76a55c1 100644 --- a/OsmoGGSN/vty/ggsn_vty_reference.xml +++ b/OsmoGGSN/vty/ggsn_vty_reference.xml @@ -1,7 +1,59 @@ - + + Common Commands + These commands are available on all VTY nodes. They are listed here only once, to unclutter the VTY reference. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + view @@ -12,21 +64,6 @@ - - - - - - - - - - - - - - - @@ -67,19 +104,19 @@ - + - + - + @@ -88,7 +125,7 @@ - + @@ -96,7 +133,7 @@ - + @@ -104,7 +141,7 @@ - + @@ -113,7 +150,7 @@ - + @@ -122,23 +159,23 @@ - + - + - + - + - + @@ -234,53 +271,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + enable @@ -363,19 +355,19 @@ - + - + - + @@ -384,7 +376,7 @@ - + @@ -392,7 +384,7 @@ - + @@ -400,7 +392,7 @@ - + @@ -409,7 +401,7 @@ - + @@ -418,23 +410,23 @@ - + - + - + - + - + @@ -530,56 +522,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config @@ -827,59 +771,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-log - + @@ -888,7 +784,7 @@ - + @@ -896,7 +792,7 @@ - + @@ -904,7 +800,7 @@ - + @@ -913,16 +809,23 @@ - + + + + + + + + - + @@ -956,56 +859,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-stats @@ -1073,56 +928,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-line @@ -1141,7 +948,8 @@ - + + config-ctrl @@ -1149,56 +957,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-ggsn @@ -1278,56 +1038,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + config-ggsn-apn @@ -1476,5 +1188,18 @@ + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5256 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:36:03 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN VTY ref: prep: convert newlines to unix In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN VTY ref: prep: convert newlines to unix ...................................................................... OsmoGGSN VTY ref: prep: convert newlines to unix To omit whitespace changes in an upcoming patch that updates the VTY reference and will use '\n' line breaks, convert line breaks from '\r\n' to '\n' without any other changes. Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28 --- M OsmoGGSN/vty/ggsn_vty_reference.xml 1 file changed, 1,480 insertions(+), 1,480 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml b/OsmoGGSN/vty/ggsn_vty_reference.xml index 6809ead..696f1f2 100644 --- a/OsmoGGSN/vty/ggsn_vty_reference.xml +++ b/OsmoGGSN/vty/ggsn_vty_reference.xml @@ -1,1480 +1,1480 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5255 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 13:36:03 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoGGSN: fix VTY additions' node IDs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoGGSN: fix VTY additions' node IDs ...................................................................... OsmoGGSN: fix VTY additions' node IDs Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453 --- M OsmoGGSN/vty/ggsn_vty_additions.xml 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoGGSN/vty/ggsn_vty_additions.xml b/OsmoGGSN/vty/ggsn_vty_additions.xml index 1bbeb81..b0e8a39 100644 --- a/OsmoGGSN/vty/ggsn_vty_additions.xml +++ b/OsmoGGSN/vty/ggsn_vty_additions.xml @@ -1,27 +1,27 @@ - - + + Telnet/VTY Configuration Node Configure parameters of the Telnet/VTY Interface, such as to which IP address it should bind/listen to. - - + + CTRL Configuration Node Configure parameters of the CTRL Interface, such as to which IP address it should bind/listen to. - - + + GGSN Instance Configuration Node Configure an Instance of a (virtual) GGSN - - + + APN Configuration Node Configure an Access Point Name (APN) inside a GGSN Instance -- To view, visit https://gerrit.osmocom.org/5257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:36:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 10 Dec 2017 13:36:04 +0000 Subject: [PATCH] osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB Message-ID: Review at https://gerrit.osmocom.org/5264 fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB Give each hNodeB its own RNC Id upon HNBAP to keep consistent LAC records in MSC and SGSN, and hence fix paging in the presence of more than one RNC. So far we were handing out identical RNC Id = 23 for each hNodeB that attaches. This lead to paging errors: the iu_client keeps only the *latest* the LAC record for a given RNC Id. Hence if one LAC asks to send an SMS to another, that other LAC would be pushed out of the single RNC record kept for RNC 23: DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:155 RNC 23 changes its details: LAC=24358 RAC=0 --> LAC=14357 RAC=0 ... DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:155 RNC 23 changes its details: LAC=14357 RAC=0 --> LAC=24358 RAC=0 This swaps back and forth. Presumably, this should also fix IuPS paging, but this has not been pinpointed / analysed / verified. Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_hnbap.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/64/5264/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 58bdab4..5230c83 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -118,13 +118,14 @@ uint16_t iuh_cs_mux_port; const char *iucs_remote_addr_name; const char *iups_remote_addr_name; - uint16_t rnc_id; bool hnbap_allow_tmsi; } config; /*! SCTP listen socket for incoming connections */ struct osmo_stream_srv_link *iuh; /* list of struct hnb_context */ struct llist_head hnb_list; + /* next RNC id to assign during HNBAP */ + uint16_t next_rnc_id; /* list of struct ue_context */ struct llist_head ue_list; /* next availble UE Context ID */ diff --git a/src/hnbgw.c b/src/hnbgw.c index 5c0570e..2c14917 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -430,7 +430,6 @@ msgb_talloc_ctx_init(tall_hnb_ctx, 0); g_hnb_gw = hnb_gw_create(tall_hnb_ctx); - g_hnb_gw->config.rnc_id = 23; rc = osmo_init_logging(&hnbgw_log_info); if (rc < 0) diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 7c1e239..f21548f 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -56,7 +56,7 @@ /* Single required response IE: RNC-ID */ HNBRegisterAcceptIEs_t accept = { - .rnc_id = ctx->gw->config.rnc_id + .rnc_id = ctx->gw->next_rnc_id ++, }; /* encode the Information Elements */ -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 13:51:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 10 Dec 2017 13:51:13 +0000 Subject: [PATCH] osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index Message-ID: Review at https://gerrit.osmocom.org/5265 sms.db: silence libdbi warnings on out-of-range index Apparently, since libdbi 0.9.0 aka 0.9.0-5 on debian-testing, osmo-msc barfs numerous libdbi warnings whenever a query rightfully returns no rows. Trivially query whether there are any rows first by adding an inline wrap function next_row(). Silenced: DDB <000d> ../../../../src/osmo-msc/src/libmsc/db.c:188 DBI: -6: An invalid or out-of-range index was passed to libdbi DDB <000d> ../../../src/libosmocore/src/backtrace.c:47 backtrace() returned 11 addresses DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xfb81) [0x555555563b81] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(_error_handler+0x99) [0x7ffff63f5c39] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(dbi_result_next_row+0x3d) [0x7ffff63f785d] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x11172) [0x555555565172] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e6bc) [0x5555555726bc] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e7f6) [0x5555555727f6] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1f1d2) [0x5555555731d2] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbb86) [0x55555555fb86] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7ffff5cfe561] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbfba) [0x55555555ffba] Related: OS#2667 Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 --- M src/libmsc/db.c 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/5265/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index eba4b1b..0104bce 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -181,6 +181,13 @@ ")", }; +static inline int next_row(dbi_result result) +{ + if (!dbi_result_has_next_row(result)) + return 0; + return dbi_result_next_row(result); +} + void db_error_func(dbi_conn conn, void *data) { const char *msg; @@ -318,7 +325,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 3).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v3(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 3).\n"); @@ -464,7 +471,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 4).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v4(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 4).\n"); @@ -540,7 +547,7 @@ if (!result) return -EINVAL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -EINVAL; } @@ -787,7 +794,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -817,7 +824,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -858,7 +865,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -891,7 +898,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:03:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:03:43 +0000 Subject: osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB In-Reply-To: References: Message-ID: Patch Set 1: I think qthis is just a hack that clutters around the assumption that there is always only one lac per RNC :/ -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:04:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:04:15 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:04:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:04:16 +0000 Subject: [MERGED] osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sms.db: silence libdbi warnings on out-of-range index ...................................................................... sms.db: silence libdbi warnings on out-of-range index Apparently, since libdbi 0.9.0 aka 0.9.0-5 on debian-testing, osmo-msc barfs numerous libdbi warnings whenever a query rightfully returns no rows. Trivially query whether there are any rows first by adding an inline wrap function next_row(). Silenced: DDB <000d> ../../../../src/osmo-msc/src/libmsc/db.c:188 DBI: -6: An invalid or out-of-range index was passed to libdbi DDB <000d> ../../../src/libosmocore/src/backtrace.c:47 backtrace() returned 11 addresses DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xfb81) [0x555555563b81] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(_error_handler+0x99) [0x7ffff63f5c39] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(dbi_result_next_row+0x3d) [0x7ffff63f785d] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x11172) [0x555555565172] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e6bc) [0x5555555726bc] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e7f6) [0x5555555727f6] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1f1d2) [0x5555555731d2] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbb86) [0x55555555fb86] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7ffff5cfe561] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbfba) [0x55555555ffba] Related: OS#2667 Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 --- M src/libmsc/db.c 1 file changed, 14 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/db.c b/src/libmsc/db.c index eba4b1b..0104bce 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -181,6 +181,13 @@ ")", }; +static inline int next_row(dbi_result result) +{ + if (!dbi_result_has_next_row(result)) + return 0; + return dbi_result_next_row(result); +} + void db_error_func(dbi_conn conn, void *data) { const char *msg; @@ -318,7 +325,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 3).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v3(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 3).\n"); @@ -464,7 +471,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 4).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v4(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 4).\n"); @@ -540,7 +547,7 @@ if (!result) return -EINVAL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -EINVAL; } @@ -787,7 +794,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -817,7 +824,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -858,7 +865,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -891,7 +898,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:05:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:05:12 +0000 Subject: osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:05:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:05:36 +0000 Subject: [MERGED] osmo-bts[master]: bts-trx: trx_ctrl_cmd: Simplify var assignment logic In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bts-trx: trx_ctrl_cmd: Simplify var assignment logic ...................................................................... bts-trx: trx_ctrl_cmd: Simplify var assignment logic Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 7030e3c..1ac21d5 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -189,7 +189,7 @@ { struct trx_ctrl_msg *tcm; va_list ap; - int l, pending = 0; + int l, pending; if (!transceiver_available && !(!strcmp(cmd, "POWEROFF") || !strcmp(cmd, "POWERON"))) { @@ -198,8 +198,7 @@ return -EIO; } - if (!llist_empty(&l1h->trx_ctrl_list)) - pending = 1; + pending = !llist_empty(&l1h->trx_ctrl_list); /* create message */ tcm = talloc_zero(tall_bts_ctx, struct trx_ctrl_msg); -- To view, visit https://gerrit.osmocom.org/5236 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:07:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:07:10 +0000 Subject: osmocom-bb[master]: mobile/gsm48_rr.c: cosmetic: drop wrong comment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5238 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:07:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:07:54 +0000 Subject: [MERGED] libosmocore[master]: cosmetic: Fix trailing whitespace In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: Fix trailing whitespace ...................................................................... cosmetic: Fix trailing whitespace Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 --- M src/gsm/lapd_core.c M src/gsm/lapdm.c 2 files changed, 8 insertions(+), 8 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index d14063e..1f1ca83 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -548,7 +548,7 @@ msg = lapd_msgb_alloc(0, "DUMMY"); osmo_prim_init(&dp.oph, 0, PRIM_DL_EST, PRIM_OP_REQUEST, msg); - + return lapd_est_req(&dp, &dl->lctx); } @@ -1500,7 +1500,7 @@ LOGP(DLLAPD, LOGL_INFO, "I received in state %s on SAPI(%u) (dl=%p)\n", lapd_state_name(dl->state), lctx->sapi, dl); - + /* G.2.2 Wrong value of the C/R bit */ if (lctx->cr == dl->cr.rem2loc.resp) { LOGP(DLLAPD, LOGL_ERROR, @@ -1781,7 +1781,7 @@ dl->tx_hist[0].more = 0; /* set Vs to 0, because it is used as index when resending SABM */ dl->v_send = 0; - + /* Set states */ dl->own_busy = dl->peer_busy = 0; dl->retrans_ctr = 0; @@ -2008,7 +2008,7 @@ LOGP(DLLAPD, LOGL_INFO, "perform re-establishment (SABM) length=%d (dl=%p)\n", msg->len, dl); - + /* be sure that history is empty */ lapd_dl_flush_hist(dl); @@ -2119,7 +2119,7 @@ dl->tx_hist[0].more = 0; /* set Vs to 0, because it is used as index when resending DISC */ dl->v_send = 0; - + /* Set states */ dl->own_busy = dl->peer_busy = 0; dl->retrans_ctr = 0; @@ -2155,7 +2155,7 @@ } l2downstatelist[] = { /* create and send UI command */ {ALL_STATES, - PRIM_DL_UNIT_DATA, PRIM_OP_REQUEST, + PRIM_DL_UNIT_DATA, PRIM_OP_REQUEST, "DL-UNIT-DATA-REQUEST", lapd_udata_req}, /* create and send SABM command */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index 5efe755..7ca2b3e 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -378,7 +378,7 @@ rllh->data[2] = RSL_IE_MS_POWER; rllh->data[3] = mctx->tx_power_ind; - + return rslms_sendmsg(msg, mctx->dl->entity); } @@ -1086,7 +1086,7 @@ ref->t2 = tm.t2; ref->t3_low = tm.t3 & 0x7; ref->t3_high = tm.t3 >> 3; - + return rslms_sendmsg(msg, le); } -- To view, visit https://gerrit.osmocom.org/5235 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:09:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:09:22 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:11:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:11:14 +0000 Subject: osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:13:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:13:49 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: I don't really see my original comment addressed. What do others think? -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:14:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:14:07 +0000 Subject: osmo-pcu[master]: TBF: remove unused variable In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5219 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:14:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:14:34 +0000 Subject: osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:18:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:18:39 +0000 Subject: osmo-bsc[master]: OML: expand status reporting checks In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:18:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:18:41 +0000 Subject: [MERGED] osmo-bsc[master]: OML: expand status reporting checks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OML: expand status reporting checks ...................................................................... OML: expand status reporting checks * check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked than report it as degraded * check TRX usability: use already available function to check that TRX is actually usable when reporting OML status via CTRL * fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is defined in libcommon-cs but neither libbsc itself nor tests using it are actually linked against libcommon-cs Related: OS#2486 Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc --- M src/Makefile.am M src/libbsc/Makefile.am M src/libbsc/abis_nm.c M tests/abis/Makefile.am M tests/nanobts_omlattr/Makefile.am 5 files changed, 22 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index dd1ad3d..454bf26 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,10 +22,10 @@ # Libraries SUBDIRS = \ libcommon \ + libcommon-cs \ libbsc \ libtrau \ libfilter \ - libcommon-cs \ $(NULL) # Programs diff --git a/src/libbsc/Makefile.am b/src/libbsc/Makefile.am index e78bde6..fc12d05 100644 --- a/src/libbsc/Makefile.am +++ b/src/libbsc/Makefile.am @@ -17,6 +17,8 @@ libbsc.a \ $(NULL) +libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a + libbsc_a_SOURCES = \ abis_nm.c \ abis_nm_vty.c \ diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c index 2c84ba7..33af213 100644 --- a/src/libbsc/abis_nm.c +++ b/src/libbsc/abis_nm.c @@ -46,6 +46,7 @@ #include #include #include +#include #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 @@ -691,9 +692,25 @@ if (bts->mo.nm_state.administrative == NM_STATE_LOCKED) return false; + if (bts->gprs.mode != BTS_GPRS_NONE) { + if (bts->gprs.cell.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nse.mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + + if (bts->gprs.nsvc[0].mo.nm_state.administrative == NM_STATE_LOCKED && + bts->gprs.nsvc[1].mo.nm_state.administrative == NM_STATE_LOCKED) + return false; + } + llist_for_each_entry(trx, &bts->trx_list, list) { if (!trx->rsl_link) return false; + + if (!trx_is_usable(trx)) + return false; + if (trx->mo.nm_state.administrative == NM_STATE_LOCKED) return false; } diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 1c5dede..8dc6248 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -27,6 +27,7 @@ abis_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 8b5e116..4b49518 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -26,6 +26,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ + $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:20:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:20:08 +0000 Subject: osmo-pcu[master]: TBF-DL: fix misleading idle time check In-Reply-To: References: Message-ID: Patch Set 1: Still, it is a numeric value so ==0 is much more readable, imho -- To view, visit https://gerrit.osmocom.org/5218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:20:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:20:41 +0000 Subject: osmocom-bb[master]: target/firmware: fix Mediatek firmware compilation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5217 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iecd619ed862f4d825095292ffde50544e647f6ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:20:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:20:47 +0000 Subject: [MERGED] osmocom-bb[master]: target/firmware: fix Mediatek firmware compilation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: target/firmware: fix Mediatek firmware compilation ...................................................................... target/firmware: fix Mediatek firmware compilation The existing Makefile.mtk isn't compatible with the current Makefile scheme, so nothing would happen when it was called. This change updates the Makefile.mtk, so the Mediatek firmware can be successfully compiled again. Change-Id: Iecd619ed862f4d825095292ffde50544e647f6ff --- M src/target/firmware/Makefile.mtk 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/target/firmware/Makefile.mtk b/src/target/firmware/Makefile.mtk index 30fa2fc..927e31a 100644 --- a/src/target/firmware/Makefile.mtk +++ b/src/target/firmware/Makefile.mtk @@ -4,14 +4,16 @@ # List of all applications (meant to be overridden on command line) APPLICATIONS?=loader_mtk -mtkram_LDS=board/mediatek/ram.lds -mtkram_OBJS=board/mediatek/start.ram.o +APP_loader_mtk_ENVIRONMENTS=mtkram + +ENV_mtkram_LDS=board/mediatek/ram.lds +ENV_mtkram_OBJS=board/mediatek/start.ram.o mtk_COMMON_OBJS=board/mediatek/uart.o # Mediatek MT62xx -mt62xx_OBJS=$(mtk_COMMON_OBJS) board/mt62xx/init.o -mt62xx_ENVIRONMENTS=mtkram +BOARD_mt62xx_OBJS=$(mtk_COMMON_OBJS) board/mt62xx/init.o +BOARD_mt62xx_ENVIRONMENTS=mtkram # Global include path INCLUDES=-Iinclude/ -I../../../include -I../../shared/libosmocore/include -- To view, visit https://gerrit.osmocom.org/5217 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iecd619ed862f4d825095292ffde50544e647f6ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:21:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:21:25 +0000 Subject: osmo-pcu[master]: vty: print class and TBFs for each MS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5206 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:21:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:21:28 +0000 Subject: [MERGED] osmo-pcu[master]: vty: print class and TBFs for each MS In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty: print class and TBFs for each MS ...................................................................... vty: print class and TBFs for each MS It's handy for troubleshooting to get quick overview of per-MS TBF allocations and MS [EGPRS] classes. Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96 --- M src/pcu_vty_functions.cpp 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 811801f..f1dd25c 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -119,12 +119,16 @@ llist_for_each(ms_iter, &bts->ms_store().ms_list()) { GprsMs *ms = ms_iter->entry(); - vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%zd, " - "IMSI=%s%s", + vty_out(vty, "MS TLLI=%08x, TA=%d, CS-UL=%s, CS-DL=%s, LLC=%zd, Cl=%d, E-Cl=%d," + " TBF-UL=%s, TBF-DL=%s, IMSI=%s%s", ms->tlli(), ms->ta(), ms->current_cs_ul().name(), ms->current_cs_dl().name(), ms->llc_queue()->size(), + ms->ms_class(), + ms->egprs_ms_class(), + ms->ul_tbf() ? ms->ul_tbf()->state_name() : "NA", + ms->dl_tbf() ? ms->dl_tbf()->state_name() : "NA", ms->imsi(), VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/5206 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:22:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:22:41 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: cosmetic fixups In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: cosmetic fixups ...................................................................... mgcp: cosmetic fixups - use unique enum/struct fsm struct names - use macro to shift bits in FSM description - use OSMO_STRINGIFY to generate the state names - remove duplicate logging of states and events - remove unnecessary space in log strings - prefix hexadecimal enpoint ids with - remove unnecessary log messages - rename bsc_mgcp_cause_codes_str to bsc_mgcp_cause_codes_names Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 39 insertions(+), 105 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 478d499..f5efa95 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -31,6 +31,8 @@ #include #include +#define S(x) (1 << (x)) + #define MGCP_MGW_TIMEOUT 4 /* in seconds */ #define MGCP_MGW_TIMEOUT_TIMER_NR 1 #define MGCP_BSS_TIMEOUT 4 /* in seconds */ @@ -40,7 +42,7 @@ /* Some internal cause codes to indicate fault * condition inside the FSM */ -enum int_cause_code { +enum bsc_mgcp_cause_code { MGCP_ERR_MGW_FAIL, MGCP_ERR_MGW_INVAL_RESP, MGCP_ERR_MGW_TX_FAIL, @@ -53,7 +55,7 @@ /* Human readable respresentation of the faul codes, * will be displayed by handle_error() */ -static const struct value_string int_cause_codes_str[] = { +static const struct value_string bsc_mgcp_cause_codes_names[] = { {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, @@ -76,19 +78,7 @@ ST_HALT }; -static const struct value_string fsm_bsc_mgcp_state_names[] = { - {ST_CRCX_BTS, "ST_CRCX_BTS (send CRCX for BTS)"}, - {ST_ASSIGN_PROC, "ST_ASSIGN_PROC (continue assignment)"}, - {ST_MDCX_BTS, "ST_MDCX_BTS (send MDCX for BTS)"}, - {ST_CRCX_NET, "ST_CRCX_NET (send CRCX for NET)"}, - {ST_ASSIGN_COMPL, "ST_ASSIGN_COMPL (complete assignment)"}, - {ST_CALL, "ST_CALL (call in progress)"}, - {ST_MDCX_BTS_HO, "ST_MDCX_BTS_HO (handover to new BTS)"}, - {ST_HALT, "ST_HALT (destroy state machine)"}, - {0, NULL} -}; - -enum fsm_evt { +enum bsc_mgcp_fsm_evt { /* Initial event: start off the state machine */ EV_INIT, @@ -128,24 +118,11 @@ EV_MDCX_BTS_HO_RESP, }; -static const struct value_string fsm_evt_names[] = { - {EV_INIT, "EV_INIT (start state machine, send CRCX for BTS)"}, - {EV_ASS_COMPLETE, "EV_ASS_COMPLETE (assignment complete)"}, - {EV_TEARDOWN, "EV_TEARDOWN (teardown all connections)"}, - {EV_HANDOVER, "EV_HANDOVER (handover bts connection)"}, - {EV_CRCX_BTS_RESP, "EV_CRCX_BTS_RESP (got CRCX reponse for BTS)"}, - {EV_MDCX_BTS_RESP, "EV_MDCX_BTS_RESP (got MDCX reponse for BTS)"}, - {EV_CRCX_NET_RESP, "EV_CRCX_NET_RESP (got CRCX reponse for NET)"}, - {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP (got DLCX reponse for BTS/NET)"}, - {EV_MDCX_BTS_HO_RESP, "EV_MDCX_BTS_HO_RESP (got MDCX reponse for BTS Handover)"}, - {0, NULL} -}; - /* A general error handler function. On error we still have an interest to * remove a half open connection (if possible). This function will execute * a controlled jump to the DLCX phase. From there, the FSM will then just * continue like the call were ended normally */ -static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum bsc_mgcp_cause_code cause) { struct osmo_fsm_inst *fi; @@ -153,10 +130,8 @@ fi = mgcp_ctx->fsm; OSMO_ASSERT(fi); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "fsm-state: %s\n", get_value_string(fsm_bsc_mgcp_state_names, fi->state)); - LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", - get_value_string(int_cause_codes_str, cause)); + get_value_string(bsc_mgcp_cause_codes_names, cause)); /* Set the VM into the state where it waits for the call end */ osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); @@ -185,14 +160,11 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - rtp_endpoint = mgcp_client_next_endpoint(mgcp); mgcp_ctx->rtp_endpoint = rtp_endpoint; LOGPFSML(fi, LOGL_DEBUG, - "CRCX/BTS: creating connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/BTS: creating connection for the BTS side on MGW endpoint:0x%x...\n", rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -210,7 +182,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "CRCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -281,9 +252,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_CRCX_BTS_RESP: break; @@ -327,9 +295,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_ASS_COMPLETE: break; @@ -343,16 +308,12 @@ lchan = mgcp_ctx->lchan; OSMO_ASSERT(lchan); - LOGPFSML(fi, LOGL_DEBUG, "BSS has completed the assignment, now prceed with MDCX towards BTS...\n"); - rtp_endpoint = mgcp_ctx->rtp_endpoint; - - LOGPFSML(fi, LOGL_DEBUG, - "MDCX/BTS: completing connection for the BTS side on " "MGW endpoint:%x...\n", rtp_endpoint); addr.s_addr = osmo_ntohl(lchan->abis_ip.bound_ip); LOGPFSML(fi, LOGL_DEBUG, - "MDCX/BTS: BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), lchan->abis_ip.bound_port); + "MDCX/BTS: completing connection for the BTS side on MGW endpoint:0x%x, BTS expects RTP input on address %s:%u\n", + rtp_endpoint, inet_ntoa(addr), lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -374,7 +335,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "MDCX/BTS: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -449,9 +409,6 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - switch (event) { case EV_MDCX_BTS_RESP: break; @@ -463,7 +420,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(fi, LOGL_DEBUG, - "CRCX/NET: creating connection for the NET side on " "MGW endpoint:%x...\n", rtp_endpoint); + "CRCX/NET: creating connection for the NET side on MGW endpoint:0x%x...\n", rtp_endpoint); /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE @@ -503,7 +460,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -552,7 +508,8 @@ return; } - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", + r->audio_ip, r->audio_port); /* Store address */ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; @@ -571,10 +528,6 @@ struct gsm_lchan *lchan; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, - "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_CRCX_NET_RESP: @@ -621,7 +574,7 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "DLCX: removing connection for the BTS and NET side on MGW endpoint:%x...\n", rtp_endpoint); + "DLCX: removing connection for the BTS and NET side on MGW endpoint:0x%x...\n", rtp_endpoint); /* We now relase the endpoint back to the pool in order to allow * other connections to use this endpoint */ @@ -642,7 +595,6 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "DLCX: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -676,13 +628,10 @@ rtp_endpoint = mgcp_ctx->rtp_endpoint; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:%x...\n", rtp_endpoint); - addr.s_addr = osmo_ntohl(ho_lchan->abis_ip.bound_ip); LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, - "MDCX/BTS/HO: new BTS expects RTP input on address %s:%u\n", inet_ntoa(addr), - ho_lchan->abis_ip.bound_port); + "MDCX/BTS/HO: handover connection from old BTS to new BTS side on MGW endpoint:0x%x, new BTS expects RTP input on address %s:%u\n\n", + rtp_endpoint, inet_ntoa(addr), ho_lchan->abis_ip.bound_port); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -703,7 +652,6 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); OSMO_ASSERT(msg); - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MDCX/BTS/HO: transmitting MGCP message to MGW...\n"); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -719,9 +667,6 @@ struct mgcp_ctx *mgcp_ctx = data; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_TEARDOWN: @@ -764,9 +709,6 @@ struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; OSMO_ASSERT(mgcp_ctx); - - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { case EV_MDCX_BTS_HO_RESP: @@ -837,9 +779,6 @@ conn = mgcp_ctx->conn; OSMO_ASSERT(conn); - LOGPFSML(fi, LOGL_DEBUG, "fsm-state: %s, fsm-event: %s\n", - get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - /* Send pending sigtran message */ if (mgcp_ctx->resp) { LOGPFSML(fi, LOGL_DEBUG, "sending pending sigtran response message...\n"); @@ -864,9 +803,6 @@ mgcp = mgcp_ctx->mgcp; OSMO_ASSERT(mgcp); - LOGPFSML(fi, LOGL_ERROR, "timeout (T%i) in state %s, attempting graceful teardown...\n", - fi->T, get_value_string(fsm_bsc_mgcp_state_names, fi->state)); - /* Ensure that no sigtran response, is present. Otherwiese we might try * to send a sigtran response when the sccp connection is already freed. */ mgcp_ctx->resp = NULL; @@ -875,7 +811,6 @@ /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ - LOGPFSML(fi, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); @@ -902,18 +837,18 @@ /* Startup state machine, send CRCX to BTS. */ [ST_CRCX_BTS] = { - .in_event_mask = (1 << EV_INIT), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_PROC), - .name = "ST_CRCX_BTS", + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASSIGN_PROC), + .name = OSMO_STRINGIFY(ST_CRCX_BTS), .action = fsm_crcx_bts_cb, }, /* When the CRCX response for the BTS side is received, then * proceed the assignment on the BSS side. */ [ST_ASSIGN_PROC] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_BTS_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_MDCX_BTS), - .name = "ST_ASSIGN_PROC", + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_BTS_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_BTS), + .name = OSMO_STRINGIFY(ST_ASSIGN_PROC), .action = fsm_proc_assignmnent_req_cb, }, @@ -922,9 +857,9 @@ * update the connections with the actual PORT/IP where the * BTS expects the RTP input. */ [ST_MDCX_BTS] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_ASS_COMPLETE), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_CRCX_NET), - .name = "ST_MDCX_BTS", + .in_event_mask = S(EV_TEARDOWN) | S(EV_ASS_COMPLETE), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_NET), + .name = OSMO_STRINGIFY(ST_MDCX_BTS), .action = fsm_mdcx_bts_cb, }, @@ -932,9 +867,9 @@ * directly proceed with sending the CRCX command to connect the * network side. This is done in one phase (no MDCX needed). */ [ST_CRCX_NET] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_MDCX_BTS_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_COMPL), - .name = "ST_CRCX_NET", + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_BTS_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASSIGN_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_NET), .action = fsm_crcx_net_cb, }, @@ -942,9 +877,9 @@ * send the assignment complete message via the A-Interface and * enter wait state in order to wait for the end of the call. */ [ST_ASSIGN_COMPL] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_CRCX_NET_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), - .name = "ST_ASSIGN_COMPL", + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_NET_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_ASSIGN_COMPL), .action = fsm_send_assignment_complete, }, @@ -953,9 +888,9 @@ * go for an extra MDCX to update the connection and land in * this state again when done. */ [ST_CALL] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER), - .out_state_mask = (1 << ST_HALT) | (1 << ST_MDCX_BTS_HO), - .name = "ST_CALL", + .in_event_mask = S(EV_TEARDOWN) | S(EV_HANDOVER), + .out_state_mask = S(ST_HALT) | S(ST_MDCX_BTS_HO), + .name = OSMO_STRINGIFY(ST_CALL), .action = fsm_active_call_cb, }, @@ -963,18 +898,18 @@ * MDCX is received, then go back to ST_CALL and wait for the * call end */ [ST_MDCX_BTS_HO] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_HANDOVER) | (1 << EV_MDCX_BTS_HO_RESP), - .out_state_mask = (1 << ST_HALT) | (1 << ST_CALL), - .name = "ST_MDCX_BTS_HO", + .in_event_mask = S(EV_TEARDOWN) | S(EV_HANDOVER) | S(EV_MDCX_BTS_HO_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_BTS_HO), .action = fsm_complete_handover, }, /* When the MGW confirms that the connections are terminated, * then halt the state machine. */ [ST_HALT] = { - .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), .out_state_mask = 0, - .name = "ST_HALT", + .name = OSMO_STRINGIFY(ST_HALT), .action = fsm_halt_cb, }, }; @@ -1023,7 +958,6 @@ mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_bsc_mgcp, NULL, ctx, LOGL_DEBUG, name); OSMO_ASSERT(mgcp_ctx->fsm); mgcp_ctx->fsm->priv = mgcp_ctx; - LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "MGW handler fsm created\n"); mgcp_ctx->mgcp = mgcp; mgcp_ctx->conn = conn; mgcp_ctx->chan_mode = chan_mode; -- To view, visit https://gerrit.osmocom.org/5075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I663e03046cde3c786af72d15681bf7497330d7f9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:30:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:30:37 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: don't configure specific local IP address for ST... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5d0a1500de5e2c4b80acf025761d0264a8a51a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:30:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:30:39 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: don't configure specific local IP address for ST... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-hnbgw: don't configure specific local IP address for STP connection ...................................................................... osmo-hnbgw: don't configure specific local IP address for STP connection It's not necessary to set a local IP to connect to OsmoSTP with, 'any' is as good as any. Related: OS#2663 Change-Id: If5d0a1500de5e2c4b80acf025761d0264a8a51a0 --- M src/hnbgw.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index 5c0570e..c1b931c 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -478,8 +478,7 @@ ranap_set_log_area(DRANAP); - rc = hnbgw_cnlink_init(g_hnb_gw, - "127.0.0.1", M3UA_PORT, "127.0.0.5" /* FIXME: configurable */); + rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); if (rc < 0) { LOGP(DMAIN, LOGL_ERROR, "Failed to initialize SCCP link to CN\n"); exit(1); -- To view, visit https://gerrit.osmocom.org/5166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5d0a1500de5e2c4b80acf025761d0264a8a51a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:31:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:31:11 +0000 Subject: libosmocore[master]: Fix LAPD UA msgb memory leak. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4f0606810e00aa6f1779d11893e4acc01976f9a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: jfdionne Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:31:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:31:12 +0000 Subject: [MERGED] libosmocore[master]: Fix LAPD UA msgb memory leak. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix LAPD UA msgb memory leak. ...................................................................... Fix LAPD UA msgb memory leak. Change-Id: Ia4f0606810e00aa6f1779d11893e4acc01976f9a --- M src/gsm/lapd_core.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 1f1ca83..4847626 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -307,6 +307,9 @@ /* reset to IDLE state */ void lapd_dl_reset(struct lapd_datalink *dl) { + LOGP(DLLAPD, LOGL_INFO, "Resetting LAPDm instance\n"); + /* enter idle state (and remove eventual cont_res) */ + lapd_dl_newstate(dl, LAPD_STATE_IDLE); /* flush buffer */ lapd_dl_flush_tx(dl); lapd_dl_flush_send(dl); -- To view, visit https://gerrit.osmocom.org/3257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4f0606810e00aa6f1779d11893e4acc01976f9a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: jfdionne From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:42:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:42:13 +0000 Subject: osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Patch Set 2: (5 comments) https://gerrit.osmocom.org/#/c/5216/2/ggsn/ggsn.c File ggsn/ggsn.c: Line 350: if (pdp->peer[1]) { /* ipv4v6 */ I think a for-loop iterating over the pdp->peer array would look better than those two copies of identical code PS2, Line 559: sizeof(addr[0])*2 why not simply sizeof(addr) ? it will clear the entire 'addr' and there's no need for complicated syntax Line 568: for (i = 0; i < num_addr; i++) { nothing here ensures that num_addr is actually <=2, right? I would consider the in46a_from_eua() library function independent and you shouldn't make assumptions on the order or the quantity of returned addresses in another part of the code, at leat not blindly in a way that would cause possible security problems and crashes. https://gerrit.osmocom.org/#/c/5216/2/ggsn/icmpv6.c File ggsn/icmpv6.c: Line 196: member = pdp->peer[1]; we blindly assume that peer[1] is IPv6 type? I mean yes, currently in46a_to_eua returns them in that order, but I think we shouldn't make undocumented asumptions about that https://gerrit.osmocom.org/#/c/5216/2/lib/in46_addr.h File lib/in46_addr.h: Line 32: int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); might be nicer to have a separate function for converting multiple addresses and keep the old one? -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 10 14:42:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 14:42:28 +0000 Subject: [MERGED] osmo-bts[master]: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bts-trx: Avoid enqueueing consecutive duplicate messages to TRX ...................................................................... bts-trx: Avoid enqueueing consecutive duplicate messages to TRX While debugging other protocol/timing issues between osmobts-trx and osmo-trx, I found that sometimes two consecutives "POWER OFF" commands are enqueued and sent to osmo-trx. There's no point in doing so, as the write queue already maintains state and retries the command until a RSP is received, then goes for the next one. With this change we hence improve timing response as we don't need to wait for the second command to be processed, and on top we get cleaner logs and simplified states which are easier to debug. Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 1ac21d5..57fd953 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -214,8 +214,13 @@ tcm->cmd[sizeof(tcm->cmd)-1] = '\0'; tcm->cmd_len = strlen(cmd); tcm->critical = critical; - llist_add_tail(&tcm->list, &l1h->trx_ctrl_list); - LOGP(DTRX, LOGL_INFO, "Enqueuing TRX control command '%s'\n", tcm->cmd); + + /* Avoid adding consecutive duplicate messages, eg: two consecutive POWEROFF */ + if (!pending || + strcmp(tcm->cmd, llist_entry(l1h->trx_ctrl_list.prev, struct trx_ctrl_msg, list)->cmd)) { + LOGP(DTRX, LOGL_INFO, "Enqueuing TRX control command '%s'\n", tcm->cmd); + llist_add_tail(&tcm->list, &l1h->trx_ctrl_list); + } /* send message, if we didn't already have pending messages */ if (!pending) -- To view, visit https://gerrit.osmocom.org/5237 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 10 15:31:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 15:31:10 +0000 Subject: [MERGED] libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix malformed Abis/RSL messages with extra L3 Information field ...................................................................... Fix malformed Abis/RSL messages with extra L3 Information field Some Abis/RSL messages such as "Release Indication" contained 3 extra bytes from an L3 Information header which should not be there according to specs in GSM 08.58 (section 8.3 "Radio link layer management messages"). Other RSL messages were affected by the same issue, except for "Establish Indication", which had already a workaround in send_rslms_dlsap. This commit fixes the issue in a generic way, removes the "Establish Indication" and fixes the test accounting for the bug, as it otherwise fails after applying the changes. Fixes: OS#1635, OS#2336 Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 --- M src/gsm/lapd_core.c M src/gsm/lapdm.c M tests/lapd/lapd_test.c M tests/lapd/lapd_test.ok 4 files changed, 3 insertions(+), 16 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 4847626..5d87154 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -379,9 +379,7 @@ static inline int send_dl_simple(uint8_t prim, uint8_t op, struct lapd_msg_ctx *lctx) { - struct msgb *msg = lapd_msgb_alloc(0, "DUMMY"); - - return send_dl_l3(prim, op, lctx, msg); + return send_dl_l3(prim, op, lctx, NULL); } /* send MDL-ERROR INDICATION */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index 7ca2b3e..80c0d17 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -414,11 +414,6 @@ switch (OSMO_PRIM_HDR(&dp->oph)) { case OSMO_PRIM(PRIM_DL_EST, PRIM_OP_INDICATION): - if (dp->oph.msg && dp->oph.msg->len == 0) { - /* omit L3 info by freeing message */ - msgb_free(dp->oph.msg); - dp->oph.msg = NULL; - } rll_msg = RSL_MT_EST_IND; break; case OSMO_PRIM(PRIM_DL_EST, PRIM_OP_CONFIRM): diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index fd92cac..e627ba6 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -350,19 +350,13 @@ struct abis_rsl_rll_hdr hdr; printf("MS: Verifying incoming primitive.\n"); - OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr) + 3); + OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr)); /* verify the header */ memset(&hdr, 0, sizeof(hdr)); rsl_init_rll_hdr(&hdr, RSL_MT_EST_CONF); hdr.c.msg_discr |= ABIS_RSL_MDISC_TRANSP; OSMO_ASSERT(memcmp(msg->data, &hdr, sizeof(hdr)) == 0); - - /* Verify the added RSL_IE_L3_INFO but we have a bug here */ - OSMO_ASSERT(msg->data[6] == RSL_IE_L3_INFO); - #pragma message ("RSL_IE_L3_INFO 16 bit length is wrong") - /* This should be okay but it is actually 0x0, 0x9c on ia-32 */ - /* OSMO_ASSERT(msg->data[7] == 0x0 && msg->data[8] == 0x0); */ } else if (state->ms_read == 1) { printf("MS: Verifying incoming MM message: %d\n", msgb_l3len(msg)); OSMO_ASSERT(msgb_l3len(msg) == 3); diff --git a/tests/lapd/lapd_test.ok b/tests/lapd/lapd_test.ok index e188e27..835ca2b 100644 --- a/tests/lapd/lapd_test.ok +++ b/tests/lapd/lapd_test.ok @@ -7,7 +7,7 @@ Confirming Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b -ms_to_bts_tx_cb: BTS->MS(us) message 9 +ms_to_bts_tx_cb: BTS->MS(us) message 6 MS: Verifying incoming primitive. Sending back to MS -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 10 19:10:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sun, 10 Dec 2017 19:10:47 +0000 Subject: osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Patch Set 2: (5 comments) https://gerrit.osmocom.org/#/c/5216/2/ggsn/ggsn.c File ggsn/ggsn.c: Line 350: if (pdp->peer[1]) { /* ipv4v6 */ > I think a for-loop iterating over the pdp->peer array would look better tha They are not exactly identical because in the first one if it's NULL it should be printed as an error, while on the 2nd one it's fine if there's no peer, because for ipv4 and ipv6 cases it's expected to be NULL. But I'm fine moving it to a loop. PS2, Line 559: sizeof(addr[0])*2 > why not simply sizeof(addr) ? it will clear the entire 'addr' and there's n At the time I was writing the code I was not 100% sure of the output of sizeof(addr), so I went for the secure way :) I'll change it. Line 568: for (i = 0; i < num_addr; i++) { > nothing here ensures that num_addr is actually <=2, right? I would conside I think I'm doing exactly that in all the code from this patch: - documentation from in46a_from_eua states is returns <=2 addresses: "\param[out] dst Array containing 2 in46_addr". It is also expected that returned number is never more than 2. I can detail a bit more the documentation. - In other parts of the code I don't make assumptions, instead I use the "num_addr" variable returned from the function. - I am not making any ssumption on the order of the addresses afair. https://gerrit.osmocom.org/#/c/5216/2/ggsn/icmpv6.c File ggsn/icmpv6.c: Line 196: member = pdp->peer[1]; > we blindly assume that peer[1] is IPv6 type? I mean yes, currently in46a_to Well, I think there's an extra restriction coming from in46a_from_eua: If two IP addresses are returned (function returns 2), then one of the IP addresses is an IPv4 and the other one is an IPv6. Following this restriction, what we do here is check if the first one is IPv4, then we can assume 2nd one is the IPv6. It don't assume here though that the IPv6 is the 2nd one. https://gerrit.osmocom.org/#/c/5216/2/lib/in46_addr.h File lib/in46_addr.h: Line 32: int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); > might be nicer to have a separate function for converting multiple addresse Why do you want to keep the old one? I mean, it lacks features. For API backward compatibility purposes? I think this code is only used in osmo-ggsn binary and it's statically linked, so there's no use for it as far as I understand. -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 10 20:34:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 20:34:22 +0000 Subject: [PATCH] osmo-bsc[master]: Change T3101 default from 10s to 3s. Message-ID: Review at https://gerrit.osmocom.org/5266 Change T3101 default from 10s to 3s. This timer is started when a channel is allocated with an IMMEDIATE ASSIGNMENT message. It is stopped when the MS has correctly seized the channel. Ever since the early days of development we were using a very long timeout to be on the safe side. However, in production networks this is a terrible waste of resources, as we will occupy 10s worth of air-time on one of our channels for each RACH request we receive. The only scenarios where you might need something absurdly high as 10s would be if you have 8s of RTT between your BTS and the BSC. See also https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Closes: OS#2733 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/66/5266/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a9512f5..a6c8198 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -262,7 +262,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; -#define GSM_T3101_DEFAULT 10 /* s */ +#define GSM_T3101_DEFAULT 3 /* s */ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 10 20:54:45 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 20:54:45 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add getopts and option to prevent endless loop In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5239 to look at the new patch set (#2). abisip-find: add getopts and option to prevent endless loop The utility abisip-find runs into an endless loop and detects the BTS over and over again. This makes it hard to use the program from scripts (autodetection and auto-configuration of a single bts in a lab setup) Add proper getops options, usage and help Add option to exit after the first response of from a BTS (one shot) Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 --- M src/ipaccess/abisip-find.c 1 file changed, 73 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/5239/2 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index c459161..b9d352e 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -25,12 +25,22 @@ #include #include +#include +#include +#include #include #include #include #include #include + +char program_name[255]; + +struct bfd_data { + bool oneshot; + bool exit; +}; static int udp_sock(const char *ifname) { @@ -140,18 +150,25 @@ /* 2 bytes length, 1 byte protocol */ if (buf[2] != IPAC_PROTO_IPACCESS) - return 0; + return -EINVAL; if (buf[4] != IPAC_MSGT_ID_RESP) - return 0; + return -EINVAL; return parse_response(buf+6, len-6); } static int bfd_cb(struct osmo_fd *bfd, unsigned int flags) { - if (flags & BSC_FD_READ) - return read_response(bfd->fd); + struct bfd_data *bfd_data = bfd->data; + int rc; + + if (flags & BSC_FD_READ) { + rc = read_response(bfd->fd); + if (bfd_data->oneshot && rc == 0) + bfd_data->exit = true; + return rc; + } if (flags & BSC_FD_WRITE) { bfd->when &= ~BSC_FD_WRITE; return bcast_find(bfd->fd); @@ -170,25 +187,72 @@ osmo_timer_schedule(&timer, 5, 0); } +static void print_usage() +{ + printf("Usage: %s\n", program_name); +} + +static void print_help() +{ + printf(" Some useful help...\n"); + printf(" -h --help this text\n"); + printf(" -i --ifname. Specify outgoing interface\n"); + printf(" -1 --one-shot. no endless loop, only one turn \n"); +} + int main(int argc, char **argv) { struct osmo_fd bfd; char *ifname = NULL; int rc; + struct bfd_data bfd_data; + + strncpy(program_name, basename(argv[0]), sizeof(program_name)); + memset(&bfd_data, 0, sizeof(bfd_data)); printf("abisip-find (C) 2009 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); - if (argc < 2) { + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"ifname", 1, 0, 'i'}, + {"one-shot", 0, 0, '1'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "hi:1", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_usage(); + print_help(); + exit(0); + case 'i': + ifname = optarg; + break; + case '1': + bfd_data.oneshot = true; + break; + default: + /* ignore */ + break; + } + } + + if (ifname == NULL) { fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); - } else { - ifname = argv[1]; } bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; bfd.fd = udp_sock(ifname); + bfd.data = &bfd_data; if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); @@ -209,6 +273,8 @@ rc = osmo_select_main(0); if (rc < 0) exit(3); + if (bfd_data.exit) + break; } exit(0); -- To view, visit https://gerrit.osmocom.org/5239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:37:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:37:23 +0000 Subject: [PATCH] libosmo-sccp[master]: Allocate SCCP user primitives with headroom Message-ID: Review at https://gerrit.osmocom.org/5267 Allocate SCCP user primitives with headroom In I19cb83302aaa404ab1a2d92e6f2aec43d0380426 I set the headroom of msgb's for SCCP User primitives to zero, assuming that we wouldn't need any headroom in those primitives. According to pespin, osmo-msc however needs this headroom: DLSCCP <002e> sccp_user.c:156 Delivering N-CONNECT.indication to SCCP User 'OsmoMSC-A' msgb(0xadfba0): Not enough headroom msgb_push (0 < 264) So let's make sure the new SCCP User primitives are allocated with the same headroom, just like before I19cb83302aaa404ab1a2d92e6f2aec43d0380426. Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d --- M src/sccp_helpers.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/67/5267/1 diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 1a67488..cafca94 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -34,7 +34,7 @@ #include "sccp_internal.h" #define SCU_MSG_SIZE 2048 -#define SCU_MSG_HEADROOM 0 +#define SCU_MSG_HEADROOM 512 static struct msgb *scu_msgb_alloc(const char *name) { -- To view, visit https://gerrit.osmocom.org/5267 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:42:08 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 21:42:08 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 2: (15 comments) > And finally, sorry for a lot of messages, but what if this would be > implemented as a part of libosmocodec? Harald? At least I think that would make a lot of sense. Also the enum with the bit offsets could be put in a header file so others can use it. https://gerrit.osmocom.org/#/c/5214/1//COMMIT_MSG Commit Message: Line 10: ith a silence frame. This may cause unpleasant audio effects. > ith slince? Done Line 12: Add a functionality (see ecu_fr.c, ecu_fr_conceal() and > ideally name the function Done Line 13: ecu_fr_reset() to craft a replacement frame from the last > Add ecu_fr_test. Done https://gerrit.osmocom.org/#/c/5214/1/include/osmo-bts/ecu_fr.h File include/osmo-bts/ecu_fr.h: Line 19 > (usually no license header in .h files, but a short summary would be nice) Done https://gerrit.osmocom.org/#/c/5214/2/include/osmo-bts/ecu_fr.h File include/osmo-bts/ecu_fr.h: Line 2: > I think, this header should satisfy at least the following dependences itse Done https://gerrit.osmocom.org/#/c/5214/1/include/osmo-bts/gsm_data_shared.h File include/osmo-bts/gsm_data_shared.h: Line 19: #include > (unrelated ws) Done https://gerrit.osmocom.org/#/c/5214/1/src/common/ecu_fr.c File src/common/ecu_fr.c: Line 1: /* (C) 2017 by sysmocom - s.f.m.c. GmbH > from Harald's recent comment we should put a dash before s.f.m.c. Done Line 303: /* Reduce the XMAXC field. When the XMAXC field reaches > (almost any API is a "helper function" :) -- just say what it does, same be Done Line 364: goto leave; > a bit more context, like at least say we failed to unpack an FR frame Done Line 377: } > semantically it's not an abort, right? Done Line 383: goto leave; > -1: unreachable code, the goto is not useful anyhow Done Line 384: } > context Done https://gerrit.osmocom.org/#/c/5214/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: Line 1113: if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) > if (!bfi_flag... Done https://gerrit.osmocom.org/#/c/5214/2/tests/ecu_fr/Makefile.am File tests/ecu_fr/Makefile.am: Line 3: LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS) > Both LIBOSMOTRAU and LIBOSMOABIS are not required here... Done https://gerrit.osmocom.org/#/c/5214/2/tests/ecu_fr/ecu_fr_test.c File tests/ecu_fr/ecu_fr_test.c: PS2, Line 1: #include : #include : #include : #include : #include : #include : #include : #include : #include : #include : #include : : #include : #include : #include : : #include : #include : #include : #include : : #include : #include : #include > So many useless includes... The following set would be enough: I copied from another test and forgot to go through the includes. Thanks. -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:44:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 21:44:53 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: tests/Makefile.am: remove excess whitespace In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5211 to look at the new patch set (#4). cosmetic: tests/Makefile.am: remove excess whitespace Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/11/5211/4 diff --git a/tests/Makefile.am b/tests/Makefile.am index 18b8ce6..1eb28d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,22 +21,22 @@ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' - + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) TESTSUITE = $(srcdir)/testsuite DISTCLEANFILES = atconfig - + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) - + installcheck-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ $(TESTSUITEFLAGS) - + clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean - + AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:44:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 21:44:53 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: tests/power: remove unused var "ret" In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5212 to look at the new patch set (#3). cosmetic: tests/power: remove unused var "ret" remove unused variable "ret" in unit test "power" Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 --- M tests/power/power_test.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/5212/3 diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 3099217..295f638 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -39,7 +39,6 @@ struct gsm_bts_trx trx; struct gsm_bts_trx_ts ts; struct gsm_lchan *lchan; - int ret; memset(&bts, 0, sizeof(bts)); memset(&btsb, 0, sizeof(btsb)); -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:44:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 21:44:53 +0000 Subject: [PATCH] osmo-bts[master]: cosmetic: tests/agch: remove unused var "static_ilv" In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5213 to look at the new patch set (#3). cosmetic: tests/agch: remove unused var "static_ilv" remove unused const variable "static_ilv" from unit test "agch" Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 --- M tests/agch/agch_test.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/5213/3 diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 7c4e6cd..b5094af 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -31,10 +31,6 @@ static struct gsm_bts *bts; static struct gsm_bts_role_bts *btsb; -static const uint8_t static_ilv[] = { - 0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19 -}; - static int count_imm_ass_rej_refs(struct gsm48_imm_ass_rej *rej) { int count = 0; -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:44:53 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 21:44:53 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5214 to look at the new patch set (#3). osmo-bts-trx: add error concealment unit for GSM-FR When a bad GSM-FR voice frame is received, the frame replaced ith a silence frame. This may cause unpleasant audio effects. Add a functionality (see ecu_fr.c, ecu_fr_conceal() and ecu_fr_reset() to craft a replacement frame from the last known good frame. Add unit test (ecu_fr_test.c) Integrate into osmo-bts-trx Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M configure.ac M include/osmo-bts/Makefile.am A include/osmo-bts/ecu_fr.h M include/osmo-bts/gsm_data_shared.h M src/common/Makefile.am A src/common/ecu_fr.c M src/osmo-bts-trx/scheduler_trx.c M tests/Makefile.am A tests/ecu_fr/Makefile.am A tests/ecu_fr/ecu_fr_test.c A tests/ecu_fr/ecu_fr_test.ok M tests/meas/meas_test.c M tests/testsuite.at 13 files changed, 827 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/3 diff --git a/configure.ac b/configure.ac index e3ea9ca..0d1a882 100644 --- a/configure.ac +++ b/configure.ac @@ -180,4 +180,5 @@ tests/tx_power/Makefile tests/power/Makefile tests/meas/Makefile + tests/ecu_fr/Makefile Makefile) diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index a15ce3d..86bcdf1 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -2,4 +2,4 @@ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ power_control.h scheduler.h scheduler_backend.h phy_link.h \ - dtx_dl_amr_fsm.h + dtx_dl_amr_fsm.h ecu_fr.h diff --git a/include/osmo-bts/ecu_fr.h b/include/osmo-bts/ecu_fr.h new file mode 100644 index 0000000..3954457 --- /dev/null +++ b/include/osmo-bts/ecu_fr.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#include + +/* Context information for the full rate ECU states */ +struct ecu_fr_ctx { + bool subsequent_lost_frame; + uint8_t frame_backup[GSM_FR_BYTES]; +}; + +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame); +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..37d6e0b 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -19,6 +19,7 @@ #include #include +#include #ifndef ROLE_BSC #include @@ -381,6 +382,8 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + struct ecu_fr_ctx ecu_fr_ctx; #endif }; diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 67f3e80..d2d6ec6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -12,6 +12,6 @@ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ l1sap.c cbch.c power_control.c main.c phy_link.c \ - dtx_dl_amr_fsm.c + dtx_dl_amr_fsm.c ecu_fr.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/ecu_fr.c b/src/common/ecu_fr.c new file mode 100644 index 0000000..92228cd --- /dev/null +++ b/src/common/ecu_fr.c @@ -0,0 +1,415 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* See also GSM 6.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/* See also RFC 3551 Table 3: GSM payload format: */ +enum gsm610_bit_offsets { + GSM610_SIGNATURE_0, + GSM610_SIGNATURE_1, + GSM610_SIGNATURE_2, + GSM610_SIGNATURE_3, + GSM610_LARC0_0, + GSM610_LARC0_1, + GSM610_LARC0_2, + GSM610_LARC0_3, + GSM610_LARC0_4, + GSM610_LARC0_5, + GSM610_LARC1_0, + GSM610_LARC1_1, + GSM610_LARC1_2, + GSM610_LARC1_3, + GSM610_LARC1_4, + GSM610_LARC1_5, + GSM610_LARC2_0, + GSM610_LARC2_1, + GSM610_LARC2_2, + GSM610_LARC2_3, + GSM610_LARC2_4, + GSM610_LARC3_0, + GSM610_LARC3_1, + GSM610_LARC3_2, + GSM610_LARC3_3, + GSM610_LARC3_4, + GSM610_LARC4_0, + GSM610_LARC4_1, + GSM610_LARC4_2, + GSM610_LARC4_3, + GSM610_LARC5_0, + GSM610_LARC5_1, + GSM610_LARC5_2, + GSM610_LARC5_3, + GSM610_LARC6_0, + GSM610_LARC6_1, + GSM610_LARC6_2, + GSM610_LARC7_0, + GSM610_LARC7_1, + GSM610_LARC7_2, + GSM610_NC0_0, + GSM610_NC0_1, + GSM610_NC0_2, + GSM610_NC0_3, + GSM610_NC0_4, + GSM610_NC0_5, + GSM610_NC0_6, + GSM610_BC0_0, + GSM610_BC0_1, + GSM610_MC0_0, + GSM610_MC0_1, + GSM610_XMAXC00, + GSM610_XMAXC01, + GSM610_XMAXC02, + GSM610_XMAXC03, + GSM610_XMAXC04, + GSM610_XMAXC05, + GSM610_XMC0_0, + GSM610_XMC0_1, + GSM610_XMC0_2, + GSM610_XMC1_0, + GSM610_XMC1_1, + GSM610_XMC1_2, + GSM610_XMC2_0, + GSM610_XMC2_1, + GSM610_XMC2_2, + GSM610_XMC3_0, + GSM610_XMC3_1, + GSM610_XMC3_2, + GSM610_XMC4_0, + GSM610_XMC4_1, + GSM610_XMC4_2, + GSM610_XMC5_0, + GSM610_XMC5_1, + GSM610_XMC5_2, + GSM610_XMC6_0, + GSM610_XMC6_1, + GSM610_XMC6_2, + GSM610_XMC7_0, + GSM610_XMC7_1, + GSM610_XMC7_2, + GSM610_XMC8_0, + GSM610_XMC8_1, + GSM610_XMC8_2, + GSM610_XMC9_0, + GSM610_XMC9_1, + GSM610_XMC9_2, + GSM610_XMC10_0, + GSM610_XMC10_1, + GSM610_XMC10_2, + GSM610_XMC11_0, + GSM610_XMC11_1, + GSM610_XMC11_2, + GSM610_XMC12_0, + GSM610_XMC12_1, + GSM610_XCM12_2, + GSM610_NC1_0, + GSM610_NC1_1, + GSM610_NC1_2, + GSM610_NC1_3, + GSM610_NC1_4, + GSM610_NC1_5, + GSM610_NC1_6, + GSM610_BC1_0, + GSM610_BC1_1, + GSM610_MC1_0, + GSM610_MC1_1, + GSM610_XMAXC10, + GSM610_XMAXC11, + GSM610_XMAXC12, + GSM610_XMAXC13, + GSM610_XMAXC14, + GSM610_XMAX15, + GSM610_XMC13_0, + GSM610_XMC13_1, + GSM610_XMC13_2, + GSM610_XMC14_0, + GSM610_XMC14_1, + GSM610_XMC14_2, + GSM610_XMC15_0, + GSM610_XMC15_1, + GSM610_XMC15_2, + GSM610_XMC16_0, + GSM610_XMC16_1, + GSM610_XMC16_2, + GSM610_XMC17_0, + GSM610_XMC17_1, + GSM610_XMC17_2, + GSM610_XMC18_0, + GSM610_XMC18_1, + GSM610_XMC18_2, + GSM610_XMC19_0, + GSM610_XMC19_1, + GSM610_XMC19_2, + GSM610_XMC20_0, + GSM610_XMC20_1, + GSM610_XMC20_2, + GSM610_XMC21_0, + GSM610_XMC21_1, + GSM610_XMC21_2, + GSM610_XMC22_0, + GSM610_XMC22_1, + GSM610_XMC22_2, + GSM610_XMC23_0, + GSM610_XMC23_1, + GSM610_XMC23_2, + GSM610_XMC24_0, + GSM610_XMC24_1, + GSM610_XMC24_2, + GSM610_XMC25_0, + GSM610_XMC25_1, + GSM610_XMC25_2, + GSM610_NC2_0, + GSM610_NC2_1, + GSM610_NC2_2, + GSM610_NC2_3, + GSM610_NC2_4, + GSM610_NC2_5, + GSM610_NC2_6, + GSM610_BC2_0, + GSM610_BC2_1, + GSM610_MC2_0, + GSM610_MC2_1, + GSM610_XMAXC20, + GSM610_XMAXC21, + GSM610_XMAXC22, + GSM610_XMAXC23, + GSM610_XMAXC24, + GSM610_XMAXC25, + GSM610_XMC26_0, + GSM610_XMC26_1, + GSM610_XMC26_2, + GSM610_XMC27_0, + GSM610_XMC27_1, + GSM610_XMC27_2, + GSM610_XMC28_0, + GSM610_XMC28_1, + GSM610_XMC28_2, + GSM610_XMC29_0, + GSM610_XMC29_1, + GSM610_XMC29_2, + GSM610_XMC30_0, + GSM610_XMC30_1, + GSM610_XMC30_2, + GSM610_XMC31_0, + GSM610_XMC31_1, + GSM610_XMC31_2, + GSM610_XMC32_0, + GSM610_XMC32_1, + GSM610_XMC32_2, + GSM610_XMC33_0, + GSM610_XMC33_1, + GSM610_XMC33_2, + GSM610_XMC34_0, + GSM610_XMC34_1, + GSM610_XMC34_2, + GSM610_XMC35_0, + GSM610_XMC35_1, + GSM610_XMC35_2, + GSM610_XMC36_0, + GSM610_XMC36_1, + GSM610_XMC36_2, + GSM610_XMC37_0, + GSM610_XMC37_1, + GSM610_XMC37_2, + GSM610_XMC38_0, + GSM610_XMC38_1, + GSM610_XMC38_2, + GSM610_NC3_0, + GSM610_NC3_1, + GSM610_NC3_2, + GSM610_NC3_3, + GSM610_NC3_4, + GSM610_NC3_5, + GSM610_NC3_6, + GSM610_BC3_0, + GSM610_BC3_1, + GSM610_MC3_0, + GSM610_MC3_1, + GSM610_XMAXC30, + GSM610_XMAXC31, + GSM610_XMAXC32, + GSM610_XMAXC33, + GSM610_XMAXC34, + GSM610_XMAXC35, + GSM610_XMC39_0, + GSM610_XMC39_1, + GSM610_XMC39_2, + GSM610_XMC40_0, + GSM610_XMC40_1, + GSM610_XMC40_2, + GSM610_XMC41_0, + GSM610_XMC41_1, + GSM610_XMC41_2, + GSM610_XMC42_0, + GSM610_XMC42_1, + GSM610_XMC42_2, + GSM610_XMC43_0, + GSM610_XMC43_1, + GSM610_XMC43_2, + GSM610_XMC44_0, + GSM610_XMC44_1, + GSM610_XMC44_2, + GSM610_XMC45_0, + GSM610_XMC45_1, + GSM610_XMC45_2, + GSM610_XMC46_0, + GSM610_XMC46_1, + GSM610_XMC46_2, + GSM610_XMC47_0, + GSM610_XMC47_1, + GSM610_XMC47_2, + GSM610_XMC48_0, + GSM610_XMC48_1, + GSM610_XMC48_2, + GSM610_XMC49_0, + GSM610_XMC49_1, + GSM610_XMC49_2, + GSM610_XMC50_0, + GSM610_XMC50_1, + GSM610_XMC50_2, + GSM610_XMC51_0, + GSM610_XMC51_1, + GSM610_XMC51_2 +}; + +/* Reduce the XMAXC field. When the XMAXC field reaches + * zero, then the function will return true */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, unsigned int index) +{ + unsigned int field_index; + uint64_t field; + bool silent = true; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + if (field != 0) + silent = false; + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return silent; +} + +/* Reduce all XMAXC fields in the frame. When all XMAXC fields reach + * zero, then the function will return true */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_XMAXC30)) + silent = true; + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static void conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + bool silent; + int rc; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) { + goto leave_nofree; + } + + /* Convert to bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, no memory to store the resulting bitvec!\n"); + goto leave_nofree; + } + rc = bitvec_unpack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, wrong number of bits unpacked!\n"); + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + rc = bitvec_pack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Packing GSM-FR frame failed, wrong number of bits packed!\n"); + goto leave; + } + +leave: + bitvec_free(frame_bitvec); +leave_nofree: + return; +} + +/* To be called whan a good frame is received. This function will then create + * a backup of the frame and reset its internal state */ +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + ctx->subsequent_lost_frame = false; + memcpy(ctx->frame_backup, frame, sizeof(ctx->frame_backup)); +} + +/* To be called when a bad frame is received. This function will then generate + * a replacement frame that can be used to conceal the dropout */ +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup. */ + if (ctx->subsequent_lost_frame) { + conceal_frame(ctx->frame_backup); + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, ctx->frame_backup, sizeof(ctx->frame_backup)); + ctx->subsequent_lost_frame = true; +} diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..dfcd031 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -968,6 +968,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1059,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1082,7 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + ecu_fr_conceal(&lchan->ecu_fr_ctx, tch_data); rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1110,9 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) + ecu_fr_reset(&lchan->ecu_fr_ctx, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); diff --git a/tests/Makefile.am b/tests/Makefile.am index 1eb28d6..e77a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = paging cipher agch misc handover tx_power power meas +SUBDIRS = paging cipher agch misc handover tx_power power meas ecu_fr if ENABLE_SYSMOBTS SUBDIRS += sysmobts diff --git a/tests/ecu_fr/Makefile.am b/tests/ecu_fr/Makefile.am new file mode 100644 index 0000000..2f1e3f6 --- /dev/null +++ b/tests/ecu_fr/Makefile.am @@ -0,0 +1,8 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOCODEC_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) +noinst_PROGRAMS = ecu_fr_test +EXTRA_DIST = ecu_fr_test.ok + +ecu_fr_test_SOURCES = ecu_fr_test.c +ecu_fr_test_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD) diff --git a/tests/ecu_fr/ecu_fr_test.c b/tests/ecu_fr/ecu_fr_test.c new file mode 100644 index 0000000..bc1cc56 --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +/* Set with sample fullrate voice frames and some intentional dropouts. */ +char *fr_voice[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Start with a good voice frame and then simulate 20 consecutive bad frames, + * watch how the error concealment decreases the XMAXC parameters */ +void test_fr_concealment(void *ctx) +{ + char frame_hex[] = + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + uint8_t *frame; + unsigned int len; + int i; + struct ecu_fr_ctx ecu_fr_ctx; + + len = strlen(frame_hex); + frame = talloc_zero_size(ctx, GSM_FR_BYTES); + len = osmo_hexparse(frame_hex, frame, GSM_FR_BYTES); + OSMO_ASSERT(len == GSM_FR_BYTES); + + printf(" Start with: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Reset the ECU with the proposed known good frame */ + ecu_fr_reset(&ecu_fr_ctx, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf("conceal: %02i, result: %s\n", i, + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } + + talloc_free(frame); +} + +/* Simulate a real life situation, voce frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + uint8_t frame[GSM_FR_BYTES]; + unsigned int len; + unsigned int id = 0; + struct ecu_fr_ctx ecu_fr_ctx; + + while (1) { + /* Detect end of test samples */ + if (fr_voice[id] == NULL) + return; + + printf("Frame No. %03i:\n", id); + len = strlen(fr_voice[id]) / 2; + + if (len != GSM_FR_BYTES) { + memset(frame, 0, GSM_FR_BYTES); + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf(" * input: (bad)\n"); + } else { + osmo_hexparse(fr_voice[id], frame, GSM_FR_BYTES); + printf(" * input: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + ecu_fr_reset(&ecu_fr_ctx, frame); + } + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + id++; + } +} + +int main(int argc, char **argv) +{ + void *tall_bts_ctx; + + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + bts_log_init(NULL); + osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG; + + test_fr_concealment(tall_bts_ctx); + test_fr_concealment_realistic(); + + printf("Success\n"); + talloc_report_full(tall_bts_ctx, stderr); + printf("Talloc total blocks: %lu\n", talloc_total_blocks(tall_bts_ctx)); + OSMO_ASSERT(talloc_total_blocks(tall_bts_ctx) == 2); + + return 0; +} diff --git a/tests/ecu_fr/ecu_fr_test.ok b/tests/ecu_fr/ecu_fr_test.ok new file mode 100644 index 0000000..fab883e --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.ok @@ -0,0 +1,194 @@ + Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 +Success +Talloc total blocks: 2 diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c index acebab5..74bbab7 100644 --- a/tests/meas/meas_test.c +++ b/tests/meas/meas_test.c @@ -1,38 +1,13 @@ +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include -#include -#include - -#include #include -#include -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include static struct gsm_bts *bts; struct gsm_bts_trx *trx; diff --git a/tests/testsuite.at b/tests/testsuite.at index 2d1cefd..c6196a5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -49,3 +49,9 @@ cat $abs_srcdir/meas/meas_test.ok > expout AT_CHECK([$abs_top_builddir/tests/meas/meas_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([ecu_fr]) +AT_KEYWORDS([ecu_fr]) +cat $abs_srcdir/ecu_fr/ecu_fr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/ecu_fr/ecu_fr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:58:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:58:20 +0000 Subject: libosmo-sccp[master]: Allocate SCCP user primitives with headroom In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5267 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:58:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:58:23 +0000 Subject: [MERGED] libosmo-sccp[master]: Allocate SCCP user primitives with headroom In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Allocate SCCP user primitives with headroom ...................................................................... Allocate SCCP user primitives with headroom In I19cb83302aaa404ab1a2d92e6f2aec43d0380426 I set the headroom of msgb's for SCCP User primitives to zero, assuming that we wouldn't need any headroom in those primitives. According to pespin, osmo-msc however needs this headroom: DLSCCP <002e> sccp_user.c:156 Delivering N-CONNECT.indication to SCCP User 'OsmoMSC-A' msgb(0xadfba0): Not enough headroom msgb_push (0 < 264) So let's make sure the new SCCP User primitives are allocated with the same headroom, just like before I19cb83302aaa404ab1a2d92e6f2aec43d0380426. Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d --- M src/sccp_helpers.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index 1a67488..cafca94 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -34,7 +34,7 @@ #include "sccp_internal.h" #define SCU_MSG_SIZE 2048 -#define SCU_MSG_HEADROOM 0 +#define SCU_MSG_HEADROOM 512 static struct msgb *scu_msgb_alloc(const char *name) { -- To view, visit https://gerrit.osmocom.org/5267 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92d7648f8ffd034341e2f12aa79dd3d16ec3a98d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:59:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:59:02 +0000 Subject: osmo-bts[master]: cosmetic: tests/power: remove unused var "ret" In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:59:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:59:14 +0000 Subject: osmo-bts[master]: cosmetic: tests/agch: remove unused var "static_ilv" In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 10 21:59:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 10 Dec 2017 21:59:26 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: tests/Makefile.am: remove excess whitespace In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: tests/Makefile.am: remove excess whitespace ...................................................................... cosmetic: tests/Makefile.am: remove excess whitespace Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 --- M tests/Makefile.am 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index 18b8ce6..1eb28d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,22 +21,22 @@ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' - + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) TESTSUITE = $(srcdir)/testsuite DISTCLEANFILES = atconfig - + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) - + installcheck-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ $(TESTSUITEFLAGS) - + clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean - + AUTOM4TE = $(SHELL) $(top_srcdir)/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 -- To view, visit https://gerrit.osmocom.org/5211 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7090d46ae72183014e6c74d6ddb240af8d66e0b4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Sat Dec 9 23:33:21 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 09 Dec 2017 23:33:21 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a2db1b61e8d8_5394d5cf50219064e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 488s] | HAVE_PCAP_FALSE='#' [ 488s] | HAVE_PCAP_TRUE='' [ 488s] | HAVE_SQLITE3_FALSE='' [ 488s] | HAVE_SQLITE3_TRUE='#' [ 488s] | INSTALL_DATA='${INSTALL} -m 644' [ 488s] | INSTALL_PROGRAM='${INSTALL}' [ 488s] | INSTALL_SCRIPT='${INSTALL}' [ 488s] | INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' [ 488s] | LD='/usr/bin/ld' [ 488s] | LDFLAGS='-Wl,-z,relro -Wl,-z,now' [ 488s] | LIBASN1C_CFLAGS='' [ 488s] | LIBASN1C_LIBS='' [ 488s] | LIBBCG729_CFLAGS='' [ 488s] | LIBBCG729_LIBS='' [ 488s] | LIBCRYPTO_CFLAGS='' [ 488s] | LIBCRYPTO_LIBS='-lcrypto' [ 488s] | LIBOBJS='' [ 488s] | LIBOSMOABIS_CFLAGS='-I/usr/include/' [ 488s] | LIBOSMOABIS_LIBS='-losmoabis' [ 488s] | LIBOSMOCORE_CFLAGS='-I/usr/include/' [ 488s] | LIBOSMOCORE_LIBS='-ltalloc -losmocore' [ 488s] | LIBOSMOCTRL_CFLAGS='-I/usr/include/' [ 489s] | LIBOSMOCTRL_LIBS='-ltalloc -losmoctrl -losmogsm -losmocore' [ 491s] | LIBOSMOGB_CFLAGS='-fno-strict-aliasing -I/u[ 474.440925] sysrq: SysRq : Power Off [ 491s] [ 474.444076] reboot: Power down [ 491s] ### VM INTERACTION END ### [ 491s] [ 491s] obs-arm-3 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 21:00:28 UTC 2017. [ 491s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Dec 10 22:22:47 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Sun, 10 Dec 2017 22:22:47 +0000 Subject: [PATCH] osmo-mgw[master]: mcgp_client: mgcp_msg_gen(): add checks to verify params Message-ID: Review at https://gerrit.osmocom.org/5268 mcgp_client: mgcp_msg_gen(): add checks to verify params mgcp_msg_gen() does not check the contents of the prameters that are handed over with the struct. This may lead to invalid mgcp messages sent to the MGW, which can be difficult to debug. Add some additional checks to make a possible problem noticeable in an early stage. - verify that the endpoint is not a nullstring - verify that the connection id is not a nullstring - verify that the ip-address is not a nullstring - verify that the port number is a value greater 0 Change-Id: I15c464c4bcdf6e524f68acc62f44186dd7ad19a7 --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/68/5268/1 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2f3d0d1..1c35aa9 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -789,8 +789,15 @@ } /* Add endpoint name */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_ENDPOINT) + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_ENDPOINT) { + if (strlen(mgcp_msg->endpoint) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty endpoint name, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, " %s", mgcp_msg->endpoint); + } /* Add protocol version */ rc += msgb_printf(msg, " MGCP 1.0\r\n"); @@ -800,8 +807,15 @@ rc += msgb_printf(msg, "C: %x\r\n", mgcp_msg->call_id); /* Add connection id */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) { + if (strlen(mgcp_msg->conn_id) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty connection id, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); + } /* Add local connection options */ if (mgcp_msg->verb == MGCP_VERB_CRCX) @@ -816,6 +830,18 @@ /* Add RTP address and port (SDP) */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_IP && mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) { + if (mgcp_msg->audio_port == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Invalid port number, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } + if (strlen(mgcp_msg->audio_ip) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty ip address, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, "\r\n"); rc += msgb_printf(msg, "c=IN IP4 %s\r\n", mgcp_msg->audio_ip); rc += -- To view, visit https://gerrit.osmocom.org/5268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15c464c4bcdf6e524f68acc62f44186dd7ad19a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From admin at opensuse.org Sun Dec 10 06:50:21 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Dec 2017 06:50:21 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a2db765937d0_5394d5cf50229193e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 312s] | #define HAVE_INTTYPES_H 1 [ 312s] | #define HAVE_STDINT_H 1 [ 312s] | #define HAVE_UNISTD_H 1 [ 312s] | #define HAVE_DLFCN_H 1 [ 312s] | #define LT_OBJDIR ".libs/" [ 312s] | #define BUILD_SMPP 1 [ 312s] | #define STDC_HEADERS 1 [ 312s] | #define HAVE_DBI_DBD_H 1 [ 312s] | #define HAVE_PCAP_PCAP_H 1 [ 312s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 312s] | [ 312s] | configure: exit 0 [ 312s] [ 312s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 312s] make[1]: *** [override_dh_auto_test] Error 1 [ 312s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 312s] debian/rules:13: recipe for target 'build' failed [ 312s] make: *** [build] Error 2 [ 312s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 312s] [ 312s] armbuild01 failed "build openbsc_1.0.0.20171209.dsc" at Sun Dec 10 06:50:06 UTC 2017. [ 312s] [ 312s] ### VM INTERACTION START ### [ 314s] [ 297.208425] SysRq : Power Off [ 314s] [ 297.238388] reboot: Power down [ 314s] ### VM INTERACTION END ### [ 314s] [ 314s] armbuild01 failed "build openbsc_1.0.0.20171209.dsc" at Sun Dec 10 06:50:09 UTC 2017. [ 314s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Dec 10 20:04:42 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Dec 2017 20:04:42 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a2dc6d21873b_5394d5cf5024504d4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 145s] | #define HAVE_STRINGS_H 1 [ 145s] | #define HAVE_INTTYPES_H 1 [ 145s] | #define HAVE_STDINT_H 1 [ 145s] | #define HAVE_UNISTD_H 1 [ 145s] | #define HAVE_DLFCN_H 1 [ 145s] | #define LT_OBJDIR ".libs/" [ 145s] | #define BUILD_SMPP 1 [ 145s] | #define STDC_HEADERS 1 [ 145s] | #define HAVE_DBI_DBD_H 1 [ 145s] | #define HAVE_PCAP_PCAP_H 1 [ 145s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 145s] | [ 145s] | configure: exit 0 [ 145s] [ 145s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 145s] make[1]: *** [override_dh_auto_test] Error 1 [ 145s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 145s] debian/rules:13: recipe for target 'build' failed [ 145s] make: *** [build] Error 2 [ 145s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 145s] [ 145s] lamb18 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 20:04:27 UTC 2017. [ 145s] [ 145s] ### VM INTERACTION START ### [ 148s] [ 140.333248] reboot: Power down [ 148s] ### VM INTERACTION END ### [ 148s] [ 148s] lamb18 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 20:04:29 UTC 2017. [ 148s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Dec 10 20:08:45 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Dec 2017 20:08:45 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a2dc6e47b8fe_5394d5cf5024529f8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 179s] | #define HAVE_STRINGS_H 1 [ 179s] | #define HAVE_INTTYPES_H 1 [ 179s] | #define HAVE_STDINT_H 1 [ 179s] | #define HAVE_UNISTD_H 1 [ 179s] | #define HAVE_DLFCN_H 1 [ 179s] | #define LT_OBJDIR ".libs/" [ 179s] | #define BUILD_SMPP 1 [ 179s] | #define STDC_HEADERS 1 [ 179s] | #define HAVE_DBI_DBD_H 1 [ 179s] | #define HAVE_PCAP_PCAP_H 1 [ 179s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 179s] | [ 179s] | configure: exit 0 [ 179s] [ 179s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 179s] make[1]: *** [override_dh_auto_test] Error 1 [ 179s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 179s] debian/rules:13: recipe for target 'build' failed [ 179s] make: *** [build] Error 2 [ 179s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 179s] [ 179s] lamb58 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 20:08:31 UTC 2017. [ 179s] [ 179s] ### VM INTERACTION START ### [ 182s] [ 174.583621] reboot: Power down [ 183s] ### VM INTERACTION END ### [ 183s] [ 183s] lamb58 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 20:08:35 UTC 2017. [ 183s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Dec 10 21:00:43 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Dec 2017 21:00:43 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a2dc7a3b6ad0_5394d5cf50246284e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 488s] | HAVE_PCAP_FALSE='#' [ 488s] | HAVE_PCAP_TRUE='' [ 488s] | HAVE_SQLITE3_FALSE='' [ 488s] | HAVE_SQLITE3_TRUE='#' [ 488s] | INSTALL_DATA='${INSTALL} -m 644' [ 488s] | INSTALL_PROGRAM='${INSTALL}' [ 488s] | INSTALL_SCRIPT='${INSTALL}' [ 488s] | INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' [ 488s] | LD='/usr/bin/ld' [ 488s] | LDFLAGS='-Wl,-z,relro -Wl,-z,now' [ 488s] | LIBASN1C_CFLAGS='' [ 488s] | LIBASN1C_LIBS='' [ 488s] | LIBBCG729_CFLAGS='' [ 488s] | LIBBCG729_LIBS='' [ 488s] | LIBCRYPTO_CFLAGS='' [ 488s] | LIBCRYPTO_LIBS='-lcrypto' [ 488s] | LIBOBJS='' [ 488s] | LIBOSMOABIS_CFLAGS='-I/usr/include/' [ 488s] | LIBOSMOABIS_LIBS='-losmoabis' [ 488s] | LIBOSMOCORE_CFLAGS='-I/usr/include/' [ 488s] | LIBOSMOCORE_LIBS='-ltalloc -losmocore' [ 488s] | LIBOSMOCTRL_CFLAGS='-I/usr/include/' [ 489s] | LIBOSMOCTRL_LIBS='-ltalloc -losmoctrl -losmogsm -losmocore' [ 491s] | LIBOSMOGB_CFLAGS='-fno-strict-aliasing -I/u[ 474.440925] sysrq: SysRq : Power Off [ 491s] [ 474.444076] reboot: Power down [ 491s] ### VM INTERACTION END ### [ 491s] [ 491s] obs-arm-3 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 21:00:28 UTC 2017. [ 491s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Dec 10 23:59:08 2017 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Dec 2017 23:59:08 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a2dca4eddc3b_5394d5cf502500723@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 318s] | #define HAVE_INTTYPES_H 1 [ 318s] | #define HAVE_STDINT_H 1 [ 318s] | #define HAVE_UNISTD_H 1 [ 318s] | #define HAVE_DLFCN_H 1 [ 318s] | #define LT_OBJDIR ".libs/" [ 318s] | #define BUILD_SMPP 1 [ 318s] | #define STDC_HEADERS 1 [ 318s] | #define HAVE_DBI_DBD_H 1 [ 318s] | #define HAVE_PCAP_PCAP_H 1 [ 318s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 318s] | [ 318s] | configure: exit 0 [ 318s] [ 318s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 318s] make[1]: *** [override_dh_auto_test] Error 1 [ 318s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 318s] debian/rules:13: recipe for target 'build' failed [ 318s] make: *** [build] Error 2 [ 318s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 318s] [ 318s] armbuild02 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 23:59:02 UTC 2017. [ 318s] [ 318s] ### VM INTERACTION START ### [ 320s] [ 303.756073] SysRq : Power Off [ 320s] [ 303.761490] reboot: Power down [ 320s] ### VM INTERACTION END ### [ 320s] [ 320s] armbuild02 failed "build openbsc_1.0.0.20171210.dsc" at Sun Dec 10 23:59:06 UTC 2017. [ 320s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 11 10:14:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 10:14:30 +0000 Subject: osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 10:16:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 10:16:28 +0000 Subject: libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5252/1/include/osmocom/core/utils.h File include/osmocom/core/utils.h: Line 23: #define OSMO_STRINGIFY_VAL(x) OSMO_STRINGIFY(x) That look odd. Why can't simply use OSMO_STRINGIFY(x) directly? -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 10:43:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 10:43:30 +0000 Subject: [PATCH] osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5216 to look at the new patch set (#3). Add support for IPv4v6 End User Addresses Before this commit, when an MS requested an ipv4v6 context osmo-ggsn returned an error stating the type was unknown, and this text was printed in the log: Processing create PDP context request for APN 'ims' Cannot decode EUA from MS/SGSN: f1 8d This patch has been tested with an MS running the 3 types of addresses: - IPv4 and IPv6: no regressions observed, the context is activated and packets are sent to the ggsn. - IPv4v6: Wireshark correctly parses request and reponse, and then ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and IPv6 DNS addresses advertised and TCP traffic over IPv4 (because probably my IPv6 network setup is not correct). I also checked I can disable/enable data (pdp ctx delete and activate) several times without any issue. Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 --- M ggsn/ggsn.c M ggsn/icmpv6.c M gtp/pdp.h M lib/in46_addr.c M lib/in46_addr.h M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c M tests/lib/in46a_v6_test.ok 8 files changed, 231 insertions(+), 82 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5216/3 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1c1276f..fa3e20c 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -335,17 +335,20 @@ static int delete_context(struct pdp_t *pdp) { struct gsn_t *gsn = pdp->gsn; - struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; struct apn_ctx *apn = pdp->priv; + struct ippoolm_t *member; + int i; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); - struct ippoolm_t *member = pdp->peer; - if (pdp->peer) { - send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ - ippool_freeip(ipp->pool, ipp); - } else - LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + for (i = 0; i < 2; i++) { + if (pdp->peer[i]) { + member = pdp->peer[i]; + send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ + ippool_freeip(member->pool, member); + } else if(i == 0) + LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + } if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", @@ -512,10 +515,10 @@ static char name_buf[256]; struct gsn_t *gsn = pdp->gsn; struct ggsn_ctx *ggsn = gsn->priv; - struct in46_addr addr; - struct ippoolm_t *member; + struct in46_addr addr[2]; + struct ippoolm_t *member = NULL; struct apn_ctx *apn; - int rc; + int rc, num_addr, i; osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); @@ -550,55 +553,63 @@ memcpy(pdp->qos_neg.v, pdp->qos_req.v, pdp->qos_req.l); /* TODO */ pdp->qos_neg.l = pdp->qos_req.l; - if (in46a_from_eua(&pdp->eua, &addr)) { + memset(addr, 0, sizeof(addr)); + if ((num_addr = in46a_from_eua(&pdp->eua, addr)) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot decode EUA from MS/SGSN: %s\n", osmo_hexdump(pdp->eua.v, pdp->eua.l)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_UNKNOWN_PDP); return 0; } - if (addr.len == sizeof(struct in_addr)) { - /* does this APN actually have an IPv4 pool? */ - if (!apn_supports_ipv4(apn)) - goto err_wrong_af; + /* Allocate dynamic addresses from the pool */ + for (i = 0; i < num_addr; i++) { + if (addr[i].len == sizeof(struct in_addr)) { + /* does this APN actually have an IPv4 pool? */ + if (!apn_supports_ipv4(apn)) + goto err_wrong_af; - rc = ippool_newip(apn->v4.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - in46a_to_eua(&member->addr, &pdp->eua); + rc = ippool_newip(apn->v4.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + /* copy back */ + memcpy(&addr[i].v4.s_addr, &member->addr.v4, 4); + } else if (addr[i].len == sizeof(struct in6_addr)) { + + /* does this APN actually have an IPv6 pool? */ + if (!apn_supports_ipv6(apn)) + goto err_wrong_af; + + rc = ippool_newip(apn->v6.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + + /* IPv6 doesn't really send the real/allocated address at this point, but just + * the link-identifier which the MS shall use for router solicitation */ + /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ + memcpy(addr[i].v6.s6_addr, &member->addr.v6, 8); + /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ + memcpy(addr[i].v6.s6_addr+8, &member->addr.v6, 8); + } else + OSMO_ASSERT(0); + + pdp->peer[i] = member; + member->peer = pdp; + } + + in46a_to_eua(addr, num_addr, &pdp->eua); + + if (apn_supports_ipv4(apn)) { /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } - } else if (addr.len == sizeof(struct in6_addr)) { - struct in46_addr tmp; + } - /* does this APN actually have an IPv6 pool? */ - if (!apn_supports_ipv6(apn)) - goto err_wrong_af; - - rc = ippool_newip(apn->v6.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - - /* IPv6 doesn't really send the real/allocated address at this point, but just - * the link-identifier which the MS shall use for router solicitation */ - tmp.len = addr.len; - /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ - memcpy(tmp.v6.s6_addr, &member->addr.v6, 8); - /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ - memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); - in46a_to_eua(&tmp, &pdp->eua); - } else - OSMO_ASSERT(0); - - pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ pdp->priv = apn; - member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index 11ced24..6564a54 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -183,12 +183,17 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *own_ll_addr, const uint8_t *pack, unsigned len) { - struct ippoolm_t *member = pdp->peer; + struct ippoolm_t *member; const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; const struct icmpv6_hdr *ic6h = (struct icmpv6_hdr *) (pack + sizeof(*ip6h)); struct msgb *msg; OSMO_ASSERT(pdp); + + member = pdp->peer[0]; + OSMO_ASSERT(member); + if (member->addr.len == sizeof(struct in_addr)) /* ipv4v6 context */ + member = pdp->peer[1]; OSMO_ASSERT(member); if (len < sizeof(*ip6h)) { diff --git a/gtp/pdp.h b/gtp/pdp.h index f1d8ad6..b581952 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -26,6 +26,7 @@ #define PDP_EUA_ORG_IETF 0xF1 #define PDP_EUA_TYPE_v4 0x21 #define PDP_EUA_TYPE_v6 0x57 +#define PDP_EUA_TYPE_v4v6 0x8D /* GTP Information elements from 29.060 v3.9.0 7.7 Information Elements */ /* Also covers version 0. Note that version 0 6: QOS Profile was superceded * @@ -121,7 +122,7 @@ /* Parameters shared by all PDP context belonging to the same MS */ void *ipif; /* IP network interface */ - void *peer; /* Pointer to peer protocol */ + void *peer[2]; /* Pointer to peer protocol */ void *asap; /* Application specific service access point */ uint64_t imsi; /* International Mobile Subscriber Identity. */ diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..f4bb8a2 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -253,33 +253,66 @@ } } -/*! Convert given PDP End User Address to in46_addr - * \returns 0 on success; negative on error */ -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua) +/*! Convert given array of in46_addr to PDP End User Address + * \param[in] src Array containing 1 or 2 in46_addr + * \param[out] eua End User Address structure to fill + * \returns 0 on success; negative on error + * + * In case size is 2, this function expects to find exactly one IPv4 and one + * IPv6 addresses in src. */ +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua) { - switch (src->len) { - case 4: - eua->l = 6; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v4; - memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ - break; - case 8: - case 16: - eua->l = 18; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v6; - memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ - break; - default: - OSMO_ASSERT(0); - return -1; + const struct in46_addr *src_v4, *src_v6; + if (size == 1) { + switch (src->len) { + case 4: + eua->l = 6; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4; + memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ + break; + case 8: + case 16: + eua->l = 18; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v6; + memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ + break; + default: + OSMO_ASSERT(0); + return -1; + } + return 0; } + + if (src[0].len == src[1].len) + return -1; /* we should have a v4 and a v6 address */ + + src_v4 = (src[0].len == 4) ? &src[0] : &src[1]; + src_v6 = (src[0].len == 4) ? &src[1] : &src[0]; + + eua->l = 22; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4v6; + memcpy(&eua->v[2], &src_v4->v4, 4); + memcpy(&eua->v[6], &src_v6->v6, 16); + return 0; } -/*! Convert given in46_addr to PDP End User Address - * \returns 0 on success; negative on error */ +/*! Convert given PDP End User Address to an array of in46_addr + * \param[in] eua End User Address structure to parse + * \param[out] dst Array containing 2 in46_addr + * \returns number of parsed addresses (1 or 2) on success; negative on error + * + * This function expects to receive an End User Address struct together with an + * array of 2 zeroed in46_addr structs. The in46_addr structs are filled in + * order, hence if the function returns 1 the parsed address will be stored in + * the first struct and the second one will be left intact. If 2 is returned, it + * is guaranteed that one of them is an IPv4 and the other one is an IPv6, but + * the order in which they are presented is not specified and must be + * discovered for instance by checking the len field of each address. + */ int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst) { if (eua->l < 2) @@ -295,22 +328,46 @@ memcpy(&dst->v4, &eua->v[2], 4); /* Copy a 4 byte address */ else dst->v4.s_addr = 0; - break; + return 1; case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) memcpy(&dst->v6, &eua->v[2], 16); /* Copy a 16 byte address */ else memset(&dst->v6, 0, 16); - break; + return 1; + case PDP_EUA_TYPE_v4v6: + /* 3GPP TS 29.060, section 7.7.27 */ + switch (eua->l) { + case 2: /* v4 & v6 dynamic */ + dst[0].v4.s_addr = 0; + memset(&dst[1].v6, 0, 16); + break; + case 6: /* v4 static, v6 dynamic */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memset(&dst[1].v6, 0, 16); + break; + case 18: /* v4 dynamic, v6 static */ + dst[0].v4.s_addr = 0; + memcpy(&dst[1].v6, &eua->v[2], 16); + break; + case 22: /* v4 & v6 static */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memcpy(&dst[1].v6, &eua->v[6], 16); + break; + default: + return -1; + } + dst[0].len = 4; + dst[1].len = 16; + return 2; default: return -1; } - return 0; default_to_dyn_v4: /* assume dynamic IPv4 by default */ dst->len = 4; dst->v4.s_addr = 0; - return 0; + return 1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..e4654cc 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -29,5 +29,5 @@ extern int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen); unsigned int in46a_netmasklen(const struct in46_addr *netmask); -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua); +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..300183b 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1617,7 +1617,7 @@ /* Otherwise it is deallocated by gtplib */ pdp_newpdp(&pdp, myimsi, options.nsapi, NULL); - pdp->peer = &iparr[n]; + pdp->peer[0] = &iparr[n]; /* FIXME: support v4v6, have 2 peers */ pdp->ipif = tun; /* TODO */ iparr[n].pdp = pdp; diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index c0bb670..b22da16 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -137,7 +137,7 @@ #endif /* IPv4 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia4, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); @@ -154,7 +154,7 @@ printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); @@ -173,14 +173,14 @@ /* unspecified V4 */ memcpy(eua.v, v4_unspec, sizeof(v4_unspec)); eua.l = sizeof(v4_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); /* specified V4 */ memcpy(eua.v, v4_spec, sizeof(v4_spec)); eua.l = sizeof(v4_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); } @@ -278,19 +278,41 @@ }; struct ul66_t eua; - printf("testing in46a_to_eua() with IPv6 addresses\n"); + printf("Testing in46a_to_eua() with IPv6 addresses\n"); /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia6, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_to_eua_v4v6() { + const struct in46_addr ia_v4v6[2] = { + { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }, + { + .len = 4, + .v4.s_addr = 0x0d0c0b0a, + } + }; + struct ul66_t eua; + printf("Testing in46a_to_eua() with IPv4v6 addresses\n"); + + /* IPv4 address */ + OSMO_ASSERT(in46a_to_eua(ia_v4v6, 2, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4v6); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); + OSMO_ASSERT(!memcmp(&eua.v[6], &g_ia6.v6, 16)); } static void test_in46a_from_eua_v6(void) @@ -308,16 +330,65 @@ /* unspecified V6 */ memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); /* specified V6 */ memcpy(eua.v, v6_spec, sizeof(v6_spec)); eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_from_eua_v4v6(void) { + struct in46_addr ia[2]; + struct ul66_t eua; + const uint8_t v4_unspec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6 }; + const uint8_t v4_spec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4 }; + const uint8_t v4_unspec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + const uint8_t v4_spec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv4v6 addresses\n"); + + /* unspecified V4 & V6 */ + memcpy(eua.v, v4_unspec_v6_unspec, sizeof(v4_unspec_v6_unspec)); + eua.l = sizeof(v4_unspec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* specified V4, unspecified V6 */ + memcpy(eua.v, v4_spec_v6_unspec, sizeof(v4_spec_v6_unspec)); + eua.l = sizeof(v4_spec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* unspecified V4, specified V6 */ + memcpy(eua.v, v4_unspec_v6_spec, sizeof(v4_unspec_v6_spec)); + eua.l = sizeof(v4_unspec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_unspec_v6_spec+2, ia[1].len)); + + /* specified V4, specified V6 */ + memcpy(eua.v, v4_spec_v6_spec, sizeof(v4_spec_v6_spec)); + eua.l = sizeof(v4_spec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_spec_v6_spec+6, ia[1].len)); } static void test_in46a_netmasklen_v6(void) @@ -378,6 +449,8 @@ test_in46a_equal_v6(); test_in46a_to_eua_v6(); test_in46a_from_eua_v6(); + test_in46a_to_eua_v4v6(); + test_in46a_from_eua_v4v6(); test_in46a_netmasklen_v6(); } return 0; diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok index d092591..10dc7f4 100644 --- a/tests/lib/in46a_v6_test.ok +++ b/tests/lib/in46a_v6_test.ok @@ -3,6 +3,8 @@ Testing in46a_ntop() with IPv6 addresses res = 102:304:506:708:90a:b0c:d0e:f10 Testing in46a_equal() with IPv6 addresses -testing in46a_to_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv6 addresses Testing in46a_from_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv4v6 addresses +Testing in46a_from_eua() with IPv4v6 addresses Testing in46a_netmasklen() with IPv6 addresses -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 10:44:52 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 10:44:52 +0000 Subject: osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:13:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:13:09 +0000 Subject: [PATCH] osmo-bsc[master]: Generate SI2ter Rest Octets Message-ID: Review at https://gerrit.osmocom.org/5269 Generate SI2ter Rest Octets Previously we simply omitted SI2ter Rest Octets which is spec violation which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix this by generating empty 'no rest octets' with proper padding. Adjust test output accordingly. Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Fixes: OS#2711 --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/5269/1 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 876e0ab..ba25b6d 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -9,6 +9,7 @@ /* generate SI1 rest octets */ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); +int rest_octets_si2ter(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index 7c6d7cd..05d8b2a 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -461,6 +461,22 @@ bitvec_set_bit(bv, L); } +/* Generate SIeter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ +int rest_octets_si2ter(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 4; + + /* No SI2ter_MP_CHANGE_MARK */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index c1b0d49..4575454 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -764,7 +764,10 @@ if (!n) bts->si_valid &= ~(1 << SYSINFO_TYPE_2ter); - return sizeof(*si2t); + /* SI2ter Rest Octets as per 3GPP TS 44.018 ?10.5.2.33a */ + rc = rest_octets_si2ter(si2t->rest_octets); + + return sizeof(*si2t) + rc; } /* SI2quater messages are optional - we only generate them when neighbor UARFCNs or EARFCNs are configured */ diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 889f001..868cd9b 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -204,7 +204,7 @@ Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5269 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:16:32 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 11:16:32 +0000 Subject: [PATCH] python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 Message-ID: Review at https://gerrit.osmocom.org/5270 osmo_ctrl.py: Set shebang to use python v2 Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 --- M osmopy/osmo_ctrl.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/70/5270/1 diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..2b8c4be 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:26:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:26:30 +0000 Subject: [PATCH] osmo-bsc[master]: fi Message-ID: Review at https://gerrit.osmocom.org/5271 fi Change-Id: I02ba838a17e5da37529d84efc6520629c8e06c5f --- M src/libbsc/rest_octets.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/71/5271/1 diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index 05d8b2a..b8a29ba 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -461,7 +461,7 @@ bitvec_set_bit(bv, L); } -/* Generate SIeter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ +/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ int rest_octets_si2ter(uint8_t *data) { struct bitvec bv; -- To view, visit https://gerrit.osmocom.org/5271 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02ba838a17e5da37529d84efc6520629c8e06c5f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:26:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:26:30 +0000 Subject: [PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation Message-ID: Review at https://gerrit.osmocom.org/5272 Fix SI2bis Rest Octets generation According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/1 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..c323e42 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:28:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:28:01 +0000 Subject: [PATCH] osmo-bsc[master]: Generate SI2ter Rest Octets In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5269 to look at the new patch set (#2). Generate SI2ter Rest Octets Previously we simply omitted SI2ter Rest Octets which is spec violation which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix this by generating empty 'no rest octets' with proper padding. Adjust test output accordingly. Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Fixes: OS#2711 --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/5269/2 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 876e0ab..ba25b6d 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -9,6 +9,7 @@ /* generate SI1 rest octets */ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); +int rest_octets_si2ter(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index 7c6d7cd..b8a29ba 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -461,6 +461,22 @@ bitvec_set_bit(bv, L); } +/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ +int rest_octets_si2ter(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 4; + + /* No SI2ter_MP_CHANGE_MARK */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index c1b0d49..4575454 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -764,7 +764,10 @@ if (!n) bts->si_valid &= ~(1 << SYSINFO_TYPE_2ter); - return sizeof(*si2t); + /* SI2ter Rest Octets as per 3GPP TS 44.018 ?10.5.2.33a */ + rc = rest_octets_si2ter(si2t->rest_octets); + + return sizeof(*si2t) + rc; } /* SI2quater messages are optional - we only generate them when neighbor UARFCNs or EARFCNs are configured */ diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 889f001..868cd9b 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -204,7 +204,7 @@ Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5269 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:28:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:28:01 +0000 Subject: [PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation In-Reply-To: References: Message-ID: Fix SI2bis Rest Octets generation According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/2 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..c323e42 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:28:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:28:48 +0000 Subject: [ABANDON] osmo-bsc[master]: fi In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: fi ...................................................................... Abandoned Mistake submission. -- To view, visit https://gerrit.osmocom.org/5271 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I02ba838a17e5da37529d84efc6520629c8e06c5f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:30:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:30:01 +0000 Subject: [PATCH] osmo-bsc[master]: Fix SI2bis Rest Octets generation In-Reply-To: References: Message-ID: Fix SI2bis Rest Octets generation According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Related: OS#2711 Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/3 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..c323e42 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 11 11:31:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 11:31:23 +0000 Subject: [PATCH] osmo-bsc[master]: Generate SI2bis Rest Octets In-Reply-To: References: Message-ID: Generate SI2bis Rest Octets According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Related: OS#2711 Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/4 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..c323e42 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SIbis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:29:07 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 12:29:07 +0000 Subject: [PATCH] osmo-bts[master]: Fix malformed Resource Indication packet Message-ID: Review at https://gerrit.osmocom.org/5273 Fix malformed Resource Indication packet Wireshark was showing a Malformed packet alert, and further ivnestigation showed that "Resource Information" TLV was missing in the packet. See GSM 08.58 sections 8.6.1 and 9.3.21 for more information. Indicating interference level is not yet implemented, but at least now we avoid sending a malformed packet. Patch has been validated against a running setup with wireshark in my local PC. Related: OS#2735 Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a --- M src/common/rsl.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/5273/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 60f964e..88e240a 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -252,6 +252,7 @@ if (!nmsg) return -ENOMEM; // FIXME: add interference levels of TRX + msgb_tlv_put(nmsg, RSL_IE_RESOURCE_INFO, 0, NULL); rsl_trx_push_hdr(nmsg, RSL_MT_RF_RES_IND); nmsg->trx = trx; -- To view, visit https://gerrit.osmocom.org/5273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:31:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 12:31:33 +0000 Subject: osmo-bts[master]: Fix malformed Resource Indication packet In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:35:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 11 Dec 2017 12:35:55 +0000 Subject: osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB In-Reply-To: References: Message-ID: Patch Set 1: > I think qthis is just a hack that clutters around the assumption > that there is always only one lac per RNC :/ ok hold on, the RNC ID identifies the HNB-GW, not the RNC inside the hNodeB, right? Looking at 25.469 9.2.26 RNC-ID Uniquely identifies the HNB-GW towards the CN on a particular Iu interface. I was pretty sure that each hNodeB has its own RNC Id and was a bit confused why the hnbgw has to deal one out. So the real solution then is in the iu client code to be able to manage several LACs per RNC Id, i.e. being able to connect multiple HNBGW each having one RNC Id, each in turn being able to serve multiple hNodeBs with a different LAC each... -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:46:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:46:55 +0000 Subject: osmo-bts[master]: Fix malformed Resource Indication packet In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:46:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:46:57 +0000 Subject: [MERGED] osmo-bts[master]: Fix malformed Resource Indication packet In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix malformed Resource Indication packet ...................................................................... Fix malformed Resource Indication packet Wireshark was showing a Malformed packet alert, and further ivnestigation showed that "Resource Information" TLV was missing in the packet. See GSM 08.58 sections 8.6.1 and 9.3.21 for more information. Indicating interference level is not yet implemented, but at least now we avoid sending a malformed packet. Patch has been validated against a running setup with wireshark in my local PC. Related: OS#2735 Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a --- M src/common/rsl.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 60f964e..88e240a 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -252,6 +252,7 @@ if (!nmsg) return -ENOMEM; // FIXME: add interference levels of TRX + msgb_tlv_put(nmsg, RSL_IE_RESOURCE_INFO, 0, NULL); rsl_trx_push_hdr(nmsg, RSL_MT_RF_RES_IND); nmsg->trx = trx; -- To view, visit https://gerrit.osmocom.org/5273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:48:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:48:06 +0000 Subject: osmo-bsc[master]: Generate SI2ter Rest Octets In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5269 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:48:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:48:35 +0000 Subject: osmo-bsc[master]: Generate SI2bis Rest Octets In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:48:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:48:39 +0000 Subject: [MERGED] osmo-bsc[master]: Generate SI2ter Rest Octets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Generate SI2ter Rest Octets ...................................................................... Generate SI2ter Rest Octets Previously we simply omitted SI2ter Rest Octets which is spec violation which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix this by generating empty 'no rest octets' with proper padding. Adjust test output accordingly. Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Fixes: OS#2711 --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 22 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index 876e0ab..ba25b6d 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -9,6 +9,7 @@ /* generate SI1 rest octets */ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); +int rest_octets_si2ter(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index 7c6d7cd..b8a29ba 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -461,6 +461,22 @@ bitvec_set_bit(bv, L); } +/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ +int rest_octets_si2ter(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 4; + + /* No SI2ter_MP_CHANGE_MARK */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index c1b0d49..4575454 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -764,7 +764,10 @@ if (!n) bts->si_valid &= ~(1 << SYSINFO_TYPE_2ter); - return sizeof(*si2t); + /* SI2ter Rest Octets as per 3GPP TS 44.018 ?10.5.2.33a */ + rc = rest_octets_si2ter(si2t->rest_octets); + + return sizeof(*si2t) + rc; } /* SI2quater messages are optional - we only generate them when neighbor UARFCNs or EARFCNs are configured */ diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 889f001..868cd9b 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -204,7 +204,7 @@ Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5269 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:49:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:49:02 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 1: why? -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:54:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:54:12 +0000 Subject: osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB In-Reply-To: References: Message-ID: Patch Set 1: > ok hold on, the RNC ID identifies the HNB-GW, not the RNC inside > the hNodeB, right? Looking at 25.469 9.2.26 > > RNC-ID Uniquely identifies the HNB-GW towards the CN on a > particular Iu interface. If that's what the spec states, then that's how it is. > I was pretty sure that each hNodeB has its own RNC Id and was a bit confused why the hnbgw has to deal one out. I think that's unrealistic, as you potentially have hundreds of thousands of femtocells, and the point of the HNB-GW is exactly to make the entire population of femtocells look as a classic UTRAN with a single or a few RNCs. > So the real solution then is in the iu client code to be able to > manage several LACs per RNC Id, i.e. being able to connect multiple > HNBGW each having one RNC Id, each in turn being able to serve > multiple hNodeBs with a different LAC each... I'm not sure they actually would need unique LAC's either. But I think at least in our case that's ok. -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:54:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:54:16 +0000 Subject: osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:55:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:55:40 +0000 Subject: libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Patch Set 17: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 17 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:55:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 12:55:58 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 1: > why? Because thescript is writen in python v2, and "python" points to "python3" in distros nowadays. Which means if I run it in the terminal with "./osmo_ctrl.py" it will fail because it will use python3 and it will find syntax errors in print. -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:56:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:56:42 +0000 Subject: osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Patch Set 1: let's give this one some testing before it gets merged. @pespin: do you want to give it a shot in osmo-gsm-tester? Or should we just mrge it and revert if we see unexpected trouble? -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:57:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:57:17 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: tests/power: remove unused var "ret" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: tests/power: remove unused var "ret" ...................................................................... cosmetic: tests/power: remove unused var "ret" remove unused variable "ret" in unit test "power" Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 --- M tests/power/power_test.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 3099217..295f638 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -39,7 +39,6 @@ struct gsm_bts_trx trx; struct gsm_bts_trx_ts ts; struct gsm_lchan *lchan; - int ret; memset(&bts, 0, sizeof(bts)); memset(&btsb, 0, sizeof(btsb)); -- To view, visit https://gerrit.osmocom.org/5212 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied484e3e2d3006eb0f03516ceaed3e0e802d51e4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:57:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:57:18 +0000 Subject: [MERGED] osmo-bts[master]: cosmetic: tests/agch: remove unused var "static_ilv" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: tests/agch: remove unused var "static_ilv" ...................................................................... cosmetic: tests/agch: remove unused var "static_ilv" remove unused const variable "static_ilv" from unit test "agch" Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 --- M tests/agch/agch_test.c 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 7c4e6cd..b5094af 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -31,10 +31,6 @@ static struct gsm_bts *bts; static struct gsm_bts_role_bts *btsb; -static const uint8_t static_ilv[] = { - 0x08, 0x59, 0x51, 0x30, 0x99, 0x00, 0x00, 0x00, 0x19 -}; - static int count_imm_ass_rej_refs(struct gsm48_imm_ass_rej *rej) { int count = 0; -- To view, visit https://gerrit.osmocom.org/5213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie724e2e5875020aa835b4cd57ab96966aee283e1 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:57:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:57:41 +0000 Subject: [MERGED] libosmocore[master]: Add functions for extended RACH coding In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add functions for extended RACH coding ...................................................................... Add functions for extended RACH coding Add support for extended RACH (11 bit) according 3GPP TS 45.003 ?5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548 --- M TODO-RELEASE M include/osmocom/coding/gsm0503_coding.h M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M src/gsm/libosmogsm.map M tests/coding/coding_test.c M tests/coding/coding_test.ok M tests/conv/conv_gsm0503_test.ok M utils/conv_codes_gsm.py 9 files changed, 30,850 insertions(+), 21 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/5062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Gerrit-PatchSet: 17 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:58:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:58:09 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 1: > > why? > > Because thescript is writen in python v2, and "python" points to > "python3" in distros nowadays. Which means if I run it in the > terminal with "./osmo_ctrl.py" it will fail because it will use > python3 and it will find syntax errors in print. I meant the reason should be in the commitlog. but nevermind. -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:58:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 12:58:12 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 12:59:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 12:59:23 +0000 Subject: osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Patch Set 1: > let's give this one some testing before it gets merged. @pespin: > do you want to give it a shot in osmo-gsm-tester? Or should we just > mrge it and revert if we see unexpected trouble? It's easier in terms of time for me to just merge it and revert if we see any problem. Otherwise I need to push it to a branch, build trials manually in a job, launch them in a job, etc. -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 13:04:09 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 13:04:09 +0000 Subject: [PATCH] python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5270 to look at the new patch set (#2). osmo_ctrl.py: Set shebang to use python v2 Nowadays bin/python usually points to python3, and this script is written in python2, which means if run directly from terminal it will fail with some print syntax errors. Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 --- M osmopy/osmo_ctrl.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/70/5270/2 diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..2b8c4be 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:05:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:05:04 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: Verify that BTS successfully connects to NITB In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: Verify that BTS successfully connects to NITB ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/2692 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1bbf9ac2b05d95a113ed4ad5e93093431496d44e Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:15:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:15:05 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API Message-ID: Review at https://gerrit.osmocom.org/5274 OsmoNitb: Introduce bts_is_connected API This can be used by tests to wait until bts is successfully connected to NITB. Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 --- M src/osmo_gsm_tester/osmo_nitb.py 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/74/5274/1 diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 6dd7342..48037a6 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -114,6 +114,13 @@ def mcc_mnc(self): return (self.mcc(), self.mnc()) + def bts_num(self, bts): + 'Provide number id used by OsmoNITB to identify configured BTS' + # We take advantage from the fact that VTY code assigns VTY in ascending + # order through the bts nodes found. As we populate the config iterating + # over this list, we have a 1:1 match in indexes. + return self.bts.index(bts) + def subscriber_add(self, modem, msisdn=None, algo=None): if msisdn is None: msisdn = self.suite_run.resources_pool.next_msisdn(modem) @@ -148,6 +155,9 @@ def imsi_list_attached(self): return OsmoNitbCtrl(self).subscriber_list_active() + def bts_is_connected(self, bts): + return OsmoNitbCtrl(self).bts_is_connected(self.bts_num(bts)) + def running(self): return not self.process.terminated() @@ -159,6 +169,8 @@ SUBSCR_DELETE_VAR = 'subscriber-delete-v1' SUBSCR_DELETE_REPLY_RE = re.compile("SET_REPLY (\d+) %s Removed" % SUBSCR_DELETE_VAR) SUBSCR_LIST_ACTIVE_VAR = 'subscriber-list-active-v1' + BTS_OML_STATE_VAR = "bts.%d.oml-connection-state" + BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) bts.\d+.oml-connection-state (?P\w+)") def __init__(self, nitb): self.nitb = nitb @@ -210,4 +222,19 @@ aslist_str = answer_str return aslist_str + def bts_is_connected(self, bts_num): + with self.ctrl() as ctrl: + ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num) + data = ctrl.receive() + while (len(data) > 0): + (answer, data) = ctrl.remove_ipa_ctrl_header(data) + answer_str = answer.decode('utf-8') + answer_str = answer_str.replace('\n', ' ') + res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str) + if res: + oml_state = str(res.group('oml_state')) + if oml_state == 'connected': + return True + return False + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5274 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:15:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:15:06 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API Message-ID: Review at https://gerrit.osmocom.org/5275 OsmoBsc: Introduce bts_is_connected API This can be used by tests to wait until bts is successfully connected to BSC. Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 --- M src/osmo_gsm_tester/osmo_bsc.py 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/75/5275/1 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 7424fb4..adea4ee 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import re import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -108,7 +109,45 @@ self.bts.append(bts) bts.set_bsc(self) + def bts_num(self, bts): + 'Provide number id used by OsmoNITB to identify configured BTS' + # We take advantage from the fact that VTY code assigns VTY in ascending + # order through the bts nodes found. As we populate the config iterating + # over this list, we have a 1:1 match in indexes. + return self.bts.index(bts) + + def bts_is_connected(self, bts): + return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts)) + def running(self): return not self.process.terminated() + +class OsmoBscCtrl(log.Origin): + PORT = 4249 + BTS_OML_STATE_VAR = "bts.%d.oml-connection-state" + BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) bts.\d+.oml-connection-state (?P\w+)") + + def __init__(self, bsc): + self.bsc = bsc + super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), OsmoBscCtrl.PORT)) + + def ctrl(self): + return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT) + + def bts_is_connected(self, bts_num): + with self.ctrl() as ctrl: + ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num) + data = ctrl.receive() + while (len(data) > 0): + (answer, data) = ctrl.remove_ipa_ctrl_header(data) + answer_str = answer.decode('utf-8') + answer_str = answer_str.replace('\n', ' ') + res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str) + if res: + oml_state = str(res.group('oml_state')) + if oml_state == 'connected': + return True + return False + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:15:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:15:06 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing Message-ID: Review at https://gerrit.osmocom.org/5276 suites: Wait for BTS to connect to BSC before continuing Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 --- M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/debug/interactive.py M suites/gprs/ping.py M suites/netreg/register.py M suites/netreg/register_default.py M suites/smpp/esme_ms_sms_storeforward.py M suites/smpp/esme_ms_sms_transaction.py M suites/sms/mo_mt_sms.py M suites/ussd/assert_extension.py M suites/voice/mo_mt_call.py 17 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/76/5276/1 diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 312083a..b08bac1 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -26,6 +26,8 @@ bsc.start() bts.start() +print('Waiting for bts to connect to bsc...') +wait(bsc.bts_is_connected, bts) print('Waiting for bts to be ready...') wait(bts.ready_for_pcu) pcu.start() diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 75614e2..6a06078 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 07293d2..d6c67ea 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index 190e5bb..b2c446f 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index 79c570e..9effe6d 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -32,6 +32,7 @@ mgw_bsc.start() bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) esme.connect() hlr.subscriber_add(ms) diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index e20b2b6..190879d 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -30,6 +30,7 @@ mgw_bsc.start() bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) esme.connect() hlr.subscriber_add(ms) diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 76b7e51..6ce460f 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -21,6 +21,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms_mo) hlr.subscriber_add(ms_mt) diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 181f07f..5969b01 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -22,6 +22,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms) diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 6df5b6d..595cfd9 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) for m in modems: nitb.subscriber_add(m) diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 46ab540..b1113d6 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -27,6 +27,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) print('Waiting for bts to be ready...') wait(bts.ready_for_pcu) pcu.start() diff --git a/suites/netreg/register.py b/suites/netreg/register.py index 9807d2b..d5fbeb7 100755 --- a/suites/netreg/register.py +++ b/suites/netreg/register.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/netreg/register_default.py b/suites/netreg/register_default.py index 797b2c1..545525d 100755 --- a/suites/netreg/register_default.py +++ b/suites/netreg/register_default.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/smpp/esme_ms_sms_storeforward.py b/suites/smpp/esme_ms_sms_storeforward.py index c35e3b1..391a040 100755 --- a/suites/smpp/esme_ms_sms_storeforward.py +++ b/suites/smpp/esme_ms_sms_storeforward.py @@ -22,6 +22,7 @@ nitb.smsc.esme_add(esme) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) esme.connect() nitb.subscriber_add(ms) diff --git a/suites/smpp/esme_ms_sms_transaction.py b/suites/smpp/esme_ms_sms_transaction.py index efc244c..adc9dae 100755 --- a/suites/smpp/esme_ms_sms_transaction.py +++ b/suites/smpp/esme_ms_sms_transaction.py @@ -20,6 +20,7 @@ nitb.smsc.esme_add(esme) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) esme.connect() nitb.subscriber_add(ms) diff --git a/suites/sms/mo_mt_sms.py b/suites/sms/mo_mt_sms.py index f729f99..10897ff 100755 --- a/suites/sms/mo_mt_sms.py +++ b/suites/sms/mo_mt_sms.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms_mo) nitb.subscriber_add(ms_mt) diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 77e5423..8ccab2d 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -11,6 +11,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index 46c5ec8..fa3b900 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -21,6 +21,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms_mo) hlr.subscriber_add(ms_mt) -- To view, visit https://gerrit.osmocom.org/5276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:05 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add basic CI integration Message-ID: Review at https://gerrit.osmocom.org/5277 Add basic CI integration Add jenkins.sh which perform trivial build/install tests with both python 2 to make sure we do not break smth accidentially. Note: python 3 tests require osmopy fixes so it will be implemented in follow-up patches. Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M .gitignore A contrib/jenkins.sh 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/1 diff --git a/.gitignore b/.gitignore index 766f495..e78ea1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ osmopython.egg-info/ +build/ diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..1bf22fc --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -ex + +rm -rf build + +python2 setup.py build +python2 setup.py install --root build/install.py2 + +# TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:05 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory Message-ID: Review at https://gerrit.osmocom.org/5278 Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 12 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..20a21c9 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl'] diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 3e147c4..76886ae 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:05 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging Message-ID: Review at https://gerrit.osmocom.org/5279 Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically fin package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 20a21c9..c94d70b 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl'] diff --git a/setup.py b/setup.py index 76886ae..533272e 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -33,7 +33,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:06 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility Message-ID: Review at https://gerrit.osmocom.org/5280 Fix python3 compatibility Use print() function with proper import. This is necesssary for proper python3 tests in local jenkins.sh Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmo_ctrl.py M osmopy/osmoutil.py 4 files changed, 23 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index c94d70b..9b38cfb 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..dd5affd 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:06 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add python 3 support to jenkins tests Message-ID: Review at https://gerrit.osmocom.org/5281 Add python 3 support to jenkins tests Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1 --- M contrib/jenkins.sh 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/81/5281/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 1bf22fc..d04bc47 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,7 +4,11 @@ rm -rf build +# FIXME: remove once python 2 support is deprecated python2 setup.py build python2 setup.py install --root build/install.py2 +python3 setup.py build +python3 setup.py install --root build/install + # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5281 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:41:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:41:20 +0000 Subject: [PATCH] osmo-ci[master]: Add osmo-python-tests to gerrit verification Message-ID: Review at https://gerrit.osmocom.org/5282 Add osmo-python-tests to gerrit verification Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/82/5282/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a7df5f3..12269fc 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -157,6 +157,8 @@ (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") + - osmo-python-tests + - osmo-sgsn: concurrent: true a1_name: IU -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:42:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:42:28 +0000 Subject: osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 This should be merged after https://gerrit.osmocom.org/#/c/5277/ -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:44:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:44:54 +0000 Subject: [PATCH] osmo-bsc[master]: Generate SI2bis Rest Octets In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5272 to look at the new patch set (#5). Generate SI2bis Rest Octets According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Related: OS#2711 Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/72/5272/5 diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..9f2b4c0 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:55:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 14:55:51 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: I've addressed the part regarding copy-pasted code. I can convert it to static c++ class if necessary although I'm no c++ expert - that's why I've opted for simple c-style array instead at first. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:57:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:57:04 +0000 Subject: python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/5278/1/osmopy/__init__.py File osmopy/__init__.py: Line 4: __all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_ctrl'] Shouldn't osmo_ctrl be moved too? AFAIU it's a script and not a lib. https://gerrit.osmocom.org/#/c/5278/1/setup.py File setup.py: Line 31: "scripts/osmo_verify_transcript_ctrl.py"] Do they end up installed in the same place as before? otherwise jobs using this scripts require changing some paths I guess. -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 14:58:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 14:58:54 +0000 Subject: python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Patch Set 1: Worth checking if there's any documenttion (README?) specifying dependencies required to build/install this repository. They may need updating. -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:02:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 15:02:51 +0000 Subject: python/osmo-python-tests[master]: Add python 3 support to jenkins tests In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5281/1/contrib/jenkins.sh File contrib/jenkins.sh: Line 12: python3 setup.py install --root build/install install.py3? -- To view, visit https://gerrit.osmocom.org/5281 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:02:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 15:02:58 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:03:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 15:03:06 +0000 Subject: python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:12:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 11 Dec 2017 15:12:12 +0000 Subject: libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node In-Reply-To: References: Message-ID: Patch Set 1: ah ok. I saw it as a convenient shorthand to set a couple of categories in a single line... -- To view, visit https://gerrit.osmocom.org/5254 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:12:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 11 Dec 2017 15:12:19 +0000 Subject: [ABANDON] libosmocore[master]: logging vty: add 'logging set-log-mask' command to log node In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: logging vty: add 'logging set-log-mask' command to log node ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5254 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iedd67750539b676271de0e0e9316d4e6f794406a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:14:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 15:14:04 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/5158/5/src/tbf.cpp File src/tbf.cpp: Line 478: tbf->stop_timers("freeing TBF"); This is pretty confusing. Can we rename this one to "stop_all_timers" ? Furthermore, afaiu the line above "stop_timer" can be removed because this line is removing all of them. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:15:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 15:15:36 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/5158/5/src/tbf.cpp File src/tbf.cpp: Line 478: tbf->stop_timers("freeing TBF"); > This is pretty confusing. Can we rename this one to "stop_all_timers" ? Fur That's fixed in follow-up patches which remove stop_timer() entirely. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:21:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 15:21:15 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3109 from 19s to 5s Message-ID: Review at https://gerrit.osmocom.org/5283 Reduce T3109 from 19s to 5s T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/5283/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a6c8198..ba3b217 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -266,7 +266,7 @@ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ +#define GSM_T3109_DEFAULT 5 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ #define GSM_T3113_DEFAULT 60 #define GSM_T3115_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 15:21:16 +0000 Subject: [PATCH] osmo-bsc[master]: paging.c: add more documentation on what the functions actua... Message-ID: Review at https://gerrit.osmocom.org/5284 paging.c: add more documentation on what the functions actually do This was created during code review towards some upcoming fix for OS#2736. However, it's not really related to that. Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc --- M src/libbsc/paging.c 1 file changed, 45 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/5284/1 diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index b8f9043..41e134d 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -121,6 +121,10 @@ paging_handle_pending_requests(paging_bts); } +/*! count the number of free channels for given RSL channel type required + * \param[in] BTS on which we shall count + * \param[in] rsl_type the RSL channel needed type + * \returns number of free channels matching \a rsl_type in \a bts */ static int can_send_pag_req(struct gsm_bts *bts, int rsl_type) { struct pchan_load pl; @@ -229,6 +233,7 @@ paging_handle_pending_requests(paging_bts); } +/*! initialize the bts paging state, if it hasn't been initialized yet */ static void paging_init_if_needed(struct gsm_bts *bts) { if (bts->paging.bts) @@ -243,6 +248,7 @@ bts->paging.available_slots = 20; } +/*! do we have any pending paging requests for given subscriber? */ static int paging_pending_request(struct gsm_bts_paging_state *bts, struct bsc_subscr *bsub) { @@ -256,6 +262,7 @@ return 0; } +/*! Call-back once T3113 (paging timeout) expires for given paging_request */ static void paging_T3113_expired(void *data) { struct gsm_paging_request *req = (struct gsm_paging_request *)data; @@ -285,6 +292,13 @@ } +/*! Start paging + paging timer for given subscriber on given BTS + * \param bts BTS on which to page + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * \returns 0 on success, negative on error */ static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -300,6 +314,7 @@ LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %s on bts %d.\n", bsc_subscr_name(bsub), bts->nr); req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); + OSMO_ASSERT(req); req->bsub = bsc_subscr_get(bsub); req->bts = bts; req->chan_type = type; @@ -313,6 +328,13 @@ return 0; } +/*! Handle PAGING request from MSC for one (matching) BTS + * \param bts BTS on which to page + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * returns 1 on success; 0 in case of error (e.g. TRX down) */ int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -332,6 +354,13 @@ return 1; } +/*! Receive a new PAGING request from the MSC + * \param network gsm_network we operate in + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * \returns number of BTSs on which we issued the paging */ int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -364,6 +393,13 @@ } +/*! Stop paging a given subscriber on a given BTS. + * If \a conn is non-NULL, we also call the paging call-back function + * to notify the paging originator that paging has completed. + * \param[in] bts BTS on which we shall stop paging + * \param[in] bsub subscriber which we shall stop paging + * \param[in] conn connection to the subscriber (if any) + * \param[in] msg message received from subscrbier (if any) */ /* we consciously ignore the type of the request here */ static void _paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub, struct gsm_subscriber_connection *conn, @@ -395,7 +431,11 @@ } } -/* Stop paging on all other bts' */ +/*! Stop paging on all other bts' + * \param[in] bts_list list of BTSs to iterate + * \param[in] _bts BTS which has received a paging response + * \param[in] bsub subscriber + * \param[in] msgb L3 message that we have received from \a bsub on \a _bts */ void paging_request_stop(struct llist_head *bts_list, struct gsm_bts *_bts, struct bsc_subscr *bsub, struct gsm_subscriber_connection *conn, @@ -418,6 +458,8 @@ } } + +/*! Update the BTS paging buffer slots on given BTS */ void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots) { paging_init_if_needed(bts); @@ -427,6 +469,7 @@ paging_schedule_if_needed(&bts->paging); } +/*! Count the number of pending paging requests on given BTS */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts) { unsigned int requests = 0; @@ -440,9 +483,7 @@ return requests; } -/** - * Find any paging data for the given subscriber at the given BTS. - */ +/*! Find any paging data for the given subscriber at the given BTS. */ void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub) { struct gsm_paging_request *req; -- To view, visit https://gerrit.osmocom.org/5284 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 15:21:16 +0000 Subject: [PATCH] osmo-bsc[master]: paging: Remove obsolete paging call-back support Message-ID: Review at https://gerrit.osmocom.org/5285 paging: Remove obsolete paging call-back support The call-back was needed inside the NITB to determine which part (CC, SMS, ...) had triggered a given paging. A pure BSC doesn't need that feature, so let's get rid of it. The 'void *cbfn_data' is replaced with a 'struct bsc_msc_data *', as all callers use it with that type. Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab --- M include/osmocom/bsc/paging.h M src/libbsc/paging.c M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_grace.c 4 files changed, 28 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/5285/1 diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index e917772..533f366 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -29,6 +29,8 @@ #include #include +struct bsc_msc_data; + /** * A pending paging request */ @@ -49,16 +51,15 @@ /* How often did we ask the BTS to page? */ int attempts; - /* callback to be called in case paging completes */ - gsm_cbfn *cbfn; - void *cbfn_param; + /* MSC that has issued this paging */ + struct bsc_msc_data *msc; }; /* schedule paging request */ -int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data); -int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data); +int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc); +int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc); /* stop paging requests */ void paging_request_stop(struct llist_head *bts_list, @@ -72,6 +73,6 @@ /* pending paging requests */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts); -void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub); +struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub); #endif diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 41e134d..f4679de 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -266,9 +266,6 @@ static void paging_T3113_expired(void *data) { struct gsm_paging_request *req = (struct gsm_paging_request *)data; - void *cbfn_param; - gsm_cbfn *cbfn; - int msg; log_set_context(LOG_CTX_BSC_SUBSCR, req->bsub); @@ -277,30 +274,19 @@ /* must be destroyed before calling cbfn, to prevent double free */ rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); - cbfn_param = req->cbfn_param; - cbfn = req->cbfn; - - /* did we ever manage to page the subscriber */ - msg = req->attempts > 0 ? GSM_PAGING_EXPIRED : GSM_PAGING_BUSY; /* destroy it now. Do not access req afterwards */ paging_remove_request(&req->bts->paging, req); - - if (cbfn) - cbfn(GSM_HOOK_RR_PAGING, msg, NULL, NULL, - cbfn_param); - } /*! Start paging + paging timer for given subscriber on given BTS * \param bts BTS on which to page * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * \returns 0 on success, negative on error */ -static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; @@ -318,8 +304,7 @@ req->bsub = bsc_subscr_get(bsub); req->bts = bts; req->chan_type = type; - req->cbfn = cbfn; - req->cbfn_param = data; + req->msc = msc; osmo_timer_setup(&req->T3113, paging_T3113_expired, req); osmo_timer_schedule(&req->T3113, bts->network->T3113, 0); llist_add_tail(&req->entry, &bts_entry->pending_requests); @@ -332,11 +317,10 @@ * \param bts BTS on which to page * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * returns 1 on success; 0 in case of error (e.g. TRX down) */ -int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { int rc; @@ -348,7 +332,7 @@ paging_init_if_needed(bts); /* Trigger paging, pass any error to the caller */ - rc = _paging_request(bts, bsub, type, cbfn, data); + rc = _paging_request(bts, bsub, type, msc); if (rc < 0) return rc; return 1; @@ -358,11 +342,10 @@ * \param network gsm_network we operate in * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * \returns number of BTSs on which we issued the paging */ -int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { struct gsm_bts *bts = NULL; int num_pages = 0; @@ -377,7 +360,7 @@ if (!bts) break; - rc = paging_request_bts(bts, bsub, type, cbfn, data); + rc = paging_request_bts(bts, bsub, type, msc); if (rc < 0) { paging_request_stop(&network->bts_list, NULL, bsub, NULL, NULL); @@ -413,19 +396,9 @@ llist_for_each_entry_safe(req, req2, &bts_entry->pending_requests, entry) { if (req->bsub == bsub) { - gsm_cbfn *cbfn = req->cbfn; - void *param = req->cbfn_param; - /* now give up the data structure */ paging_remove_request(&bts->paging, req); - req = NULL; - - if (conn && cbfn) { - LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d, calling cbfn.\n", bsub->imsi, bts->nr); - cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, conn, param); - } else - LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d silently.\n", bsub->imsi, bts->nr); + LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d\n", bsub->imsi, bts->nr); break; } } @@ -484,13 +457,13 @@ } /*! Find any paging data for the given subscriber at the given BTS. */ -void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub) +struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub) { struct gsm_paging_request *req; llist_for_each_entry(req, &bts->paging.pending_requests, entry) if (req->bsub == bsub) - return req->cbfn_param; + return req->msc; return NULL; } diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 7f9671a..2b71b85 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -186,7 +186,7 @@ return NULL; } - pag_msc = paging_get_data(conn->bts, subscr); + pag_msc = paging_get_msc(conn->bts, subscr); bsc_subscr_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { diff --git a/src/osmo-bsc/osmo_bsc_grace.c b/src/osmo-bsc/osmo_bsc_grace.c index a310079..f16a19a 100644 --- a/src/osmo-bsc/osmo_bsc_grace.c +++ b/src/osmo-bsc/osmo_bsc_grace.c @@ -42,12 +42,12 @@ struct gsm_bts *bts; llist_for_each_entry(bts, &msc->network->bts_list, list) - paging_request_bts(bts, subscr, chan_needed, NULL, msc); + paging_request_bts(bts, subscr, chan_needed, msc); return 0; } - return paging_request(msc->network, subscr, chan_needed, NULL, msc); + return paging_request(msc->network, subscr, chan_needed, msc); } static int locked_paging(struct bsc_subscr *subscr, int chan_needed, @@ -73,7 +73,7 @@ /* * now page on this bts */ - paging_request_bts(bts, subscr, chan_needed, NULL, msc); + paging_request_bts(bts, subscr, chan_needed, msc); }; /* All bts are either off or in the grace period */ -- To view, visit https://gerrit.osmocom.org/5285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:21:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 15:21:16 +0000 Subject: [PATCH] osmo-bsc[master]: paging: Stop all paging if MSC sends us BSSMAP RESET Message-ID: Review at https://gerrit.osmocom.org/5286 paging: Stop all paging if MSC sends us BSSMAP RESET When the MSC has lost its state and issues a RESET, we should not only clear all ongoing radio connections, but we should also stop any paging. There's no point in paging a subscriber if the MSC doesn't know about this paging anymore. Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Closes: OS#2736 --- M include/osmocom/bsc/paging.h M src/libbsc/paging.c M src/osmo-bsc/osmo_bsc_bssap.c 3 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/5286/1 diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index 533f366..2b1bc50 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -75,4 +75,7 @@ struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub); +void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc); +void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc); + #endif diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index f4679de..8d54d0a 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -467,3 +467,26 @@ return NULL; } + +/*! Flush all paging requests at a given BTS for a given MSC*/ +void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc) +{ + struct gsm_paging_request *req, *req2; + + llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { + if (msc && req->msc != msc) + continue; + /* now give up the data structure */ + LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d (flush).\n", req->bsub->imsi, bts->nr); + paging_remove_request(&bts->paging, req); + } +} + +/*! Flush all paging requests issued by \a msc on any BTS in \a net */ +void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc) +{ + struct gsm_bts *bts; + + llist_for_each_entry(bts, &net->bts_list, list) + paging_flush_bts(bts, msc); +} diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 73776ad..051b74e 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -218,6 +218,9 @@ * close all active channels on the BTS side as well */ osmo_bsc_sigtran_reset(msc); + /* Drop all ongoing paging requests that this MSC has created on any BTS */ + paging_flush_network(msc->network, msc); + /* Inform the MSC that we have received the reset request and * that we acted accordingly */ osmo_bsc_sigtran_tx_reset_ack(msc); -- To view, visit https://gerrit.osmocom.org/5286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:22:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 11 Dec 2017 15:22:30 +0000 Subject: libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5252/1/include/osmocom/core/utils.h File include/osmocom/core/utils.h: Line 23: #define OSMO_STRINGIFY_VAL(x) OSMO_STRINGIFY(x) > That look odd. Why can't simply use OSMO_STRINGIFY(x) directly? see the note above to OSMO_STRINGIFY: * Note: if nested within another preprocessor macro, this will * stringify the value of x instead of its name. */ it's due to macro expansion magic ... sometimes the #x stringifies the macro name, sometimes the macro has already been resolved to its value, and then #x hits. It's quite voodoo and I wish it weren't so, but there you go. -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 15:24:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 11 Dec 2017 15:24:29 +0000 Subject: libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... In-Reply-To: References: Message-ID: Patch Set 1: -Code-Review -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:00:36 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 16:00:36 +0000 Subject: [PATCH] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5275 to look at the new patch set (#2). OsmoBsc: Introduce bts_is_connected API This can be used by tests to wait until bts is successfully connected to BSC. Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 --- M src/osmo_gsm_tester/osmo_bsc.py 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/75/5275/2 diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 7424fb4..2c909bc 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import re import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -108,7 +109,45 @@ self.bts.append(bts) bts.set_bsc(self) + def bts_num(self, bts): + 'Provide number id used by OsmoNITB to identify configured BTS' + # We take advantage from the fact that VTY code assigns VTY in ascending + # order through the bts nodes found. As we populate the config iterating + # over this list, we have a 1:1 match in indexes. + return self.bts.index(bts) + + def bts_is_connected(self, bts): + return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts)) + def running(self): return not self.process.terminated() + +class OsmoBscCtrl(log.Origin): + PORT = 4249 + BTS_OML_STATE_VAR = "bts.%d.oml-connection-state" + BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) bts.\d+.oml-connection-state (?P\w+)") + + def __init__(self, bsc): + self.bsc = bsc + super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), OsmoBscCtrl.PORT)) + + def ctrl(self): + return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT) + + def bts_is_connected(self, bts_num): + with self.ctrl() as ctrl: + ctrl.do_get(OsmoBscCtrl.BTS_OML_STATE_VAR % bts_num) + data = ctrl.receive() + while (len(data) > 0): + (answer, data) = ctrl.remove_ipa_ctrl_header(data) + answer_str = answer.decode('utf-8') + answer_str = answer_str.replace('\n', ' ') + res = OsmoBscCtrl.BTS_OML_STATE_RE.match(answer_str) + if res: + oml_state = str(res.group('oml_state')) + if oml_state == 'connected': + return True + return False + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:38:26 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 11 Dec 2017 16:38:26 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 3: > At least I think that would make a lot of sense. > Also the enumwith the bit offsets could be put in > a header file so others can use it. Sure, I am a potential user of this feature for the MS side ;) -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:54:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:54:20 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 3: I think if Vadim wants to use it on the MS side, then it should go into libosmocodec or the like, at elast the ecu_fr.[ch] code. -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:54:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:54:39 +0000 Subject: osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:54:41 +0000 Subject: osmo-bsc[master]: paging.c: add more documentation on what the functions actua... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5284 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:54:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:54:44 +0000 Subject: osmo-bsc[master]: paging: Remove obsolete paging call-back support In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:54:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:54:54 +0000 Subject: osmo-bsc[master]: paging: Stop all paging if MSC sends us BSSMAP RESET In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:55:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 11 Dec 2017 16:55:17 +0000 Subject: osmo-bsc[master]: Reduce T3109 from 19s to 5s In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 let's keep this on hold for some more testing -- To view, visit https://gerrit.osmocom.org/5283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 16:57:40 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 11 Dec 2017 16:57:40 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 3: Thanks, Harald! @dexter, just let me know if I can help you with that. -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:51 +0000 Subject: [PATCH] meta-telephony[201705]: Set up osmocom recipes to current git master Message-ID: Review at https://gerrit.osmocom.org/5287 Set up osmocom recipes to current git master This set of revisions together with next set of patches has been tested in a sysmobts-v2 locally. Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 --- M recipes-misc/libsmpp/libsmpp34_git.bb M recipes-osmocom/libasn1c/libasn1c_git.bb M recipes-osmocom/libosmo-abis/libosmo-abis_git.bb M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/libosmocore/libosmocore_git.bb M recipes-osmocom/openbsc/openbsc_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb M recipes-osmocom/osmo-msc/osmo-msc_git.bb M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb 14 files changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/87/5287/1 diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index 235c908..ce39cff 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -6,7 +6,7 @@ DEPENDS = "libxml2" S = "${WORKDIR}/git" -SRCREV = "84f2905c5bfed2e1f5bae52a2bb9bc771fd8b895" +SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8" SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" PV = "1.10+gitr${SRCPV}" PR = "r1" diff --git a/recipes-osmocom/libasn1c/libasn1c_git.bb b/recipes-osmocom/libasn1c/libasn1c_git.bb index 0d4800a..8554d70 100644 --- a/recipes-osmocom/libasn1c/libasn1c_git.bb +++ b/recipes-osmocom/libasn1c/libasn1c_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "aaae8c76496a97050264e4c49e539b0420496737" +SRCREV = "bd2173796d90db181c22034e4acbe391d2cb57ce" SRC_URI = "git://git.osmocom.org/libasn1c.git;protocol=git" PV = "0.9.28+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb index 6f9c2fd..4a07b20 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb +++ b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb @@ -3,7 +3,7 @@ DEPENDS += "libtalloc" S = "${WORKDIR}/git" -SRCREV = "01543a1ea392fa98974ea2f99cafbc28e9966656" +SRCREV = "d1dd22c38e86f123c8f9a93c2789deafdfcb9265" SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git" PV = "0.4.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb index 0e55628..a6f0e9b 100644 --- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb +++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb @@ -3,7 +3,7 @@ DEPENDS += "libtalloc lksctp-tools" S = "${WORKDIR}/git" -SRCREV = "59941982083f7f0d6ab11f7bbb42c297a3fb8d69" +SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323" SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git" PV = "0.4.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index a335993..c97ea1f 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "54fa75b85c91bb4bb79960942f63968f6423f6a5" +SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" PV = "0.7.0+gitr${SRCPV}" PR = "${INC_PR}.2" diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 5d702a3..f1d6bc0 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "657c5b6cadcef470c7ff9bffed3caab227026e6a" +SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.9.6+gitr${SRCPV}" PR = "r0" diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 59667f7..1547b8c 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -4,7 +4,7 @@ PRINC = "0" PR = "${INC_PR}.0" -SRCREV = "3ae8682f974058970fa564f09a34a51e867b896b" +SRCREV = "5d69fa52cf1e679e391519dd841da1579d640087" SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git" S = "${WORKDIR}/git/openbsc" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb index 234e054..d061c05 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb +++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "00c22464a0c1b51bb4b29efecab39e993224949c" +SRCREV = "4bd710d107786ecf838f568171a0175d157e809d" SRC_URI = "git://git.osmocom.org/osmo-bsc.git;protocol=git" PV = "1.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 3aafe13..597edd6 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -5,7 +5,7 @@ PV = "1.0.0+gitr${SRCPV}" PR = "r1" -SRCREV = "859f9b0752419d43928d465bc96a87238c6d7940" +SRCREV = "4f0343233b83337afa1e1dfb4bcf9d076ecd4be2" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ file://osmo-ggsn.init \ file://libgtp-queue_depth_32.patch \ diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb index 8a08d94..5beedd6 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb +++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "05c8b465ab2fe13edb67c95210a9b475f91ebeb3" +SRCREV = "43bd6069e83ff034dcaff4780891d0468e899b07" SRC_URI = "git://git.osmocom.org/osmo-hlr.git;protocol=git" PV = "0.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb index 821373d..8f694d3 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb +++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "5a3df8fa9ffc4400367250a0f9ff0e20dc4b5d3b" +SRCREV = "accb78000b6161d5f76eae24e625c01533001b89" SRC_URI = "git://git.osmocom.org/osmo-iuh.git;protocol=git" PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb index 1ea1a7b..34e286c 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb +++ b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "1c8d67d7f5f6f8788d92df65a0b68e0ec19a34dc" +SRCREV = "a330b864e58a5f899c5d8a155f3a788f8c3fb0d9" SRC_URI = "git://git.osmocom.org/osmo-mgw.git;protocol=git" PV = "1.0.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-msc/osmo-msc_git.bb b/recipes-osmocom/osmo-msc/osmo-msc_git.bb index 7d55237..3c271ea 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc_git.bb +++ b/recipes-osmocom/osmo-msc/osmo-msc_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "4e7ece0bd969389132d7babf8de4f57cf7d0126f" +SRCREV = "db8272921dec02e698c2e473ebe210908964c827" SRC_URI = "git://git.osmocom.org/osmo-msc.git;protocol=git" PV = "1.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb index e94618f..68c31f4 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "341d446b4db87b48812afe8d2149ebc840e8a357" +SRCREV = "b24af2bddf584b1f6d305efc5c5e762c32ae7251" SRC_URI = "git://git.osmocom.org/osmo-sgsn.git;protocol=git" PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" -- To view, visit https://gerrit.osmocom.org/5287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:53 +0000 Subject: [PATCH] meta-telephony[201705]: openbsc.git: Upstream binary now named osmo-bsc-sccplite Message-ID: Review at https://gerrit.osmocom.org/5288 openbsc.git: Upstream binary now named osmo-bsc-sccplite In Change-Id If10d1599b62d010726336134091a4e855c380d93, upstream osmocom.git has renamed osmo-bsc (and related config files, etc) to osmo-bsc-sccplite, so we don't have to rename it in the recipe anymore. Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 --- M recipes-osmocom/openbsc/openbsc.inc 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/88/5288/1 diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index e04911d..3c1b98f 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -11,7 +11,7 @@ file://osmo-bsc-sccplite.service \ " -INC_PR = "r23.${META_TELEPHONY_OSMO_INC}" +INC_PR = "r24.${META_TELEPHONY_OSMO_INC}" EXTRA_OECONF += "--enable-osmo-bsc --enable-mgcp-transcoding --with-g729" @@ -26,7 +26,7 @@ do_install_append() { install -d ${D}${sysconfdir}/osmocom install -m 0660 ${S}/doc/examples/osmo-nitb/nanobts/openbsc.cfg ${D}${sysconfdir}/osmocom/osmo-nitb.cfg - install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg + install -m 0660 ${S}/doc/examples/osmo-bsc-sccplite/osmo-bsc-sccplite.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg # Install sysv-init files install -d ${D}${sysconfdir}/init.d @@ -41,7 +41,6 @@ install -d ${D}/var/lib/osmocom - mv ${D}${bindir}/osmo-bsc ${D}${bindir}/osmo-bsc-sccplite } PACKAGES =+ "osmo-bsc-sccplite osmo-nitb" -- To view, visit https://gerrit.osmocom.org/5288 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:53 +0000 Subject: [PATCH] meta-telephony[201705]: Update PV for osmocom recipes Message-ID: Review at https://gerrit.osmocom.org/5289 Update PV for osmocom recipes Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 --- M recipes-misc/libsmpp/libsmpp34_git.bb M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/libosmocore/libosmocore_git.bb M recipes-osmocom/openbsc/openbsc_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb M recipes-osmocom/osmo-msc/osmo-msc_git.bb M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb 12 files changed, 14 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/89/5289/1 diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index ce39cff..245cd43 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -17,4 +17,3 @@ PACKAGES =+ "${PN}-apps" FILES_${PN}-apps = "${bindir}/*" - diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb index a6f0e9b..094efbc 100644 --- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb +++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb @@ -5,5 +5,5 @@ S = "${WORKDIR}/git" SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323" SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git" -PV = "0.4.0+gitr${SRCPV}" -PR = "${INC_PR}.0" +PV = "0.1.1+gitr${SRCPV}" +PR = "${INC_PR}.1" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index c97ea1f..23a97eb 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -3,8 +3,8 @@ S = "${WORKDIR}/git" SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" -PV = "0.7.0+gitr${SRCPV}" -PR = "${INC_PR}.2" +PV = "0.8.1+gitr${SRCPV}" +PR = "${INC_PR}.0" # we require the tests to link to the static libosmo-sigtran library to # access symbols not starting with osmo_* diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index f1d6bc0..3d731f5 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -3,7 +3,7 @@ S = "${WORKDIR}/git" SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" -PV = "0.9.6+gitr${SRCPV}" +PV = "0.10.2+gitr${SRCPV}" PR = "r0" DEPENDS += "libtalloc" diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 1547b8c..59150d8 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -1,6 +1,6 @@ require ${PN}.inc -PV = "0.15.0+gitr${SRCPV}" +PV = "1.0.0+gitr${SRCPV}" PRINC = "0" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb index d061c05..d04c60f 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb +++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "4bd710d107786ecf838f568171a0175d157e809d" SRC_URI = "git://git.osmocom.org/osmo-bsc.git;protocol=git" -PV = "1.0.1+gitr${SRCPV}" +PV = "1.1.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 597edd6..969c4bf 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -2,8 +2,8 @@ HOMEPAGE = "https://osmocom.org/projects/openggsn" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" -PV = "1.0.0+gitr${SRCPV}" -PR = "r1" +PV = "1.1.0+gitr${SRCPV}" +PR = "r0" SRCREV = "4f0343233b83337afa1e1dfb4bcf9d076ecd4be2" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb index 5beedd6..dccb5b5 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb +++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "43bd6069e83ff034dcaff4780891d0468e899b07" SRC_URI = "git://git.osmocom.org/osmo-hlr.git;protocol=git" -PV = "0.0.1+gitr${SRCPV}" +PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb index 8f694d3..16c36ed 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb +++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "accb78000b6161d5f76eae24e625c01533001b89" SRC_URI = "git://git.osmocom.org/osmo-iuh.git;protocol=git" -PV = "0.1.0+gitr${SRCPV}" +PV = "0.2.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb index 34e286c..14792d9 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb +++ b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "a330b864e58a5f899c5d8a155f3a788f8c3fb0d9" SRC_URI = "git://git.osmocom.org/osmo-mgw.git;protocol=git" -PV = "1.0.2+gitr${SRCPV}" +PV = "1.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-msc/osmo-msc_git.bb b/recipes-osmocom/osmo-msc/osmo-msc_git.bb index 3c271ea..7af56f7 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc_git.bb +++ b/recipes-osmocom/osmo-msc/osmo-msc_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "db8272921dec02e698c2e473ebe210908964c827" SRC_URI = "git://git.osmocom.org/osmo-msc.git;protocol=git" -PV = "1.0.1+gitr${SRCPV}" +PV = "1.1.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb index 68c31f4..625c4d3 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "b24af2bddf584b1f6d305efc5c5e762c32ae7251" SRC_URI = "git://git.osmocom.org/osmo-sgsn.git;protocol=git" -PV = "0.1.0+gitr${SRCPV}" +PV = "1.2.0+gitr${SRCPV}" PR = "${INC_PR}.0" -- To view, visit https://gerrit.osmocom.org/5289 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:53 +0000 Subject: [PATCH] meta-telephony[201705]: Remove libsmpp34_1.12.bb and use _git instead Message-ID: Review at https://gerrit.osmocom.org/5290 Remove libsmpp34_1.12.bb and use _git instead Same as we do for other osmocom recipes. Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd --- D recipes-misc/libsmpp/libsmpp34_1.12.bb M recipes-misc/libsmpp/libsmpp34_git.bb 2 files changed, 2 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/90/5290/1 diff --git a/recipes-misc/libsmpp/libsmpp34_1.12.bb b/recipes-misc/libsmpp/libsmpp34_1.12.bb deleted file mode 100644 index 406fa45..0000000 --- a/recipes-misc/libsmpp/libsmpp34_1.12.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "C Open SMPP library" -HOMEPAGE = "http://osmocom.org/projects/libsmpp34/" -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" -SECTION = "libs" -DEPENDS = "libxml2" - -S = "${WORKDIR}/git" -SRCREV = "6d47c170cccd8a72eae985c7ecffba3f07d3861a" -SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" -PR = "r1" - -PARALLEL_MAKE = "" - -inherit autotools pkgconfig - -PACKAGES =+ "${PN}-apps" -FILES_${PN}-apps = "${bindir}/*" - diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index 245cd43..73933c8 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -8,8 +8,8 @@ S = "${WORKDIR}/git" SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8" SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" -PV = "1.10+gitr${SRCPV}" -PR = "r1" +PV = "1.12+gitr${SRCPV}" +PR = "r0" PARALLEL_MAKE = "" -- To view, visit https://gerrit.osmocom.org/5290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:53 +0000 Subject: [PATCH] meta-telephony[201705]: libosmocore: depend on gnutls for compilation now Message-ID: Review at https://gerrit.osmocom.org/5291 libosmocore: depend on gnutls for compilation now Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 --- M recipes-osmocom/libosmocore/libosmocore_git.bb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/91/5291/1 diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 3d731f5..a3c18ba 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -4,9 +4,9 @@ SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.10.2+gitr${SRCPV}" -PR = "r0" +PR = "r1" -DEPENDS += "libtalloc" +DEPENDS += "libtalloc gnutls" PACKAGES =+ "libosmoctrl libosmocodec libosmogb libosmogsm libosmovty osmo-arfcn osmo-auc-gen" FILES_libosmoctrl = "${libdir}/libosmoctrl${SOLIBS}" -- To view, visit https://gerrit.osmocom.org/5291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:53 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:53 +0000 Subject: [PATCH] meta-telephony[201705]: osmo-mgw: Split packages and install osmo-mgw systemd service Message-ID: Review at https://gerrit.osmocom.org/5292 osmo-mgw: Split packages and install osmo-mgw systemd service Change-Id: I1b902842cf8766af1e58de76e46786213d222389 --- M recipes-osmocom/osmo-mgw/osmo-mgw.inc 1 file changed, 36 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/92/5292/1 diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 1b3362f..3294464 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -17,7 +17,41 @@ install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service ${D}${systemd_system_unitdir}/ + + install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg ${D}${sysconfdir}/osmocom/osmo-mgw.cfg + install -m 0644 ${S}/contrib/systemd/osmo-mgw.service ${D}${systemd_system_unitdir}/ } -SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" -CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" +PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp" +SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service" +SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service" + +FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}" +FILES_libosmo-legacy-mgcp-dev = " \ + ${includedir}/osmocom/legacy_mgcp \ + ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \ + ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}" +FILES_libosmo-mgcp-dev = " \ + ${includedir}/osmocom/mgcp \ + ${libdir}/pkgconfig/libosmo-mgcp.pc \ + ${libdir}/libosmo-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}" +FILES_libosmo-mgcp-client-dev = " \ + ${includedir}/osmocom/mgcp_client \ + ${libdir}/pkgconfig/libosmo-mgcp-client.pc \ + ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \ + " + +FILES_osmo-bsc-mgcp = " \ + ${bindir}/osmo-bsc_mgcp \ + ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ + ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ + " +CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" + +CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-mgw.cfg" -- To view, visit https://gerrit.osmocom.org/5292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:23:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:23:54 +0000 Subject: [PATCH] meta-telephony[201705]: osmo-sgsn: libosmo-sccp dep is only needed if building with ... Message-ID: Review at https://gerrit.osmocom.org/5293 osmo-sgsn: libosmo-sccp dep is only needed if building with iu support Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 --- M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/93/5293/1 diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 8ed6a10..25c6a25 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -3,14 +3,14 @@ LICENSE = "AGPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" -DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" +DEPENDS = "c-ares libpcap libosmocore libosmo-netif osmo-ggsn" INC_PR="r4.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'iu', d)}" -PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c osmo-iuh," +PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c libosmo-sccp osmo-iuh," do_install_append() { install -d ${D}${systemd_system_unitdir}/ -- To view, visit https://gerrit.osmocom.org/5293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:36:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 11 Dec 2017 17:36:49 +0000 Subject: meta-telephony[201705]: Set up osmocom recipes to current git master In-Reply-To: References: Message-ID: Patch Set 1: Reminder: At the same time of merging this patch series, we have to merge meta-sysmocom-bsp branch=pespin/201705 into 201705 -- To view, visit https://gerrit.osmocom.org/5287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 11 17:51:57 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Dec 2017 17:51:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual Message-ID: Review at https://gerrit.osmocom.org/5294 osmo-mgw: Add vty reference manual add missing vty reference manual for osmo-mgw Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 --- M Makefile A OsmoMGW/Makefile A OsmoMGW/osmomgw-vty-reference.xml A OsmoMGW/vty/mgw_vty_additions.xml A OsmoMGW/vty/mgw_vty_reference.xml 5 files changed, 1,789 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/94/5294/1 diff --git a/Makefile b/Makefile index 8261640..1fd0733 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) cd OsmocomBB; $(MAKE) + cd OsmoMGW; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -27,6 +28,7 @@ cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean cd OsmocomBB; $(MAKE) clean + cd OsmoMGW; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -42,6 +44,7 @@ cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload cd OsmocomBB; $(MAKE) upload + cd OsmoMGW; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -54,6 +57,7 @@ # These don't use asciidoc, so they have no 'make check' target: #cd OsmoMGCP; $(MAKE) check #cd OsmoNAT; $(MAKE) check + #cd OsmoMGW; $(MAKE) check cd OsmoGSMTester; $(MAKE) check cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check diff --git a/OsmoMGW/Makefile b/OsmoMGW/Makefile new file mode 100644 index 0000000..46c97e4 --- /dev/null +++ b/OsmoMGW/Makefile @@ -0,0 +1,6 @@ +TOPDIR = .. + +VTY_REFERENCE = osmomgw-vty-reference.xml +include $(TOPDIR)/build/Makefile.vty-reference.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmoMGW/osmomgw-vty-reference.xml b/OsmoMGW/osmomgw-vty-reference.xml new file mode 100644 index 0000000..ad30dbd --- /dev/null +++ b/OsmoMGW/osmomgw-vty-reference.xml @@ -0,0 +1,44 @@ + + + + +]> + + + + + + v1 + 13th August 2012 + hf + Initial + + + v2 + 5th March 2014 + hf + Update to match osmo-bsc version 0.13.0-305 + + + + OsmoMGCP VTY Reference + + + 2012-2014 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoMGW/vty/mgw_vty_additions.xml b/OsmoMGW/vty/mgw_vty_additions.xml new file mode 100644 index 0000000..a4c675e --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_additions.xml @@ -0,0 +1,2 @@ + + diff --git a/OsmoMGW/vty/mgw_vty_reference.xml b/OsmoMGW/vty/mgw_vty_reference.xml new file mode 100644 index 0000000..28eba81 --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_reference.xml @@ -0,0 +1,1733 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter From admin at opensuse.org Mon Dec 11 20:05:15 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Dec 2017 20:05:15 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a2ee5049fa43_5394d5cf50281165c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 156s] | #define HAVE_STRINGS_H 1 [ 156s] | #define HAVE_INTTYPES_H 1 [ 156s] | #define HAVE_STDINT_H 1 [ 156s] | #define HAVE_UNISTD_H 1 [ 156s] | #define HAVE_DLFCN_H 1 [ 156s] | #define LT_OBJDIR ".libs/" [ 156s] | #define BUILD_SMPP 1 [ 156s] | #define STDC_HEADERS 1 [ 156s] | #define HAVE_DBI_DBD_H 1 [ 156s] | #define HAVE_PCAP_PCAP_H 1 [ 156s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 156s] | [ 156s] | configure: exit 0 [ 156s] [ 156s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 156s] make[1]: *** [override_dh_auto_test] Error 1 [ 156s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 156s] debian/rules:13: recipe for target 'build' failed [ 156s] make: *** [build] Error 2 [ 156s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 156s] [ 156s] wildcard2 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 20:05:02 UTC 2017. [ 156s] [ 156s] ### VM INTERACTION START ### [ 159s] [ 146.474758] reboot: Power down [ 160s] ### VM INTERACTION END ### [ 160s] [ 160s] wildcard2 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 20:05:06 UTC 2017. [ 160s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 11 20:05:32 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Dec 2017 20:05:32 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a2ee524137af_5394d5cf50281186d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 154s] + /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf720a276] [ 154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x4ea5) [0x56642ea5] [ 154s] +DBI: -6: An invalid or out-of-range index was passed to libdbi [ 154s] +backtrace() returned 8 addresses [ 154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x58df) [0x566438df] [ 154s] + /usr/lib/i386-linux-gnu/libdbi.so.1(_error_handler+0x86) [0xf73aef16] [ 154s] + /usr/lib/i386-linux-gnu/libdbi.so.1(dbi_result_next_row+0x68) [0xf73b0bd8] [ 154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x92dc) [0x566472dc] [ 154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(main+0x459) [0x56642919] [ 154s] + /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf720a276] [ 154s] + /usr/src/packages/BUILD/openbsc/tests/db/db_test(+0x4ea5) [0x56642ea5] [ 154s]  [ 154s] \ No newline at end of file [ 154s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28) [ 154s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 154s] make[1]: *** [override_dh_auto_test] Error 1 [ 154s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 154s] debian/rules:13: recipe for target 'build' failed [ 154s] make: *** [build] Error 2 [ 154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 154s] [ 154s] lamb11 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 20:05:15 UTC 2017. [ 154s] [ 154s] ### VM INTERACTION START ### [ 156s] [ 148.342880] reboot: Power down [ 156s] ### VM INTERACTION END ### [ 156s] [ 156s] lamb11 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 20:05:19 UTC 2017. [ 156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 11 21:04:40 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Dec 2017 21:04:40 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a2ef2f6e0ea1_5394d5cf50283228c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 1117s] | configure:7731: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 1117s] | configure:7731: $? = 0 [ 1117s] | configure:7745: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 1117s] | conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory [ 1117s] | #include [ 1117s] | ^ [ 1117s] | compilation terminated. [ 1117s] | configure:7745: $? = 1 [ 1117s] | configure: failed program was: [ 1117s] | | /* confdefs.h */ [ 1117s] | | #define PACKAGE_NAME "openbsc" [ 1117s] | | #define PACKAGE_TARNAME "openbsc" [ 1117s] | | #define PACKAGE_VERSION "UNKNOWN" [ 1117s] | | #define PACKAGE_STRING "openbsc UNKNOWN" [ 1117s] | | #define PACKAGE_BUGREPORT "openbsc at lists.osmocom.org" [ 1117s] | | #define PACKAGE_URL "" [ 1117s] | | #define PACKAGE "openbsc" [ 1117s] | | #define VERSION "UNKNOWN" [ 1117s] | | /* end confdefs.h. */ [ 1117s] | | #include [ 1117s] | configure:7774: checking for ANSI C header files [ 1117s] | configure:7794: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 1117s] | configure:7794: $? = 0 [ 1119s] | conf[ 1058.733727] sysrq: SysRq : Power Off [ 1119s] [ 1058.744922] reboot: Power down [ 1120s] ### VM INTERACTION END ### [ 1120s] [ 1120s] obs-arm-3 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 21:04:25 UTC 2017. [ 1120s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 11 21:57:21 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 11 Dec 2017 21:57:21 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/3258/3/tests/lapd/lapd_test.c File tests/lapd/lapd_test.c: Line 365 Does the above assert hold true now? -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 11 22:08:14 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 11 Dec 2017 22:08:14 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: Why do we see ../../../ in the file names? We switched logging to __BASE_FILE__ to avoid this on src vs. build dir builds.. -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From admin at opensuse.org Mon Dec 11 22:44:15 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Dec 2017 22:44:15 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a2f0a4c9387e_5394d5cf5029397d3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 405s] | configure:14162: gcc -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c [ 405s] | conftest.c:27:21: fatal error: cdk/cdk.h: No such file or directory [ 405s] | #include [ 405s] | ^ [ 405s] | compilation terminated. [ 405s] | configure:14162: $? = 1 [ 405s] | configure: failed program was: [ 405s] | | /* confdefs.h */ [ 405s] | | #define PACKAGE_NAME "openbsc" [ 405s] | | #define PACKAGE_TARNAME "openbsc" [ 405s] | | #define PACKAGE_VERSION "UNKNOWN" [ 405s] | | #define PACKAGE_STRING "openbsc UNKNOWN" [ 405s] | | #define PACKAGE_BUGREPORT "openbsc at lists.osmocom.org" [ 405s] | | #define PACKAGE_URL "" [ 405s] | | #define PACKAGE "openbsc" [ 405s] | | #define VERSION "UNKNOWN" [ 405s] | | #define STDC_HEADERS 1 [ 405s] | | #define HAVE_SYS_TYPES_H 1 [ 405s] | | #define HAVE_SYS_STAT_H 1 [ 405s] | | #define HAVE_STDLIB_H 1 [ 405s] | | #define HAVE_STRING_H 1 [ 405s] | | #define HAVE_MEMORY_H 1 [ 405s] | | #define HAVE_STRINGS_H 1 [ 407s] | | #defin[ 386.669438] sysrq: SysRq : Power Off [ 407s] [ 386.671945] reboot: Power down [ 407s] ### VM INTERACTION END ### [ 407s] [ 407s] armbuild15 failed "build openbsc_1.0.0.20171211.dsc" at Mon Dec 11 22:44:13 UTC 2017. [ 407s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 12 04:59:36 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 12 Dec 2017 04:59:36 +0000 Subject: [PATCH] osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig... Message-ID: Review at https://gerrit.osmocom.org/5295 rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh The split build script also initilize the repository if it's empty and doesn't need any state of the osc repository. It also downloads bumpversion and limesuite Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 164 insertions(+), 69 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/95/5295/1 diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index c2b603b..8db2d57 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -1,84 +1,179 @@ -#!/bin/sh - +#!/bin/bash # requirements # apt install devscripts git-buildpackage osc git -# rather than including a dangerous 'rm -rf *' here, lets delegate to the user: -if [ -n "$(ls)" ]; then - echo "ERROR: I need to run in an empty directory." - exit 1 -fi +set -e +set -x if ! which osc >/dev/null 2>/dev/null ; then echo "osc binary not found" exit 1 fi - -set -x -e - -git clone git://git.osmocom.org/osmo-sip-connector -git clone git://git.osmocom.org/libosmocore -git clone git://git.osmocom.org/libosmo-sccp -git clone git://git.osmocom.org/libosmo-abis -git clone git://git.osmocom.org/libosmo-netif -git clone git://git.osmocom.org/libsmpp34 -git clone git://git.osmocom.org/libasn1c -git clone git://git.osmocom.org/libgtpnl -git clone git://git.osmocom.org/osmo-iuh -git clone git://git.osmocom.org/osmo-sgsn -git clone git://git.osmocom.org/osmo-ggsn -git clone git://git.osmocom.org/openbsc -git clone git://git.osmocom.org/osmo-pcap -git clone git://git.osmocom.org/osmo-trx -git clone git://git.osmocom.org/osmo-bts -git clone git://git.osmocom.org/osmo-pcu -git clone git://git.osmocom.org/osmo-hlr -git clone git://git.osmocom.org/osmo-mgw -git clone git://git.osmocom.org/osmo-msc -git clone git://git.osmocom.org/osmo-bsc - - +DT=$(date +%Y%m%d) PROJ=network:osmocom:nightly -osc co $PROJ -DT=`date +%Y%m%d` +### common +checkout() { + local name=$1 + local branch=$2 + local url="git://git.osmocom.org" + cd "$REPO" -build() { - rm -rf data - cd $1 - VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","", | sed s,")","",` - dch -v $VER.$DT -m "Snapshot build" - git commit -m "$DT snapshot" debian/ - gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data - cd ../$PROJ/$1 - osc rm * || true - mv ../../data/*.dsc . - mv ../../data/*.tar* . - osc add * - cd ../../ + if [ -n "$branch" ] ; then + git clone "$url/$name" -b "$branch" + else + git clone "$url/$name" + fi + + cd - } -build libosmocore -build libosmo-sccp -build libosmo-abis -build libosmo-netif -build libsmpp34 -build libasn1c -build libgtpnl -build osmo-iuh -build osmo-ggsn -build osmo-sgsn -build openbsc -build osmo-pcap -build osmo-trx -build osmo-sip-connector -build osmo-bts -build osmo-pcu -build osmo-hlr -build osmo-mgw -build osmo-msc -build osmo-bsc +### OBS build +prepare() { + # clean up the whole space + mkdir -p "$REPO/osc/" + cd "$REPO/osc" + osc co "$PROJ" +} -cd $PROJ -osc ci -m "Snapshot $DT" +build() { + local name=$1 + local changelog=$2 + local gitbpargs=$3 + local repodir=$REPO/$name + local oscdir=$REPO/osc/$PROJ/$name + + if [ -z "$changelog" ] ; then + changelog=commit + fi + + if [ -d "$oscdir" ] ; then + # remove earlier version + cd "$oscdir" + osc rm -- * || true + else + # new package + mkdir -p "$oscdir/" + cd "$REPO/osc/$PROJ/" + osc add "$name" + fi + + cd "$repodir" + + if [ "$changelog" = "commit" ] ; then + VER=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,' | sed 's,),,') + dch -v "$VER.$DT" -m "Snapshot build" + git commit -m "$DT snapshot" debian/ + fi + + mkdir -p "$DATA/$name" + # source code build without dependency checks and unsigned source and unsigned change log + gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" $gitbpargs + + mv "$DATA/$name/"*.tar* "$DATA/$name/"*.dsc "$oscdir/" + + cd "$oscdir" + osc add -- *.tar* *.dsc + osc ci -m "Snapshot $name $DT" +} + +post() { + cd "$REPO/osc/$PROJ/" + osc status +} + +download_bumpversion() { + # bumpversion is required for debian < 9/stretch + local oscdir=$REPO/osc/$PROJ/bumpversion + local version=0.5.3 + local release=3 + + if [ ! -d "$oscdir" ] ; then + mkdir "$oscdir" + cd "$oscdir" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.dsc" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version.orig.tar.gz" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.debian.tar.xz" + fi +} + +checkout_limesuite() { + TAG="v17.12.0" + + cd "$REPO" + git clone https://github.com/myriadrf/LimeSuite limesuite + cd limesuite + git checkout "$TAG" +} + +build_osmocom() { + BASE=$PWD + DATA=$BASE/data + REPO=$BASE/repo + + # rather than including a dangerous 'rm -rf *' here, lets delegate to the user: + if [ -n "$(ls)" ]; then + echo "ERROR: I need to run in an empty directory." + exit 1 + fi + + prepare + + checkout libosmocore + checkout libosmo-sccp + checkout libosmo-abis + checkout libosmo-netif + checkout libsmpp34 + checkout libasn1c + checkout libgtpnl + checkout osmo-iuh + checkout osmo-ggsn + checkout osmo-sgsn + checkout openbsc + checkout osmo-pcap + checkout osmo-trx + checkout osmo-sip-connector + checkout osmo-bts + checkout osmo-pcu + checkout osmo-hlr + checkout osmo-mgw + checkout osmo-msc + checkout osmo-bsc + checkout_limesuite + + build libosmocore + build libosmo-sccp + build libosmo-abis + build libosmo-netif + build libsmpp34 + build libasn1c + build libgtpnl + build osmo-iuh + build osmo-ggsn + build osmo-sgsn + build openbsc + build osmo-pcap + build osmo-trx + build osmo-sip-connector + build osmo-bts + build osmo-pcu + build osmo-hlr + build osmo-mgw + build osmo-msc + build osmo-bsc + + download_bumpversion + build limesuite no_commit --git-upstream-tree=v17.12.0 + + post +} + +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary is not installed" + exit 1 +fi + +TMPDIR=$(mktemp -d nightly-3g_XXXXXX) +cd "$TMPDIR" +build_osmocom -- To view, visit https://gerrit.osmocom.org/5295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Dec 12 08:23:36 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 08:23:36 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/3258/3/tests/lapd/lapd_test.c File tests/lapd/lapd_test.c: Line 365 > Does the above assert hold true now? It doesn't, as the IE L3 INFO is not added anymore to those messages used here as stated in GSM 08.58 (section 8.3 "Radio link layer management messages"). We actually have no msg->data[6] or 7 or 8 anymore. See how the first ASSERT in the function is changed to verify the IE L3 INFO is not added. -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 12 10:50:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 12 Dec 2017 10:50:31 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: On a related note: eventually this will be converted to osmo-fsm so we'll use the timers associated with it. The current solution is just temporary plug until we can undertake this conversion. Hence I'm not sure if it's worth the extra efforts to make it more c++. -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:25:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 11:25:12 +0000 Subject: [PATCH] meta-telephony[201705]: sdk: Add missing libosmotrau-dev after split from libosmo-abis Message-ID: Review at https://gerrit.osmocom.org/5296 sdk: Add missing libosmotrau-dev after split from libosmo-abis After splitting libosmotrau from libosmo-abis in 127bed3ceb41015d8fd36779689ab6d799f773f6, related libosmotrau dev were moved to its own package, which was not added to the include list for the SDK. As a result, somo-bts cannot be built anymore as it fails to find libosmotrau pkgconfig file, headers and shared object file. Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab --- M recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb M recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/96/5296/1 diff --git a/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb b/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb index dd5072b..2aed3f1 100644 --- a/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb +++ b/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb @@ -5,7 +5,7 @@ DESCRIPTION = "Software Development Kit for Osmocom devices" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -PR = "r5" +PR = "r6" ALLOW_EMPTY_${PN} = "1" diff --git a/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc b/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc index 0a3f1d4..5055689 100644 --- a/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc +++ b/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc @@ -5,6 +5,7 @@ libosmocore-dev \ libosmo-sccp-staticdev \ libosmo-abis-dev \ + libosmotrau-dev \ libgtp-dev \ libdbi-dev \ libsmpp34-dev \ -- To view, visit https://gerrit.osmocom.org/5296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:25:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:25:33 +0000 Subject: osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5294/1/OsmoMGW/osmomgw-vty-reference.xml File OsmoMGW/osmomgw-vty-reference.xml: PS1, Line 14: : : v1 : 13th August 2012 : hf : Initial : : : v2 : 5th March 2014 : hf : Update to match osmo-bsc version 0.13.0-305 : : copy + paste mistake. PS1, Line 29: smoMGCP VTY Reference copy and paste mistake -- To view, visit https://gerrit.osmocom.org/5294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:26:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:26:26 +0000 Subject: meta-telephony[201705]: Set up osmocom recipes to current git master In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:26:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:26:35 +0000 Subject: meta-telephony[201705]: openbsc.git: Upstream binary now named osmo-bsc-sccplite In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5288 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:26:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:26:49 +0000 Subject: meta-telephony[201705]: Update PV for osmocom recipes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5289 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:26:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:26:55 +0000 Subject: meta-telephony[201705]: Remove libsmpp34_1.12.bb and use _git instead In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:00 +0000 Subject: meta-telephony[201705]: libosmocore: depend on gnutls for compilation now In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:12 +0000 Subject: meta-telephony[201705]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:17 +0000 Subject: meta-telephony[201705]: osmo-sgsn: libosmo-sccp dep is only needed if building with ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:21 +0000 Subject: meta-telephony[201705]: sdk: Add missing libosmotrau-dev after split from libosmo-abis In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:38 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:40 +0000 Subject: python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:27:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:27:42 +0000 Subject: [MERGED] python/osmo-python-tests[master]: osmo_ctrl.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo_ctrl.py: Set shebang to use python v2 ...................................................................... osmo_ctrl.py: Set shebang to use python v2 Nowadays bin/python usually points to python3, and this script is written in python2, which means if run directly from terminal it will fail with some print syntax errors. Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 --- M osmopy/osmo_ctrl.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/osmopy/osmo_ctrl.py b/osmopy/osmo_ctrl.py index 003f100..2b8c4be 100755 --- a/osmopy/osmo_ctrl.py +++ b/osmopy/osmo_ctrl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* -- To view, visit https://gerrit.osmocom.org/5270 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24a568fc2c3e69e7c9f7b9729bd023fe1f0691c7 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:28:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:28:57 +0000 Subject: osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 11:28:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 11:28:59 +0000 Subject: [MERGED] osmo-ggsn[master]: Add support for IPv4v6 End User Addresses In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add support for IPv4v6 End User Addresses ...................................................................... Add support for IPv4v6 End User Addresses Before this commit, when an MS requested an ipv4v6 context osmo-ggsn returned an error stating the type was unknown, and this text was printed in the log: Processing create PDP context request for APN 'ims' Cannot decode EUA from MS/SGSN: f1 8d This patch has been tested with an MS running the 3 types of addresses: - IPv4 and IPv6: no regressions observed, the context is activated and packets are sent to the ggsn. - IPv4v6: Wireshark correctly parses request and reponse, and then ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and IPv6 DNS addresses advertised and TCP traffic over IPv4 (because probably my IPv6 network setup is not correct). I also checked I can disable/enable data (pdp ctx delete and activate) several times without any issue. Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 --- M ggsn/ggsn.c M ggsn/icmpv6.c M gtp/pdp.h M lib/in46_addr.c M lib/in46_addr.h M sgsnemu/sgsnemu.c M tests/lib/in46a_test.c M tests/lib/in46a_v6_test.ok 8 files changed, 231 insertions(+), 82 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 1c1276f..fa3e20c 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -335,17 +335,20 @@ static int delete_context(struct pdp_t *pdp) { struct gsn_t *gsn = pdp->gsn; - struct ippoolm_t *ipp = (struct ippoolm_t *)pdp->peer; struct apn_ctx *apn = pdp->priv; + struct ippoolm_t *member; + int i; LOGPPDP(LOGL_INFO, pdp, "Deleting PDP context\n"); - struct ippoolm_t *member = pdp->peer; - if (pdp->peer) { - send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ - ippool_freeip(ipp->pool, ipp); - } else - LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + for (i = 0; i < 2; i++) { + if (pdp->peer[i]) { + member = pdp->peer[i]; + send_trap(gsn, pdp, member, "imsi-rem-ip"); /* TRAP with IP removal */ + ippool_freeip(member->pool, member); + } else if(i == 0) + LOGPPDP(LOGL_ERROR, pdp, "Cannot find/free IP Pool member\n"); + } if (gtp_kernel_tunnel_del(pdp, apn->tun.cfg.dev_name)) { LOGPPDP(LOGL_ERROR, pdp, "Cannot delete tunnel from kernel:%s\n", @@ -512,10 +515,10 @@ static char name_buf[256]; struct gsn_t *gsn = pdp->gsn; struct ggsn_ctx *ggsn = gsn->priv; - struct in46_addr addr; - struct ippoolm_t *member; + struct in46_addr addr[2]; + struct ippoolm_t *member = NULL; struct apn_ctx *apn; - int rc; + int rc, num_addr, i; osmo_apn_to_str(name_buf, pdp->apn_req.v, pdp->apn_req.l); @@ -550,55 +553,63 @@ memcpy(pdp->qos_neg.v, pdp->qos_req.v, pdp->qos_req.l); /* TODO */ pdp->qos_neg.l = pdp->qos_req.l; - if (in46a_from_eua(&pdp->eua, &addr)) { + memset(addr, 0, sizeof(addr)); + if ((num_addr = in46a_from_eua(&pdp->eua, addr)) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot decode EUA from MS/SGSN: %s\n", osmo_hexdump(pdp->eua.v, pdp->eua.l)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_UNKNOWN_PDP); return 0; } - if (addr.len == sizeof(struct in_addr)) { - /* does this APN actually have an IPv4 pool? */ - if (!apn_supports_ipv4(apn)) - goto err_wrong_af; + /* Allocate dynamic addresses from the pool */ + for (i = 0; i < num_addr; i++) { + if (addr[i].len == sizeof(struct in_addr)) { + /* does this APN actually have an IPv4 pool? */ + if (!apn_supports_ipv4(apn)) + goto err_wrong_af; - rc = ippool_newip(apn->v4.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - in46a_to_eua(&member->addr, &pdp->eua); + rc = ippool_newip(apn->v4.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + /* copy back */ + memcpy(&addr[i].v4.s_addr, &member->addr.v4, 4); + } else if (addr[i].len == sizeof(struct in6_addr)) { + + /* does this APN actually have an IPv6 pool? */ + if (!apn_supports_ipv6(apn)) + goto err_wrong_af; + + rc = ippool_newip(apn->v6.pool, &member, &addr[i], 0); + if (rc < 0) + goto err_pool_full; + + /* IPv6 doesn't really send the real/allocated address at this point, but just + * the link-identifier which the MS shall use for router solicitation */ + /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ + memcpy(addr[i].v6.s6_addr, &member->addr.v6, 8); + /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ + memcpy(addr[i].v6.s6_addr+8, &member->addr.v6, 8); + } else + OSMO_ASSERT(0); + + pdp->peer[i] = member; + member->peer = pdp; + } + + in46a_to_eua(addr, num_addr, &pdp->eua); + + if (apn_supports_ipv4(apn)) { /* TODO: In IPv6, EUA doesn't contain the actual IP addr/prefix! */ if (gtp_kernel_tunnel_add(pdp, apn->tun.cfg.dev_name) < 0) { LOGPPDP(LOGL_ERROR, pdp, "Cannot add tunnel to kernel: %s\n", strerror(errno)); gtp_create_context_resp(gsn, pdp, GTPCAUSE_SYS_FAIL); return 0; } - } else if (addr.len == sizeof(struct in6_addr)) { - struct in46_addr tmp; + } - /* does this APN actually have an IPv6 pool? */ - if (!apn_supports_ipv6(apn)) - goto err_wrong_af; - - rc = ippool_newip(apn->v6.pool, &member, &addr, 0); - if (rc < 0) - goto err_pool_full; - - /* IPv6 doesn't really send the real/allocated address at this point, but just - * the link-identifier which the MS shall use for router solicitation */ - tmp.len = addr.len; - /* initialize upper 64 bits to prefix, they are discarded by MS anyway */ - memcpy(tmp.v6.s6_addr, &member->addr.v6, 8); - /* use allocated 64bit prefix as lower 64bit, used as link id by MS */ - memcpy(tmp.v6.s6_addr+8, &member->addr.v6, 8); - in46a_to_eua(&tmp, &pdp->eua); - } else - OSMO_ASSERT(0); - - pdp->peer = member; pdp->ipif = apn->tun.tun; /* TODO */ pdp->priv = apn; - member->peer = pdp; if (!send_trap(gsn, pdp, member, "imsi-ass-ip")) { /* TRAP with IP assignment */ gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index 11ced24..6564a54 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -183,12 +183,17 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *own_ll_addr, const uint8_t *pack, unsigned len) { - struct ippoolm_t *member = pdp->peer; + struct ippoolm_t *member; const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; const struct icmpv6_hdr *ic6h = (struct icmpv6_hdr *) (pack + sizeof(*ip6h)); struct msgb *msg; OSMO_ASSERT(pdp); + + member = pdp->peer[0]; + OSMO_ASSERT(member); + if (member->addr.len == sizeof(struct in_addr)) /* ipv4v6 context */ + member = pdp->peer[1]; OSMO_ASSERT(member); if (len < sizeof(*ip6h)) { diff --git a/gtp/pdp.h b/gtp/pdp.h index f1d8ad6..b581952 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -26,6 +26,7 @@ #define PDP_EUA_ORG_IETF 0xF1 #define PDP_EUA_TYPE_v4 0x21 #define PDP_EUA_TYPE_v6 0x57 +#define PDP_EUA_TYPE_v4v6 0x8D /* GTP Information elements from 29.060 v3.9.0 7.7 Information Elements */ /* Also covers version 0. Note that version 0 6: QOS Profile was superceded * @@ -121,7 +122,7 @@ /* Parameters shared by all PDP context belonging to the same MS */ void *ipif; /* IP network interface */ - void *peer; /* Pointer to peer protocol */ + void *peer[2]; /* Pointer to peer protocol */ void *asap; /* Application specific service access point */ uint64_t imsi; /* International Mobile Subscriber Identity. */ diff --git a/lib/in46_addr.c b/lib/in46_addr.c index 36ad6af..f4bb8a2 100644 --- a/lib/in46_addr.c +++ b/lib/in46_addr.c @@ -253,33 +253,66 @@ } } -/*! Convert given PDP End User Address to in46_addr - * \returns 0 on success; negative on error */ -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua) +/*! Convert given array of in46_addr to PDP End User Address + * \param[in] src Array containing 1 or 2 in46_addr + * \param[out] eua End User Address structure to fill + * \returns 0 on success; negative on error + * + * In case size is 2, this function expects to find exactly one IPv4 and one + * IPv6 addresses in src. */ +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua) { - switch (src->len) { - case 4: - eua->l = 6; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v4; - memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ - break; - case 8: - case 16: - eua->l = 18; - eua->v[0] = PDP_EUA_ORG_IETF; - eua->v[1] = PDP_EUA_TYPE_v6; - memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ - break; - default: - OSMO_ASSERT(0); - return -1; + const struct in46_addr *src_v4, *src_v6; + if (size == 1) { + switch (src->len) { + case 4: + eua->l = 6; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4; + memcpy(&eua->v[2], &src->v4, 4); /* Copy a 4 byte address */ + break; + case 8: + case 16: + eua->l = 18; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v6; + memcpy(&eua->v[2], &src->v6, 16); /* Copy a 16 byte address */ + break; + default: + OSMO_ASSERT(0); + return -1; + } + return 0; } + + if (src[0].len == src[1].len) + return -1; /* we should have a v4 and a v6 address */ + + src_v4 = (src[0].len == 4) ? &src[0] : &src[1]; + src_v6 = (src[0].len == 4) ? &src[1] : &src[0]; + + eua->l = 22; + eua->v[0] = PDP_EUA_ORG_IETF; + eua->v[1] = PDP_EUA_TYPE_v4v6; + memcpy(&eua->v[2], &src_v4->v4, 4); + memcpy(&eua->v[6], &src_v6->v6, 16); + return 0; } -/*! Convert given in46_addr to PDP End User Address - * \returns 0 on success; negative on error */ +/*! Convert given PDP End User Address to an array of in46_addr + * \param[in] eua End User Address structure to parse + * \param[out] dst Array containing 2 in46_addr + * \returns number of parsed addresses (1 or 2) on success; negative on error + * + * This function expects to receive an End User Address struct together with an + * array of 2 zeroed in46_addr structs. The in46_addr structs are filled in + * order, hence if the function returns 1 the parsed address will be stored in + * the first struct and the second one will be left intact. If 2 is returned, it + * is guaranteed that one of them is an IPv4 and the other one is an IPv6, but + * the order in which they are presented is not specified and must be + * discovered for instance by checking the len field of each address. + */ int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst) { if (eua->l < 2) @@ -295,22 +328,46 @@ memcpy(&dst->v4, &eua->v[2], 4); /* Copy a 4 byte address */ else dst->v4.s_addr = 0; - break; + return 1; case PDP_EUA_TYPE_v6: dst->len = 16; if (eua->l >= 18) memcpy(&dst->v6, &eua->v[2], 16); /* Copy a 16 byte address */ else memset(&dst->v6, 0, 16); - break; + return 1; + case PDP_EUA_TYPE_v4v6: + /* 3GPP TS 29.060, section 7.7.27 */ + switch (eua->l) { + case 2: /* v4 & v6 dynamic */ + dst[0].v4.s_addr = 0; + memset(&dst[1].v6, 0, 16); + break; + case 6: /* v4 static, v6 dynamic */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memset(&dst[1].v6, 0, 16); + break; + case 18: /* v4 dynamic, v6 static */ + dst[0].v4.s_addr = 0; + memcpy(&dst[1].v6, &eua->v[2], 16); + break; + case 22: /* v4 & v6 static */ + memcpy(&dst[0].v4, &eua->v[2], 4); + memcpy(&dst[1].v6, &eua->v[6], 16); + break; + default: + return -1; + } + dst[0].len = 4; + dst[1].len = 16; + return 2; default: return -1; } - return 0; default_to_dyn_v4: /* assume dynamic IPv4 by default */ dst->len = 4; dst->v4.s_addr = 0; - return 0; + return 1; } diff --git a/lib/in46_addr.h b/lib/in46_addr.h index ff26521..e4654cc 100644 --- a/lib/in46_addr.h +++ b/lib/in46_addr.h @@ -29,5 +29,5 @@ extern int in46a_within_mask(const struct in46_addr *addr, const struct in46_addr *net, size_t prefixlen); unsigned int in46a_netmasklen(const struct in46_addr *netmask); -int in46a_to_eua(const struct in46_addr *src, struct ul66_t *eua); +int in46a_to_eua(const struct in46_addr *src, unsigned int size, struct ul66_t *eua); int in46a_from_eua(const struct ul66_t *eua, struct in46_addr *dst); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index c31f875..300183b 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1617,7 +1617,7 @@ /* Otherwise it is deallocated by gtplib */ pdp_newpdp(&pdp, myimsi, options.nsapi, NULL); - pdp->peer = &iparr[n]; + pdp->peer[0] = &iparr[n]; /* FIXME: support v4v6, have 2 peers */ pdp->ipif = tun; /* TODO */ iparr[n].pdp = pdp; diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c index c0bb670..b22da16 100644 --- a/tests/lib/in46a_test.c +++ b/tests/lib/in46a_test.c @@ -137,7 +137,7 @@ #endif /* IPv4 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia4, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4); OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); @@ -154,7 +154,7 @@ printf("Testing in46a_from_eua() with IPv4 addresses\n"); /* default: v4 unspec */ - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); @@ -173,14 +173,14 @@ /* unspecified V4 */ memcpy(eua.v, v4_unspec, sizeof(v4_unspec)); eua.l = sizeof(v4_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == 0); /* specified V4 */ memcpy(eua.v, v4_spec, sizeof(v4_spec)); eua.l = sizeof(v4_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 4); OSMO_ASSERT(ia.v4.s_addr == htonl(0x01020304)); } @@ -278,19 +278,41 @@ }; struct ul66_t eua; - printf("testing in46a_to_eua() with IPv6 addresses\n"); + printf("Testing in46a_to_eua() with IPv6 addresses\n"); /* IPv6 address */ - OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&g_ia6, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &g_ia6.v6, 16)); /* IPv6 address with prefix / length 8 */ - OSMO_ASSERT(in46a_to_eua(&ia_v6_8, &eua) == 0); + OSMO_ASSERT(in46a_to_eua(&ia_v6_8, 1, &eua) == 0); OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v6); OSMO_ASSERT(!memcmp(&eua.v[2], &ia_v6_8.v6, 16)); +} + +static void test_in46a_to_eua_v4v6() { + const struct in46_addr ia_v4v6[2] = { + { + .len = 16, + .v6.s6_addr = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 }, + }, + { + .len = 4, + .v4.s_addr = 0x0d0c0b0a, + } + }; + struct ul66_t eua; + printf("Testing in46a_to_eua() with IPv4v6 addresses\n"); + + /* IPv4 address */ + OSMO_ASSERT(in46a_to_eua(ia_v4v6, 2, &eua) == 0); + OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF); + OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4v6); + OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr); + OSMO_ASSERT(!memcmp(&eua.v[6], &g_ia6.v6, 16)); } static void test_in46a_from_eua_v6(void) @@ -308,16 +330,65 @@ /* unspecified V6 */ memcpy(eua.v, v6_unspec, sizeof(v6_unspec)); eua.l = sizeof(v6_unspec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia.v6)); /* specified V6 */ memcpy(eua.v, v6_spec, sizeof(v6_spec)); eua.l = sizeof(v6_spec); - OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 0); + OSMO_ASSERT(in46a_from_eua(&eua, &ia) == 1); OSMO_ASSERT(ia.len == 16); OSMO_ASSERT(!memcmp(&ia.v6, v6_spec+2, ia.len)); +} + +static void test_in46a_from_eua_v4v6(void) { + struct in46_addr ia[2]; + struct ul66_t eua; + const uint8_t v4_unspec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6 }; + const uint8_t v4_spec_v6_unspec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4 }; + const uint8_t v4_unspec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + const uint8_t v4_spec_v6_spec[] = { PDP_EUA_ORG_IETF, PDP_EUA_TYPE_v4v6, 1,2,3,4, 1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10 }; + + memset(&eua, 0, sizeof(eua)); + + printf("Testing in46a_from_eua() with IPv4v6 addresses\n"); + + /* unspecified V4 & V6 */ + memcpy(eua.v, v4_unspec_v6_unspec, sizeof(v4_unspec_v6_unspec)); + eua.l = sizeof(v4_unspec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* specified V4, unspecified V6 */ + memcpy(eua.v, v4_spec_v6_unspec, sizeof(v4_spec_v6_unspec)); + eua.l = sizeof(v4_spec_v6_unspec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(IN6_IS_ADDR_UNSPECIFIED(&ia[1].v6)); + + /* unspecified V4, specified V6 */ + memcpy(eua.v, v4_unspec_v6_spec, sizeof(v4_unspec_v6_spec)); + eua.l = sizeof(v4_unspec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == 0); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_unspec_v6_spec+2, ia[1].len)); + + /* specified V4, specified V6 */ + memcpy(eua.v, v4_spec_v6_spec, sizeof(v4_spec_v6_spec)); + eua.l = sizeof(v4_spec_v6_spec); + OSMO_ASSERT(in46a_from_eua(&eua, ia) == 2); + OSMO_ASSERT(ia[0].len == 4); + OSMO_ASSERT(ia[1].len == 16); + OSMO_ASSERT(ia[0].v4.s_addr == htonl(0x01020304)); + OSMO_ASSERT(!memcmp(&ia[1].v6, v4_spec_v6_spec+6, ia[1].len)); } static void test_in46a_netmasklen_v6(void) @@ -378,6 +449,8 @@ test_in46a_equal_v6(); test_in46a_to_eua_v6(); test_in46a_from_eua_v6(); + test_in46a_to_eua_v4v6(); + test_in46a_from_eua_v4v6(); test_in46a_netmasklen_v6(); } return 0; diff --git a/tests/lib/in46a_v6_test.ok b/tests/lib/in46a_v6_test.ok index d092591..10dc7f4 100644 --- a/tests/lib/in46a_v6_test.ok +++ b/tests/lib/in46a_v6_test.ok @@ -3,6 +3,8 @@ Testing in46a_ntop() with IPv6 addresses res = 102:304:506:708:90a:b0c:d0e:f10 Testing in46a_equal() with IPv6 addresses -testing in46a_to_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv6 addresses Testing in46a_from_eua() with IPv6 addresses +Testing in46a_to_eua() with IPv4v6 addresses +Testing in46a_from_eua() with IPv4v6 addresses Testing in46a_netmasklen() with IPv6 addresses -- To view, visit https://gerrit.osmocom.org/5216 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 12:22:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 12:22:56 +0000 Subject: [PATCH] openbsc[master]: sms.db: silence libdbi warnings on out-of-range index Message-ID: Review at https://gerrit.osmocom.org/5297 sms.db: silence libdbi warnings on out-of-range index Apparently, since libdbi 0.9.0 aka 0.9.0-5 on debian-testing, osmo-msc barfs numerous libdbi warnings whenever a query rightfully returns no rows. Trivially query whether there are any rows first by adding an inline wrap function next_row(). Silenced: DDB <000d> ../../../../src/osmo-msc/src/libmsc/db.c:188 DBI: -6: An invalid or out-of-range index was passed to l DDB <000d> ../../../src/libosmocore/src/backtrace.c:47 backtrace() returned 11 addresses DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xfb81) [0x555555563b81] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(_error_handle DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(dbi_result_ne DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x11172) [0x555555565172] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e6bc) [0x5555555726bc] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e7f6) [0x5555555727f6] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1f1d2) [0x5555555731d2] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbb86) [0x55555555fb86] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0 DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbfba) [0x55555555ffba] Related: OS#2737 OS#2667 Change-Id: I43cf4eed22425554826d59857eded5b4cc0d2c52 --- M openbsc/src/libmsc/db.c 1 file changed, 25 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/97/5297/1 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 4ba12ca..15e7fd4 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -183,6 +183,13 @@ ")", }; +static inline int next_row(dbi_result result) +{ + if (!dbi_result_has_next_row(result)) + return 0; + return dbi_result_next_row(result); +} + void db_error_func(dbi_conn conn, void *data) { const char *msg; @@ -310,7 +317,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 3).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v3(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 3).\n"); @@ -456,7 +463,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 4).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v4(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 4).\n"); @@ -532,7 +539,7 @@ if (!result) return -EINVAL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -EINVAL; } @@ -726,7 +733,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -774,7 +781,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -860,7 +867,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -1050,7 +1057,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber.\n"); return NULL; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { DEBUGP(DDB, "Failed to find the Subscriber. '%u' '%s'\n", field, id); dbi_result_free(result); @@ -1086,7 +1093,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber: %llu\n", subscr->id); return -EIO; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { DEBUGP(DDB, "Failed to find the Subscriber. %llu\n", subscr->id); dbi_result_free(result); @@ -1279,7 +1286,7 @@ return -1; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { struct gsm_subscriber *subscr; subscr = subscr_alloc(); @@ -1357,7 +1364,7 @@ return -EIO; } - while (dbi_result_next_row(result)) + while (next_row(result)) callback(priv, dbi_result_get_ulonglong(result, "id")); dbi_result_free(result); @@ -1396,7 +1403,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); DEBUGP(DDB, "Allocated TMSI %u for IMSI %s.\n", subscriber->tmsi, subscriber->imsi); @@ -1429,7 +1436,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); break; } @@ -1470,7 +1477,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); break; } @@ -1530,7 +1537,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Equipment by IMEI.\n"); return 1; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { LOGP(DDB, LOGL_ERROR, "Failed to find the Equipment.\n"); dbi_result_free(result); return 1; @@ -1686,7 +1693,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1715,7 +1722,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1745,7 +1752,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1774,7 +1781,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } -- To view, visit https://gerrit.osmocom.org/5297 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43cf4eed22425554826d59857eded5b4cc0d2c52 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 12 13:09:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 13:09:16 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: > Why do we see ../../../ in the file names? We switched logging to > __BASE_FILE__ to avoid this on src vs. build dir builds.. I have no idea, maybe __BASE_FILE__ isn't working out as expected? I build in this dir topology and usually see the long ../../ paths: ./src/osmo-foo/configure.ac ./make/osmo-foo/Makefile Can confirm though that LOGP macros use __BASE_FILE__. -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 13:13:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 13:13:43 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: "__BASE_FILE__ This macro expands to the name of the main input file, in the form of a C string constant. This is the source file that was specified on the command line of the preprocessor or C compiler. " So it's not related to stripping path elements. If we did something like 'cd $(srcdir); gcc -o $(builddir)/thing.o' the paths would go shorter. I'm not so sure on when __BASE_FILE__ != __FILE__, maybe we should go back to __FILE__? -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 13:17:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 13:17:51 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: stackoverflow has #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) which would iterate around in file paths for each log statement. compared to terminal output that's probably neglectable. -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 14:17:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 14:17:32 +0000 Subject: osmo-msc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: let's continue discussing this in https://osmocom.org/issues/2740 -- To view, visit https://gerrit.osmocom.org/5265 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8993c8db171d1e845a6297deef137d18506cda3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 14:28:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 14:28:08 +0000 Subject: python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5278/1//COMMIT_MSG Commit Message: Line 7: Move scripts to appropriate directory IIUC the problem is not mixing library code with scripts, it's much more mixing py2 and py3 files? Last time I checked the library code was installed in /usr/local/lib/python* while the runnable scripts ended up in /usr/local/bin, so having one dir looks fine to me. Could you indicate the specific error and its solution in detail? https://gerrit.osmocom.org/#/c/5278/1/setup.py File setup.py: Line 31: "scripts/osmo_verify_transcript_ctrl.py"] > Do they end up installed in the same place as before? otherwise jobs using 'setup.py install' should make them end up in the same dir, but I am not sure whether all of our build jobs indeed use a locally installed version instead of checking out their own local osmo-python-tests and trying to use that. So I'm still afraid this may cause fallout. -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 12 14:32:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 14:32:16 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) py3 foo again? I'm not sure this is worth the effort... - have you verified that these tools work as expected in both py2 and py3? - at least two code lines you tweak will break py2 https://gerrit.osmocom.org/#/c/5280/1/osmopy/osmoutil.py File osmopy/osmoutil.py: Line 84: print("osmoappdesc not found in %s" % dirname, file=sys.stderr) will no longer work in py2 -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 12 14:33:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 12 Dec 2017 14:33:05 +0000 Subject: osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Patch Set 1: > This should be merged after https://gerrit.osmocom.org/#/c/5277/ (usually we would put a "Depends: (repos-name)" in the commit log for this relation) -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 15:36:10 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Dec 2017 15:36:10 +0000 Subject: [PATCH] osmo-mgw[master]: network: use originating RTP packet address for loopback Message-ID: Review at https://gerrit.osmocom.org/5298 network: use originating RTP packet address for loopback When a connection is created in loopback mode all incoming packets should be reflected back to their origin. If the user did not supply a destination address with the CRCX command all incoming packets will be tossed because no destination address is officially known yet. If there is no destination address set and the connection is in loopback mode. Then use the originating address of the incoming packet as destination address. Change-Id: I3d1abe56d016e28c97f60635eb574679d36e2c52 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/98/5298/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index eb44f9b..aac3e51 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1077,7 +1077,16 @@ /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ + if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { + /* When we are in loopback mode, we loop back all incoming + * packets back to their origin. We will use the originating + * address data from the UDP packet header to patch the + * outgoing address in connection on the fly */ + if (conn_src->end.rtp_port == 0) { + conn_src->end.addr = addr.sin_addr; + conn_src->end.rtp_port = addr.sin_port; + } return mgcp_send_rtp(proto, &addr, buf, len, conn_src, conn_src); } -- To view, visit https://gerrit.osmocom.org/5298 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d1abe56d016e28c97f60635eb574679d36e2c52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 12 15:37:59 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Dec 2017 15:37:59 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#11). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 14 files changed, 1,228 insertions(+), 321 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/11 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..0ccd838 --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,52 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +/* MGCP state handler context (fsm etc..) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer + * needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..2901df6 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -41,6 +41,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..d117b31 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -408,8 +408,8 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..d0b24eb 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -596,11 +597,7 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + msc_mgcp_ass_complete(conn, osmo_ntohs(rtp_addr_in->sin_port), inet_ntoa(rtp_addr_in->sin_addr)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..57ed08c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #ifdef BUILD_IU @@ -78,6 +79,7 @@ #include #include +#include #include @@ -1328,8 +1330,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teadown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1385,6 +1387,23 @@ return 0; } +/* helper function for tch_bridge() to bridge the RTP Voice streams also */ +static int rtp_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) +{ + int rc; + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; +} + /* bridge channels of two transactions */ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge) { @@ -1400,7 +1419,7 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + return rtp_bridge(trans1, trans2); } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1762,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1804,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2688,8 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2729,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2745,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2772,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2788,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = osmo_htonl(rtp->ip); + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..adfaa18 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,22 @@ #include #include +#include #include #include +#include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +201,39 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = osmo_htonl(inet_addr(conn->rtp.local_addr_ran)); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," + " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, + rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" + " conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..823a1df --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1065 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 +#define MGCP_ASS_TIMEOUT 10 /* in seconds */ +#define MGCP_ASS_TIMEOUT_TIMER_NR 4 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault + * condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_ASS_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, + * will be displayed by handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "call could not be completed in time (RAN)"}, + {MGCP_ERR_ASS_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_ASS_COMPL, + ST_MDCX_RAN, + ST_MDCX_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and we + * may now forward IP/Port of the remote call leg to the MGW*/ + EV_ASSIGN, + + /* External event: Notify that the Call is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* Note: We were unable to communicate with the MGW, + * unfortunately there is no meaningful action we can take + * now other than giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* Note: If the logic that controls the RAN is unable to + * negotiate a connection, we presumably still have a + * working connection to the MGW, we will try to + * shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Note: Under normal conditions, the MSC logic should + * always command to release the call at some point. + * However, the release may be missing due to errors + * in the MSC logic and we may have reached ST_HALT + * because of cascading errors and timeouts. In this + * and only in this case we will allow ST_HALT to + * free all context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_ASS_TIMEOUT_TIMER_NR) { + /* Note: There may be rare cases in which the MSC + * is unable to complete the call assignment */ + handle_error(mgcp_ctx, MGCP_ERR_ASS_TIMEOUT); + } else { + /* Note: Ther must not be any unsolicited timers + * in this FSM. If so, we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_ASS_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_ASS_COMPL: wait for mgw response, check if assignment is complete */ +static void fsm_ass_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_subscriber_connection *conn; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Enter MDCX phase */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_ASS_TIMEOUT, MGCP_ASS_TIMEOUT_TIMER_NR); + + /* If we already have a valid remote port and IP-Address from the RAN side + * call leg, the assignment has been completed before we got here, so we + * may move on immediately */ + if (conn->rtp.remote_port_ran != 0 || strlen(conn->rtp.remote_addr_ran) > 0) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: wait for assignment completion, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_ASSIGN: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_COMPL: check MGW response */ +static void fsm_mdcx_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the CRCX is received, then proceed with sending + the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on + * the RAT, this will either trigger an Assignment Request on the + * A-Interface or an RAB-Assignment on the IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, + * we will enter the MDCX phaseby sending an MDCX for the CN side + * to the MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_ASS_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* Check if the assignment has been completed and the remote leg + * address/port combination has become valid. If not, wait until + * the assignment is completed */ + [ST_ASS_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_ASS_COMPL), + .action = fsm_ass_compl_cb, + }, + /* When the response for the MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The MDCX phase is complete when the response is received from the + * MGW. The call is now active */ + [ST_MDCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_COMPL), + .action = fsm_mdcx_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Inform the FSM that the assignment (RAN connection) is now complete + * Parameter: + * conn: subscriber connection context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, assignment completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, assignmnet completion failed.\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + /* Memorize port and IP-Address of the remote RAN call leg. We need this + * information at latest when we enter the MDCX phase for the RAN side. */ + conn->rtp.remote_port_ran = port; + osmo_strlcpy(conn->rtp.remote_addr_ran, addr, sizeof(conn->rtp.remote_addr_ran)); + + /* Note: We only dispatch the event if we are really waiting for the + * assignment, if we are not yet waiting, there is no need to loudly + * broadcast an event that the all other states do not understand anyway */ + if (mgcp_ctx->fsm->state == ST_MDCX_RAN) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context + * port: port number of the remote leg + * addr: IP-address of the remote leg + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already have passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call + * Parameter: + * trans: connection context + * Returns -EINVAL on error, 0 on success */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 11 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 12 15:44:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 15:44:15 +0000 Subject: [PATCH] osmo-gsm-tester[master]: suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx r... Message-ID: Review at https://gerrit.osmocom.org/5299 suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx request Otherwise osmo-ggsn tries to allocate one IP of each type but fails because the other APNs are ipv4-only or ipv6-only. Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b --- M suites/gprs/ping.py 1 file changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/99/5299/1 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 46ab540..f6f01a6 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -44,11 +44,21 @@ print('waiting for modems to attach to data services...') wait(ms.is_attached) -ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) -# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) -# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) -# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) -# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) + +# We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) +ctx_id_v4 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv4) sleep(5) # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) + +# We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) +ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v6) + +# IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) +# sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +# ms.deactivate_context(ctx_id_v46) -- To view, visit https://gerrit.osmocom.org/5299 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 15:53:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 15:53:49 +0000 Subject: osmo-gsm-tester[master]: suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx r... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5299 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 15:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 15:53:50 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx r... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx request ...................................................................... suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx request Otherwise osmo-ggsn tries to allocate one IP of each type but fails because the other APNs are ipv4-only or ipv6-only. Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b --- M suites/gprs/ping.py 1 file changed, 15 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 46ab540..f6f01a6 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -44,11 +44,21 @@ print('waiting for modems to attach to data services...') wait(ms.is_attached) -ctx_id_v4 = ms.activate_context(apn='internet', protocol=ms.CTX_PROT_IPv4) -# IPv6 no supported in EC20: org.ofono.Error.NotImplemented: Implementation not provided (36) -# ctx_id_v6 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv6) -# IPv46 (dual) not supported in EC20: org.ofono.Error.Failed: Operation failed (36) -# ctx_id_v46 = ms.activate_context(apn='inet6', protocol=ms.CTX_PROT_IPv46) + +# We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) +ctx_id_v4 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv4) sleep(5) # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) + +# We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) +ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +ms.deactivate_context(ctx_id_v6) + +# IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) +# ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) +# sleep(5) +# TODO: send ping to server or open TCP conn with a socket in python +# ms.deactivate_context(ctx_id_v46) -- To view, visit https://gerrit.osmocom.org/5299 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:10:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 12 Dec 2017 16:10:34 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: > have you verified that these tools work as expected in both py2 and py3? py2 is verified in gerrit 5277, py3 verification is added in follow-up patch. Once gerrit 5277 and corresponding patch for osmo-ci are merged, I'll resubmit the rest of this series so it could be tested by jenkins. > will no longer work in py2 it works for me but we should first merge the jenkins integration and than let it be tested automatically. -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:38 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:38 +0000 Subject: meta-telephony[201705]: Set up osmocom recipes to current git master In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:40 +0000 Subject: meta-telephony[201705]: openbsc.git: Upstream binary now named osmo-bsc-sccplite In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5288 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:42 +0000 Subject: meta-telephony[201705]: Update PV for osmocom recipes In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5289 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:43 +0000 Subject: meta-telephony[201705]: Remove libsmpp34_1.12.bb and use _git instead In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:45 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:45 +0000 Subject: meta-telephony[201705]: libosmocore: depend on gnutls for compilation now In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:47 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:47 +0000 Subject: meta-telephony[201705]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:49 +0000 Subject: meta-telephony[201705]: osmo-sgsn: libosmo-sccp dep is only needed if building with ... In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:51 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:51 +0000 Subject: meta-telephony[201705]: sdk: Add missing libosmotrau-dev after split from libosmo-abis In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:57 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:57 +0000 Subject: [MERGED] meta-telephony[201705]: sdk: Add missing libosmotrau-dev after split from libosmo-abis In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: sdk: Add missing libosmotrau-dev after split from libosmo-abis ...................................................................... sdk: Add missing libosmotrau-dev after split from libosmo-abis After splitting libosmotrau from libosmo-abis in 127bed3ceb41015d8fd36779689ab6d799f773f6, related libosmotrau dev were moved to its own package, which was not added to the include list for the SDK. As a result, somo-bts cannot be built anymore as it fails to find libosmotrau pkgconfig file, headers and shared object file. Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab --- M recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb M recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb b/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb index dd5072b..2aed3f1 100644 --- a/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb +++ b/recipes-osmocom/packagegroup/packagegroup-core-standalone-osmo-sdk-target.bb @@ -5,7 +5,7 @@ DESCRIPTION = "Software Development Kit for Osmocom devices" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -PR = "r5" +PR = "r6" ALLOW_EMPTY_${PN} = "1" diff --git a/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc b/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc index 0a3f1d4..5055689 100644 --- a/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc +++ b/recipes-osmocom/packagegroup/packagegroup-sdk-osmo.inc @@ -5,6 +5,7 @@ libosmocore-dev \ libosmo-sccp-staticdev \ libosmo-abis-dev \ + libosmotrau-dev \ libgtp-dev \ libdbi-dev \ libsmpp34-dev \ -- To view, visit https://gerrit.osmocom.org/5296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42f3fa2ad82bfadb48f22167e42a08974fef16ab Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:58 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:58 +0000 Subject: [MERGED] meta-telephony[201705]: osmo-sgsn: libosmo-sccp dep is only needed if building with ... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-sgsn: libosmo-sccp dep is only needed if building with iu support ...................................................................... osmo-sgsn: libosmo-sccp dep is only needed if building with iu support Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 --- M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 8ed6a10..25c6a25 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -3,14 +3,14 @@ LICENSE = "AGPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" -DEPENDS = "c-ares libpcap libosmocore libosmo-netif libosmo-sccp osmo-ggsn" +DEPENDS = "c-ares libpcap libosmocore libosmo-netif osmo-ggsn" INC_PR="r4.${META_TELEPHONY_OSMO_INC}" inherit autotools pkgconfig systemd PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'iu', d)}" -PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c osmo-iuh," +PACKAGECONFIG[iu] = "--enable-iu,--disable-iu,libasn1c libosmo-sccp osmo-iuh," do_install_append() { install -d ${D}${systemd_system_unitdir}/ -- To view, visit https://gerrit.osmocom.org/5293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97e4e37219f584f0b9d42e21ff9464e2d7143e13 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:59 +0000 Subject: [MERGED] meta-telephony[201705]: osmo-mgw: Split packages and install osmo-mgw systemd service In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-mgw: Split packages and install osmo-mgw systemd service ...................................................................... osmo-mgw: Split packages and install osmo-mgw systemd service Change-Id: I1b902842cf8766af1e58de76e46786213d222389 --- M recipes-osmocom/osmo-mgw/osmo-mgw.inc 1 file changed, 36 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc b/recipes-osmocom/osmo-mgw/osmo-mgw.inc index 1b3362f..3294464 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc +++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc @@ -17,7 +17,41 @@ install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service ${D}${systemd_system_unitdir}/ + + install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg ${D}${sysconfdir}/osmocom/osmo-mgw.cfg + install -m 0644 ${S}/contrib/systemd/osmo-mgw.service ${D}${systemd_system_unitdir}/ } -SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service" -CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" +PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp" +SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service" +SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service" + +FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}" +FILES_libosmo-legacy-mgcp-dev = " \ + ${includedir}/osmocom/legacy_mgcp \ + ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \ + ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}" +FILES_libosmo-mgcp-dev = " \ + ${includedir}/osmocom/mgcp \ + ${libdir}/pkgconfig/libosmo-mgcp.pc \ + ${libdir}/libosmo-mgcp${SOLIBSDEV} \ + " + +FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}" +FILES_libosmo-mgcp-client-dev = " \ + ${includedir}/osmocom/mgcp_client \ + ${libdir}/pkgconfig/libosmo-mgcp-client.pc \ + ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \ + " + +FILES_osmo-bsc-mgcp = " \ + ${bindir}/osmo-bsc_mgcp \ + ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ + ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ + " +CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg" + +CONFFILES_osmo-mgw = "${sysconfdir}/osmocom/osmo-mgw.cfg" -- To view, visit https://gerrit.osmocom.org/5292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:59 +0000 Subject: [MERGED] meta-telephony[201705]: libosmocore: depend on gnutls for compilation now In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: libosmocore: depend on gnutls for compilation now ...................................................................... libosmocore: depend on gnutls for compilation now Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 --- M recipes-osmocom/libosmocore/libosmocore_git.bb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 3d731f5..a3c18ba 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -4,9 +4,9 @@ SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.10.2+gitr${SRCPV}" -PR = "r0" +PR = "r1" -DEPENDS += "libtalloc" +DEPENDS += "libtalloc gnutls" PACKAGES =+ "libosmoctrl libosmocodec libosmogb libosmogsm libosmovty osmo-arfcn osmo-auc-gen" FILES_libosmoctrl = "${libdir}/libosmoctrl${SOLIBS}" -- To view, visit https://gerrit.osmocom.org/5291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic349f551261715fcc2e3e0b725fd94deaedaa682 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:17:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:17:59 +0000 Subject: [MERGED] meta-telephony[201705]: Remove libsmpp34_1.12.bb and use _git instead In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Remove libsmpp34_1.12.bb and use _git instead ...................................................................... Remove libsmpp34_1.12.bb and use _git instead Same as we do for other osmocom recipes. Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd --- D recipes-misc/libsmpp/libsmpp34_1.12.bb M recipes-misc/libsmpp/libsmpp34_git.bb 2 files changed, 2 insertions(+), 21 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-misc/libsmpp/libsmpp34_1.12.bb b/recipes-misc/libsmpp/libsmpp34_1.12.bb deleted file mode 100644 index 406fa45..0000000 --- a/recipes-misc/libsmpp/libsmpp34_1.12.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "C Open SMPP library" -HOMEPAGE = "http://osmocom.org/projects/libsmpp34/" -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" -SECTION = "libs" -DEPENDS = "libxml2" - -S = "${WORKDIR}/git" -SRCREV = "6d47c170cccd8a72eae985c7ecffba3f07d3861a" -SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" -PR = "r1" - -PARALLEL_MAKE = "" - -inherit autotools pkgconfig - -PACKAGES =+ "${PN}-apps" -FILES_${PN}-apps = "${bindir}/*" - diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index 245cd43..73933c8 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -8,8 +8,8 @@ S = "${WORKDIR}/git" SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8" SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" -PV = "1.10+gitr${SRCPV}" -PR = "r1" +PV = "1.12+gitr${SRCPV}" +PR = "r0" PARALLEL_MAKE = "" -- To view, visit https://gerrit.osmocom.org/5290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1dcebbb3170654e15d1bb9644d630b462fd22fbd Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:18:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:18:00 +0000 Subject: [MERGED] meta-telephony[201705]: Update PV for osmocom recipes In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Update PV for osmocom recipes ...................................................................... Update PV for osmocom recipes Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 --- M recipes-misc/libsmpp/libsmpp34_git.bb M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/libosmocore/libosmocore_git.bb M recipes-osmocom/openbsc/openbsc_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb M recipes-osmocom/osmo-msc/osmo-msc_git.bb M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb 12 files changed, 14 insertions(+), 15 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index ce39cff..245cd43 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -17,4 +17,3 @@ PACKAGES =+ "${PN}-apps" FILES_${PN}-apps = "${bindir}/*" - diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb index a6f0e9b..094efbc 100644 --- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb +++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb @@ -5,5 +5,5 @@ S = "${WORKDIR}/git" SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323" SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git" -PV = "0.4.0+gitr${SRCPV}" -PR = "${INC_PR}.0" +PV = "0.1.1+gitr${SRCPV}" +PR = "${INC_PR}.1" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index c97ea1f..23a97eb 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -3,8 +3,8 @@ S = "${WORKDIR}/git" SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" -PV = "0.7.0+gitr${SRCPV}" -PR = "${INC_PR}.2" +PV = "0.8.1+gitr${SRCPV}" +PR = "${INC_PR}.0" # we require the tests to link to the static libosmo-sigtran library to # access symbols not starting with osmo_* diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index f1d6bc0..3d731f5 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -3,7 +3,7 @@ S = "${WORKDIR}/git" SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" -PV = "0.9.6+gitr${SRCPV}" +PV = "0.10.2+gitr${SRCPV}" PR = "r0" DEPENDS += "libtalloc" diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 1547b8c..59150d8 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -1,6 +1,6 @@ require ${PN}.inc -PV = "0.15.0+gitr${SRCPV}" +PV = "1.0.0+gitr${SRCPV}" PRINC = "0" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb index d061c05..d04c60f 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb +++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "4bd710d107786ecf838f568171a0175d157e809d" SRC_URI = "git://git.osmocom.org/osmo-bsc.git;protocol=git" -PV = "1.0.1+gitr${SRCPV}" +PV = "1.1.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 597edd6..969c4bf 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -2,8 +2,8 @@ HOMEPAGE = "https://osmocom.org/projects/openggsn" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" -PV = "1.0.0+gitr${SRCPV}" -PR = "r1" +PV = "1.1.0+gitr${SRCPV}" +PR = "r0" SRCREV = "4f0343233b83337afa1e1dfb4bcf9d076ecd4be2" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb index 5beedd6..dccb5b5 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb +++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "43bd6069e83ff034dcaff4780891d0468e899b07" SRC_URI = "git://git.osmocom.org/osmo-hlr.git;protocol=git" -PV = "0.0.1+gitr${SRCPV}" +PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb index 8f694d3..16c36ed 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb +++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "accb78000b6161d5f76eae24e625c01533001b89" SRC_URI = "git://git.osmocom.org/osmo-iuh.git;protocol=git" -PV = "0.1.0+gitr${SRCPV}" +PV = "0.2.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb index 34e286c..14792d9 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb +++ b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "a330b864e58a5f899c5d8a155f3a788f8c3fb0d9" SRC_URI = "git://git.osmocom.org/osmo-mgw.git;protocol=git" -PV = "1.0.2+gitr${SRCPV}" +PV = "1.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-msc/osmo-msc_git.bb b/recipes-osmocom/osmo-msc/osmo-msc_git.bb index 3c271ea..7af56f7 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc_git.bb +++ b/recipes-osmocom/osmo-msc/osmo-msc_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "db8272921dec02e698c2e473ebe210908964c827" SRC_URI = "git://git.osmocom.org/osmo-msc.git;protocol=git" -PV = "1.0.1+gitr${SRCPV}" +PV = "1.1.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb index 68c31f4..625c4d3 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb @@ -3,5 +3,5 @@ S = "${WORKDIR}/git" SRCREV = "b24af2bddf584b1f6d305efc5c5e762c32ae7251" SRC_URI = "git://git.osmocom.org/osmo-sgsn.git;protocol=git" -PV = "0.1.0+gitr${SRCPV}" +PV = "1.2.0+gitr${SRCPV}" PR = "${INC_PR}.0" -- To view, visit https://gerrit.osmocom.org/5289 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d5933527d333825e92c9748004adfb3e4b3a078 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:18:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:18:00 +0000 Subject: [MERGED] meta-telephony[201705]: openbsc.git: Upstream binary now named osmo-bsc-sccplite In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: openbsc.git: Upstream binary now named osmo-bsc-sccplite ...................................................................... openbsc.git: Upstream binary now named osmo-bsc-sccplite In Change-Id If10d1599b62d010726336134091a4e855c380d93, upstream osmocom.git has renamed osmo-bsc (and related config files, etc) to osmo-bsc-sccplite, so we don't have to rename it in the recipe anymore. Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 --- M recipes-osmocom/openbsc/openbsc.inc 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index e04911d..3c1b98f 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -11,7 +11,7 @@ file://osmo-bsc-sccplite.service \ " -INC_PR = "r23.${META_TELEPHONY_OSMO_INC}" +INC_PR = "r24.${META_TELEPHONY_OSMO_INC}" EXTRA_OECONF += "--enable-osmo-bsc --enable-mgcp-transcoding --with-g729" @@ -26,7 +26,7 @@ do_install_append() { install -d ${D}${sysconfdir}/osmocom install -m 0660 ${S}/doc/examples/osmo-nitb/nanobts/openbsc.cfg ${D}${sysconfdir}/osmocom/osmo-nitb.cfg - install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg + install -m 0660 ${S}/doc/examples/osmo-bsc-sccplite/osmo-bsc-sccplite.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-sccplite.cfg # Install sysv-init files install -d ${D}${sysconfdir}/init.d @@ -41,7 +41,6 @@ install -d ${D}/var/lib/osmocom - mv ${D}${bindir}/osmo-bsc ${D}${bindir}/osmo-bsc-sccplite } PACKAGES =+ "osmo-bsc-sccplite osmo-nitb" -- To view, visit https://gerrit.osmocom.org/5288 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7e3bf1d6186fb32f4d671cbf84cad195d2776190 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:18:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 12 Dec 2017 16:18:00 +0000 Subject: [MERGED] meta-telephony[201705]: Set up osmocom recipes to current git master In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Set up osmocom recipes to current git master ...................................................................... Set up osmocom recipes to current git master This set of revisions together with next set of patches has been tested in a sysmobts-v2 locally. Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 --- M recipes-misc/libsmpp/libsmpp34_git.bb M recipes-osmocom/libasn1c/libasn1c_git.bb M recipes-osmocom/libosmo-abis/libosmo-abis_git.bb M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb M recipes-osmocom/libosmocore/libosmocore_git.bb M recipes-osmocom/openbsc/openbsc_git.bb M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb M recipes-osmocom/osmo-msc/osmo-msc_git.bb M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb 14 files changed, 14 insertions(+), 14 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/recipes-misc/libsmpp/libsmpp34_git.bb b/recipes-misc/libsmpp/libsmpp34_git.bb index 235c908..ce39cff 100644 --- a/recipes-misc/libsmpp/libsmpp34_git.bb +++ b/recipes-misc/libsmpp/libsmpp34_git.bb @@ -6,7 +6,7 @@ DEPENDS = "libxml2" S = "${WORKDIR}/git" -SRCREV = "84f2905c5bfed2e1f5bae52a2bb9bc771fd8b895" +SRCREV = "7c2232e0ffd8751376d354fb95a86467d68d3bc8" SRC_URI = "git://git.osmocom.org/libsmpp34.git;protocol=git" PV = "1.10+gitr${SRCPV}" PR = "r1" diff --git a/recipes-osmocom/libasn1c/libasn1c_git.bb b/recipes-osmocom/libasn1c/libasn1c_git.bb index 0d4800a..8554d70 100644 --- a/recipes-osmocom/libasn1c/libasn1c_git.bb +++ b/recipes-osmocom/libasn1c/libasn1c_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "aaae8c76496a97050264e4c49e539b0420496737" +SRCREV = "bd2173796d90db181c22034e4acbe391d2cb57ce" SRC_URI = "git://git.osmocom.org/libasn1c.git;protocol=git" PV = "0.9.28+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb index 6f9c2fd..4a07b20 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb +++ b/recipes-osmocom/libosmo-abis/libosmo-abis_git.bb @@ -3,7 +3,7 @@ DEPENDS += "libtalloc" S = "${WORKDIR}/git" -SRCREV = "01543a1ea392fa98974ea2f99cafbc28e9966656" +SRCREV = "d1dd22c38e86f123c8f9a93c2789deafdfcb9265" SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git" PV = "0.4.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb index 0e55628..a6f0e9b 100644 --- a/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb +++ b/recipes-osmocom/libosmo-netif/libosmo-netif_git.bb @@ -3,7 +3,7 @@ DEPENDS += "libtalloc lksctp-tools" S = "${WORKDIR}/git" -SRCREV = "59941982083f7f0d6ab11f7bbb42c297a3fb8d69" +SRCREV = "c72be77aa330c968f9f1d624e38141b3c2e24323" SRC_URI = "git://git.osmocom.org/libosmo-netif.git;protocol=git" PV = "0.4.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb index a335993..c97ea1f 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "54fa75b85c91bb4bb79960942f63968f6423f6a5" +SRCREV = "6cd8d1243711f4de2f1314c7b87b972572cdec4e" SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git" PV = "0.7.0+gitr${SRCPV}" PR = "${INC_PR}.2" diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 5d702a3..f1d6bc0 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "657c5b6cadcef470c7ff9bffed3caab227026e6a" +SRCREV = "32e5641dbbfd91b650a9ec8cf62d28fd22109e9e" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.9.6+gitr${SRCPV}" PR = "r0" diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 59667f7..1547b8c 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -4,7 +4,7 @@ PRINC = "0" PR = "${INC_PR}.0" -SRCREV = "3ae8682f974058970fa564f09a34a51e867b896b" +SRCREV = "5d69fa52cf1e679e391519dd841da1579d640087" SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git" S = "${WORKDIR}/git/openbsc" diff --git a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb index 234e054..d061c05 100644 --- a/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb +++ b/recipes-osmocom/osmo-bsc/osmo-bsc_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "00c22464a0c1b51bb4b29efecab39e993224949c" +SRCREV = "4bd710d107786ecf838f568171a0175d157e809d" SRC_URI = "git://git.osmocom.org/osmo-bsc.git;protocol=git" PV = "1.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb index 3aafe13..597edd6 100644 --- a/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb +++ b/recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb @@ -5,7 +5,7 @@ PV = "1.0.0+gitr${SRCPV}" PR = "r1" -SRCREV = "859f9b0752419d43928d465bc96a87238c6d7940" +SRCREV = "4f0343233b83337afa1e1dfb4bcf9d076ecd4be2" SRC_URI = "git://git.osmocom.org/osmo-ggsn \ file://osmo-ggsn.init \ file://libgtp-queue_depth_32.patch \ diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb index 8a08d94..5beedd6 100644 --- a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb +++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "05c8b465ab2fe13edb67c95210a9b475f91ebeb3" +SRCREV = "43bd6069e83ff034dcaff4780891d0468e899b07" SRC_URI = "git://git.osmocom.org/osmo-hlr.git;protocol=git" PV = "0.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb index 821373d..8f694d3 100644 --- a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb +++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "5a3df8fa9ffc4400367250a0f9ff0e20dc4b5d3b" +SRCREV = "accb78000b6161d5f76eae24e625c01533001b89" SRC_URI = "git://git.osmocom.org/osmo-iuh.git;protocol=git" PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb index 1ea1a7b..34e286c 100644 --- a/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb +++ b/recipes-osmocom/osmo-mgw/osmo-mgw_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "1c8d67d7f5f6f8788d92df65a0b68e0ec19a34dc" +SRCREV = "a330b864e58a5f899c5d8a155f3a788f8c3fb0d9" SRC_URI = "git://git.osmocom.org/osmo-mgw.git;protocol=git" PV = "1.0.2+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-msc/osmo-msc_git.bb b/recipes-osmocom/osmo-msc/osmo-msc_git.bb index 7d55237..3c271ea 100644 --- a/recipes-osmocom/osmo-msc/osmo-msc_git.bb +++ b/recipes-osmocom/osmo-msc/osmo-msc_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "4e7ece0bd969389132d7babf8de4f57cf7d0126f" +SRCREV = "db8272921dec02e698c2e473ebe210908964c827" SRC_URI = "git://git.osmocom.org/osmo-msc.git;protocol=git" PV = "1.0.1+gitr${SRCPV}" PR = "${INC_PR}.0" diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb index e94618f..68c31f4 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "341d446b4db87b48812afe8d2149ebc840e8a357" +SRCREV = "b24af2bddf584b1f6d305efc5c5e762c32ae7251" SRC_URI = "git://git.osmocom.org/osmo-sgsn.git;protocol=git" PV = "0.1.0+gitr${SRCPV}" PR = "${INC_PR}.0" -- To view, visit https://gerrit.osmocom.org/5287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idda98bdfa07c16aee1955fa63373b358bb754c90 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:34:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:34:15 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: gprs_gb: Fix compileation (don't use Ericsson MobileL3) Message-ID: Review at https://gerrit.osmocom.org/5300 gprs_gb: Fix compileation (don't use Ericsson MobileL3) Change-Id: I751096f7e2846278df166d0b947fa78ddbe1ca9b --- M gprs_gb/gen_links.sh 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/5300/1 diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh index 5f6547a..9f4cea4 100755 --- a/gprs_gb/gen_links.sh +++ b/gprs_gb/gen_links.sh @@ -27,10 +27,6 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.MobileL3_v13.4.0/src -FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn SS_DataTypes.asn SS_EncDec.cc SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn" -gen_links $DIR $FILES - DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I751096f7e2846278df166d0b947fa78ddbe1ca9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:34:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:34:45 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Makefile: ensure that 'compile' targets depend on 'deps' Message-ID: Review at https://gerrit.osmocom.org/5301 Makefile: ensure that 'compile' targets depend on 'deps' This will ensure that a 'make compile' on a freshly-cloned repo will first clone all the deps to ensure a successful build Change-Id: I6583a42758b5682b04d1e90585063904508aa3a9 --- M Makefile 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/5301/1 diff --git a/Makefile b/Makefile index 6a470a0..80211de 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ define DIR_compile_template .PHONY: $(1)/compile -$(1)/compile: $(1)/Makefile +$(1)/compile: deps $(1)/Makefile $(MAKE) -C $(1) compile endef @@ -45,7 +45,7 @@ define DIR_all_template $(1): $(1)/all .PHONY: $(1)/all -$(1)/all: $(1)/Makefile +$(1)/all: deps $(1)/Makefile $(MAKE) -C $(1) compile $(MAKE) $(PARALLEL_MAKE) -C $(1) endef -- To view, visit https://gerrit.osmocom.org/5301 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6583a42758b5682b04d1e90585063904508aa3a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:39:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:39:05 +0000 Subject: osmo-ttcn3-hacks[master]: Makefile: ensure that 'compile' targets depend on 'deps' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5301 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6583a42758b5682b04d1e90585063904508aa3a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:39:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:39:14 +0000 Subject: osmo-ttcn3-hacks[master]: gprs_gb: Fix compileation (don't use Ericsson MobileL3) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I751096f7e2846278df166d0b947fa78ddbe1ca9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:39:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:39:23 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: gprs_gb: Fix compileation (don't use Ericsson MobileL3) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs_gb: Fix compileation (don't use Ericsson MobileL3) ...................................................................... gprs_gb: Fix compileation (don't use Ericsson MobileL3) Change-Id: I751096f7e2846278df166d0b947fa78ddbe1ca9b --- M gprs_gb/gen_links.sh 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh index 5f6547a..9f4cea4 100755 --- a/gprs_gb/gen_links.sh +++ b/gprs_gb/gen_links.sh @@ -27,10 +27,6 @@ FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" gen_links $DIR $FILES -DIR=$BASEDIR/titan.ProtocolModules.MobileL3_v13.4.0/src -FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn SS_DataTypes.asn SS_EncDec.cc SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn" -gen_links $DIR $FILES - DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I751096f7e2846278df166d0b947fa78ddbe1ca9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:39:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 16:39:23 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Makefile: ensure that 'compile' targets depend on 'deps' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Makefile: ensure that 'compile' targets depend on 'deps' ...................................................................... Makefile: ensure that 'compile' targets depend on 'deps' This will ensure that a 'make compile' on a freshly-cloned repo will first clone all the deps to ensure a successful build Change-Id: I6583a42758b5682b04d1e90585063904508aa3a9 --- M Makefile 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/Makefile b/Makefile index 6a470a0..80211de 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ define DIR_compile_template .PHONY: $(1)/compile -$(1)/compile: $(1)/Makefile +$(1)/compile: deps $(1)/Makefile $(MAKE) -C $(1) compile endef @@ -45,7 +45,7 @@ define DIR_all_template $(1): $(1)/all .PHONY: $(1)/all -$(1)/all: $(1)/Makefile +$(1)/all: deps $(1)/Makefile $(MAKE) -C $(1) compile $(MAKE) $(PARALLEL_MAKE) -C $(1) endef -- To view, visit https://gerrit.osmocom.org/5301 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6583a42758b5682b04d1e90585063904508aa3a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 16:44:00 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Dec 2017 16:44:00 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5294 to look at the new patch set (#2). osmo-mgw: Add vty reference manual add missing vty reference manual for osmo-mgw Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 --- M Makefile A OsmoMGW/Makefile A OsmoMGW/osmomgw-vty-reference.xml A OsmoMGW/vty/mgw_vty_additions.xml A OsmoMGW/vty/mgw_vty_reference.xml 5 files changed, 1,783 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/94/5294/2 diff --git a/Makefile b/Makefile index 8261640..1fd0733 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) cd OsmocomBB; $(MAKE) + cd OsmoMGW; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -27,6 +28,7 @@ cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean cd OsmocomBB; $(MAKE) clean + cd OsmoMGW; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -42,6 +44,7 @@ cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload cd OsmocomBB; $(MAKE) upload + cd OsmoMGW; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -54,6 +57,7 @@ # These don't use asciidoc, so they have no 'make check' target: #cd OsmoMGCP; $(MAKE) check #cd OsmoNAT; $(MAKE) check + #cd OsmoMGW; $(MAKE) check cd OsmoGSMTester; $(MAKE) check cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check diff --git a/OsmoMGW/Makefile b/OsmoMGW/Makefile new file mode 100644 index 0000000..46c97e4 --- /dev/null +++ b/OsmoMGW/Makefile @@ -0,0 +1,6 @@ +TOPDIR = .. + +VTY_REFERENCE = osmomgw-vty-reference.xml +include $(TOPDIR)/build/Makefile.vty-reference.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmoMGW/osmomgw-vty-reference.xml b/OsmoMGW/osmomgw-vty-reference.xml new file mode 100644 index 0000000..38cfd4f --- /dev/null +++ b/OsmoMGW/osmomgw-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + 12th December 2017 + pm + Initial + + + + OsmoMGW VTY Reference + + + 2017 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoMGW/vty/mgw_vty_additions.xml b/OsmoMGW/vty/mgw_vty_additions.xml new file mode 100644 index 0000000..a4c675e --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_additions.xml @@ -0,0 +1,2 @@ + + diff --git a/OsmoMGW/vty/mgw_vty_reference.xml b/OsmoMGW/vty/mgw_vty_reference.xml new file mode 100644 index 0000000..28eba81 --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_reference.xml @@ -0,0 +1,1733 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:57:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:57:32 +0000 Subject: osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:57:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:57:34 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: osmo-mgw: Add vty reference manual In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-mgw: Add vty reference manual ...................................................................... osmo-mgw: Add vty reference manual add missing vty reference manual for osmo-mgw Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 --- M Makefile A OsmoMGW/Makefile A OsmoMGW/osmomgw-vty-reference.xml A OsmoMGW/vty/mgw_vty_additions.xml A OsmoMGW/vty/mgw_vty_reference.xml 5 files changed, 1,783 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile b/Makefile index 8261640..1fd0733 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ cd OsmoHLR; $(MAKE) cd OsmoSTP; $(MAKE) cd OsmocomBB; $(MAKE) + cd OsmoMGW; $(MAKE) clean: cd OsmoBTS; $(MAKE) clean @@ -27,6 +28,7 @@ cd OsmoHLR; $(MAKE) clean cd OsmoSTP; $(MAKE) clean cd OsmocomBB; $(MAKE) clean + cd OsmoMGW; $(MAKE) clean upload: cd OsmoBTS; $(MAKE) upload @@ -42,6 +44,7 @@ cd OsmoHLR; $(MAKE) upload cd OsmoSTP; $(MAKE) upload cd OsmocomBB; $(MAKE) upload + cd OsmoMGW; $(MAKE) upload check: cd OsmoBTS; $(MAKE) check @@ -54,6 +57,7 @@ # These don't use asciidoc, so they have no 'make check' target: #cd OsmoMGCP; $(MAKE) check #cd OsmoNAT; $(MAKE) check + #cd OsmoMGW; $(MAKE) check cd OsmoGSMTester; $(MAKE) check cd OsmoMSC; $(MAKE) check cd OsmoHLR; $(MAKE) check diff --git a/OsmoMGW/Makefile b/OsmoMGW/Makefile new file mode 100644 index 0000000..46c97e4 --- /dev/null +++ b/OsmoMGW/Makefile @@ -0,0 +1,6 @@ +TOPDIR = .. + +VTY_REFERENCE = osmomgw-vty-reference.xml +include $(TOPDIR)/build/Makefile.vty-reference.inc + +include $(TOPDIR)/build/Makefile.common.inc diff --git a/OsmoMGW/osmomgw-vty-reference.xml b/OsmoMGW/osmomgw-vty-reference.xml new file mode 100644 index 0000000..38cfd4f --- /dev/null +++ b/OsmoMGW/osmomgw-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + 12th December 2017 + pm + Initial + + + + OsmoMGW VTY Reference + + + 2017 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoMGW/vty/mgw_vty_additions.xml b/OsmoMGW/vty/mgw_vty_additions.xml new file mode 100644 index 0000000..a4c675e --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_additions.xml @@ -0,0 +1,2 @@ + + diff --git a/OsmoMGW/vty/mgw_vty_reference.xml b/OsmoMGW/vty/mgw_vty_reference.xml new file mode 100644 index 0000000..28eba81 --- /dev/null +++ b/OsmoMGW/vty/mgw_vty_reference.xml @@ -0,0 +1,1733 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/5294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9d8cdcbbbf14b23e48af5b9ae1c56c2a38219a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:58:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:58:19 +0000 Subject: osmo-mgw[master]: network: use originating RTP packet address for loopback In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5298 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d1abe56d016e28c97f60635eb574679d36e2c52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:03 +0000 Subject: osmo-mgw[master]: mcgp_client: mgcp_msg_gen(): add checks to verify params In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15c464c4bcdf6e524f68acc62f44186dd7ad19a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:08 +0000 Subject: [MERGED] osmo-mgw[master]: mcgp_client: mgcp_msg_gen(): add checks to verify params In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mcgp_client: mgcp_msg_gen(): add checks to verify params ...................................................................... mcgp_client: mgcp_msg_gen(): add checks to verify params mgcp_msg_gen() does not check the contents of the prameters that are handed over with the struct. This may lead to invalid mgcp messages sent to the MGW, which can be difficult to debug. Add some additional checks to make a possible problem noticeable in an early stage. - verify that the endpoint is not a nullstring - verify that the connection id is not a nullstring - verify that the ip-address is not a nullstring - verify that the port number is a value greater 0 Change-Id: I15c464c4bcdf6e524f68acc62f44186dd7ad19a7 --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 28 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 2f3d0d1..1c35aa9 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -789,8 +789,15 @@ } /* Add endpoint name */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_ENDPOINT) + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_ENDPOINT) { + if (strlen(mgcp_msg->endpoint) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty endpoint name, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, " %s", mgcp_msg->endpoint); + } /* Add protocol version */ rc += msgb_printf(msg, " MGCP 1.0\r\n"); @@ -800,8 +807,15 @@ rc += msgb_printf(msg, "C: %x\r\n", mgcp_msg->call_id); /* Add connection id */ - if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) + if (mgcp_msg->presence & MGCP_MSG_PRESENCE_CONN_ID) { + if (strlen(mgcp_msg->conn_id) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty connection id, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, "I: %s\r\n", mgcp_msg->conn_id); + } /* Add local connection options */ if (mgcp_msg->verb == MGCP_VERB_CRCX) @@ -816,6 +830,18 @@ /* Add RTP address and port (SDP) */ if (mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_IP && mgcp_msg->presence & MGCP_MSG_PRESENCE_AUDIO_PORT) { + if (mgcp_msg->audio_port == 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Invalid port number, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } + if (strlen(mgcp_msg->audio_ip) <= 0) { + LOGP(DLMGCP, LOGL_ERROR, + "Empty ip address, can not generate MGCP message\n"); + msgb_free(msg); + return NULL; + } rc += msgb_printf(msg, "\r\n"); rc += msgb_printf(msg, "c=IN IP4 %s\r\n", mgcp_msg->audio_ip); rc += -- To view, visit https://gerrit.osmocom.org/5268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15c464c4bcdf6e524f68acc62f44186dd7ad19a7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:09 +0000 Subject: [MERGED] osmo-mgw[master]: network: use originating RTP packet address for loopback In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: network: use originating RTP packet address for loopback ...................................................................... network: use originating RTP packet address for loopback When a connection is created in loopback mode all incoming packets should be reflected back to their origin. If the user did not supply a destination address with the CRCX command all incoming packets will be tossed because no destination address is officially known yet. If there is no destination address set and the connection is in loopback mode. Then use the originating address of the incoming packet as destination address. Change-Id: I3d1abe56d016e28c97f60635eb574679d36e2c52 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index eb44f9b..aac3e51 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1077,7 +1077,16 @@ /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ + if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { + /* When we are in loopback mode, we loop back all incoming + * packets back to their origin. We will use the originating + * address data from the UDP packet header to patch the + * outgoing address in connection on the fly */ + if (conn_src->end.rtp_port == 0) { + conn_src->end.addr = addr.sin_addr; + conn_src->end.rtp_port = addr.sin_port; + } return mgcp_send_rtp(proto, &addr, buf, len, conn_src, conn_src); } -- To view, visit https://gerrit.osmocom.org/5298 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d1abe56d016e28c97f60635eb574679d36e2c52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:25 +0000 Subject: openbsc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5297 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I43cf4eed22425554826d59857eded5b4cc0d2c52 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:31 +0000 Subject: [MERGED] openbsc[master]: sms.db: silence libdbi warnings on out-of-range index In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sms.db: silence libdbi warnings on out-of-range index ...................................................................... sms.db: silence libdbi warnings on out-of-range index Apparently, since libdbi 0.9.0 aka 0.9.0-5 on debian-testing, osmo-msc barfs numerous libdbi warnings whenever a query rightfully returns no rows. Trivially query whether there are any rows first by adding an inline wrap function next_row(). Silenced: DDB <000d> ../../../../src/osmo-msc/src/libmsc/db.c:188 DBI: -6: An invalid or out-of-range index was passed to l DDB <000d> ../../../src/libosmocore/src/backtrace.c:47 backtrace() returned 11 addresses DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xfb81) [0x555555563b81] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(_error_handle DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/lib/x86_64-linux-gnu/libdbi.so.1(dbi_result_ne DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x11172) [0x555555565172] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e6bc) [0x5555555726bc] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1e7f6) [0x5555555727f6] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0x1f1d2) [0x5555555731d2] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbb86) [0x55555555fb86] DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0 DDB <000d> ../../../src/libosmocore/src/backtrace.c:57 /usr/local/bin/osmo-msc(+0xbfba) [0x55555555ffba] Related: OS#2737 OS#2667 Change-Id: I43cf4eed22425554826d59857eded5b4cc0d2c52 --- M openbsc/src/libmsc/db.c 1 file changed, 25 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 4ba12ca..15e7fd4 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -183,6 +183,13 @@ ")", }; +static inline int next_row(dbi_result result) +{ + if (!dbi_result_has_next_row(result)) + return 0; + return dbi_result_next_row(result); +} + void db_error_func(dbi_conn conn, void *data) { const char *msg; @@ -310,7 +317,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 3).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v3(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 3).\n"); @@ -456,7 +463,7 @@ "Failed fetch messages from the old SMS table (upgrade from rev 4).\n"); goto rollback; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { sms = sms_from_result_v4(result); if (db_sms_store(sms) != 0) { LOGP(DDB, LOGL_ERROR, "Failed to store message to the new SMS table(upgrade from rev 4).\n"); @@ -532,7 +539,7 @@ if (!result) return -EINVAL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -EINVAL; } @@ -726,7 +733,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -774,7 +781,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -860,7 +867,7 @@ if (!result) return -EIO; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return -ENOENT; } @@ -1050,7 +1057,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber.\n"); return NULL; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { DEBUGP(DDB, "Failed to find the Subscriber. '%u' '%s'\n", field, id); dbi_result_free(result); @@ -1086,7 +1093,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Subscriber: %llu\n", subscr->id); return -EIO; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { DEBUGP(DDB, "Failed to find the Subscriber. %llu\n", subscr->id); dbi_result_free(result); @@ -1279,7 +1286,7 @@ return -1; } - while (dbi_result_next_row(result)) { + while (next_row(result)) { struct gsm_subscriber *subscr; subscr = subscr_alloc(); @@ -1357,7 +1364,7 @@ return -EIO; } - while (dbi_result_next_row(result)) + while (next_row(result)) callback(priv, dbi_result_get_ulonglong(result, "id")); dbi_result_free(result); @@ -1396,7 +1403,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); DEBUGP(DDB, "Allocated TMSI %u for IMSI %s.\n", subscriber->tmsi, subscriber->imsi); @@ -1429,7 +1436,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); break; } @@ -1470,7 +1477,7 @@ dbi_result_free(result); continue; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); break; } @@ -1530,7 +1537,7 @@ LOGP(DDB, LOGL_ERROR, "Failed to query Equipment by IMEI.\n"); return 1; } - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { LOGP(DDB, LOGL_ERROR, "Failed to find the Equipment.\n"); dbi_result_free(result); return 1; @@ -1686,7 +1693,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1715,7 +1722,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1745,7 +1752,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } @@ -1774,7 +1781,7 @@ if (!result) return NULL; - if (!dbi_result_next_row(result)) { + if (!next_row(result)) { dbi_result_free(result); return NULL; } -- To view, visit https://gerrit.osmocom.org/5297 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43cf4eed22425554826d59857eded5b4cc0d2c52 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:45 +0000 Subject: [MERGED] osmo-bsc[master]: paging: Stop all paging if MSC sends us BSSMAP RESET In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: paging: Stop all paging if MSC sends us BSSMAP RESET ...................................................................... paging: Stop all paging if MSC sends us BSSMAP RESET When the MSC has lost its state and issues a RESET, we should not only clear all ongoing radio connections, but we should also stop any paging. There's no point in paging a subscriber if the MSC doesn't know about this paging anymore. Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Closes: OS#2736 --- M include/osmocom/bsc/paging.h M src/libbsc/paging.c M src/osmo-bsc/osmo_bsc_bssap.c 3 files changed, 29 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index 533f366..2b1bc50 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -75,4 +75,7 @@ struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub); +void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc); +void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc); + #endif diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index f4679de..8d54d0a 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -467,3 +467,26 @@ return NULL; } + +/*! Flush all paging requests at a given BTS for a given MSC*/ +void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc) +{ + struct gsm_paging_request *req, *req2; + + llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { + if (msc && req->msc != msc) + continue; + /* now give up the data structure */ + LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d (flush).\n", req->bsub->imsi, bts->nr); + paging_remove_request(&bts->paging, req); + } +} + +/*! Flush all paging requests issued by \a msc on any BTS in \a net */ +void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc) +{ + struct gsm_bts *bts; + + llist_for_each_entry(bts, &net->bts_list, list) + paging_flush_bts(bts, msc); +} diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 73776ad..051b74e 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -218,6 +218,9 @@ * close all active channels on the BTS side as well */ osmo_bsc_sigtran_reset(msc); + /* Drop all ongoing paging requests that this MSC has created on any BTS */ + paging_flush_network(msc->network, msc); + /* Inform the MSC that we have received the reset request and * that we acted accordingly */ osmo_bsc_sigtran_tx_reset_ack(msc); -- To view, visit https://gerrit.osmocom.org/5286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:46 +0000 Subject: [MERGED] osmo-bsc[master]: paging: Remove obsolete paging call-back support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: paging: Remove obsolete paging call-back support ...................................................................... paging: Remove obsolete paging call-back support The call-back was needed inside the NITB to determine which part (CC, SMS, ...) had triggered a given paging. A pure BSC doesn't need that feature, so let's get rid of it. The 'void *cbfn_data' is replaced with a 'struct bsc_msc_data *', as all callers use it with that type. Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab --- M include/osmocom/bsc/paging.h M src/libbsc/paging.c M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_grace.c 4 files changed, 28 insertions(+), 54 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index e917772..533f366 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -29,6 +29,8 @@ #include #include +struct bsc_msc_data; + /** * A pending paging request */ @@ -49,16 +51,15 @@ /* How often did we ask the BTS to page? */ int attempts; - /* callback to be called in case paging completes */ - gsm_cbfn *cbfn; - void *cbfn_param; + /* MSC that has issued this paging */ + struct bsc_msc_data *msc; }; /* schedule paging request */ -int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data); -int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data); +int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc); +int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc); /* stop paging requests */ void paging_request_stop(struct llist_head *bts_list, @@ -72,6 +73,6 @@ /* pending paging requests */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts); -void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub); +struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub); #endif diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 41e134d..f4679de 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -266,9 +266,6 @@ static void paging_T3113_expired(void *data) { struct gsm_paging_request *req = (struct gsm_paging_request *)data; - void *cbfn_param; - gsm_cbfn *cbfn; - int msg; log_set_context(LOG_CTX_BSC_SUBSCR, req->bsub); @@ -277,30 +274,19 @@ /* must be destroyed before calling cbfn, to prevent double free */ rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); - cbfn_param = req->cbfn_param; - cbfn = req->cbfn; - - /* did we ever manage to page the subscriber */ - msg = req->attempts > 0 ? GSM_PAGING_EXPIRED : GSM_PAGING_BUSY; /* destroy it now. Do not access req afterwards */ paging_remove_request(&req->bts->paging, req); - - if (cbfn) - cbfn(GSM_HOOK_RR_PAGING, msg, NULL, NULL, - cbfn_param); - } /*! Start paging + paging timer for given subscriber on given BTS * \param bts BTS on which to page * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * \returns 0 on success, negative on error */ -static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; @@ -318,8 +304,7 @@ req->bsub = bsc_subscr_get(bsub); req->bts = bts; req->chan_type = type; - req->cbfn = cbfn; - req->cbfn_param = data; + req->msc = msc; osmo_timer_setup(&req->T3113, paging_T3113_expired, req); osmo_timer_schedule(&req->T3113, bts->network->T3113, 0); llist_add_tail(&req->entry, &bts_entry->pending_requests); @@ -332,11 +317,10 @@ * \param bts BTS on which to page * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * returns 1 on success; 0 in case of error (e.g. TRX down) */ -int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { int rc; @@ -348,7 +332,7 @@ paging_init_if_needed(bts); /* Trigger paging, pass any error to the caller */ - rc = _paging_request(bts, bsub, type, cbfn, data); + rc = _paging_request(bts, bsub, type, msc); if (rc < 0) return rc; return 1; @@ -358,11 +342,10 @@ * \param network gsm_network we operate in * \param[in] bsub subscriber we want to page * \param[in] type type of radio channel we're requirign - * \param[in] cbfn call-back function to call once we see paging response - * \param[in] data user-data to pass to \a cbfn on paging response + * \param[in] msc MSC which has issue this paging * \returns number of BTSs on which we issued the paging */ -int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, - int type, gsm_cbfn *cbfn, void *data) +int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, + struct bsc_msc_data *msc) { struct gsm_bts *bts = NULL; int num_pages = 0; @@ -377,7 +360,7 @@ if (!bts) break; - rc = paging_request_bts(bts, bsub, type, cbfn, data); + rc = paging_request_bts(bts, bsub, type, msc); if (rc < 0) { paging_request_stop(&network->bts_list, NULL, bsub, NULL, NULL); @@ -413,19 +396,9 @@ llist_for_each_entry_safe(req, req2, &bts_entry->pending_requests, entry) { if (req->bsub == bsub) { - gsm_cbfn *cbfn = req->cbfn; - void *param = req->cbfn_param; - /* now give up the data structure */ paging_remove_request(&bts->paging, req); - req = NULL; - - if (conn && cbfn) { - LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d, calling cbfn.\n", bsub->imsi, bts->nr); - cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED, - msg, conn, param); - } else - LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d silently.\n", bsub->imsi, bts->nr); + LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d\n", bsub->imsi, bts->nr); break; } } @@ -484,13 +457,13 @@ } /*! Find any paging data for the given subscriber at the given BTS. */ -void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub) +struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub) { struct gsm_paging_request *req; llist_for_each_entry(req, &bts->paging.pending_requests, entry) if (req->bsub == bsub) - return req->cbfn_param; + return req->msc; return NULL; } diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 7f9671a..2b71b85 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -186,7 +186,7 @@ return NULL; } - pag_msc = paging_get_data(conn->bts, subscr); + pag_msc = paging_get_msc(conn->bts, subscr); bsc_subscr_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { diff --git a/src/osmo-bsc/osmo_bsc_grace.c b/src/osmo-bsc/osmo_bsc_grace.c index a310079..f16a19a 100644 --- a/src/osmo-bsc/osmo_bsc_grace.c +++ b/src/osmo-bsc/osmo_bsc_grace.c @@ -42,12 +42,12 @@ struct gsm_bts *bts; llist_for_each_entry(bts, &msc->network->bts_list, list) - paging_request_bts(bts, subscr, chan_needed, NULL, msc); + paging_request_bts(bts, subscr, chan_needed, msc); return 0; } - return paging_request(msc->network, subscr, chan_needed, NULL, msc); + return paging_request(msc->network, subscr, chan_needed, msc); } static int locked_paging(struct bsc_subscr *subscr, int chan_needed, @@ -73,7 +73,7 @@ /* * now page on this bts */ - paging_request_bts(bts, subscr, chan_needed, NULL, msc); + paging_request_bts(bts, subscr, chan_needed, msc); }; /* All bts are either off or in the grace period */ -- To view, visit https://gerrit.osmocom.org/5285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8839e8338d3ad1a91b41e687e8412fcdca3fd9ab Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:46 +0000 Subject: [MERGED] osmo-bsc[master]: paging.c: add more documentation on what the functions actua... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: paging.c: add more documentation on what the functions actually do ...................................................................... paging.c: add more documentation on what the functions actually do This was created during code review towards some upcoming fix for OS#2736. However, it's not really related to that. Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc --- M src/libbsc/paging.c 1 file changed, 45 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index b8f9043..41e134d 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -121,6 +121,10 @@ paging_handle_pending_requests(paging_bts); } +/*! count the number of free channels for given RSL channel type required + * \param[in] BTS on which we shall count + * \param[in] rsl_type the RSL channel needed type + * \returns number of free channels matching \a rsl_type in \a bts */ static int can_send_pag_req(struct gsm_bts *bts, int rsl_type) { struct pchan_load pl; @@ -229,6 +233,7 @@ paging_handle_pending_requests(paging_bts); } +/*! initialize the bts paging state, if it hasn't been initialized yet */ static void paging_init_if_needed(struct gsm_bts *bts) { if (bts->paging.bts) @@ -243,6 +248,7 @@ bts->paging.available_slots = 20; } +/*! do we have any pending paging requests for given subscriber? */ static int paging_pending_request(struct gsm_bts_paging_state *bts, struct bsc_subscr *bsub) { @@ -256,6 +262,7 @@ return 0; } +/*! Call-back once T3113 (paging timeout) expires for given paging_request */ static void paging_T3113_expired(void *data) { struct gsm_paging_request *req = (struct gsm_paging_request *)data; @@ -285,6 +292,13 @@ } +/*! Start paging + paging timer for given subscriber on given BTS + * \param bts BTS on which to page + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * \returns 0 on success, negative on error */ static int _paging_request(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -300,6 +314,7 @@ LOGP(DPAG, LOGL_DEBUG, "Start paging of subscriber %s on bts %d.\n", bsc_subscr_name(bsub), bts->nr); req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); + OSMO_ASSERT(req); req->bsub = bsc_subscr_get(bsub); req->bts = bts; req->chan_type = type; @@ -313,6 +328,13 @@ return 0; } +/*! Handle PAGING request from MSC for one (matching) BTS + * \param bts BTS on which to page + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * returns 1 on success; 0 in case of error (e.g. TRX down) */ int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -332,6 +354,13 @@ return 1; } +/*! Receive a new PAGING request from the MSC + * \param network gsm_network we operate in + * \param[in] bsub subscriber we want to page + * \param[in] type type of radio channel we're requirign + * \param[in] cbfn call-back function to call once we see paging response + * \param[in] data user-data to pass to \a cbfn on paging response + * \returns number of BTSs on which we issued the paging */ int paging_request(struct gsm_network *network, struct bsc_subscr *bsub, int type, gsm_cbfn *cbfn, void *data) { @@ -364,6 +393,13 @@ } +/*! Stop paging a given subscriber on a given BTS. + * If \a conn is non-NULL, we also call the paging call-back function + * to notify the paging originator that paging has completed. + * \param[in] bts BTS on which we shall stop paging + * \param[in] bsub subscriber which we shall stop paging + * \param[in] conn connection to the subscriber (if any) + * \param[in] msg message received from subscrbier (if any) */ /* we consciously ignore the type of the request here */ static void _paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub, struct gsm_subscriber_connection *conn, @@ -395,7 +431,11 @@ } } -/* Stop paging on all other bts' */ +/*! Stop paging on all other bts' + * \param[in] bts_list list of BTSs to iterate + * \param[in] _bts BTS which has received a paging response + * \param[in] bsub subscriber + * \param[in] msgb L3 message that we have received from \a bsub on \a _bts */ void paging_request_stop(struct llist_head *bts_list, struct gsm_bts *_bts, struct bsc_subscr *bsub, struct gsm_subscriber_connection *conn, @@ -418,6 +458,8 @@ } } + +/*! Update the BTS paging buffer slots on given BTS */ void paging_update_buffer_space(struct gsm_bts *bts, uint16_t free_slots) { paging_init_if_needed(bts); @@ -427,6 +469,7 @@ paging_schedule_if_needed(&bts->paging); } +/*! Count the number of pending paging requests on given BTS */ unsigned int paging_pending_requests_nr(struct gsm_bts *bts) { unsigned int requests = 0; @@ -440,9 +483,7 @@ return requests; } -/** - * Find any paging data for the given subscriber at the given BTS. - */ +/*! Find any paging data for the given subscriber at the given BTS. */ void *paging_get_data(struct gsm_bts *bts, struct bsc_subscr *bsub) { struct gsm_paging_request *req; -- To view, visit https://gerrit.osmocom.org/5284 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68d4fc8baaedd1d64cd628b2441c57ebc64ecebc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 12 17:59:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 17:59:46 +0000 Subject: [MERGED] osmo-bsc[master]: Change T3101 default from 10s to 3s. In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Change T3101 default from 10s to 3s. ...................................................................... Change T3101 default from 10s to 3s. This timer is started when a channel is allocated with an IMMEDIATE ASSIGNMENT message. It is stopped when the MS has correctly seized the channel. Ever since the early days of development we were using a very long timeout to be on the safe side. However, in production networks this is a terrible waste of resources, as we will occupy 10s worth of air-time on one of our channels for each RACH request we receive. The only scenarios where you might need something absurdly high as 10s would be if you have 8s of RTT between your BTS and the BSC. See also https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Closes: OS#2733 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a9512f5..a6c8198 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -262,7 +262,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; -#define GSM_T3101_DEFAULT 10 /* s */ +#define GSM_T3101_DEFAULT 3 /* s */ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -- To view, visit https://gerrit.osmocom.org/5266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3c52a7cf0c06d074c44a2fc414679279189aab9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 18:00:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 18:00:53 +0000 Subject: osmo-bsc[master]: Generate SI2bis Rest Octets In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 18:00:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 18:00:56 +0000 Subject: [MERGED] osmo-bsc[master]: Generate SI2bis Rest Octets In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Generate SI2bis Rest Octets ...................................................................... Generate SI2bis Rest Octets According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Related: OS#2711 Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd --- M include/osmocom/bsc/rest_octets.h M src/libbsc/rest_octets.c M src/libbsc/system_information.c M tests/gsm0408/gsm0408_test.ok 4 files changed, 20 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/rest_octets.h b/include/osmocom/bsc/rest_octets.h index ba25b6d..f7ad682 100644 --- a/include/osmocom/bsc/rest_octets.h +++ b/include/osmocom/bsc/rest_octets.h @@ -10,6 +10,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts); int rest_octets_si2ter(uint8_t *data); +int rest_octets_si2bis(uint8_t *data); int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { diff --git a/src/libbsc/rest_octets.c b/src/libbsc/rest_octets.c index b8a29ba..9f2b4c0 100644 --- a/src/libbsc/rest_octets.c +++ b/src/libbsc/rest_octets.c @@ -478,6 +478,20 @@ return bv.data_len; } +/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ +int rest_octets_si2bis(uint8_t *data) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + + return bv.data_len; +} + /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3) { diff --git a/src/libbsc/system_information.c b/src/libbsc/system_information.c index 4575454..a04959d 100644 --- a/src/libbsc/system_information.c +++ b/src/libbsc/system_information.c @@ -739,7 +739,10 @@ si2b->rach_control = bts->si_common.rach_control; - return sizeof(*si2b); + /* SI2bis Rest Octets as per 3GPP TS 44.018 ?10.5.2.33 */ + rc = rest_octets_si2bis(si2b->rest_octets); + + return sizeof(*si2b) + rc; } static int generate_si2ter(enum osmo_sysinfo_type t, struct gsm_bts *bts) diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 868cd9b..536287c 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -203,7 +203,7 @@ generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5272 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 12 20:58:52 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 12 Dec 2017 20:58:52 +0000 Subject: libosmocore[master]: Fix malformed Abis/RSL messages with extra L3 Information field In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/3258/3/tests/lapd/lapd_test.c File tests/lapd/lapd_test.c: Line 365 > It doesn't, as the IE L3 INFO is not added anymore to those messages used h Cool! That explains it. -- To view, visit https://gerrit.osmocom.org/3258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:09:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:09:41 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Ensure that PCH load indications suppress further... Message-ID: Review at https://gerrit.osmocom.org/5302 BSC_Tests: Ensure that PCH load indications suppress further paging Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52 --- M bsc/BSC_Tests.ttcn 1 file changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/5302/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index ea8b67e..926e8cc 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -742,8 +742,31 @@ /* Paging on multiple cells (multiple entries in list): Verify all of them page */ /* Verify paging retransmission interval + count */ /* Verify paging stops after channel establishment */ -/* Verify PCH load */ /* Test behavior under paging overload */ + +/* Verify PCH load */ +testcase TC_paging_imsi_load() runs on test_CT { + var BSSMAP_FIELD_CellIdentificationList cid_list; + timer T := 4.0; + cid_list := valueof(ts_BSSMAP_CIL_noCell); + f_pageing_helper('001010123456789'H, cid_list); + + /* tell BSC there is no paging space anymore */ + f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(0)); + + /* Wait for 4 seconds if any more PAGING CMD are received on RSL. Normally, + * there would be 8 retransmissions during 4 seconds */ + T.start; + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after LOAD_IND(0)"); + self.stop; + } + [] T.timeout { + setverdict(pass); + } + } +} /* Verify paging stops after A-RESET */ testcase TC_paging_imsi_a_reset() runs on test_CT { @@ -802,7 +825,7 @@ execute( TC_paging_imsi_nochan_lac() ); execute( TC_paging_imsi_nochan_all() ); execute( TC_paging_imsi_a_reset() ); - + execute( TC_paging_imsi_load() ); } } -- To view, visit https://gerrit.osmocom.org/5302 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:40:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:40:57 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: regen_makefile.sh: Fix TITAN 6.1.0 support Message-ID: Review at https://gerrit.osmocom.org/5303 regen_makefile.sh: Fix TITAN 6.1.0 support When introducing the rewriting for 6.3.0 we broke the 6.1.0 support. Now the result should build on Debian with both 6.1.0 and 6.3.0 Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d --- M bsc-nat/regen_makefile.sh M bsc/regen_makefile.sh M ggsn_tests/regen_makefile.sh M gprs_gb/regen_makefile.sh M lapdm/regen_makefile.sh M mgw/regen_makefile.sh M msc_tests/regen_makefile.sh M sysinfo/regen_makefile.sh 8 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/5303/1 diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index 6fb3ca4..6d0ac12 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -11,5 +11,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index f037230..4e334d5 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -11,5 +11,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index b3e6332..cd2d95a 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh index b45e5b4..72fc632 100755 --- a/gprs_gb/regen_makefile.sh +++ b/gprs_gb/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh index f2d1782..c80b094 100755 --- a/lapdm/regen_makefile.sh +++ b/lapdm/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index df7ccc7..30f8c33 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/msc_tests/regen_makefile.sh b/msc_tests/regen_makefile.sh index 0b4ab88..7db539d 100755 --- a/msc_tests/regen_makefile.sh +++ b/msc_tests/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index 1042090..e06b8f5 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile -- To view, visit https://gerrit.osmocom.org/5303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:43:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:43:43 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: add missing 'rmkinks.sh script Message-ID: Review at https://gerrit.osmocom.org/5304 add missing 'rmkinks.sh script Change-Id: I0f87b2c9755881ea7ba019faa74cb1bfaca88546 --- A rmlinks.sh 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/5304/1 diff --git a/rmlinks.sh b/rmlinks.sh new file mode 100755 index 0000000..58ca6f3 --- /dev/null +++ b/rmlinks.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find . -type l -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f87b2c9755881ea7ba019faa74cb1bfaca88546 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:44:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:44:37 +0000 Subject: osmo-ttcn3-hacks[master]: add missing 'rmkinks.sh script In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f87b2c9755881ea7ba019faa74cb1bfaca88546 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:44:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:44:38 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: add missing 'rmkinks.sh script In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add missing 'rmkinks.sh script ...................................................................... add missing 'rmkinks.sh script Change-Id: I0f87b2c9755881ea7ba019faa74cb1bfaca88546 --- A rmlinks.sh 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/rmlinks.sh b/rmlinks.sh new file mode 100755 index 0000000..58ca6f3 --- /dev/null +++ b/rmlinks.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find . -type l -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f87b2c9755881ea7ba019faa74cb1bfaca88546 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:47:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:47:13 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 Message-ID: Review at https://gerrit.osmocom.org/5305 Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 I have no clue why, but this seems to work? Change-Id: I49750709e50d16a9fabec3e754ae8381832e6104 --- M library/Osmocom_CTRL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/5305/1 diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn index 5d6ddae..4d2406d 100644 --- a/library/Osmocom_CTRL_Types.ttcn +++ b/library/Osmocom_CTRL_Types.ttcn @@ -55,7 +55,7 @@ CtrlResponse resp, CtrlError err, CtrlTrap trap -}; +} with { variant "BEGIN('')" }; external function enc_CtrlMessage(in CtrlMessage id) return charstring with { extension "prototype(convert) encode(TEXT)"}; -- To view, visit https://gerrit.osmocom.org/5305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49750709e50d16a9fabec3e754ae8381832e6104 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:47:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:47:59 +0000 Subject: osmo-ttcn3-hacks[master]: Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I49750709e50d16a9fabec3e754ae8381832e6104 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:48:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:48:00 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 ...................................................................... Osmocom_CTRL_Types.ttcn: workaround to compile on TITAN 6.1.0 I have no clue why, but this seems to work? Change-Id: I49750709e50d16a9fabec3e754ae8381832e6104 --- M library/Osmocom_CTRL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn index 5d6ddae..4d2406d 100644 --- a/library/Osmocom_CTRL_Types.ttcn +++ b/library/Osmocom_CTRL_Types.ttcn @@ -55,7 +55,7 @@ CtrlResponse resp, CtrlError err, CtrlTrap trap -}; +} with { variant "BEGIN('')" }; external function enc_CtrlMessage(in CtrlMessage id) return charstring with { extension "prototype(convert) encode(TEXT)"}; -- To view, visit https://gerrit.osmocom.org/5305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49750709e50d16a9fabec3e754ae8381832e6104 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:50:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:50:30 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: selftest: Fix Makefile generation on TITAN 6.1.0 Message-ID: Review at https://gerrit.osmocom.org/5306 selftest: Fix Makefile generation on TITAN 6.1.0 Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6 --- M selftest/regen_makefile.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/5306/1 diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh index b4780a0..086441b 100755 --- a/selftest/regen_makefile.sh +++ b/selftest/regen_makefile.sh @@ -5,7 +5,7 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c" ttcn3_makefilegen -l -f $MAIN $FILES -#sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile -- To view, visit https://gerrit.osmocom.org/5306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:51:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:51:07 +0000 Subject: osmo-ttcn3-hacks[master]: selftest: Fix Makefile generation on TITAN 6.1.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:51:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:51:10 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: selftest: Fix Makefile generation on TITAN 6.1.0 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: selftest: Fix Makefile generation on TITAN 6.1.0 ...................................................................... selftest: Fix Makefile generation on TITAN 6.1.0 Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6 --- M selftest/regen_makefile.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh index b4780a0..086441b 100755 --- a/selftest/regen_makefile.sh +++ b/selftest/regen_makefile.sh @@ -5,7 +5,7 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c" ttcn3_makefilegen -l -f $MAIN $FILES -#sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile -- To view, visit https://gerrit.osmocom.org/5306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7720972573281a1df0be99f769217f9aa3bea7d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:51:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:51:19 +0000 Subject: osmo-ttcn3-hacks[master]: regen_makefile.sh: Fix TITAN 6.1.0 support In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d Gerrit-PatchSet: 6 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 12 23:51:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 12 Dec 2017 23:51:24 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: regen_makefile.sh: Fix TITAN 6.1.0 support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: regen_makefile.sh: Fix TITAN 6.1.0 support ...................................................................... regen_makefile.sh: Fix TITAN 6.1.0 support When introducing the rewriting for 6.3.0 we broke the 6.1.0 support. Now the result should build on Debian with both 6.1.0 and 6.3.0 Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d --- M bsc-nat/regen_makefile.sh M bsc/regen_makefile.sh M ggsn_tests/regen_makefile.sh M gprs_gb/regen_makefile.sh M lapdm/regen_makefile.sh M mgw/regen_makefile.sh M msc_tests/regen_makefile.sh M sysinfo/regen_makefile.sh 8 files changed, 8 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index 6fb3ca4..6d0ac12 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -11,5 +11,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index f037230..4e334d5 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -11,5 +11,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index b3e6332..cd2d95a 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh index b45e5b4..72fc632 100755 --- a/gprs_gb/regen_makefile.sh +++ b/gprs_gb/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh index f2d1782..c80b094 100755 --- a/lapdm/regen_makefile.sh +++ b/lapdm/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index df7ccc7..30f8c33 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/msc_tests/regen_makefile.sh b/msc_tests/regen_makefile.sh index 0b4ab88..7db539d 100755 --- a/msc_tests/regen_makefile.sh +++ b/msc_tests/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index 1042090..e06b8f5 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -9,5 +9,5 @@ sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile -- To view, visit https://gerrit.osmocom.org/5303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I263a6abd2d9eb15ce5778ef8dbfcdac2a228b77d Gerrit-PatchSet: 6 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:05:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:05:52 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: generalize shared code from regen_makefile.sh into shared he... Message-ID: Review at https://gerrit.osmocom.org/5307 generalize shared code from regen_makefile.sh into shared helper script Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba --- M bsc-nat/regen_makefile.sh M bsc/regen_makefile.sh M ggsn_tests/regen_makefile.sh M gprs_gb/regen_makefile.sh M lapdm/regen_makefile.sh M mgw/regen_makefile.sh M msc_tests/regen_makefile.sh A regen-makefile.sh M selftest/regen_makefile.sh M sysinfo/regen_makefile.sh 10 files changed, 29 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/5307/1 diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index 6d0ac12..a3c6243 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 4e334d5..8b8fa43 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index cd2d95a..3970187 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc GTPC_EncDec.cc GTPU_EncDec.cc GTP_CodecPort_CtrlFunctDef.cc ICMPv6_EncDec.cc IP_EncDec.cc Native_FunctionDefs.cc UDP_EncDec.cc" -ttcn3_makefilegen -l -f GGSN_Tests.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh GGSN_Tests.ttcn $FILES diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh index 72fc632..b883d1e 100755 --- a/gprs_gb/regen_makefile.sh +++ b/gprs_gb/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn BSSGP_Helper.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc" -ttcn3_makefilegen -f Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan/' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh index c80b094..c3601c8 100755 --- a/lapdm/regen_makefile.sh +++ b/lapdm/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn UD_PT.cc UD_PT.hh RLCMAC_EncDec.cc" -ttcn3_makefilegen -f L1CTL_Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan `pkg-config --libs libnetfilter_conntrack`/' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh L1CTL_Test.ttcn $FILES diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index 30f8c33..9b94d69 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f MGCP_Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MGCP_Test.ttcn $FILES diff --git a/msc_tests/regen_makefile.sh b/msc_tests/regen_makefile.sh index 7db539d..132da3b 100755 --- a/msc_tests/regen_makefile.sh +++ b/msc_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc" -ttcn3_makefilegen -l -f MSC_Tests.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MSC_Tests.ttcn $FILES diff --git a/regen-makefile.sh b/regen-makefile.sh new file mode 100755 index 0000000..1814699 --- /dev/null +++ b/regen-makefile.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Wrapper around the TITAN make file generator to work in Debian. +# +# TITAN has a makefile generator, but somehow Debian seems to install +# the binaries to different paths without patching the make file +# generator, leading in inconsistent non-working Makefiles. +# +# The regexes below patch the generated Makefile to work on Debian 9 and +# unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0 + +ttcn3_makefilegen -l -f $* +sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile +#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile + +# for TITAN 6.3.0 +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh index 086441b..eefda49 100755 --- a/selftest/regen_makefile.sh +++ b/selftest/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index e06b8f5..9dd3b7f 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc IPL4_GSMTAP_CtrlFunctDef.cc TELNETasp_PT.cc" -ttcn3_makefilegen -l -f Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/5307 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:06:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:06:31 +0000 Subject: osmo-ttcn3-hacks[master]: generalize shared code from regen_makefile.sh into shared he... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5307 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:06:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:06:49 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Ensure that PCH load indications suppress further... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5302 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:07:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:07:01 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Ensure that PCH load indications suppress further... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Ensure that PCH load indications suppress further paging ...................................................................... BSC_Tests: Ensure that PCH load indications suppress further paging Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52 --- M bsc/BSC_Tests.ttcn 1 file changed, 25 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index ea8b67e..926e8cc 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -742,8 +742,31 @@ /* Paging on multiple cells (multiple entries in list): Verify all of them page */ /* Verify paging retransmission interval + count */ /* Verify paging stops after channel establishment */ -/* Verify PCH load */ /* Test behavior under paging overload */ + +/* Verify PCH load */ +testcase TC_paging_imsi_load() runs on test_CT { + var BSSMAP_FIELD_CellIdentificationList cid_list; + timer T := 4.0; + cid_list := valueof(ts_BSSMAP_CIL_noCell); + f_pageing_helper('001010123456789'H, cid_list); + + /* tell BSC there is no paging space anymore */ + f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(0)); + + /* Wait for 4 seconds if any more PAGING CMD are received on RSL. Normally, + * there would be 8 retransmissions during 4 seconds */ + T.start; + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after LOAD_IND(0)"); + self.stop; + } + [] T.timeout { + setverdict(pass); + } + } +} /* Verify paging stops after A-RESET */ testcase TC_paging_imsi_a_reset() runs on test_CT { @@ -802,7 +825,7 @@ execute( TC_paging_imsi_nochan_lac() ); execute( TC_paging_imsi_nochan_all() ); execute( TC_paging_imsi_a_reset() ); - + execute( TC_paging_imsi_load() ); } } -- To view, visit https://gerrit.osmocom.org/5302 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1111996e497bc3ef179b57df135975160b4f7a52 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:07:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:07:02 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: generalize shared code from regen_makefile.sh into shared he... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: generalize shared code from regen_makefile.sh into shared helper script ...................................................................... generalize shared code from regen_makefile.sh into shared helper script Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba --- M bsc-nat/regen_makefile.sh M bsc/regen_makefile.sh M ggsn_tests/regen_makefile.sh M gprs_gb/regen_makefile.sh M lapdm/regen_makefile.sh M mgw/regen_makefile.sh M msc_tests/regen_makefile.sh A regen-makefile.sh M selftest/regen_makefile.sh M sysinfo/regen_makefile.sh 10 files changed, 29 insertions(+), 81 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/regen_makefile.sh b/bsc-nat/regen_makefile.sh index 6d0ac12..a3c6243 100755 --- a/bsc-nat/regen_makefile.sh +++ b/bsc-nat/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn SCCP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 4e334d5..8b8fa43 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index cd2d95a..3970187 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc GTPC_EncDec.cc GTPU_EncDec.cc GTP_CodecPort_CtrlFunctDef.cc ICMPv6_EncDec.cc IP_EncDec.cc Native_FunctionDefs.cc UDP_EncDec.cc" -ttcn3_makefilegen -l -f GGSN_Tests.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh GGSN_Tests.ttcn $FILES diff --git a/gprs_gb/regen_makefile.sh b/gprs_gb/regen_makefile.sh index 72fc632..b883d1e 100755 --- a/gprs_gb/regen_makefile.sh +++ b/gprs_gb/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn BSSGP_Helper.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc" -ttcn3_makefilegen -f Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan/' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES diff --git a/lapdm/regen_makefile.sh b/lapdm/regen_makefile.sh index c80b094..c3601c8 100755 --- a/lapdm/regen_makefile.sh +++ b/lapdm/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn UD_PT.cc UD_PT.hh RLCMAC_EncDec.cc" -ttcn3_makefilegen -f L1CTL_Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan `pkg-config --libs libnetfilter_conntrack`/' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh L1CTL_Test.ttcn $FILES diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index 30f8c33..9b94d69 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc" -ttcn3_makefilegen -l -f MGCP_Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MGCP_Test.ttcn $FILES diff --git a/msc_tests/regen_makefile.sh b/msc_tests/regen_makefile.sh index 7db539d..132da3b 100755 --- a/msc_tests/regen_makefile.sh +++ b/msc_tests/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc" -ttcn3_makefilegen -l -f MSC_Tests.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh MSC_Tests.ttcn $FILES diff --git a/regen-makefile.sh b/regen-makefile.sh new file mode 100755 index 0000000..1814699 --- /dev/null +++ b/regen-makefile.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Wrapper around the TITAN make file generator to work in Debian. +# +# TITAN has a makefile generator, but somehow Debian seems to install +# the binaries to different paths without patching the make file +# generator, leading in inconsistent non-working Makefiles. +# +# The regexes below patch the generated Makefile to work on Debian 9 and +# unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0 + +ttcn3_makefilegen -l -f $* +sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile +#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile + +# for TITAN 6.3.0 +sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile +sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh index 086441b..eefda49 100755 --- a/selftest/regen_makefile.sh +++ b/selftest/regen_makefile.sh @@ -4,12 +4,4 @@ FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c" -ttcn3_makefilegen -l -f $MAIN $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh $MAIN $FILES diff --git a/sysinfo/regen_makefile.sh b/sysinfo/regen_makefile.sh index e06b8f5..9dd3b7f 100755 --- a/sysinfo/regen_makefile.sh +++ b/sysinfo/regen_makefile.sh @@ -2,12 +2,4 @@ FILES="*.ttcn IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc IPL4_GSMTAP_CtrlFunctDef.cc TELNETasp_PT.cc" -ttcn3_makefilegen -l -f Test.ttcn $FILES -sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile -#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile - -# for TITAN 6.3.0 -sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile +../regen-makefile.sh Test.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/5307 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86a738420851a7d9e3bdb2671f6862c3d505a4ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:20:00 +0000 Subject: [PATCH] osmo-ci[master]: Add gerrit JJB for osmo-ttcn3-hacks Message-ID: Review at https://gerrit.osmocom.org/5308 Add gerrit JJB for osmo-ttcn3-hacks we simply call 'make compile' which will compile all of the projects from TTCN-3 to C++ Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 --- M jobs/gerrit-verifications.yml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/08/5308/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a7df5f3..1a821a8 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -177,6 +177,12 @@ - osmocom-bb - osmo-tetra + - osmo-ttcn3-hacks: + node: build2-deb9build + cmd: > + # keep first line with less indent to preserve newlines + make compile + jobs: - 'gerrit-{repos}' -- To view, visit https://gerrit.osmocom.org/5308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:20:00 +0000 Subject: [PATCH] osmo-ci[master]: gerrit: osmo-ttcn3-hacks: Use git:// instead of ssh:// Message-ID: Review at https://gerrit.osmocom.org/5309 gerrit: osmo-ttcn3-hacks: Use git:// instead of ssh:// The build slave on which the tests are running currently has no SSH key that's authorized to use git+ssh. But then, it's not actually needed, and I wonder why we're not using the public git:// access anyway? Change-Id: Iecb8cacab4e1665933723311e9ce6ab1ed7d95fe --- M jobs/gerrit-verifications.yml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/09/5309/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 1a821a8..8404109 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -178,6 +178,9 @@ - osmo-tetra - osmo-ttcn3-hacks: + scm: + - git: + url: https://gerrit.osmocom.org/{repos} node: build2-deb9build cmd: > # keep first line with less indent to preserve newlines -- To view, visit https://gerrit.osmocom.org/5309 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecb8cacab4e1665933723311e9ce6ab1ed7d95fe Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:20:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:20:01 +0000 Subject: [PATCH] osmo-ci[master]: gerrit: ttcn3: doe 'make clean' as part of test Message-ID: Review at https://gerrit.osmocom.org/5310 gerrit: ttcn3: doe 'make clean' as part of test Change-Id: Id9936e405730f80edc85186f08de75e00b3711bc --- M jobs/gerrit-verifications.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/10/5310/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 8404109..66d1751 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -184,7 +184,7 @@ node: build2-deb9build cmd: > # keep first line with less indent to preserve newlines - make compile + make clean; make compile jobs: - 'gerrit-{repos}' -- To view, visit https://gerrit.osmocom.org/5310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9936e405730f80edc85186f08de75e00b3711bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:21:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:21:32 +0000 Subject: [PATCH] osmo-ci[master]: Add gerrit JJB for osmo-ttcn3-hacks In-Reply-To: References: Message-ID: Add gerrit JJB for osmo-ttcn3-hacks we simply call 'make compile' which will compile all of the projects from TTCN-3 to C++ Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 --- M jobs/gerrit-verifications.yml 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/08/5308/2 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a7df5f3..66d1751 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -177,6 +177,15 @@ - osmocom-bb - osmo-tetra + - osmo-ttcn3-hacks: + scm: + - git: + url: https://gerrit.osmocom.org/{repos} + node: build2-deb9build + cmd: > + # keep first line with less indent to preserve newlines + make clean; make compile + jobs: - 'gerrit-{repos}' -- To view, visit https://gerrit.osmocom.org/5308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:24:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:24:05 +0000 Subject: osmo-ci[master]: Add gerrit JJB for osmo-ttcn3-hacks In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:24:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:24:06 +0000 Subject: [MERGED] osmo-ci[master]: Add gerrit JJB for osmo-ttcn3-hacks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add gerrit JJB for osmo-ttcn3-hacks ...................................................................... Add gerrit JJB for osmo-ttcn3-hacks we simply call 'make compile' which will compile all of the projects from TTCN-3 to C++ Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 --- M jobs/gerrit-verifications.yml 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a7df5f3..66d1751 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -177,6 +177,15 @@ - osmocom-bb - osmo-tetra + - osmo-ttcn3-hacks: + scm: + - git: + url: https://gerrit.osmocom.org/{repos} + node: build2-deb9build + cmd: > + # keep first line with less indent to preserve newlines + make clean; make compile + jobs: - 'gerrit-{repos}' -- To view, visit https://gerrit.osmocom.org/5308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bb94c08259c130558f82bb4c084484be5b81c40 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:24:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:24:10 +0000 Subject: [ABANDON] osmo-ci[master]: gerrit: osmo-ttcn3-hacks: Use git:// instead of ssh:// In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: gerrit: osmo-ttcn3-hacks: Use git:// instead of ssh:// ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5309 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iecb8cacab4e1665933723311e9ce6ab1ed7d95fe Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 00:24:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 00:24:15 +0000 Subject: [ABANDON] osmo-ci[master]: gerrit: ttcn3: doe 'make clean' as part of test In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: gerrit: ttcn3: doe 'make clean' as part of test ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id9936e405730f80edc85186f08de75e00b3711bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 01:11:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 01:11:26 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 11: Code-Review-1 (31 comments) In general, I wonder whether it is helping that I comment on the numerous cosmetic issues. Most of it could be caught by you reading your own patch, it is taking a lot of time of my day and it seems like I am reiterating similar obvious points over and over. It makes me feel like a nitpick and probably makes you feel unappreciated, also clutters the really important code review and probably makes me miss the real problems; IOW, I would enjoy to give more constructive feedback so that we can both feel good about the review. Either by me letting every cosmetic no-go pass uncommented or by you fixing them before submitting a patch; not sure which it should be, maybe a bit of both; maybe others have an opinion on that too. I'd like to finally see this merged, but still can't +2 because: - I don't understand the FSM -- it should be quite linear, but it reads like it has paths crossing and teardown is skipping/merging some steps that should be separate. If the FSM is correct and I'm not seeing it, then the comments and state/event naming could help clarifying; see inline comments. - missing inet_addr() error handling / needs replacement. https://gerrit.osmocom.org/#/c/4980/11/include/osmocom/msc/msc_mgcp.h File include/osmocom/msc/msc_mgcp.h: Line 26: /* MGCP state handler context (fsm etc..) */ explain the scope? mgcp context for one call leg? one subscriber? Line 31: /* RTP endpoint number */ (omit comments that just mirror the variable name; explain what the endpoint is about or drop the comment?) Line 35: * needed */ use line width instead of wrapping short lines https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 412: rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); needs some error checking. man inet_addr: The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return. https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: Line 1333: /* Initiate the teadown of the related connections on the MGW */ "teadown" Line 1390: /* helper function for tch_bridge() to bridge the RTP Voice streams also */ (I find "helper function for" is something you could write everywhere; I also used to write this phrase a lot some years ago, but better just say what it does) Line 2691: uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); inet_addr, error checking https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/iucs.c File src/libmsc/iucs.c: Line 226: " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, I would have said, use line width, but this is just moving code, right? Line 235: " conn_id=%d rab_id=%d rtp=%x:%u\n", same https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 56: /* Some internal cause codes to indicate fault use line width Line 70: /* Human readable respresentation of the faul codes, line width, also multiple more times below Line 102: * may now forward IP/Port of the remote call leg to the MGW*/ (space before '*/') Line 167: if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { (a lot of "Note:" below) Line 180: osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); could make sense to place teardown in a ST_HALT -> on_enter function? Otherwise could make sense to combine the state_chg + event dispatch in a common function Line 231: "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); join "..." "..." Line 710: osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); above, a TEARDOWN event follows after the HALT state_chg. What triggers the teardown here? Line 747: if (mgcp_ctx->free_ctx) { the free_ctx flag essentially creates two kinds of HALT states. One where we're still waiting for something (but what?) and one where we're going to free on any (!) incoming event? I would prefer if the waiting-for-x and halting + freeing states were explicit and distinct states, instead of using the same FSM state split up by additional ctx flag. Also would welcome if it was obvious which kinds of events are expected to arrive here, and that the event is distinct. For example, it looks now like the teardown event could happen in any context, and once it means "go to HALT state" (does it?) and once it means "let's discard the FSM right now"... would be better to have explicit and distinct events. Line 749: talloc_free(mgcp_ctx); mabe clear the free_ctx flag to be safe? otherwise set mgcp_ctx->fsm to NULL? IOW, what is preventing a double free, given that the HALT state could be entered multiple times? Line 761: .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), IIUC the next state is CRCX_CN, not ST_CALL? Howcome do all states allow transitioning to ST_CALL? Line 765: /* When the response to the CRCX is received, then proceed with sending "the RAN CRCX" Line 774: * the RAT, this will either trigger an Assignment Request on the RAT? Line 783: * we will enter the MDCX phaseby sending an MDCX for the CN side "phaseby" Line 793: * the assignment is completed */ above it sounds like CRCX_COMPL sends the Assignment Requests and MDCX_CN receives the Assignment Complete. Then, which Assignment Complete state is this? Line 800: /* When the response for the MDCX is received, send the MDCX for the "for the CN MDCX" Line 803: .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), I find this hard to follow: ST_MDCX_RAN receives EV_ASSIGN, but ST_ASS_COMPL above has already passed, while ST_MDCX_CN coment above says it waits for completion of the assignment request and actually has ST_ASS_COMPL as out_state... Am I missing some pattern? It currently reads to me like reverse / mixed-up. Line 808: /* The MDCX phase is complete when the response is received from the "the RAN side MDCX response" Line 809: * MGW. The call is now active */ when the call is now active, why is this not the ST_CALL state? Oh, you mean this state is *waiting* for the MDCX_RAN_RESP, now I see in the in_event_mask Line 825: * the state machine. */ IIUC there should be DLCX for both the RAN and CN sides, each returning a DLCX OK, and finally a free of the FSM: appears to me like we should actually need three states for tearing down the call. Line 843: /* Notify that that a new call begins. This will create a connection for the "that that" Line 846: * trans: transaction context use punctuation in doc, don't rely on line endings Line 912: /* Inform the FSM that the assignment (RAN connection) is now complete punctuation on all of these lines -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 11 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 01:32:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 01:32:54 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master-builds: fix git master branch polling Message-ID: Review at https://gerrit.osmocom.org/5311 jobs: master-builds: fix git master branch polling The 'refs/heads/origin/master' somehow caused that git polling would not trigger builds. 'origin/master' was succesful in a manual test, so set all jobs to that. Change-Id: Id033d1bfce6cc9e20fbbf9be462842b9e44bde83 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/11/5311/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 82e84d1..2606177 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -260,7 +260,7 @@ - git: url: git://git.osmocom.org/{repos} branches: - - 'refs/remotes/origin/master' + - 'origin/master' refspec: name: wipe-workspace: false -- To view, visit https://gerrit.osmocom.org/5311 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id033d1bfce6cc9e20fbbf9be462842b9e44bde83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 13 01:33:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 01:33:13 +0000 Subject: osmo-ci[master]: jobs: master-builds: fix git master branch polling In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5311 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id033d1bfce6cc9e20fbbf9be462842b9e44bde83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 01:33:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 01:33:23 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master-builds: fix git master branch polling In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master-builds: fix git master branch polling ...................................................................... jobs: master-builds: fix git master branch polling The 'refs/heads/origin/master' somehow caused that git polling would not trigger builds. 'origin/master' was succesful in a manual test, so set all jobs to that. Change-Id: Id033d1bfce6cc9e20fbbf9be462842b9e44bde83 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 82e84d1..2606177 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -260,7 +260,7 @@ - git: url: git://git.osmocom.org/{repos} branches: - - 'refs/remotes/origin/master' + - 'origin/master' refspec: name: wipe-workspace: false -- To view, visit https://gerrit.osmocom.org/5311 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id033d1bfce6cc9e20fbbf9be462842b9e44bde83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 13 01:34:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 01:34:58 +0000 Subject: [MERGED] libosmocore[master]: logging vty: describe 'logging set-log-mask' command, add OS... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: logging vty: describe 'logging set-log-mask' command, add OSMO_STRINGIFY_VAL() ...................................................................... logging vty: describe 'logging set-log-mask' command, add OSMO_STRINGIFY_VAL() Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f --- M include/osmocom/core/utils.h M src/vty/logging_vty.c 2 files changed, 13 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0a3805d..5c660cd 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -19,6 +19,8 @@ * Note: if nested within another preprocessor macro, this will * stringify the value of x instead of its name. */ #define OSMO_STRINGIFY(x) #x +/*! Stringify the value of a macro x, e.g. a port number. */ +#define OSMO_STRINGIFY_VAL(x) OSMO_STRINGIFY(x) /*! Make a value_string entry from an enum value name */ #define OSMO_VALUE_STRING(x) { x, #x } /*! Number of bytes necessary to store given BITS */ diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 215394f..c39017b 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -247,7 +247,15 @@ "logging set-log-mask MASK", LOGGING_STR "Set the logmask of this logging target\n" - "The logmask to use\n") + "List of logging categories to log, e.g. 'abc:mno:xyz'. Available log categories depend on the specific" + " application, refer to the 'logging level' command. Optionally add individual log levels like" + " 'abc,1:mno,3:xyz,5', where the level numbers are" + " " OSMO_STRINGIFY(LOGL_DEBUG) "=" OSMO_STRINGIFY_VAL(LOGL_DEBUG) + " " OSMO_STRINGIFY(LOGL_INFO) "=" OSMO_STRINGIFY_VAL(LOGL_INFO) + " " OSMO_STRINGIFY(LOGL_NOTICE) "=" OSMO_STRINGIFY_VAL(LOGL_NOTICE) + " " OSMO_STRINGIFY(LOGL_ERROR) "=" OSMO_STRINGIFY_VAL(LOGL_ERROR) + " " OSMO_STRINGIFY(LOGL_FATAL) "=" OSMO_STRINGIFY_VAL(LOGL_FATAL) + "\n") { struct log_target *tgt = osmo_log_vty2tgt(vty); @@ -263,7 +271,8 @@ "logging set log mask MASK", LOGGING_STR "Decide which categories to output.\n" - "Log commands\n" "Mask commands\n" "The logmask to use\n"); + "Log commands\n" "Mask commands\n" + "'set log mask' is deprecated, please refer to the docs of 'set-log-mask' instead\n"); DEFUN(diable_logging, -- To view, visit https://gerrit.osmocom.org/5252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:16:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 10:16:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Add git-review config Message-ID: Review at https://gerrit.osmocom.org/5312 Add git-review config Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/5312/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..ffc7ed4 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-ttcn3-hacks -- To view, visit https://gerrit.osmocom.org/5312 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:18:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:18:14 +0000 Subject: osmo-ttcn3-hacks[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5312 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:18:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:18:16 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Add git-review config In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add git-review config ...................................................................... Add git-review config Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..ffc7ed4 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-ttcn3-hacks -- To view, visit https://gerrit.osmocom.org/5312 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:19:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:19:28 +0000 Subject: osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:19:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:19:30 +0000 Subject: [MERGED] osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh ...................................................................... rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh The split build script also initilize the repository if it's empty and doesn't need any state of the osc repository. It also downloads bumpversion and limesuite Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 164 insertions(+), 69 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index c2b603b..8db2d57 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -1,84 +1,179 @@ -#!/bin/sh - +#!/bin/bash # requirements # apt install devscripts git-buildpackage osc git -# rather than including a dangerous 'rm -rf *' here, lets delegate to the user: -if [ -n "$(ls)" ]; then - echo "ERROR: I need to run in an empty directory." - exit 1 -fi +set -e +set -x if ! which osc >/dev/null 2>/dev/null ; then echo "osc binary not found" exit 1 fi - -set -x -e - -git clone git://git.osmocom.org/osmo-sip-connector -git clone git://git.osmocom.org/libosmocore -git clone git://git.osmocom.org/libosmo-sccp -git clone git://git.osmocom.org/libosmo-abis -git clone git://git.osmocom.org/libosmo-netif -git clone git://git.osmocom.org/libsmpp34 -git clone git://git.osmocom.org/libasn1c -git clone git://git.osmocom.org/libgtpnl -git clone git://git.osmocom.org/osmo-iuh -git clone git://git.osmocom.org/osmo-sgsn -git clone git://git.osmocom.org/osmo-ggsn -git clone git://git.osmocom.org/openbsc -git clone git://git.osmocom.org/osmo-pcap -git clone git://git.osmocom.org/osmo-trx -git clone git://git.osmocom.org/osmo-bts -git clone git://git.osmocom.org/osmo-pcu -git clone git://git.osmocom.org/osmo-hlr -git clone git://git.osmocom.org/osmo-mgw -git clone git://git.osmocom.org/osmo-msc -git clone git://git.osmocom.org/osmo-bsc - - +DT=$(date +%Y%m%d) PROJ=network:osmocom:nightly -osc co $PROJ -DT=`date +%Y%m%d` +### common +checkout() { + local name=$1 + local branch=$2 + local url="git://git.osmocom.org" + cd "$REPO" -build() { - rm -rf data - cd $1 - VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","", | sed s,")","",` - dch -v $VER.$DT -m "Snapshot build" - git commit -m "$DT snapshot" debian/ - gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data - cd ../$PROJ/$1 - osc rm * || true - mv ../../data/*.dsc . - mv ../../data/*.tar* . - osc add * - cd ../../ + if [ -n "$branch" ] ; then + git clone "$url/$name" -b "$branch" + else + git clone "$url/$name" + fi + + cd - } -build libosmocore -build libosmo-sccp -build libosmo-abis -build libosmo-netif -build libsmpp34 -build libasn1c -build libgtpnl -build osmo-iuh -build osmo-ggsn -build osmo-sgsn -build openbsc -build osmo-pcap -build osmo-trx -build osmo-sip-connector -build osmo-bts -build osmo-pcu -build osmo-hlr -build osmo-mgw -build osmo-msc -build osmo-bsc +### OBS build +prepare() { + # clean up the whole space + mkdir -p "$REPO/osc/" + cd "$REPO/osc" + osc co "$PROJ" +} -cd $PROJ -osc ci -m "Snapshot $DT" +build() { + local name=$1 + local changelog=$2 + local gitbpargs=$3 + local repodir=$REPO/$name + local oscdir=$REPO/osc/$PROJ/$name + + if [ -z "$changelog" ] ; then + changelog=commit + fi + + if [ -d "$oscdir" ] ; then + # remove earlier version + cd "$oscdir" + osc rm -- * || true + else + # new package + mkdir -p "$oscdir/" + cd "$REPO/osc/$PROJ/" + osc add "$name" + fi + + cd "$repodir" + + if [ "$changelog" = "commit" ] ; then + VER=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,' | sed 's,),,') + dch -v "$VER.$DT" -m "Snapshot build" + git commit -m "$DT snapshot" debian/ + fi + + mkdir -p "$DATA/$name" + # source code build without dependency checks and unsigned source and unsigned change log + gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" $gitbpargs + + mv "$DATA/$name/"*.tar* "$DATA/$name/"*.dsc "$oscdir/" + + cd "$oscdir" + osc add -- *.tar* *.dsc + osc ci -m "Snapshot $name $DT" +} + +post() { + cd "$REPO/osc/$PROJ/" + osc status +} + +download_bumpversion() { + # bumpversion is required for debian < 9/stretch + local oscdir=$REPO/osc/$PROJ/bumpversion + local version=0.5.3 + local release=3 + + if [ ! -d "$oscdir" ] ; then + mkdir "$oscdir" + cd "$oscdir" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.dsc" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version.orig.tar.gz" + wget "http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.debian.tar.xz" + fi +} + +checkout_limesuite() { + TAG="v17.12.0" + + cd "$REPO" + git clone https://github.com/myriadrf/LimeSuite limesuite + cd limesuite + git checkout "$TAG" +} + +build_osmocom() { + BASE=$PWD + DATA=$BASE/data + REPO=$BASE/repo + + # rather than including a dangerous 'rm -rf *' here, lets delegate to the user: + if [ -n "$(ls)" ]; then + echo "ERROR: I need to run in an empty directory." + exit 1 + fi + + prepare + + checkout libosmocore + checkout libosmo-sccp + checkout libosmo-abis + checkout libosmo-netif + checkout libsmpp34 + checkout libasn1c + checkout libgtpnl + checkout osmo-iuh + checkout osmo-ggsn + checkout osmo-sgsn + checkout openbsc + checkout osmo-pcap + checkout osmo-trx + checkout osmo-sip-connector + checkout osmo-bts + checkout osmo-pcu + checkout osmo-hlr + checkout osmo-mgw + checkout osmo-msc + checkout osmo-bsc + checkout_limesuite + + build libosmocore + build libosmo-sccp + build libosmo-abis + build libosmo-netif + build libsmpp34 + build libasn1c + build libgtpnl + build osmo-iuh + build osmo-ggsn + build osmo-sgsn + build openbsc + build osmo-pcap + build osmo-trx + build osmo-sip-connector + build osmo-bts + build osmo-pcu + build osmo-hlr + build osmo-mgw + build osmo-msc + build osmo-bsc + + download_bumpversion + build limesuite no_commit --git-upstream-tree=v17.12.0 + + post +} + +if ! which osc >/dev/null 2>/dev/null ; then + echo "osc binary is not installed" + exit 1 +fi + +TMPDIR=$(mktemp -d nightly-3g_XXXXXX) +cd "$TMPDIR" +build_osmocom -- To view, visit https://gerrit.osmocom.org/5295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:20:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:20:34 +0000 Subject: osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5274 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:20:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:20:42 +0000 Subject: osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:21:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:21:33 +0000 Subject: osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py File suites/voice/mo_mt_call.py: Line 26: hlr.subscriber_add(ms_mo) you can probably add the subscribers to the HLR before/while waiting for the BTS to be connected. There's no dependency between those. -- To view, visit https://gerrit.osmocom.org/5276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:22:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:22:14 +0000 Subject: osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:22:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 10:22:16 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm48_rr.c: fix ACCH System Information parsing ...................................................................... mobile/gsm48_rr.c: fix ACCH System Information parsing According to GSM 04.08, the System Information messages, such as SI5, SI5ter, SI5bis and SI6 (described in sections 9.1.37-40), have no the 'L2 Pseudo Length' (10.5.2.19) field, unlike others. So, previously the ACCH SI messages were ignored due to an implementation error - the gsm48_system_information_type_header struct isn't applicable here, because it assumes the 'l2_plen'. Since there is no (yet?) equivalent struct for the ACCH SI, this change replaces the wrong struct by the 'gsm48_hdr', which satisfies described requirements. Moreover, this change cleans up some gsm48_rr_rx_sysinfo* functions, getting rid of meaningless pionter shifting. Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 11 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index ac27214..403e32d 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1943,10 +1943,9 @@ /* receive "SYSTEM INFORMATION 5" message (9.1.37) */ static int gsm48_rr_rx_sysinfo5(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5 *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5 " @@ -1973,10 +1972,9 @@ /* receive "SYSTEM INFORMATION 5bis" message (9.1.38) */ static int gsm48_rr_rx_sysinfo5bis(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5bis *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5bis *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5bis" @@ -2004,10 +2002,9 @@ /* receive "SYSTEM INFORMATION 5ter" message (9.1.39) */ static int gsm48_rr_rx_sysinfo5ter(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_5ter *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_5ter *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5ter" @@ -2035,11 +2032,10 @@ /* receive "SYSTEM INFORMATION 6" message (9.1.39) */ static int gsm48_rr_rx_sysinfo6(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ - struct gsm48_system_information_type_6 *si = msgb_l3(msg) + 1; + struct gsm48_system_information_type_6 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; struct rx_meas_stat *meas = &ms->meas; - int payload_len = msgb_l3len(msg) - sizeof(*si) - 1; + int payload_len = msgb_l3len(msg) - sizeof(*si); if (!s) { LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 6 " @@ -4748,7 +4744,7 @@ struct gsm48_rrlayer *rr = &ms->rrlayer; struct gsm_settings *set = &ms->settings; struct abis_rsl_rll_hdr *rllh = msgb_l2(msg); - struct gsm48_system_information_type_header *sih = msgb_l3(msg); + struct gsm48_hdr *sih = msgb_l3(msg); uint8_t ind_ta, ind_tx_power; if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) { @@ -4772,7 +4768,7 @@ rr->cd_now.ind_tx_power = ind_tx_power; } - switch (sih->system_information) { + switch (sih->msg_type) { case GSM48_MT_RR_SYSINFO_5: return gsm48_rr_rx_sysinfo5(ms, msg); case GSM48_MT_RR_SYSINFO_5bis: @@ -4783,7 +4779,7 @@ return gsm48_rr_rx_sysinfo6(ms, msg); default: LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n", - sih->system_information); + sih->msg_type); return -EINVAL; } } -- To view, visit https://gerrit.osmocom.org/5204 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 13 Dec 2017 10:34:36 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/gsm48_rr.c: cosmetic: drop wrong comment In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change and it was merged. Change subject: mobile/gsm48_rr.c: cosmetic: drop wrong comment ...................................................................... mobile/gsm48_rr.c: cosmetic: drop wrong comment Nothing is actually being skipped in this function. Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 403e32d..f4b9500 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -1911,7 +1911,6 @@ /* receive "SYSTEM INFORMATION 4" message (9.1.36) */ static int gsm48_rr_rx_sysinfo4(struct osmocom_ms *ms, struct msgb *msg) { - /* NOTE: pseudo length is not in this structure, so we skip */ struct gsm48_system_information_type_4 *si = msgb_l3(msg); struct gsm48_sysinfo *s = ms->cellsel.si; int payload_len = msgb_l3len(msg) - sizeof(*si); -- To view, visit https://gerrit.osmocom.org/5238 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:38:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 10:38:03 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Avoid gcc version check Message-ID: Review at https://gerrit.osmocom.org/5313 Avoid gcc version check By default the build fails due to gcc version check in /usr/include/titan/cversion.h - instead of asking users to manually change this file let's add workaround to our makefile fixer which disables this check automatically. Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 --- M regen-makefile.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/5313/1 diff --git a/regen-makefile.sh b/regen-makefile.sh index 1814699..77a5bc2 100755 --- a/regen-makefile.sh +++ b/regen-makefile.sh @@ -13,7 +13,7 @@ sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -- To view, visit https://gerrit.osmocom.org/5313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 10:49:59 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 10:49:59 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh Message-ID: Review at https://gerrit.osmocom.org/5314 Fix rmlink.sh Exclude directories with symlinks which are under version control from link cleanup script. Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 --- M rmlinks.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/5314/1 diff --git a/rmlinks.sh b/rmlinks.sh index 58ca6f3..b26fbc9 100755 --- a/rmlinks.sh +++ b/rmlinks.sh @@ -1,2 +1,2 @@ #!/bin/sh -find . -type l -exec rm \{\} \; +find . -type l \( -path bin -o -path M3UA_CNL113537 -o -path SCCP_CNL113341 \) -prune -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 12:41:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 12:41:26 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Add generic link functions Message-ID: Review at https://gerrit.osmocom.org/5315 Add generic link functions * add function for link generation * add functions to symlink specific libraries The main differences with existing gen_links() routines: * properly shift arguments to avoid making directory symlink alongside with files symlink * additional debug output * automated generation of .gitignore entries for linked files Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b --- A generic.sh 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/15/5315/1 diff --git a/generic.sh b/generic.sh new file mode 100644 index 0000000..c084602 --- /dev/null +++ b/generic.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# Generic function for properly linking necessary dependencies +# and several examples of linking particular libraries which use it. +# To avoid cluttering git status, the per-test .gitignore is updated automatically +# If additional files are required from particular library than manual adjustements +# might be necessary + +set -e + +gen_links() { + DIR=$1 + shift + FILES=$* + echo "Files to link from $DIR:" + echo $FILES + echo "" + for f in $FILES; do + echo "Linking $f" + ln -sf $DIR/$f $f + echo "$f" >> .gitignore + done + echo "Linking done, cleaning up .gitignore..." + awk '!seen[$0]++' .gitignore > tmp.gitignore + mv tmp.gitignore .gitignore +} + +link_TCCUsefulFunctions() { + gen_links $1/titan.Libraries.TCCUsefulFunctions/src "TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +} + +link_IPL4asp() { + gen_links $1/titan.TestPorts.IPL4asp/src "IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +} + +link_SocketAPI() { + gen_links $1/titan.TestPorts.Common_Components.Socket-API/src "Socket_API_Definitions.ttcn" +} + +link_UNIX_DOMAIN_SOCKETasp() { + gen_links $1/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src "UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" +} + +link_MobileL3_v13() { + gen_links $1/titan.ProtocolModules.MobileL3_v13.4.0/src "MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn SS_DataTypes.asn SS_EncDec.cc SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn" +} + +link_library() { + gen_links "../library" "General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn" +} -- To view, visit https://gerrit.osmocom.org/5315 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 12:41:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 12:41:27 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: GPRS/Gb: use generic linker Message-ID: Review at https://gerrit.osmocom.org/5316 GPRS/Gb: use generic linker Make symlinks using generic.sh functions. Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf --- A gprs_gb/.gitignore M gprs_gb/gen_links.sh 2 files changed, 107 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/5316/1 diff --git a/gprs_gb/.gitignore b/gprs_gb/.gitignore new file mode 100644 index 0000000..3c00bbe --- /dev/null +++ b/gprs_gb/.gitignore @@ -0,0 +1,100 @@ +# Add files to be ignored manually in here: +BSSGP_Emulation.cc +BSSGP_Emulation.hh +BSSGP_Helper_Functions.cc +BSSGP_Helper_Functions.hh +BSSGP_Types.cc +BSSGP_Types.hh +GSM_RR_Types.cc +GSM_RR_Types.hh +GSM_Types.cc +GSM_Types.hh +General_Types.cc +General_Types.hh +IPL4asp_Functions.cc +IPL4asp_Functions.hh +IPL4asp_PortType.cc +IPL4asp_PortType.hh +IPL4asp_Types.cc +IPL4asp_Types.hh +L1CTL_PortType.cc +L1CTL_PortType.hh +L1CTL_Types.cc +L1CTL_Types.hh +LAPDm_RAW_PT.cc +LAPDm_RAW_PT.hh +LAPDm_Types.cc +LAPDm_Types.hh +LLC_Types.cc +LLC_Types.hh +Makefile +NS_CodecPort.cc +NS_CodecPort.hh +NS_CodecPort_CtrlFunct.cc +NS_CodecPort_CtrlFunct.hh +NS_Emulation.cc +NS_Emulation.hh +NS_Types.cc +NS_Types.hh +Osmocom_Types.cc +Osmocom_Types.hh +RLCMAC_CSN1_Types.cc +RLCMAC_CSN1_Types.hh +RLCMAC_Types.cc +RLCMAC_Types.hh +Socket_API_Definitions.cc +Socket_API_Definitions.hh +TCCConversion_Functions.cc +TCCConversion_Functions.hh +TCCInterface_Functions.cc +TCCInterface_Functions.hh +Test.cc +Test.hh +UD_PortType.cc +UD_PortType.hh +UD_Types.cc +UD_Types.hh +# N. B: the entries below this line updated automatically by gen_links.sh +TCCInterface_Functions.ttcn +TCCConversion_Functions.ttcn +TCCConversion.cc +TCCInterface.cc +TCCInterface_ip.h +IPL4asp_Functions.ttcn +IPL4asp_PT.cc +IPL4asp_PT.hh +IPL4asp_PortType.ttcn +IPL4asp_Types.ttcn +IPL4asp_discovery.cc +IPL4asp_protocol_L234.hh +Socket_API_Definitions.ttcn +UD_PT.cc +UD_PT.hh +UD_PortType.ttcn +UD_Types.ttcn +MobileL3_CC_Types.ttcn +MobileL3_CommonIE_Types.ttcn +MobileL3_GMM_SM_Types.ttcn +MobileL3_MM_Types.ttcn +MobileL3_RRM_Types.ttcn +MobileL3_SMS_Types.ttcn +MobileL3_SS_Types.ttcn +MobileL3_Types.ttcn +SS_DataTypes.asn +SS_EncDec.cc +SS_Errors.asn +SS_Operations.asn +SS_PDU_Defs.asn +SS_Protocol.asn +SS_Types.ttcn +General_Types.ttcn +GSM_Types.ttcn +GSM_RR_Types.ttcn +Osmocom_Types.ttcn +RLCMAC_Types.ttcn +RLCMAC_CSN1_Types.ttcn +RLCMAC_EncDec.cc +L1CTL_Types.ttcn +L1CTL_PortType.ttcn +LAPDm_RAW_PT.ttcn +LAPDm_Types.ttcn diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh index 9f4cea4..e1291ac 100755 --- a/gprs_gb/gen_links.sh +++ b/gprs_gb/gen_links.sh @@ -2,35 +2,11 @@ BASEDIR=../deps -gen_links() { - DIR=$1 - FILES=$* - for f in $FILES; do - echo "Linking $f" - ln -sf $DIR/$f $f - done -} +. ../generic.sh -#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src -#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" -#gen_links $DIR $FILES - -DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src -FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCConversion.hh TCCInterface.cc TCCInterface_ip.h" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src -FILES="Socket_API_Definitions.ttcn" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.IPL4asp/src -FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src -FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" -gen_links $DIR $FILES - -DIR=../library -FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn" -gen_links $DIR $FILES +link_TCCUsefulFunctions $BASEDIR +link_IPL4asp $BASEDIR +link_SocketAPI $BASEDIR +link_UNIX_DOMAIN_SOCKETasp $BASEDIR +link_MobileL3_v13 $BASEDIR +link_library -- To view, visit https://gerrit.osmocom.org/5316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:06:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 13:06:27 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5314 to look at the new patch set (#2). Fix rmlink.sh Exclude directories with symlinks which are under version control from link cleanup script. Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 --- M rmlinks.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/5314/2 diff --git a/rmlinks.sh b/rmlinks.sh index 58ca6f3..851577d 100755 --- a/rmlinks.sh +++ b/rmlinks.sh @@ -1,2 +1,2 @@ #!/bin/sh -find . -type l -exec rm \{\} \; +find . -type l -not -path bin -not -path M3UA_CNL113537 -not -path SCCP_CNL113341 -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:06:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 13:06:27 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: GPRS/Gb: use generic linker In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5316 to look at the new patch set (#2). GPRS/Gb: use generic linker Make symlinks using generic.sh functions. Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf --- A gprs_gb/.gitignore M gprs_gb/gen_links.sh 2 files changed, 106 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/5316/2 diff --git a/gprs_gb/.gitignore b/gprs_gb/.gitignore new file mode 100644 index 0000000..3c00bbe --- /dev/null +++ b/gprs_gb/.gitignore @@ -0,0 +1,100 @@ +# Add files to be ignored manually in here: +BSSGP_Emulation.cc +BSSGP_Emulation.hh +BSSGP_Helper_Functions.cc +BSSGP_Helper_Functions.hh +BSSGP_Types.cc +BSSGP_Types.hh +GSM_RR_Types.cc +GSM_RR_Types.hh +GSM_Types.cc +GSM_Types.hh +General_Types.cc +General_Types.hh +IPL4asp_Functions.cc +IPL4asp_Functions.hh +IPL4asp_PortType.cc +IPL4asp_PortType.hh +IPL4asp_Types.cc +IPL4asp_Types.hh +L1CTL_PortType.cc +L1CTL_PortType.hh +L1CTL_Types.cc +L1CTL_Types.hh +LAPDm_RAW_PT.cc +LAPDm_RAW_PT.hh +LAPDm_Types.cc +LAPDm_Types.hh +LLC_Types.cc +LLC_Types.hh +Makefile +NS_CodecPort.cc +NS_CodecPort.hh +NS_CodecPort_CtrlFunct.cc +NS_CodecPort_CtrlFunct.hh +NS_Emulation.cc +NS_Emulation.hh +NS_Types.cc +NS_Types.hh +Osmocom_Types.cc +Osmocom_Types.hh +RLCMAC_CSN1_Types.cc +RLCMAC_CSN1_Types.hh +RLCMAC_Types.cc +RLCMAC_Types.hh +Socket_API_Definitions.cc +Socket_API_Definitions.hh +TCCConversion_Functions.cc +TCCConversion_Functions.hh +TCCInterface_Functions.cc +TCCInterface_Functions.hh +Test.cc +Test.hh +UD_PortType.cc +UD_PortType.hh +UD_Types.cc +UD_Types.hh +# N. B: the entries below this line updated automatically by gen_links.sh +TCCInterface_Functions.ttcn +TCCConversion_Functions.ttcn +TCCConversion.cc +TCCInterface.cc +TCCInterface_ip.h +IPL4asp_Functions.ttcn +IPL4asp_PT.cc +IPL4asp_PT.hh +IPL4asp_PortType.ttcn +IPL4asp_Types.ttcn +IPL4asp_discovery.cc +IPL4asp_protocol_L234.hh +Socket_API_Definitions.ttcn +UD_PT.cc +UD_PT.hh +UD_PortType.ttcn +UD_Types.ttcn +MobileL3_CC_Types.ttcn +MobileL3_CommonIE_Types.ttcn +MobileL3_GMM_SM_Types.ttcn +MobileL3_MM_Types.ttcn +MobileL3_RRM_Types.ttcn +MobileL3_SMS_Types.ttcn +MobileL3_SS_Types.ttcn +MobileL3_Types.ttcn +SS_DataTypes.asn +SS_EncDec.cc +SS_Errors.asn +SS_Operations.asn +SS_PDU_Defs.asn +SS_Protocol.asn +SS_Types.ttcn +General_Types.ttcn +GSM_Types.ttcn +GSM_RR_Types.ttcn +Osmocom_Types.ttcn +RLCMAC_Types.ttcn +RLCMAC_CSN1_Types.ttcn +RLCMAC_EncDec.cc +L1CTL_Types.ttcn +L1CTL_PortType.ttcn +LAPDm_RAW_PT.ttcn +LAPDm_Types.ttcn diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh index 9f4cea4..9a6f3e3 100755 --- a/gprs_gb/gen_links.sh +++ b/gprs_gb/gen_links.sh @@ -2,35 +2,10 @@ BASEDIR=../deps -gen_links() { - DIR=$1 - FILES=$* - for f in $FILES; do - echo "Linking $f" - ln -sf $DIR/$f $f - done -} +. ../generic.sh -#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src -#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" -#gen_links $DIR $FILES - -DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src -FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCConversion.hh TCCInterface.cc TCCInterface_ip.h" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src -FILES="Socket_API_Definitions.ttcn" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.IPL4asp/src -FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" -gen_links $DIR $FILES - -DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src -FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" -gen_links $DIR $FILES - -DIR=../library -FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn" -gen_links $DIR $FILES +link_UNIX_DOMAIN_SOCKETasp $BASEDIR +link_TCCUsefulFunctions $BASEDIR +link_SocketAPI $BASEDIR +link_IPL4asp $BASEDIR +link_library -- To view, visit https://gerrit.osmocom.org/5316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:17:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 13:17:41 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5314 to look at the new patch set (#3). Fix rmlink.sh Exclude directories with symlinks which are under version control from link cleanup script. Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 --- M rmlinks.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/5314/3 diff --git a/rmlinks.sh b/rmlinks.sh index 58ca6f3..2b356a5 100755 --- a/rmlinks.sh +++ b/rmlinks.sh @@ -1,2 +1,2 @@ #!/bin/sh -find . -type l -exec rm \{\} \; +find . -type l -not -path "./bin/*" -not -path "./M3UA_CNL113537/*" -not -path "./SCCP_CNL113341/*" -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 13:26:20 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Ignore build byproducts Message-ID: Review at https://gerrit.osmocom.org/5317 Ignore build byproducts Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450 --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/5317/1 diff --git a/.gitignore b/.gitignore index ccb08fa..d525ada 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ bin/*.hh *.o *.log +*.so +compile -- To view, visit https://gerrit.osmocom.org/5317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:36:36 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 13:36:36 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#12). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 14 files changed, 1,279 insertions(+), 321 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/12 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..2fd44ef --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,56 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +/* MGCP state handler context. This context information stores all information + * to handle the direction of the RTP streams via MGCP. There is one instance + * of this context struct per subscriber connection. + * (see also struct gsm_subscriber_connection) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number. This number number identifies the endpoint + * on the MGW on which the RAN and CN connection is created. This + * endpoint number is assigned and released automatically. */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..2901df6 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -41,6 +41,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..5973234 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -408,8 +409,21 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); + + if (rtp_addr_in.sin_addr.s_addr == INADDR_NONE) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Address -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (rtp_addr_in.sin_port == 0) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Port -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..d0b24eb 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -596,11 +597,7 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + msc_mgcp_ass_complete(conn, osmo_ntohs(rtp_addr_in->sin_port), inet_ntoa(rtp_addr_in->sin_addr)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..4ce768c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #ifdef BUILD_IU @@ -78,6 +79,7 @@ #include #include +#include #include @@ -1328,8 +1330,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teardown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1390,6 +1392,7 @@ { struct gsm_trans *trans1 = trans_find_by_callref(net, bridge->callref[0]); struct gsm_trans *trans2 = trans_find_by_callref(net, bridge->callref[1]); + int rc; if (!trans1 || !trans2) return -EIO; @@ -1400,7 +1403,18 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + /* Bridge RTP streams */ + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1757,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1799,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2683,23 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; + + LOGP(DMNCC, LOGL_ERROR, "RTP create for non-existing trans\n"); + + if (addr == INADDR_NONE) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid IP-Address\n", + vlr_subscr_name(trans->vsub)); + return; + } + if (port == 0) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid Port\n", + vlr_subscr_name(trans->vsub)); + return; + } /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2739,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2755,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2782,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2798,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = osmo_htonl(rtp->ip); + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..7bb45b2 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,22 @@ #include #include +#include #include #include +#include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +201,53 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = osmo_htonl(inet_addr(conn->rtp.local_addr_ran)); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + if (rtp_ip == INADDR_NONE) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP IP-Address\n", + conn_id, rab_id); + return -EINVAL; + } + if (rtp_port == 0) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP Port\n", + conn_id, rab_id); + return -EINVAL; + } + + use_x213_nsap = + (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, rtp=%x:%u, use_x213_nsap=%d\n", + conn_id, rab_id, rtp_ip, rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, + "Failed to send RAB Assignment: conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..394771e --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1074 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 +#define MGCP_ASS_TIMEOUT 10 /* in seconds */ +#define MGCP_ASS_TIMEOUT_TIMER_NR 4 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_ASS_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, will be displayed by + * handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "call could not be completed in time (RAN)"}, + {MGCP_ERR_ASS_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_CN_COMPL, + ST_MDCX_RAN, + ST_MDCX_RAN_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and we + * may now forward IP/Port of the remote call leg to the MGW */ + EV_ASSIGN, + + /* External event: Notify that the Call is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: An error occurred that requires a controlled + * teardown of the RTP connections */ + EV_TEARDOWN_ERROR, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* We were unable to communicate with the MGW, unfortunately + * there is no meaningful action we can take now other than + * giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* If the logic that controls the RAN is unable to negotiate a + * connection, we presumably still have a working connection to + * the MGW, we will try to shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Under normal conditions, the MSC logic should always command + * to release the call at some point. However, the release may + * be missing due to errors in the MSC logic and we may have + * reached ST_HALT because of cascading errors and timeouts. In + * this and only in this case we will allow ST_HALT to free all + * context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_ASS_TIMEOUT_TIMER_NR) { + /* There may be rare cases in which the MSC is unable to + * complete the call assignment */ + handle_error(mgcp_ctx, MGCP_ERR_ASS_TIMEOUT); + } else { + /* Ther must not be any unsolicited timers in this FSM. If so, + * we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_CN_COMPL: wait for mgw response, move on with the MDCX + * for the RAN side if we already have valid IP/Port data for the RAN sided + * RTP stream. */ +static void fsm_mdcx_cn_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_subscriber_connection *conn; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Enter MDCX phase, but we must be sure that the Assigmnet on the A or + * IuCS interface is complete (IP-Address and Port are valid) */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_ASS_TIMEOUT, MGCP_ASS_TIMEOUT_TIMER_NR); + + /* If we already have a valid remote port and IP-Address from the RAN side + * call leg, the assignment has been completed before we got here, so we + * may move on immediately */ + if (conn->rtp.remote_port_ran != 0 || strlen(conn->rtp.remote_addr_ran) > 0) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: wait for assignment completion, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_ASSIGN: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_RAN_COMPL: check MGW response */ +static void fsm_mdcx_ran_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the RAN CRCX is received, then proceed with + sending the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on the + * RAT (Radio Access Technology) , this will either trigger an + * Assignment Request on the A-Interface or an RAB-Assignment on the + * IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, we + * will enter the MDCX phase by sending an MDCX for the CN side to the + * MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* We arrive in this state when the MDCX phase for the CN side as + * completed we will check the IP/Port of the RAN connection. If we + * this data is valid we may continue with the MDCX phase for the RAN + * side. If not we wait until the assinment completes on the A or on + * the IuCS interface. The completion of the assigmnet will fill in the + * port and IP-Address of the RAN side and way may continue then. */ + [ST_MDCX_CN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN_COMPL), + .action = fsm_mdcx_cn_compl_cb, + }, + /* When the response for the CN MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_ASSIGN), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The ran side MDCX phase is complete when the response is received + * from the MGW. The is then active and we change to ST_CALL and wait + * there until the call ends. */ + [ST_MDCX_RAN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN_COMPL), + .action = fsm_mdcx_ran_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Inform the FSM that the assignment (RAN connection) is now complete. + * Parameter: + * conn: subscriber connection context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, assignment completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, assignmnet completion failed.\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + /* Memorize port and IP-Address of the remote RAN call leg. We need this + * information at latest when we enter the MDCX phase for the RAN side. */ + conn->rtp.remote_port_ran = port; + osmo_strlcpy(conn->rtp.remote_addr_ran, addr, sizeof(conn->rtp.remote_addr_ran)); + + /* Note: We only dispatch the event if we are really waiting for the + * assignment, if we are not yet waiting, there is no need to loudly + * broadcast an event that the all other states do not understand anyway */ + if (mgcp_ctx->fsm->state == ST_MDCX_RAN) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already have passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call. + * Parameter: + * trans: connection context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 12 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:37:28 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 13:37:28 +0000 Subject: [PATCH] osmo-mgw[master]: client: mgcp_response_parse_params: check rtp port Message-ID: Review at https://gerrit.osmocom.org/5318 client: mgcp_response_parse_params: check rtp port Also check the port number for plausibility like we do it already for the IP-Address Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4 --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/5318/1 diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 1c35aa9..7e07d00 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -180,6 +180,9 @@ &r->audio_port) != 1) goto response_parse_failure; + if (r->audio_port == 0) + goto response_parse_failure; + return 0; response_parse_failure: -- To view, visit https://gerrit.osmocom.org/5318 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:37:43 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 13:37:43 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments Message-ID: Review at https://gerrit.osmocom.org/5319 cosmetic: osmo_bsc_mgcp: improve comments Make the comments for struct mgcp_ctx more expressive Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2 --- M include/osmocom/bsc/osmo_bsc_mgcp.h 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/5319/1 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index f7106b6..7452513 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -23,12 +23,17 @@ #include #include -/* MGCP state handler context (fsm etc..) */ +/* MGCP state handler context. This context information stores all information + * to handle the direction of the RTP streams via MGCP. There is one instance + * of this context struct per subscriber connection. + * (see also struct osmo_bsc_sccp_con) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ struct osmo_fsm_inst *fsm; - /* RTP endpoint number */ + /* RTP endpoint number. This number number identifies the endpoint + * on the MGW on which the BTS and NET connection is created. This + * endpoint number is assigned and released automatically. */ uint16_t rtp_endpoint; /* RTP connection identifiers */ -- To view, visit https://gerrit.osmocom.org/5319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:37:43 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 13:37:43 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port) Message-ID: Review at https://gerrit.osmocom.org/5320 mgcp: validate rtp connection data in MGW response (ip/port) Currently the pasing results from the RTP ip/port are fed into inet_addr without checking the results. Check the return code of inet_addr to be sure that the IP-Address got properly decoded. Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/20/5320/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 39ae9d0..a3676e4 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -198,6 +198,7 @@ struct mgcp_ctx *mgcp_ctx = priv; int rc; struct osmo_bsc_sccp_con *conn; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -227,13 +228,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ conn->rtp_port = r->audio_port; - conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->rtp_ip = osmo_ntohl(addr); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -480,6 +488,7 @@ struct osmo_bsc_sccp_con *conn; struct gsm_lchan *lchan; struct sockaddr_in *sin; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -511,13 +520,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Store address */ sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; sin->sin_family = AF_INET; - sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_addr.s_addr = addr; sin->sin_port = osmo_ntohs(r->audio_port); /* Notify the FSM that we got the response. */ -- To view, visit https://gerrit.osmocom.org/5320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:52:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 13:52:48 +0000 Subject: osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5274 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:53:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 13:53:48 +0000 Subject: osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 13:55:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 13:55:18 +0000 Subject: osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py File suites/voice/mo_mt_call.py: Line 26: hlr.subscriber_add(ms_mo) > you can probably add the subscribers to the HLR before/while waiting for th (true, but will not make a noticeable difference in execution time) -- To view, visit https://gerrit.osmocom.org/5276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:05:26 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 14:05:26 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 11: (70 comments) Actually we should not merge this patch until we did not solve the problems with 3G (rab assignment response not parsed). For the other topic, please see my email. https://gerrit.osmocom.org/#/c/4980/2//COMMIT_MSG Commit Message: Line 15: Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c > please use the tag as "Depends: foo" to match general tag syntax like below Done https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_ifaces.h File include/osmocom/msc/msc_ifaces.h: Line 44 > -1: msc_ifaces.h/c didn't really turn out as clearly as I had intended... B Done https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_mgcp.h File include/osmocom/msc/msc_mgcp.h: Line 33: > ?: I wonder whether rtp_endpoint and the conn_ids should rather be part of The structs are similar, however I would not include this into the mgcp_client API. It is not guaranteed that every client will use exactly one connection. Integrating this into the client would require some more elaborated approach. We would have to manage the connection IDs some how, which means we would have to track open connections, add CRCX and remove connection IDs to lists on DLCX. This would be rather complex. I think letting the user tracking the connection IDs is pretty ok. https://gerrit.osmocom.org/#/c/4980/11/include/osmocom/msc/msc_mgcp.h File include/osmocom/msc/msc_mgcp.h: Line 26: /* MGCP state handler context (fsm etc..) */ > explain the scope? mgcp context for one call leg? one subscriber? Done Line 31: /* RTP endpoint number */ > (omit comments that just mirror the variable name; explain what the endpoin Done Line 35: * needed */ > use line width instead of wrapping short lines Done https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 412: rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); > needs some error checking. man inet_addr: Done https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/gsm_04_08.c File src/libmsc/gsm_04_08.c: Line 1333: /* Initiate the teadown of the related connections on the MGW */ > "teadown" Done Line 1390: /* helper function for tch_bridge() to bridge the RTP Voice streams also */ > (I find "helper function for" is something you could write everywhere; I al The "helper function for" serves basically the purpose to mark the function as a nested function. Unfortunately we do not have nested functions in C (see also pascal). Actually we do not need to have this in a separate function anyway so I removed it. Line 2691: uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); > inet_addr, error checking Done https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/iucs.c File src/libmsc/iucs.c: Line 226: " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, > I would have said, use line width, but this is just moving code, right? I have corrected the formatting of the whole function now. This is code that had been moved from msc_ifaces.c to here. (splitting the log strings is a coding style violation anyway, so I concatenated the strings again and corrected the the formatting) Line 235: " conn_id=%d rab_id=%d rtp=%x:%u\n", > same Done https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_ifaces.c File src/libmsc/msc_ifaces.c: Line 194 > looks like callers should just call msc_mgcp_call_assignment() directly. Done Line 249 > looks like callers should just call msc_mgcp_call_release() directly. Done https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 47: #define MGCP_RAN_TIMEOUT 10 /* in seconds */ > -1: prefer msc_mgcp_ instead of int_ because if you follow this scheme, we Done Line 59: MGCP_ERR_MGW_FAIL, > -1: typical naming would be Done Line 93: ST_CALL, > -1: again you are using the same general struct name, just 'fsm_', like in Done Line 126: * the CN side */ > fsm_ Done Line 217: { > -1: again, you do not need to log FSM states or events, the FSM code does t Done Line 222: int rc; > -1: best use "0x%x" so we always know it is logged in hex. Are you sure it osmo-mgw parses the numerical digit as hexadecimal number, so yes we should display it in hexadecimal here too. Line 240: if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= > (wondering whether this log line adds any info to the log, since the FSM al Done Line 248: /* Transmit MGCP message to MGW */ > lol, return at the end of a void function? (some more below) Done Line 319: handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); > nope Done Line 422: goto error; > nope Done Line 442: * of the side pointing towards the BSS should be already communicated > (code dup: could have one handle_error(...) below and goto assignment_fail Done Line 460: struct gsm_subscriber_connection *conn; > (then) Done Line 465: OSMO_ASSERT(mgcp_ctx); > ?: no timeout? I have added a 10sec timeout now. I think after 20sec we can be pretty sure that there are problems on the BSC side and the call can not be completed anyway. Line 492: .conn_id = mgcp_ctx->conn_id_cn, > ... Done Line 503: OSMO_ASSERT(msg); > (line break or drop the " " in the middle) Done Line 507: rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); > (rather combine with preceding LOGPFSML for less log lines and a bit less l Done Line 552: return; > you're copying these lines and local variables around everywhere, even in f Done Line 609: }; > (combine logs) Done Line 691: .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), > really an error? Done Line 803: .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), > (we often use an S() macro, e.g. see top of vlr_lu_fsm.c and struct sub_pre Done Line 805: .name = OSMO_STRINGIFY(ST_MDCX_RAN), > (I like to use OSMO_STRINGIFY(ST_CRCX_RAN) because then there won't be typo Done Line 877: if (conn->via_ran == RAN_UTRAN_IU) > "the a" Done Line 895: OSMO_ASSERT(mgcp_ctx->fsm); > can't we log some context? Remember Holger's scenario ... it is 37c3, you h We encode trans->transaction_id in the fsm name, so where we use LOGPFSML() we have some context, which should be sufficient. In the LOGP() case here it is not so easy because we would have to add the context info externally. From what I can see we won't get until here anyway if trans or trans->conn is missing. Line 927: if (!addr || strlen(addr) <= 0) { > I think it should be a child of the conn->conn_fsm. I think we have a design problem here anyway. mgcp_client_tx() takes the function pointer, including context references and indefinitely waits for an answer of the mgw. The answer may arrive late when the FSM and the context is long freed. There is no real way to cope with this on the MSC side. We have to free the context info at some point. What we would need is a functionality in mgcp_client through which we can tell that the context is freed and that we are not interested in any late answers anymore. Did I overlook something in the client? Do we already have some functionality like this? Line 954: osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); > context please in all of these logs. Done Line 961: * trans: transaction context > In general, you could have a look whether any code path leading to these ch Done https://gerrit.osmocom.org/#/c/4980/3/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 65: MGCP_ERR_ASS_TIMEOUT, > (prefix 'msc_mgcp_': nice. Why not the common value_string[] suffix '_names Done Line 283: > -1: oops: %0x%x Done Line 389: /* Notify the FSM that we got the response. */ > well, or we added a new RAN type and forgot to implement it here. I usually Done Line 445: osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); > (i.e. you don't want to combine these two logs?) Done Line 529: > (i.e. you don't want to combine these two logs?) Done Line 803: .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), > i.e. you don't want the FSM to be a child of the conn_fsm? I think this will cause the FSM to freed to early. I already tried to free when conn is freed. This leads to a crash because the MGW response arrives after the freeing is done. We should discuss this tomorrow, I think this is a difficult problem. Line 806: .action = fsm_mdcx_ran_cb, > (this is also a duplicate of FSM internal logging, right?) Done Line 858: if (!trans->conn) { > -1: context Done https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 56: /* Some internal cause codes to indicate fault > use line width Done Line 70: /* Human readable respresentation of the faul codes, > line width, also multiple more times below Comment lines that exceed the 80 line boundary are becoming difficult to read. Also readability is decreased when only the last word wraps. Line 102: * may now forward IP/Port of the remote call leg to the MGW*/ > (space before '*/') Done Line 167: if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { > (a lot of "Note:" below) Done Line 180: osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); > could make sense to place teardown in a ST_HALT -> on_enter function? Other I have seen the possibility of supplying an onenter function recently but too late. I do not think that it is an all too good idea to patch this at such a late development state. Line 231: "CRCX/RAN: creating connection for the RAN side on " "MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); > join "..." "..." Done Line 710: osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); > above, a TEARDOWN event follows after the HALT state_chg. What triggers the The EV_TEARDOWN event is fired on error via: handle_error() fsm_timeout_cb() And on a regular call end by: msc_mgcp_call_release() Line 747: if (mgcp_ctx->free_ctx) { > the free_ctx flag essentially creates two kinds of HALT states. One where w The flag is needed to know if some outside entity still needs to access the context information or not. At the point of the call release we can be sure that nobody will access the context anymore and that we may free it. An internal error can happen anytime. We could then change to a state ST_HALT_ERROR but then we still do not know if anyone still needs the context. So this does not help us to get rid of the flag because this state also must not free the context too early. The root of the probelm (I do not see it as a problem) is the way the surrounding logic is designed. When the call is released by gsm_04_08.c then the call is over from the gsm_04_08.c point of view. But we have all the RTP connections still running. We must safely tear them down and then free the context ourseleves. For this we must know that the call war really released from ouside (then we may free) or we just decided because of an error condition to tear down the RTP connections. If so we may free, but only when the ouside also acknowledged the end of the call not early because then we run into a use-after free problem. To make it more clear I have added an event EV_TEARDOWN_ERROR, so then we are at least clear who decided to teardown. Line 749: talloc_free(mgcp_ctx); > mabe clear the free_ctx flag to be safe? otherwise set mgcp_ctx->fsm to NUL The double free is prevented inherently because the FSM instance is freed including all context data. There is no way to enter fsm_halt_cb again because the FSM is gone. Also clearing the flag does not make sense when the context is freed. Line 761: .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), > IIUC the next state is CRCX_CN, not ST_CALL? Howcome do all states allow tr The reason for this is because ST_CALL supplys all the tools to teardown the connection on the MGW. Bascially what we do here is to skip to the call state and then immediately tear down the call. Line 765: /* When the response to the CRCX is received, then proceed with sending > "the RAN CRCX" Done Line 774: * the RAT, this will either trigger an Assignment Request on the > RAT? RAT = Radio Access Technology Line 783: * we will enter the MDCX phaseby sending an MDCX for the CN side > "phaseby" Done Line 793: * the assignment is completed */ > above it sounds like CRCX_COMPL sends the Assignment Requests and MDCX_CN r The assignment is completed in parallel to the FSM. There may be cases where the IP-Address of the RAN side is not yet valid because the assignment is still ongoing. In this case we just wait until the assignment completes. If we already have a valid IP/Port, then we implicitly know that the Assignment completed in the meantime. Then we just fall through and continue. Line 800: /* When the response for the MDCX is received, send the MDCX for the > "for the CN MDCX" Done Line 803: .in_event_mask = S(EV_TEARDOWN) | S(EV_ASSIGN), > I find this hard to follow: ST_MDCX_RAN receives EV_ASSIGN, but ST_ASS_COMP Yes, ST_MDCX_RAN must wait for EV_ASSIGN because it must not execute before. Otherwise it would run on invalid IP/Port data. ST_ASS_COMPL is missnamed, I will rename it. This is entered when the MDCX for the CN side completes. If the assignment is detected non complete, than it stays there, if not it falls through. But I see, the naming is irretating. I will rename the states. Line 808: /* The MDCX phase is complete when the response is received from the > "the RAN side MDCX response" Done Line 809: * MGW. The call is now active */ > when the call is now active, why is this not the ST_CALL state? Oh, you mea Yes, thats correct. The call is active when the MGW responds. Then we go to ST_CALL and wait for the EV_TEARDOWN event which then terminates the call. Line 825: * the state machine. */ > IIUC there should be DLCX for both the RAN and CN sides, each returning a D No, doing it one by one is more complicated and error prone. Ending both connections at a time with a wildcarded DLCX is RFC conform and the safest and fastest way to do it. Line 843: /* Notify that that a new call begins. This will create a connection for the > "that that" Done Line 846: * trans: transaction context > use punctuation in doc, don't rely on line endings Done Line 912: /* Inform the FSM that the assignment (RAN connection) is now complete > punctuation on all of these lines Done -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 11 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:05:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 14:05:32 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: > > have you verified that these tools work as expected in both py2 > and py3? > > py2 is verified in gerrit 5277, py3 verification is added in > follow-up patch. We do not have comprehensive automatic testing of these scripts anywhere, so it would involve manual testing. Hence I would welcome a rationale: why does this *need* py3 in the first place? "necessary for proper py3 tests" doesn't explain it to me. Why is it necessary in particular? I would be more comfortable sticking with py2 where we have it, and for new projects use the fully-py3 osmo_interact_* code instead. > > will no longer work in py2 > > it works for me but we should first merge the jenkins integration > and than let it be tested automatically. IIUC it cannot possibly work, since in py2 the syntax is completely different. Your change will print a tuple or something, but I wonder whether ('abc', file=xyz) is actually valid tuple syntax. You are of course aware that it's not like C where errors are caught immediately, in py you have to hit the actual code path to be sure that the syntax has the desired effect. Have you *really* tested it and checked the output? -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:08:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 14:08:40 +0000 Subject: osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py File suites/voice/mo_mt_call.py: Line 26: hlr.subscriber_add(ms_mo) > (true, but will not make a noticeable difference in execution time) I agree that it would be better in terms of dependencies and timing, but the difference would not be really noticeable and I wanted to avoid mangling more lines than necessary. -- To view, visit https://gerrit.osmocom.org/5276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:09:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 14:09:20 +0000 Subject: [MERGED] osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: suites: Wait for BTS to connect to BSC before continuing ...................................................................... suites: Wait for BTS to connect to BSC before continuing Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 --- M suites/aoip_debug/interactive.py M suites/aoip_encryption/register_a5_0_authopt.py M suites/aoip_encryption/register_a5_0_authreq.py M suites/aoip_encryption/register_a5_1_authreq.py M suites/aoip_smpp/esme_ms_sms_storeforward.py M suites/aoip_smpp/esme_ms_sms_transaction.py M suites/aoip_sms/mo_mt_sms.py M suites/aoip_ussd/assert_extension.py M suites/debug/interactive.py M suites/gprs/ping.py M suites/netreg/register.py M suites/netreg/register_default.py M suites/smpp/esme_ms_sms_storeforward.py M suites/smpp/esme_ms_sms_transaction.py M suites/sms/mo_mt_sms.py M suites/ussd/assert_extension.py M suites/voice/mo_mt_call.py 17 files changed, 18 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py index 312083a..b08bac1 100755 --- a/suites/aoip_debug/interactive.py +++ b/suites/aoip_debug/interactive.py @@ -26,6 +26,8 @@ bsc.start() bts.start() +print('Waiting for bts to connect to bsc...') +wait(bsc.bts_is_connected, bts) print('Waiting for bts to be ready...') wait(bts.ready_for_pcu) pcu.start() diff --git a/suites/aoip_encryption/register_a5_0_authopt.py b/suites/aoip_encryption/register_a5_0_authopt.py index 75614e2..6a06078 100755 --- a/suites/aoip_encryption/register_a5_0_authopt.py +++ b/suites/aoip_encryption/register_a5_0_authopt.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_encryption/register_a5_0_authreq.py b/suites/aoip_encryption/register_a5_0_authreq.py index 07293d2..d6c67ea 100755 --- a/suites/aoip_encryption/register_a5_0_authreq.py +++ b/suites/aoip_encryption/register_a5_0_authreq.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_encryption/register_a5_1_authreq.py b/suites/aoip_encryption/register_a5_1_authreq.py index 190e5bb..b2c446f 100755 --- a/suites/aoip_encryption/register_a5_1_authreq.py +++ b/suites/aoip_encryption/register_a5_1_authreq.py @@ -22,6 +22,7 @@ bsc.bts_add(bts) bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) ms.log_info() good_ki = ms.ki() diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py b/suites/aoip_smpp/esme_ms_sms_storeforward.py index 79c570e..9effe6d 100755 --- a/suites/aoip_smpp/esme_ms_sms_storeforward.py +++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py @@ -32,6 +32,7 @@ mgw_bsc.start() bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) esme.connect() hlr.subscriber_add(ms) diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py b/suites/aoip_smpp/esme_ms_sms_transaction.py index e20b2b6..190879d 100755 --- a/suites/aoip_smpp/esme_ms_sms_transaction.py +++ b/suites/aoip_smpp/esme_ms_sms_transaction.py @@ -30,6 +30,7 @@ mgw_bsc.start() bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) esme.connect() hlr.subscriber_add(ms) diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py index 76b7e51..6ce460f 100755 --- a/suites/aoip_sms/mo_mt_sms.py +++ b/suites/aoip_sms/mo_mt_sms.py @@ -21,6 +21,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms_mo) hlr.subscriber_add(ms_mt) diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py index 181f07f..5969b01 100755 --- a/suites/aoip_ussd/assert_extension.py +++ b/suites/aoip_ussd/assert_extension.py @@ -22,6 +22,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms) diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 6df5b6d..595cfd9 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) for m in modems: nitb.subscriber_add(m) diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index f6f01a6..1b6d85c 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -27,6 +27,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) print('Waiting for bts to be ready...') wait(bts.ready_for_pcu) pcu.start() diff --git a/suites/netreg/register.py b/suites/netreg/register.py index 9807d2b..d5fbeb7 100755 --- a/suites/netreg/register.py +++ b/suites/netreg/register.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/netreg/register_default.py b/suites/netreg/register_default.py index 797b2c1..545525d 100755 --- a/suites/netreg/register_default.py +++ b/suites/netreg/register_default.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/smpp/esme_ms_sms_storeforward.py b/suites/smpp/esme_ms_sms_storeforward.py index c35e3b1..391a040 100755 --- a/suites/smpp/esme_ms_sms_storeforward.py +++ b/suites/smpp/esme_ms_sms_storeforward.py @@ -22,6 +22,7 @@ nitb.smsc.esme_add(esme) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) esme.connect() nitb.subscriber_add(ms) diff --git a/suites/smpp/esme_ms_sms_transaction.py b/suites/smpp/esme_ms_sms_transaction.py index efc244c..adc9dae 100755 --- a/suites/smpp/esme_ms_sms_transaction.py +++ b/suites/smpp/esme_ms_sms_transaction.py @@ -20,6 +20,7 @@ nitb.smsc.esme_add(esme) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) esme.connect() nitb.subscriber_add(ms) diff --git a/suites/sms/mo_mt_sms.py b/suites/sms/mo_mt_sms.py index f729f99..10897ff 100755 --- a/suites/sms/mo_mt_sms.py +++ b/suites/sms/mo_mt_sms.py @@ -10,6 +10,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms_mo) nitb.subscriber_add(ms_mt) diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py index 77e5423..8ccab2d 100755 --- a/suites/ussd/assert_extension.py +++ b/suites/ussd/assert_extension.py @@ -11,6 +11,7 @@ nitb.bts_add(bts) nitb.start() bts.start() +wait(nitb.bts_is_connected, bts) nitb.subscriber_add(ms) diff --git a/suites/voice/mo_mt_call.py b/suites/voice/mo_mt_call.py index 46c5ec8..fa3b900 100755 --- a/suites/voice/mo_mt_call.py +++ b/suites/voice/mo_mt_call.py @@ -21,6 +21,7 @@ bsc.start() bts.start() +wait(bsc.bts_is_connected, bts) hlr.subscriber_add(ms_mo) hlr.subscriber_add(ms_mt) -- To view, visit https://gerrit.osmocom.org/5276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:09:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 14:09:21 +0000 Subject: [MERGED] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: OsmoBsc: Introduce bts_is_connected API ...................................................................... OsmoBsc: Introduce bts_is_connected API This can be used by tests to wait until bts is successfully connected to BSC. Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 --- M src/osmo_gsm_tester/osmo_bsc.py 1 file changed, 39 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 7424fb4..2c909bc 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import re import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -108,7 +109,45 @@ self.bts.append(bts) bts.set_bsc(self) + def bts_num(self, bts): + 'Provide number id used by OsmoNITB to identify configured BTS' + # We take advantage from the fact that VTY code assigns VTY in ascending + # order through the bts nodes found. As we populate the config iterating + # over this list, we have a 1:1 match in indexes. + return self.bts.index(bts) + + def bts_is_connected(self, bts): + return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts)) + def running(self): return not self.process.terminated() + +class OsmoBscCtrl(log.Origin): + PORT = 4249 + BTS_OML_STATE_VAR = "bts.%d.oml-connection-state" + BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) bts.\d+.oml-connection-state (?P\w+)") + + def __init__(self, bsc): + self.bsc = bsc + super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), OsmoBscCtrl.PORT)) + + def ctrl(self): + return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT) + + def bts_is_connected(self, bts_num): + with self.ctrl() as ctrl: + ctrl.do_get(OsmoBscCtrl.BTS_OML_STATE_VAR % bts_num) + data = ctrl.receive() + while (len(data) > 0): + (answer, data) = ctrl.remove_ipa_ctrl_header(data) + answer_str = answer.decode('utf-8') + answer_str = answer_str.replace('\n', ' ') + res = OsmoBscCtrl.BTS_OML_STATE_RE.match(answer_str) + if res: + oml_state = str(res.group('oml_state')) + if oml_state == 'connected': + return True + return False + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5275 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:09:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 14:09:21 +0000 Subject: [MERGED] osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: OsmoNitb: Introduce bts_is_connected API ...................................................................... OsmoNitb: Introduce bts_is_connected API This can be used by tests to wait until bts is successfully connected to NITB. Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 --- M src/osmo_gsm_tester/osmo_nitb.py 1 file changed, 27 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 6dd7342..48037a6 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -114,6 +114,13 @@ def mcc_mnc(self): return (self.mcc(), self.mnc()) + def bts_num(self, bts): + 'Provide number id used by OsmoNITB to identify configured BTS' + # We take advantage from the fact that VTY code assigns VTY in ascending + # order through the bts nodes found. As we populate the config iterating + # over this list, we have a 1:1 match in indexes. + return self.bts.index(bts) + def subscriber_add(self, modem, msisdn=None, algo=None): if msisdn is None: msisdn = self.suite_run.resources_pool.next_msisdn(modem) @@ -148,6 +155,9 @@ def imsi_list_attached(self): return OsmoNitbCtrl(self).subscriber_list_active() + def bts_is_connected(self, bts): + return OsmoNitbCtrl(self).bts_is_connected(self.bts_num(bts)) + def running(self): return not self.process.terminated() @@ -159,6 +169,8 @@ SUBSCR_DELETE_VAR = 'subscriber-delete-v1' SUBSCR_DELETE_REPLY_RE = re.compile("SET_REPLY (\d+) %s Removed" % SUBSCR_DELETE_VAR) SUBSCR_LIST_ACTIVE_VAR = 'subscriber-list-active-v1' + BTS_OML_STATE_VAR = "bts.%d.oml-connection-state" + BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) bts.\d+.oml-connection-state (?P\w+)") def __init__(self, nitb): self.nitb = nitb @@ -210,4 +222,19 @@ aslist_str = answer_str return aslist_str + def bts_is_connected(self, bts_num): + with self.ctrl() as ctrl: + ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num) + data = ctrl.receive() + while (len(data) > 0): + (answer, data) = ctrl.remove_ipa_ctrl_header(data) + answer_str = answer.decode('utf-8') + answer_str = answer_str.replace('\n', ' ') + res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str) + if res: + oml_state = str(res.group('oml_state')) + if oml_state == 'connected': + return True + return False + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5274 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:24:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 14:24:57 +0000 Subject: osmo-ttcn3-hacks[master]: Fix rmlink.sh In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 the script is to be run from within one of the test cases, i.e. from within osmo-ttcn3-hacks/bsc, then the issue you are fixing won't occur. But it seems your patch won't hurt. -- To view, visit https://gerrit.osmocom.org/5314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:27:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 14:27:26 +0000 Subject: osmo-ttcn3-hacks[master]: Add generic link functions In-Reply-To: References: Message-ID: Patch Set 3: I'm not quite sure if it's worth optimizing this, given that there is a proper solution in TITAN that avoids working with symlinks. I haven't used it yet, but it relates to the .grp XML files that ship with their libraries. ttcn3_makefilegen can work with those, but I haven't studied this in detail. Let's not get distracted and focus on our actual work extending our test coverage and once somebody has some spare time to figure out how to work with .grp files try to adopt that. -- To view, visit https://gerrit.osmocom.org/5315 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:30:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 14:30:15 +0000 Subject: osmo-ttcn3-hacks[master]: Avoid gcc version check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 might make sense to refer to the fact that this is a debian-specific bug report and also refer to Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 -- To view, visit https://gerrit.osmocom.org/5313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 14:38:14 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 13 Dec 2017 14:38:14 +0000 Subject: [PATCH] osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital... Message-ID: Review at https://gerrit.osmocom.org/5321 paging: paging_flush_bts: be sure pending_requests is initalized The BSSMAP reset causes the paging requests to be flushed. When this happens right after startup then calling paging_flush_bts() may be called when the list bts->paging.pending_requests is not yet initalized, which causes a segfault. Call paging_init_if_needed() to be sure that the list is inizalized (like the other functions also do) Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc --- M src/libbsc/paging.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/5321/1 diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 8d54d0a..e9d122e 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -473,6 +473,8 @@ { struct gsm_paging_request *req, *req2; + paging_init_if_needed(bts); + llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { if (msc && req->msc != msc) continue; -- To view, visit https://gerrit.osmocom.org/5321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 13 15:09:54 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 15:09:54 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de... Message-ID: Review at https://gerrit.osmocom.org/5322 osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices This is a temporary workaround to be able to test gprs signalling until we set up all required bits to run osmo-ggsn in its own namespace. Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9 --- M src/osmo_gsm_tester/osmo_ggsn.py M src/osmo_gsm_tester/util.py 2 files changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/22/5322/1 diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py index c11353c..9f23c64 100644 --- a/src/osmo_gsm_tester/osmo_ggsn.py +++ b/src/osmo_gsm_tester/osmo_ggsn.py @@ -51,7 +51,14 @@ pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s' % self.addr()) - env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + env = {} + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for osmo-ggsn') + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-ggsn requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to osmo-ggsn') + util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin')) self.dbg(run_dir=self.run_dir, binary=binary, env=env) self.process = process.Process(self.name(), self.run_dir, diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index 8fb6e19..ed1a258 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -68,12 +68,25 @@ osmo-gsm-tester. See osmo-gsm-tester manual for more information. ''' from .process import Process - SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' - proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 'osmo-gsm-tester_setcap_net_raw.sh', binary]) + SETCAP_NET_RAW_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' + proc = Process(SETCAP_NET_RAW_BIN, run_dir, ['sudo', SETCAP_NET_RAW_BIN, binary]) proc.launch() proc.wait() if proc.result != 0: - raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, proc.result)) + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_RAW_BIN, proc.result)) + +def setcap_net_admin(binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh' + proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', SETCAP_NET_ADMIN_BIN, binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_ADMIN_BIN, proc.result)) class listdict(dict): 'a dict of lists { "a": [1, 2, 3], "b": [1, 2] }' -- To view, visit https://gerrit.osmocom.org/5322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 15:59:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 15:59:31 +0000 Subject: osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 15:59:33 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 15:59:33 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices ...................................................................... osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices This is a temporary workaround to be able to test gprs signalling until we set up all required bits to run osmo-ggsn in its own namespace. Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9 --- M src/osmo_gsm_tester/osmo_ggsn.py M src/osmo_gsm_tester/util.py 2 files changed, 24 insertions(+), 4 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py index c11353c..9f23c64 100644 --- a/src/osmo_gsm_tester/osmo_ggsn.py +++ b/src/osmo_gsm_tester/osmo_ggsn.py @@ -51,7 +51,14 @@ pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s' % self.addr()) - env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + env = {} + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for osmo-ggsn') + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-ggsn requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to osmo-ggsn') + util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin')) self.dbg(run_dir=self.run_dir, binary=binary, env=env) self.process = process.Process(self.name(), self.run_dir, diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index 8fb6e19..ed1a258 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -68,12 +68,25 @@ osmo-gsm-tester. See osmo-gsm-tester manual for more information. ''' from .process import Process - SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' - proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 'osmo-gsm-tester_setcap_net_raw.sh', binary]) + SETCAP_NET_RAW_BIN = 'osmo-gsm-tester_setcap_net_raw.sh' + proc = Process(SETCAP_NET_RAW_BIN, run_dir, ['sudo', SETCAP_NET_RAW_BIN, binary]) proc.launch() proc.wait() if proc.result != 0: - raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, proc.result)) + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_RAW_BIN, proc.result)) + +def setcap_net_admin(binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh' + proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', SETCAP_NET_ADMIN_BIN, binary]) + proc.launch() + proc.wait() + if proc.result != 0: + raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_ADMIN_BIN, proc.result)) class listdict(dict): 'a dict of lists { "a": [1, 2, 3], "b": [1, 2] }' -- To view, visit https://gerrit.osmocom.org/5322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:08:52 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 13 Dec 2017 16:08:52 +0000 Subject: [PATCH] osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description Message-ID: Review at https://gerrit.osmocom.org/5323 mobile/vty_interface.c: fix 'channel-capability' description Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/5323/1 diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 8767985..37093ce 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2392,9 +2392,12 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability " - "(sdcch|sdcch+tchf|sdcch+tchf+tchh)", - "Select channel capability\nSDCCH only\nSDCCH + TCH/F\nSDCCH + TCH/H") +DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, + "channel-capability (sdcch|sdcch+tchf|sdcch+tchf+tchh)", + "Select channel capability\n" + "SDCCH only\n" + "SDCCH + TCH/F\n" + "SDCCH + TCH/F + TCH/H") { struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; -- To view, visit https://gerrit.osmocom.org/5323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:26:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 16:26:18 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library Message-ID: Review at https://gerrit.osmocom.org/5324 move RTP_CodecPort.ttcn to library Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3 --- R library/RTP_CodecPort.ttcn M mgw/gen_links.sh 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/5324/1 diff --git a/mgw/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn similarity index 100% rename from mgw/RTP_CodecPort.ttcn rename to library/RTP_CodecPort.ttcn diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index 0b8195e..acdeb40 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -37,5 +37,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc" +FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RTP_CodecPort.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:26:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 16:26:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files Message-ID: Review at https://gerrit.osmocom.org/5325 Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6 --- A library/RTP_CodecPort_CtrlFunct.ttcn A library/RTP_CodecPort_CtrlFunctDef.cc 2 files changed, 100 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/5325/1 diff --git a/library/RTP_CodecPort_CtrlFunct.ttcn b/library/RTP_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..9f6cad2 --- /dev/null +++ b/library/RTP_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,44 @@ +module RTP_CodecPort_CtrlFunct { + + import from RTP_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout RTP_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout RTP_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + +} + diff --git a/library/RTP_CodecPort_CtrlFunctDef.cc b/library/RTP_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..ce8e176 --- /dev/null +++ b/library/RTP_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,56 @@ +#include "IPL4asp_PortType.hh" +#include "RTP_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace RTP__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + +} + -- To view, visit https://gerrit.osmocom.org/5325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 16:26:20 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort Message-ID: Review at https://gerrit.osmocom.org/5326 Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f --- A library/RTP_Emulation.ttcn 1 file changed, 209 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/5326/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn new file mode 100644 index 0000000..b8b1dbe --- /dev/null +++ b/library/RTP_Emulation.ttcn @@ -0,0 +1,209 @@ +module RTP_Emulation { + +/* Functionalities that we want this module to imeplement: + * * act as a RTP source that generates a RTP Stream + * * act asaa RTP sink that consumes a RTP Stream + * + * for all of the above, we want to be able to + * * specify the payload type + * * specify the interval / sample rate + * * create drop-outs in the stream + * * detect reordered or lost frames + * * validate if the size of the frames matches epectations + * * play back real audio (at least some tones?) + * * enable/disable generation/verification of RTCP + */ + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; +import from RTP_Types all; +import from RTP_CodecPort all; +import from RTP_CodecPort_CtrlFunct all; + +type component RTP_Emulation_CT { + /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */ + port RTP_CODEC_PT RTP; + var integer g_rtp_conn_id := -1; + port RTP_CODEC_PT RTCP; + var integer g_rtcp_conn_id := -1; + + /* user-facing port for controlling the binding */ + port RTPEM_CTRL_PT CTRL; + + /* configurable by user, should be fixed */ + var INT7b g_tx_payload_type := 0; + var integer g_tx_samplerate_hz := 8000; + var integer g_tx_duration_ms := 20; + var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H); + + var HostName g_remote_host; + var PortNumber g_remote_port; + var HostName g_local_host; + var PortNumber g_local_port; + + /* state variables, change over time */ + var boolean g_rx_enabled := false; + var LIN2_BO_LAST g_tx_next_seq := 0; + var uint32_t g_tx_next_ts := 0; + + var INT7b g_rx_payload_type := 0; + var LIN2_BO_LAST g_rx_last_seq; + var uint32_t g_rx_last_ts; +} + +type enumerated RtpemMode { + RTPEM_MODE_NONE, + RTPEM_MODE_TXONLY, + RTPEM_MODE_RXONLY, + RTPEM_MODE_BIDIR +}; + +signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); +signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port); +signature RTPEM_mode(in RtpemMode mode); + +type port RTPEM_CTRL_PT procedure { + inout RTPEM_bind, RTPEM_connect, RTPEM_mode; +} with { extension "internal" }; + +template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts, + octetstring payload, BIT1 marker := '0'B) := { + version := 2, + padding_ind := '0'B, + extension_ind := '0'B, + CSRC_count := 0, + marker_bit := marker, + payload_type := pt, + sequence_number := seq, + time_stamp := int2bit(ts, 4), + SSRC_id := ssrc, + CSRCs := omit, + ext_header := omit, + data := payload +} + +private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { + var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, g_tx_next_seq, + g_tx_next_ts, payload, marker)); + RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); + /* increment sequence + timestamp for next transmit */ + g_tx_next_seq := g_tx_next_seq + 1; + g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod g_tx_duration_ms)); +} + +function f_main() runs on RTP_Emulation_CT +{ + var Result res; + + timer T_transmit := 1000.0/int2float(g_tx_duration_ms); + var RTP_RecvFrom rx_rtp; + var template RTP_RecvFrom tr := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := ? + }; + var template RTP_RecvFrom tr_rtp := tr; + var template RTP_RecvFrom tr_rtcp := tr; + tr_rtp.connId := g_rtp_conn_id; + tr_rtp.msg := { rtp := ? }; + tr_rtp.connId := g_rtcp_conn_id; + tr_rtcp.msg := { rtcp := ? }; + + while (true) { + alt { + /* control procedures (calls) from the user */ + [] CTRL.getcall(RTPEM_bind:{?,?}) -> param(g_local_host, g_local_port) { + if (g_local_port rem 2 == 1) { + //CTRL.raise(RTPEM_bind, "Local Port is not an even port number!"); + log("Local Port is not an even port number!"); + continue; + } + res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, + g_local_port, {udp:={}}); + g_rtp_conn_id := res.connId; + res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, + g_local_port+1, {udp:={}}); + g_rtcp_conn_id := res.connId; + CTRL.reply(RTPEM_bind:{g_local_host, g_local_port}); + } + [] CTRL.getcall(RTPEM_connect:{?,?}) -> param (g_remote_host, g_remote_port) { + if (g_remote_port rem 2 == 1) { + //CTRL.raise(RTPEM_connect, "Remote Port is not an even number!"); + log("Remote Port is not an even number!"); + continue; + } + res := RTP_CodecPort_CtrlFunct.f_IPL4_connect(RTP, g_remote_host, + g_remote_port, + g_local_host, g_local_port, + g_rtp_conn_id, {udp:={}}); + res := RTP_CodecPort_CtrlFunct.f_IPL4_connect(RTCP, g_remote_host, + g_remote_port+1, + g_local_host, g_local_port+1, + g_rtcp_conn_id, {udp:={}}); + CTRL.reply(RTPEM_connect:{g_remote_host, g_remote_port}); + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { + T_transmit.stop; + g_rx_enabled := false; + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_TXONLY}) { + /* start transmit timer */ + T_transmit.start; + g_rx_enabled := false; + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_RXONLY}) { + + T_transmit.stop; + if (g_rx_enabled == false) { + /* flush queues */ + RTP.clear; + RTCP.clear; + g_rx_enabled := true; + } + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_BIDIR}) { + T_transmit.start; + if (g_rx_enabled == false) { + /* flush queues */ + RTP.clear; + RTCP.clear; + g_rx_enabled := true; + } + } + + /* simply ignore any RTTP/RTCP if receiver not enabled */ + [g_rx_enabled==false] RTP.receive(tr_rtp) { } + [g_rx_enabled==false] RTCP.receive(tr_rtp) { } + + /* process received RTCP/RTP if receiver enabled */ + [g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp { + log("RX RTP: ", rx_rtp); + } + [g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp { + log("RX RTCP: ", rx_rtp); + } + + /* transmit if timer has expired */ + [] T_transmit.timeout { + /* send one RTP frame, re-start timer */ + f_tx_rtp('01020304'O); + T_transmit.start; + } + + /* fail on any unexpected messages */ + [] RTP.receive { + setverdict(fail, "Received unexpected type from RTP"); + } + [] RTCP.receive { + setverdict(fail, "Received unexpected type from RTCP"); + } + } + } +} + + +} -- To view, visit https://gerrit.osmocom.org/5326 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:50:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 16:50:07 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Fix rmlink.sh In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix rmlink.sh ...................................................................... Fix rmlink.sh Exclude directories with symlinks which are under version control from link cleanup script. Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 --- M rmlinks.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/rmlinks.sh b/rmlinks.sh index 58ca6f3..2b356a5 100755 --- a/rmlinks.sh +++ b/rmlinks.sh @@ -1,2 +1,2 @@ #!/bin/sh -find . -type l -exec rm \{\} \; +find . -type l -not -path "./bin/*" -not -path "./M3UA_CNL113537/*" -not -path "./SCCP_CNL113341/*" -exec rm \{\} \; -- To view, visit https://gerrit.osmocom.org/5314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed Dec 13 16:57:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 16:57:44 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 1: > We do not have comprehensive automatic testing of these scripts anywhere We don't have any testing, that's why I've added basic tests in https://gerrit.osmocom.org/#/c/5277/ > why does this *need* py3 in the first place? "necessary for proper py3 tests" doesn't explain it to me. If we have code which requires python3 than it have to be tested with python3. But before we commit those we have to first make sure the tests are passed. That's what this patch does. > Have you *really* tested it and checked the output? This is completely pointless discussion. The tests have to be run automatically by jenkins for each commit. If you think that the test coverage is insufficient than we have to expand tests first. Either way, https://gerrit.osmocom.org/#/c/5277/ have to be reviewed and merged first. -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 17:02:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 17:02:04 +0000 Subject: python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Patch Set 1: README describes only basic installation which remains exactly the same. We do not have any dependencies described anywhere yet (because distutils does not have this concept) and anyway it would have stayed the same: both distutils and setuptools are part of the standard library. -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 17:08:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 13 Dec 2017 17:08:36 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Avoid gcc version check In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5313 to look at the new patch set (#2). Avoid gcc version check By default the build fails on Debian due to gcc version check in /usr/include/titan/cversion.h - instead of asking users to manually change this file let's add workaround to our makefile fixer which disables this check automatically. The corresponding Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 --- M regen-makefile.sh 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/5313/2 diff --git a/regen-makefile.sh b/regen-makefile.sh index 1814699..f757fa3 100755 --- a/regen-makefile.sh +++ b/regen-makefile.sh @@ -8,12 +8,16 @@ # # The regexes below patch the generated Makefile to work on Debian 9 and # unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0 +# ttcn3_makefilegen -l -f $* sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile + +# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue, +# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -- To view, visit https://gerrit.osmocom.org/5313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:14:13 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 18:14:13 +0000 Subject: [PATCH] osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist Message-ID: Review at https://gerrit.osmocom.org/5327 fix segfault upon release paging on BSSMAP Reset: init llist Initialize the llist head gsm_bts->paging.pending_requests at the time gsm_bts is allocated, not only at paging_init_if_needed(). The gsm_bts->paging sub-struct is invalid as long as gsm_bts->paging.bts doesn't point back to bts. Hence the recently added iteration of gsm_bts->paging.pending_requests should have checked whether bts is NULL. The llist_head pending_requests is not initialized unless paging_init_if_needed() has been called (and paging.bts is hence set). However, this fix is a safer way to prevent errors like this in general. The segfault was introduced by d382bf63e2b7e28fe41c5310c26fe584f0356897 / If3f53d3bb66ad2dc02db823cb813590c6b59c700 Related: OS#2747 Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840 --- M src/libbsc/paging.c M src/libcommon/gsm_data_shared.c 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/5327/1 diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 8d54d0a..d657bd3 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -240,7 +240,11 @@ return; bts->paging.bts = bts; - INIT_LLIST_HEAD(&bts->paging.pending_requests); + + /* This should be initialized only once. There is currently no code that sets bts->paging.bts + * back to NULL, so let's just assert this one instead of graceful handling. */ + OSMO_ASSERT(llist_empty(&bts->paging.pending_requests)); + osmo_timer_setup(&bts->paging.work_timer, paging_worker, &bts->paging); diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 2f7e7e3..30ef1ca 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -364,7 +364,10 @@ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; + bts->paging.free_chans_need = -1; + INIT_LLIST_HEAD(&bts->paging.pending_requests); + bts->features.data = &bts->_features_data[0]; bts->features.data_len = sizeof(bts->_features_data); -- To view, visit https://gerrit.osmocom.org/5327 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:52:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:52:24 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another) Message-ID: Review at https://gerrit.osmocom.org/5328 bsc: Run three virtual BTSs (2 in one lac, 1 in another) This allows us to verify if the BSC pages *only* where it is supposed to page based on the cell identity list in the 08.08 PAGING. Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457 --- M bsc/BSC_Tests.ttcn M bsc/osmo-bsc.cfg M library/BSSMAP_Templates.ttcn 3 files changed, 248 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/5328/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 926e8cc..2e48e0b 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -22,7 +22,7 @@ import from RSL_Tests all; -const integer NUM_BTS := 1; +const integer NUM_BTS := 3; const float T3101_MAX := 12.0; @@ -88,7 +88,7 @@ map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); - clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, clnt.ccm_pars)); + clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); /* wait for IPA RSL link to connect and send ID ACK */ T.start; @@ -606,10 +606,21 @@ }; private const Cell_Identity cid := { '001'H, '001'H, 1, 0 }; +type set of integer BtsIdList; + +private function f_bts_in_list(integer bts_id, BtsIdList bts_ids) return boolean { + for (var integer j := 0; j < sizeof(bts_ids); j := j + 1) { + if (bts_id == bts_ids[j]) { + return true; + } + } + return false; +} /* core paging test helper function; used by most paging test cases */ private function f_pageing_helper(hexstring imsi, template BSSMAP_FIELD_CellIdentificationList cid_list, + BtsIdList bts_ids := { 0 }, template RSL_ChanNeeded rsl_chneed := omit, template OCT4 tmsi := omit) runs on test_CT { @@ -618,12 +629,15 @@ var template octetstring id_enc; /* FIXME */ var RSL_Message rx_rsl; var integer paging_group := hex2int(imsi[lengthof(imsi)-1]); + var integer i; f_init(); f_bssap_reset(); /* Clear the queue, it might still contain stuff like BCCH FILLING */ - IPA_RSL[0].clear; + for (i := 0; i < sizeof(bts_ids); i := i + 1) { + IPA_RSL[bts_ids[i]].clear; + } if (isvalue(rsl_chneed)) { /* The values of 08.08 3.2.2.36 and 08.58 9.3.40 are luckily identical */ @@ -643,95 +657,116 @@ id_enc := enc_MobileIdentity(mi); */ id_enc := ?; - rx_rsl := f_exp_ipa_rx(0, tr_RSL_PAGING_CMD(id_enc)); - /* check channel type, paging group */ - if (rx_rsl.ies[1].body.paging_group != paging_group) { - setverdict(fail, "Paging for wrong paging group"); + for (i := 0; i < sizeof(bts_ids); i := i + 1) { + rx_rsl := f_exp_ipa_rx(bts_ids[i], tr_RSL_PAGING_CMD(id_enc)); + /* check channel type, paging group */ + if (rx_rsl.ies[1].body.paging_group != paging_group) { + setverdict(fail, "Paging for wrong paging group"); + } + if (ispresent(rsl_chneed) and + rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) { + setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed"); + } } - if (ispresent(rsl_chneed) and - rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) { - setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed"); + /* do a quick check on all not-included BTSs if they received paging */ + for (i := 0; i < NUM_BTS; i := i + 1) { + timer T := 0.1; + if (f_bts_in_list(i, bts_ids)) { + continue; + } + T.start; + alt { + [] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(id_enc))) { + setverdict(fail, "Paging on BTS ", i, " which is not part of ", bts_ids); + } + [] IPA_RSL[i].receive { repeat; } + [] T.timeout { } + } } setverdict(pass); } +const BtsIdList c_BtsId_all := { 0, 1, 2 }; +const BtsIdList c_BtsId_LAC1 := { 0, 1 }; +const BtsIdList c_BtsId_LAC2 := { 2 }; + /* PAGING by IMSI + TMSI */ testcase TC_paging_imsi_nochan() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); } /* PAGING by IMSI + TMSI */ testcase TC_paging_tmsi_nochan() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000001'H, cid_list, omit, 'A1B2C301'O); + f_pageing_helper('001010100000001'H, cid_list, c_BtsId_all, omit, 'A1B2C301'O); } /* Paging with different "channel needed' values */ testcase TC_paging_tmsi_any() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000002'H, cid_list, RSL_CHANNEED_ANY, 'A1B2C302'O); + f_pageing_helper('001010100000002'H, cid_list, c_BtsId_all, RSL_CHANNEED_ANY, 'A1B2C302'O); } testcase TC_paging_tmsi_sdcch() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000003'H, cid_list, RSL_CHANNEED_SDCCH, 'A1B2C303'O); + f_pageing_helper('001010100000003'H, cid_list, c_BtsId_all, RSL_CHANNEED_SDCCH, 'A1B2C303'O); } testcase TC_paging_tmsi_tch_f() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010000000004'H, cid_list, RSL_CHANNEED_TCH_F, 'A1B2C304'O); + f_pageing_helper('001010000000004'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_F, 'A1B2C304'O); } testcase TC_paging_tmsi_tch_hf() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010000000005'H, cid_list, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O); + f_pageing_helper('001010000000005'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O); } /* Paging by CGI */ testcase TC_paging_imsi_nochan_cgi() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_CGI := { ts_BSSMAP_CI_CGI(cid.mcc, cid.mnc, cid.lac, cid.ci) } }; - f_pageing_helper('001010000000006'H, cid_list); + f_pageing_helper('001010000000006'H, cid_list, { 0 }); } /* Paging by LAC+CI */ testcase TC_paging_imsi_nochan_lac_ci() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAC_CI := { ts_BSSMAP_CI_LAC_CI(cid.lac, cid.ci) } }; - f_pageing_helper('001010000000007'H, cid_list); + f_pageing_helper('001010000000007'H, cid_list, { 0 }); } /* Paging by CI */ testcase TC_paging_imsi_nochan_ci() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_CI := { ts_BSSMAP_CI_CI(cid.ci) } }; - f_pageing_helper('001010000000008'H, cid_list); + f_pageing_helper('001010000000008'H, cid_list, { 0 }); } /* Paging by LAI */ testcase TC_paging_imsi_nochan_lai() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAI := { ts_BSSMAP_CI_LAI(cid.mcc, cid.mnc, cid.lac) } }; - f_pageing_helper('001010000000009'H, cid_list); + f_pageing_helper('001010000000009'H, cid_list, c_BtsId_LAC1); } /* Paging by LAC */ testcase TC_paging_imsi_nochan_lac() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(cid.lac) } }; - f_pageing_helper('001010000000010'H, cid_list); + f_pageing_helper('001010000000010'H, cid_list, c_BtsId_LAC1); } /* Paging by "all in BSS" */ testcase TC_paging_imsi_nochan_all() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_allInBSS := ''O }; - f_pageing_helper('001010000000011'H, cid_list); + f_pageing_helper('001010000000011'H, cid_list, c_BtsId_all); } /* Paging by PLMN+LAC+RNC */ @@ -749,7 +784,7 @@ var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 4.0; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* tell BSC there is no paging space anymore */ f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(0)); @@ -773,7 +808,7 @@ var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 3.0; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* Perform a BSSMAP Reset and wait for ACK */ BSSAP.send(ts_BSSAP_UNITDATA_req(g_sccp_addr_peer, g_sccp_addr_own, ts_BSSMAP_Reset(0))); @@ -792,6 +827,14 @@ setverdict(fail, "Received PAGING after A-RESET"); self.stop; } + [] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after A-RESET"); + self.stop; + } + [] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after A-RESET"); + self.stop; + } [] T.timeout { setverdict(pass); } diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index 488ba09..ac1553e 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -176,6 +176,186 @@ timeslot 7 phys_chan_config PDCH hopping enabled 0 + bts 1 + type sysmobts + band DCS1800 + cell_identity 1 + location_area_code 2 + dtx uplink force + dtx downlink + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + ip.access unit_id 1235 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode manual-si5 + neighbor-list add arfcn 100 + neighbor-list add arfcn 200 + si5 neighbor-list add arfcn 10 + si5 neighbor-list add arfcn 20 + codec-support fr + gprs mode gprs + gprs 11bit_rach_support_for_egprs 0 + gprs routing area 0 + gprs network-control-order nc0 + gprs cell bvci 1235 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1235 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1235 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip 192.168.100.239 + gprs nsvc 1 nsvci 0 + gprs nsvc 1 local udp port 0 + gprs nsvc 1 remote udp port 0 + gprs nsvc 1 remote ip 0.0.0.0 + no force-combined-si + trx 0 + rf_locked 0 + arfcn 871 + nominal power 23 + max_power_red 20 + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 6 + phys_chan_config PDCH + hopping enabled 0 + timeslot 7 + phys_chan_config PDCH + hopping enabled 0 + bts 2 + type sysmobts + band DCS1800 + cell_identity 1 + location_area_code 1 + dtx uplink force + dtx downlink + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + ip.access unit_id 1236 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode manual-si5 + neighbor-list add arfcn 100 + neighbor-list add arfcn 200 + si5 neighbor-list add arfcn 10 + si5 neighbor-list add arfcn 20 + codec-support fr + gprs mode gprs + gprs 11bit_rach_support_for_egprs 0 + gprs routing area 0 + gprs network-control-order nc0 + gprs cell bvci 1236 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1236 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1236 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip 192.168.100.239 + gprs nsvc 1 nsvci 0 + gprs nsvc 1 local udp port 0 + gprs nsvc 1 remote udp port 0 + gprs nsvc 1 remote ip 0.0.0.0 + no force-combined-si + trx 0 + rf_locked 0 + arfcn 871 + nominal power 23 + max_power_red 20 + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 6 + phys_chan_config PDCH + hopping enabled 0 + timeslot 7 + phys_chan_config PDCH + hopping enabled 0 msc 0 ip.access rtp-base 4000 timeout-ping 20 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 22fefdd..54e3f79 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -449,7 +449,7 @@ } private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 { - return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[3] & mnc[2]); + return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[2] & mnc[1]); } template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := { -- To view, visit https://gerrit.osmocom.org/5328 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:08 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 18:53:08 +0000 Subject: [PATCH] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test Message-ID: Review at https://gerrit.osmocom.org/5329 gprs: ping.py: Disable ipv6 ctx activate test Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 --- M suites/gprs/ping.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/5329/1 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 1b6d85c..5d2d847 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -52,11 +52,12 @@ # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) +# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in Prod main unit (OS#2746) # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) -sleep(5) +# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +# sleep(5) # TODO: send ping to server or open TCP conn with a socket in python -ms.deactivate_context(ctx_id_v6) +# ms.deactivate_context(ctx_id_v6) # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) -- To view, visit https://gerrit.osmocom.org/5329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:20 +0000 Subject: osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:22 +0000 Subject: osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:27 +0000 Subject: osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5326 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:48 +0000 Subject: osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5328 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:49 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc: Run three virtual BTSs (2 in one lac, 1 in another) ...................................................................... bsc: Run three virtual BTSs (2 in one lac, 1 in another) This allows us to verify if the BSC pages *only* where it is supposed to page based on the cell identity list in the 08.08 PAGING. Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457 --- M bsc/BSC_Tests.ttcn M bsc/osmo-bsc.cfg M library/BSSMAP_Templates.ttcn 3 files changed, 248 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 926e8cc..2e48e0b 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -22,7 +22,7 @@ import from RSL_Tests all; -const integer NUM_BTS := 1; +const integer NUM_BTS := 3; const float T3101_MAX := 12.0; @@ -88,7 +88,7 @@ map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); - clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, clnt.ccm_pars)); + clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); /* wait for IPA RSL link to connect and send ID ACK */ T.start; @@ -606,10 +606,21 @@ }; private const Cell_Identity cid := { '001'H, '001'H, 1, 0 }; +type set of integer BtsIdList; + +private function f_bts_in_list(integer bts_id, BtsIdList bts_ids) return boolean { + for (var integer j := 0; j < sizeof(bts_ids); j := j + 1) { + if (bts_id == bts_ids[j]) { + return true; + } + } + return false; +} /* core paging test helper function; used by most paging test cases */ private function f_pageing_helper(hexstring imsi, template BSSMAP_FIELD_CellIdentificationList cid_list, + BtsIdList bts_ids := { 0 }, template RSL_ChanNeeded rsl_chneed := omit, template OCT4 tmsi := omit) runs on test_CT { @@ -618,12 +629,15 @@ var template octetstring id_enc; /* FIXME */ var RSL_Message rx_rsl; var integer paging_group := hex2int(imsi[lengthof(imsi)-1]); + var integer i; f_init(); f_bssap_reset(); /* Clear the queue, it might still contain stuff like BCCH FILLING */ - IPA_RSL[0].clear; + for (i := 0; i < sizeof(bts_ids); i := i + 1) { + IPA_RSL[bts_ids[i]].clear; + } if (isvalue(rsl_chneed)) { /* The values of 08.08 3.2.2.36 and 08.58 9.3.40 are luckily identical */ @@ -643,95 +657,116 @@ id_enc := enc_MobileIdentity(mi); */ id_enc := ?; - rx_rsl := f_exp_ipa_rx(0, tr_RSL_PAGING_CMD(id_enc)); - /* check channel type, paging group */ - if (rx_rsl.ies[1].body.paging_group != paging_group) { - setverdict(fail, "Paging for wrong paging group"); + for (i := 0; i < sizeof(bts_ids); i := i + 1) { + rx_rsl := f_exp_ipa_rx(bts_ids[i], tr_RSL_PAGING_CMD(id_enc)); + /* check channel type, paging group */ + if (rx_rsl.ies[1].body.paging_group != paging_group) { + setverdict(fail, "Paging for wrong paging group"); + } + if (ispresent(rsl_chneed) and + rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) { + setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed"); + } } - if (ispresent(rsl_chneed) and - rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) { - setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed"); + /* do a quick check on all not-included BTSs if they received paging */ + for (i := 0; i < NUM_BTS; i := i + 1) { + timer T := 0.1; + if (f_bts_in_list(i, bts_ids)) { + continue; + } + T.start; + alt { + [] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(id_enc))) { + setverdict(fail, "Paging on BTS ", i, " which is not part of ", bts_ids); + } + [] IPA_RSL[i].receive { repeat; } + [] T.timeout { } + } } setverdict(pass); } +const BtsIdList c_BtsId_all := { 0, 1, 2 }; +const BtsIdList c_BtsId_LAC1 := { 0, 1 }; +const BtsIdList c_BtsId_LAC2 := { 2 }; + /* PAGING by IMSI + TMSI */ testcase TC_paging_imsi_nochan() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); } /* PAGING by IMSI + TMSI */ testcase TC_paging_tmsi_nochan() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000001'H, cid_list, omit, 'A1B2C301'O); + f_pageing_helper('001010100000001'H, cid_list, c_BtsId_all, omit, 'A1B2C301'O); } /* Paging with different "channel needed' values */ testcase TC_paging_tmsi_any() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000002'H, cid_list, RSL_CHANNEED_ANY, 'A1B2C302'O); + f_pageing_helper('001010100000002'H, cid_list, c_BtsId_all, RSL_CHANNEED_ANY, 'A1B2C302'O); } testcase TC_paging_tmsi_sdcch() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010100000003'H, cid_list, RSL_CHANNEED_SDCCH, 'A1B2C303'O); + f_pageing_helper('001010100000003'H, cid_list, c_BtsId_all, RSL_CHANNEED_SDCCH, 'A1B2C303'O); } testcase TC_paging_tmsi_tch_f() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010000000004'H, cid_list, RSL_CHANNEED_TCH_F, 'A1B2C304'O); + f_pageing_helper('001010000000004'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_F, 'A1B2C304'O); } testcase TC_paging_tmsi_tch_hf() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010000000005'H, cid_list, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O); + f_pageing_helper('001010000000005'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O); } /* Paging by CGI */ testcase TC_paging_imsi_nochan_cgi() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_CGI := { ts_BSSMAP_CI_CGI(cid.mcc, cid.mnc, cid.lac, cid.ci) } }; - f_pageing_helper('001010000000006'H, cid_list); + f_pageing_helper('001010000000006'H, cid_list, { 0 }); } /* Paging by LAC+CI */ testcase TC_paging_imsi_nochan_lac_ci() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAC_CI := { ts_BSSMAP_CI_LAC_CI(cid.lac, cid.ci) } }; - f_pageing_helper('001010000000007'H, cid_list); + f_pageing_helper('001010000000007'H, cid_list, { 0 }); } /* Paging by CI */ testcase TC_paging_imsi_nochan_ci() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_CI := { ts_BSSMAP_CI_CI(cid.ci) } }; - f_pageing_helper('001010000000008'H, cid_list); + f_pageing_helper('001010000000008'H, cid_list, { 0 }); } /* Paging by LAI */ testcase TC_paging_imsi_nochan_lai() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAI := { ts_BSSMAP_CI_LAI(cid.mcc, cid.mnc, cid.lac) } }; - f_pageing_helper('001010000000009'H, cid_list); + f_pageing_helper('001010000000009'H, cid_list, c_BtsId_LAC1); } /* Paging by LAC */ testcase TC_paging_imsi_nochan_lac() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(cid.lac) } }; - f_pageing_helper('001010000000010'H, cid_list); + f_pageing_helper('001010000000010'H, cid_list, c_BtsId_LAC1); } /* Paging by "all in BSS" */ testcase TC_paging_imsi_nochan_all() runs on test_CT { var template BSSMAP_FIELD_CellIdentificationList cid_list; cid_list := { cIl_allInBSS := ''O }; - f_pageing_helper('001010000000011'H, cid_list); + f_pageing_helper('001010000000011'H, cid_list, c_BtsId_all); } /* Paging by PLMN+LAC+RNC */ @@ -749,7 +784,7 @@ var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 4.0; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* tell BSC there is no paging space anymore */ f_ipa_tx(0, ts_RSL_PAGING_LOAD_IND(0)); @@ -773,7 +808,7 @@ var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 3.0; cid_list := valueof(ts_BSSMAP_CIL_noCell); - f_pageing_helper('001010123456789'H, cid_list); + f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all); /* Perform a BSSMAP Reset and wait for ACK */ BSSAP.send(ts_BSSAP_UNITDATA_req(g_sccp_addr_peer, g_sccp_addr_own, ts_BSSMAP_Reset(0))); @@ -792,6 +827,14 @@ setverdict(fail, "Received PAGING after A-RESET"); self.stop; } + [] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after A-RESET"); + self.stop; + } + [] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) { + setverdict(fail, "Received PAGING after A-RESET"); + self.stop; + } [] T.timeout { setverdict(pass); } diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index 488ba09..ac1553e 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -176,6 +176,186 @@ timeslot 7 phys_chan_config PDCH hopping enabled 0 + bts 1 + type sysmobts + band DCS1800 + cell_identity 1 + location_area_code 2 + dtx uplink force + dtx downlink + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + ip.access unit_id 1235 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode manual-si5 + neighbor-list add arfcn 100 + neighbor-list add arfcn 200 + si5 neighbor-list add arfcn 10 + si5 neighbor-list add arfcn 20 + codec-support fr + gprs mode gprs + gprs 11bit_rach_support_for_egprs 0 + gprs routing area 0 + gprs network-control-order nc0 + gprs cell bvci 1235 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1235 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1235 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip 192.168.100.239 + gprs nsvc 1 nsvci 0 + gprs nsvc 1 local udp port 0 + gprs nsvc 1 remote udp port 0 + gprs nsvc 1 remote ip 0.0.0.0 + no force-combined-si + trx 0 + rf_locked 0 + arfcn 871 + nominal power 23 + max_power_red 20 + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 6 + phys_chan_config PDCH + hopping enabled 0 + timeslot 7 + phys_chan_config PDCH + hopping enabled 0 + bts 2 + type sysmobts + band DCS1800 + cell_identity 1 + location_area_code 1 + dtx uplink force + dtx downlink + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + ip.access unit_id 1236 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode manual-si5 + neighbor-list add arfcn 100 + neighbor-list add arfcn 200 + si5 neighbor-list add arfcn 10 + si5 neighbor-list add arfcn 20 + codec-support fr + gprs mode gprs + gprs 11bit_rach_support_for_egprs 0 + gprs routing area 0 + gprs network-control-order nc0 + gprs cell bvci 1236 + gprs cell timer blocking-timer 3 + gprs cell timer blocking-retries 3 + gprs cell timer unblocking-retries 3 + gprs cell timer reset-timer 3 + gprs cell timer reset-retries 3 + gprs cell timer suspend-timer 10 + gprs cell timer suspend-retries 3 + gprs cell timer resume-timer 10 + gprs cell timer resume-retries 3 + gprs cell timer capability-update-timer 10 + gprs cell timer capability-update-retries 3 + gprs nsei 1236 + gprs ns timer tns-block 3 + gprs ns timer tns-block-retries 3 + gprs ns timer tns-reset 3 + gprs ns timer tns-reset-retries 3 + gprs ns timer tns-test 30 + gprs ns timer tns-alive 3 + gprs ns timer tns-alive-retries 10 + gprs nsvc 0 nsvci 1236 + gprs nsvc 0 local udp port 23000 + gprs nsvc 0 remote udp port 23000 + gprs nsvc 0 remote ip 192.168.100.239 + gprs nsvc 1 nsvci 0 + gprs nsvc 1 local udp port 0 + gprs nsvc 1 remote udp port 0 + gprs nsvc 1 remote ip 0.0.0.0 + no force-combined-si + trx 0 + rf_locked 0 + arfcn 871 + nominal power 23 + max_power_red 20 + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 6 + phys_chan_config PDCH + hopping enabled 0 + timeslot 7 + phys_chan_config PDCH + hopping enabled 0 msc 0 ip.access rtp-base 4000 timeout-ping 20 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 22fefdd..54e3f79 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -449,7 +449,7 @@ } private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 { - return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[3] & mnc[2]); + return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[2] & mnc[1]); } template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := { -- To view, visit https://gerrit.osmocom.org/5328 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:50 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort ...................................................................... Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f --- A library/RTP_Emulation.ttcn 1 file changed, 209 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn new file mode 100644 index 0000000..b8b1dbe --- /dev/null +++ b/library/RTP_Emulation.ttcn @@ -0,0 +1,209 @@ +module RTP_Emulation { + +/* Functionalities that we want this module to imeplement: + * * act as a RTP source that generates a RTP Stream + * * act asaa RTP sink that consumes a RTP Stream + * + * for all of the above, we want to be able to + * * specify the payload type + * * specify the interval / sample rate + * * create drop-outs in the stream + * * detect reordered or lost frames + * * validate if the size of the frames matches epectations + * * play back real audio (at least some tones?) + * * enable/disable generation/verification of RTCP + */ + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; +import from RTP_Types all; +import from RTP_CodecPort all; +import from RTP_CodecPort_CtrlFunct all; + +type component RTP_Emulation_CT { + /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */ + port RTP_CODEC_PT RTP; + var integer g_rtp_conn_id := -1; + port RTP_CODEC_PT RTCP; + var integer g_rtcp_conn_id := -1; + + /* user-facing port for controlling the binding */ + port RTPEM_CTRL_PT CTRL; + + /* configurable by user, should be fixed */ + var INT7b g_tx_payload_type := 0; + var integer g_tx_samplerate_hz := 8000; + var integer g_tx_duration_ms := 20; + var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H); + + var HostName g_remote_host; + var PortNumber g_remote_port; + var HostName g_local_host; + var PortNumber g_local_port; + + /* state variables, change over time */ + var boolean g_rx_enabled := false; + var LIN2_BO_LAST g_tx_next_seq := 0; + var uint32_t g_tx_next_ts := 0; + + var INT7b g_rx_payload_type := 0; + var LIN2_BO_LAST g_rx_last_seq; + var uint32_t g_rx_last_ts; +} + +type enumerated RtpemMode { + RTPEM_MODE_NONE, + RTPEM_MODE_TXONLY, + RTPEM_MODE_RXONLY, + RTPEM_MODE_BIDIR +}; + +signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); +signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port); +signature RTPEM_mode(in RtpemMode mode); + +type port RTPEM_CTRL_PT procedure { + inout RTPEM_bind, RTPEM_connect, RTPEM_mode; +} with { extension "internal" }; + +template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts, + octetstring payload, BIT1 marker := '0'B) := { + version := 2, + padding_ind := '0'B, + extension_ind := '0'B, + CSRC_count := 0, + marker_bit := marker, + payload_type := pt, + sequence_number := seq, + time_stamp := int2bit(ts, 4), + SSRC_id := ssrc, + CSRCs := omit, + ext_header := omit, + data := payload +} + +private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { + var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, g_tx_next_seq, + g_tx_next_ts, payload, marker)); + RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); + /* increment sequence + timestamp for next transmit */ + g_tx_next_seq := g_tx_next_seq + 1; + g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod g_tx_duration_ms)); +} + +function f_main() runs on RTP_Emulation_CT +{ + var Result res; + + timer T_transmit := 1000.0/int2float(g_tx_duration_ms); + var RTP_RecvFrom rx_rtp; + var template RTP_RecvFrom tr := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := ? + }; + var template RTP_RecvFrom tr_rtp := tr; + var template RTP_RecvFrom tr_rtcp := tr; + tr_rtp.connId := g_rtp_conn_id; + tr_rtp.msg := { rtp := ? }; + tr_rtp.connId := g_rtcp_conn_id; + tr_rtcp.msg := { rtcp := ? }; + + while (true) { + alt { + /* control procedures (calls) from the user */ + [] CTRL.getcall(RTPEM_bind:{?,?}) -> param(g_local_host, g_local_port) { + if (g_local_port rem 2 == 1) { + //CTRL.raise(RTPEM_bind, "Local Port is not an even port number!"); + log("Local Port is not an even port number!"); + continue; + } + res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, + g_local_port, {udp:={}}); + g_rtp_conn_id := res.connId; + res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, g_local_host, + g_local_port+1, {udp:={}}); + g_rtcp_conn_id := res.connId; + CTRL.reply(RTPEM_bind:{g_local_host, g_local_port}); + } + [] CTRL.getcall(RTPEM_connect:{?,?}) -> param (g_remote_host, g_remote_port) { + if (g_remote_port rem 2 == 1) { + //CTRL.raise(RTPEM_connect, "Remote Port is not an even number!"); + log("Remote Port is not an even number!"); + continue; + } + res := RTP_CodecPort_CtrlFunct.f_IPL4_connect(RTP, g_remote_host, + g_remote_port, + g_local_host, g_local_port, + g_rtp_conn_id, {udp:={}}); + res := RTP_CodecPort_CtrlFunct.f_IPL4_connect(RTCP, g_remote_host, + g_remote_port+1, + g_local_host, g_local_port+1, + g_rtcp_conn_id, {udp:={}}); + CTRL.reply(RTPEM_connect:{g_remote_host, g_remote_port}); + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { + T_transmit.stop; + g_rx_enabled := false; + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_TXONLY}) { + /* start transmit timer */ + T_transmit.start; + g_rx_enabled := false; + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_RXONLY}) { + + T_transmit.stop; + if (g_rx_enabled == false) { + /* flush queues */ + RTP.clear; + RTCP.clear; + g_rx_enabled := true; + } + } + [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_BIDIR}) { + T_transmit.start; + if (g_rx_enabled == false) { + /* flush queues */ + RTP.clear; + RTCP.clear; + g_rx_enabled := true; + } + } + + /* simply ignore any RTTP/RTCP if receiver not enabled */ + [g_rx_enabled==false] RTP.receive(tr_rtp) { } + [g_rx_enabled==false] RTCP.receive(tr_rtp) { } + + /* process received RTCP/RTP if receiver enabled */ + [g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp { + log("RX RTP: ", rx_rtp); + } + [g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp { + log("RX RTCP: ", rx_rtp); + } + + /* transmit if timer has expired */ + [] T_transmit.timeout { + /* send one RTP frame, re-start timer */ + f_tx_rtp('01020304'O); + T_transmit.start; + } + + /* fail on any unexpected messages */ + [] RTP.receive { + setverdict(fail, "Received unexpected type from RTP"); + } + [] RTCP.receive { + setverdict(fail, "Received unexpected type from RTCP"); + } + } + } +} + + +} -- To view, visit https://gerrit.osmocom.org/5326 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:50 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files ...................................................................... Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6 --- A library/RTP_CodecPort_CtrlFunct.ttcn A library/RTP_CodecPort_CtrlFunctDef.cc 2 files changed, 100 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_CodecPort_CtrlFunct.ttcn b/library/RTP_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..9f6cad2 --- /dev/null +++ b/library/RTP_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,44 @@ +module RTP_CodecPort_CtrlFunct { + + import from RTP_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout RTP_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout RTP_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + +} + diff --git a/library/RTP_CodecPort_CtrlFunctDef.cc b/library/RTP_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..ce8e176 --- /dev/null +++ b/library/RTP_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,56 @@ +#include "IPL4asp_PortType.hh" +#include "RTP_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace RTP__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + +} + -- To view, visit https://gerrit.osmocom.org/5325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:53:50 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: move RTP_CodecPort.ttcn to library ...................................................................... move RTP_CodecPort.ttcn to library Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3 --- R library/RTP_CodecPort.ttcn M mgw/gen_links.sh 2 files changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn similarity index 100% rename from mgw/RTP_CodecPort.ttcn rename to library/RTP_CodecPort.ttcn diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index 0b8195e..acdeb40 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -37,5 +37,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc" +FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RTP_CodecPort.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:54:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:54:11 +0000 Subject: osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 reason belongs in changelog, IMHO. -- To view, visit https://gerrit.osmocom.org/5329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:54:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:54:23 +0000 Subject: osmo-ttcn3-hacks[master]: Avoid gcc version check In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:54:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 18:54:24 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Avoid gcc version check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Avoid gcc version check ...................................................................... Avoid gcc version check By default the build fails on Debian due to gcc version check in /usr/include/titan/cversion.h - instead of asking users to manually change this file let's add workaround to our makefile fixer which disables this check automatically. The corresponding Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 --- M regen-makefile.sh 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/regen-makefile.sh b/regen-makefile.sh index 1814699..f757fa3 100755 --- a/regen-makefile.sh +++ b/regen-makefile.sh @@ -8,12 +8,16 @@ # # The regexes below patch the generated Makefile to work on Debian 9 and # unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0 +# ttcn3_makefilegen -l -f $* sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile -sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile + +# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue, +# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details +sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile # for TITAN 6.3.0 sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile -- To view, visit https://gerrit.osmocom.org/5313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed Dec 13 18:57:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 18:57:25 +0000 Subject: [PATCH] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5329 to look at the new patch set (#2). gprs: ping.py: Disable ipv6 ctx activate test osmo-ggsn is failing to create tun ipv6 device in Prod main unit. Afterwards, as the iface is not created, it cannot find its link-local ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx is requested, it fails because apn doesn't support ipv6 (because the pool is not created). Related: OS#2746 Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 --- M suites/gprs/ping.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/5329/2 diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 1b6d85c..5d2d847 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -52,11 +52,12 @@ # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) +# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in Prod main unit (OS#2746) # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) -sleep(5) +# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +# sleep(5) # TODO: send ping to server or open TCP conn with a socket in python -ms.deactivate_context(ctx_id_v6) +# ms.deactivate_context(ctx_id_v6) # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) -- To view, visit https://gerrit.osmocom.org/5329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 19:03:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 19:03:22 +0000 Subject: osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 19:03:24 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Wed, 13 Dec 2017 19:03:24 +0000 Subject: [MERGED] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: gprs: ping.py: Disable ipv6 ctx activate test ...................................................................... gprs: ping.py: Disable ipv6 ctx activate test osmo-ggsn is failing to create tun ipv6 device in Prod main unit. Afterwards, as the iface is not created, it cannot find its link-local ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx is requested, it fails because apn doesn't support ipv6 (because the pool is not created). Related: OS#2746 Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 --- M suites/gprs/ping.py 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved; Verified diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 1b6d85c..5d2d847 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -52,11 +52,12 @@ # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) +# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in Prod main unit (OS#2746) # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) -sleep(5) +# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +# sleep(5) # TODO: send ping to server or open TCP conn with a socket in python -ms.deactivate_context(ctx_id_v6) +# ms.deactivate_context(ctx_id_v6) # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) -- To view, visit https://gerrit.osmocom.org/5329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:18:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:18:21 +0000 Subject: osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5327 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:18:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:18:23 +0000 Subject: [MERGED] osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix segfault upon release paging on BSSMAP Reset: init llist ...................................................................... fix segfault upon release paging on BSSMAP Reset: init llist Initialize the llist head gsm_bts->paging.pending_requests at the time gsm_bts is allocated, not only at paging_init_if_needed(). The gsm_bts->paging sub-struct is invalid as long as gsm_bts->paging.bts doesn't point back to bts. Hence the recently added iteration of gsm_bts->paging.pending_requests should have checked whether bts is NULL. The llist_head pending_requests is not initialized unless paging_init_if_needed() has been called (and paging.bts is hence set). However, this fix is a safer way to prevent errors like this in general. The segfault was introduced by d382bf63e2b7e28fe41c5310c26fe584f0356897 / If3f53d3bb66ad2dc02db823cb813590c6b59c700 Related: OS#2747 Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840 --- M src/libbsc/paging.c M src/libcommon/gsm_data_shared.c 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 8d54d0a..d657bd3 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -240,7 +240,11 @@ return; bts->paging.bts = bts; - INIT_LLIST_HEAD(&bts->paging.pending_requests); + + /* This should be initialized only once. There is currently no code that sets bts->paging.bts + * back to NULL, so let's just assert this one instead of graceful handling. */ + OSMO_ASSERT(llist_empty(&bts->paging.pending_requests)); + osmo_timer_setup(&bts->paging.work_timer, paging_worker, &bts->paging); diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 2f7e7e3..30ef1ca 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -364,7 +364,10 @@ bts->rach_b_thresh = -1; bts->rach_ldavg_slots = -1; + bts->paging.free_chans_need = -1; + INIT_LLIST_HEAD(&bts->paging.pending_requests); + bts->features.data = &bts->_features_data[0]; bts->features.data_len = sizeof(bts->_features_data); -- To view, visit https://gerrit.osmocom.org/5327 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:18:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:18:50 +0000 Subject: osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:18:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:18:52 +0000 Subject: [MERGED] osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile/vty_interface.c: fix 'channel-capability' description ...................................................................... mobile/vty_interface.c: fix 'channel-capability' description Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842 --- M src/host/layer23/src/mobile/vty_interface.c 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 8767985..37093ce 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2392,9 +2392,12 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability " - "(sdcch|sdcch+tchf|sdcch+tchf+tchh)", - "Select channel capability\nSDCCH only\nSDCCH + TCH/F\nSDCCH + TCH/H") +DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, + "channel-capability (sdcch|sdcch+tchf|sdcch+tchf+tchh)", + "Select channel capability\n" + "SDCCH only\n" + "SDCCH + TCH/F\n" + "SDCCH + TCH/F + TCH/H") { struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; -- To view, visit https://gerrit.osmocom.org/5323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:19:39 +0000 Subject: osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port) In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:19:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:19:50 +0000 Subject: osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:19:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:19:52 +0000 Subject: [MERGED] osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: paging: paging_flush_bts: be sure pending_requests is initalized ...................................................................... paging: paging_flush_bts: be sure pending_requests is initalized The BSSMAP reset causes the paging requests to be flushed. When this happens right after startup then calling paging_flush_bts() may be called when the list bts->paging.pending_requests is not yet initalized, which causes a segfault. Call paging_init_if_needed() to be sure that the list is inizalized (like the other functions also do) Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc --- M src/libbsc/paging.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index d657bd3..42ecdcf 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -477,6 +477,8 @@ { struct gsm_paging_request *req, *req2; + paging_init_if_needed(bts); + llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { if (msc && req->msc != msc) continue; -- To view, visit https://gerrit.osmocom.org/5321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:20:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:20:02 +0000 Subject: osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:21:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:21:09 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 1: waiting for answers to Neels' question before moving this ahead -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:21:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:21:49 +0000 Subject: osmo-ttcn3-hacks[master]: Ignore build byproducts In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:21:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:21:51 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Ignore build byproducts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Ignore build byproducts ...................................................................... Ignore build byproducts Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450 --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index ccb08fa..d525ada 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ bin/*.hh *.o *.log +*.so +compile -- To view, visit https://gerrit.osmocom.org/5317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:26:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:26:56 +0000 Subject: osmo-bsc[master]: abisip-find: add getopts and option to prevent endless loop In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5239/2/src/ipaccess/abisip-find.c File src/ipaccess/abisip-find.c: Line 210: strncpy(program_name, basename(argv[0]), sizeof(program_name)); you don't need to copy the string here, as the argc array is pushed on the stack before main() is called. This means it is valid until you return from main, and hence a "char *program_name = basename(argv[0]) is sufficient. basename *modifies* argv[0] and doesn't create any copies itself. Also, *if* you want to do a string-copy, please *always* use osmo_strlcpy() everywhere to make sure we properly NUL-terminate the buffer in all situations, thanks. Also, *if* you want to use a static-sized buffer, it's best to use PATH_MAX rather than the magic number 255, as PATH_MAX is as long as the maximum name of a file system path. -- To view, visit https://gerrit.osmocom.org/5239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:27:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:27:50 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 3: > @dexter, just let me know if I can help you with that. if you have time and want to split it to a library function and propose an API+patch, feel free to go ahead. dexter has many other things on his hand, so I'm not sure when he can get back to it. -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 13 20:30:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 20:30:55 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: osmo_bsc_mgcp: improve comments ...................................................................... cosmetic: osmo_bsc_mgcp: improve comments Make the comments for struct mgcp_ctx more expressive Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2 --- M include/osmocom/bsc/osmo_bsc_mgcp.h 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index df18524..e4b038c 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -22,12 +22,17 @@ #include -/* MGCP state handler context (fsm etc..) */ +/* MGCP state handler context. This context information stores all information + * to handle the direction of the RTP streams via MGCP. There is one instance + * of this context struct per subscriber connection. + * (see also struct osmo_bsc_sccp_con) */ struct mgcp_ctx { /* FSM instance, which handles the connection switching procedure */ struct osmo_fsm_inst *fsm; - /* RTP endpoint number */ + /* RTP endpoint number. This number number identifies the endpoint + * on the MGW on which the BTS and NET connection is created. This + * endpoint number is assigned and released automatically. */ uint16_t rtp_endpoint; /* RTP connection identifiers */ -- To view, visit https://gerrit.osmocom.org/5319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 13 21:34:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 21:34:05 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Make as_Tguard() more robust (don't abort after R... Message-ID: Review at https://gerrit.osmocom.org/5330 BSC_Tests: Make as_Tguard() more robust (don't abort after RESET) Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775 --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/5330/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 2e48e0b..aa8150a 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -163,6 +163,7 @@ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, ts_BSSMAP_ResetAck)); + repeat; } } -- To view, visit https://gerrit.osmocom.org/5330 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 21:34:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 21:34:05 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK Message-ID: Review at https://gerrit.osmocom.org/5331 BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK ... and replace it with a function Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679 --- M bsc/BSC_Tests.ttcn 1 file changed, 15 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/5331/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index aa8150a..14ba97d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -255,10 +255,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); /* expect BSC to disable the channel again if there's no RLL EST IND */ rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); @@ -274,10 +271,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); var octetstring l3 := '00010203040506'O f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -299,10 +293,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); var octetstring l3 := '00010203040506'O f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -321,18 +312,25 @@ RslChannelNr rsl_chan_nr } +/* Send CHAN RQD and wait for allocation; acknowledge it */ +private function f_chreq_act_ack(OCT1 ra := '23'O, GsmFrameNumber fn := 23) +runs on test_CT return RslChannelNr { + var RSL_Message rx_rsl; + f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); + var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; + f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10)); + return chan_nr; +} + /* helper function to establish a dedicated channel via BTS and MSC */ function f_est_dchan(OCT1 ra, GsmFrameNumber fn, octetstring l3) runs on test_CT return DchanTuple { var BSSAP_N_CONNECT_ind rx_c_ind; - var RSL_Message rx_rsl; var DchanTuple dt; /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - dt.rsl_chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(dt.rsl_chan_nr, fn+1)); + dt.rsl_chan_nr := f_chreq_act_ack(ra, fn); f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -409,7 +407,6 @@ /* Test behavior of channel release after hard Clear Command from MSC */ testcase TC_chan_rel_hard_clear() runs on test_CT { var BSSAP_N_DATA_ind rx_di; - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); @@ -456,7 +453,6 @@ /* Test behavior of channel release after hard RLSD from MSC */ testcase TC_chan_rel_hard_rlsd() runs on test_CT { - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); @@ -496,7 +492,6 @@ /* Test behavior of channel release after BSSMAP RESET from MSC */ testcase TC_chan_rel_a_reset() runs on test_CT { - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); -- To view, visit https://gerrit.osmocom.org/5331 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 21:34:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 13 Dec 2017 21:34:05 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add more tests about invalid channel activations Message-ID: Review at https://gerrit.osmocom.org/5332 BSC_Tests: Add more tests about invalid channel activations Change-Id: I8a44b5eab6c6e09330305547d145820983f90140 --- M bsc/BSC_Tests.ttcn 1 file changed, 107 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/5332/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 14ba97d..c8016d7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -538,6 +538,108 @@ setverdict(pass); } +/* Test behavior if RSL EST IND for non-active channel */ +testcase TC_rll_est_ind_inact_lchan() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var octetstring l3 := '00010203040506'O; + var RslChannelNr chan_nr := valueof(t_RslChanNr_Bm(6)); + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for non-active lchan"); + } + [] BSSAP.receive {} + [] IPA_RSL[0].receive {} + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SAPI */ +testcase TC_rll_est_ind_inval_sapi1() runs on test_CT { + var RslChannelNr chan_nr; + + f_init(); + f_bssap_reset(); + + chan_nr := f_chreq_act_ack() + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(1)), l3)); + + timer T := 2.0; + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid SAPI 1"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SAPI */ +testcase TC_rll_est_ind_inval_sapi3() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var RslChannelNr chan_nr := f_chreq_act_ack(); + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(3)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid SAPI 3"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SACCH */ +testcase TC_rll_est_ind_inval_sacch() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var RslChannelNr chan_nr := f_chreq_act_ack(); + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_SACCH(0)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid Link SACCH"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + + + testcase TC_ctrl_msc_connection_status() runs on test_CT { var charstring ctrl_resp; @@ -851,6 +953,11 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_rll_est_ind_inact_lchan() ); + execute( TC_rll_est_ind_inval_sapi1() ); + execute( TC_rll_est_ind_inval_sapi3() ); + execute( TC_rll_est_ind_inval_sacch() ); + execute( TC_paging_imsi_nochan() ); execute( TC_paging_tmsi_nochan() ); execute( TC_paging_tmsi_any() ); -- To view, visit https://gerrit.osmocom.org/5332 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a44b5eab6c6e09330305547d145820983f90140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed Dec 13 23:58:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 13 Dec 2017 23:58:57 +0000 Subject: [PATCH] osmo-msc[master]: fix vty write: add missing 'authentication optional/required... Message-ID: Review at https://gerrit.osmocom.org/5333 fix vty write: add missing 'authentication optional/required' output Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2 --- M src/libmsc/msc_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/33/5333/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index d070b4d..14ad19e 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -151,6 +151,8 @@ vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); + vty_out(vty, " authentication %s%s", + gsmnet->authentication_required ? "required" : "optional", VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5333 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:32 +0000 Subject: [PATCH] osmo-pcu[master]: DL window: constify resend_needed() function Message-ID: Review at https://gerrit.osmocom.org/5334 DL window: constify resend_needed() function It doesn't change any state so mark it as const. Change-Id: I5d672bfd654198aebb187772de464c52b3209435 --- M src/rlc.cpp M src/rlc.h 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5334/1 diff --git a/src/rlc.cpp b/src/rlc.cpp index acd4169..c52417d 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -58,7 +58,7 @@ m_v_b.reset(); } -int gprs_rlc_dl_window::resend_needed() +int gprs_rlc_dl_window::resend_needed() const { for (uint16_t bsn = v_a(); bsn != v_s(); bsn = mod_sns(bsn + 1)) { if (m_v_b.is_nacked(bsn) || m_v_b.is_resend(bsn)) diff --git a/src/rlc.h b/src/rlc.h index ee86c2a..14d2082 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -303,7 +303,7 @@ const uint16_t distance() const; /* Methods to manage reception */ - int resend_needed(); + int resend_needed() const; int mark_for_resend(); void update(BTS *bts, char *show_rbb, uint16_t ssn, uint16_t *lost, uint16_t *received); -- To view, visit https://gerrit.osmocom.org/5334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d672bfd654198aebb187772de464c52b3209435 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:34 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: move EGPRS enablement into (U|D)L-TBF Message-ID: Review at https://gerrit.osmocom.org/5335 TBF: move EGPRS enablement into (U|D)L-TBF This is preparation patch for transition to separate UL/DL window variables instead of current shared generic window. The setting of window parameters is performed in functions specific to UL/DL TBFs but the general EGPRS flag remains the same and is set via the same function which is now marked as protected since it's only meant to be used by UL/DL subclasses. Related: OS#1759 Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 --- M src/tbf.cpp M src/tbf.h 2 files changed, 15 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/35/5335/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..98005dc 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -862,7 +862,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); @@ -956,7 +955,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); diff --git a/src/tbf.h b/src/tbf.h index 80249df..558bd21 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -210,7 +210,6 @@ /* EGPRS */ bool is_egprs_enabled() const; - void enable_egprs(); void disable_egprs(); /* attempt to make things a bit more fair */ @@ -286,7 +285,7 @@ protected: gprs_rlcmac_bts *bts_data() const; - + void enable_egprs(); int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); @@ -416,7 +415,7 @@ gprs_rlcmac_dl_tbf(BTS *bts); void cleanup(); - + void enable_egprs(); /* dispatch Unitdata.DL messages */ static int handle(struct gprs_rlcmac_bts *bts, const uint32_t tlli, const uint32_t old_tlli, @@ -513,7 +512,7 @@ struct msgb *create_ul_ack(uint32_t fn, uint8_t ts); bool ctrl_ack_to_toggle(); bool handle_ctrl_ack(); - + void enable_egprs(); /* blocks were acked */ int rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, @@ -577,6 +576,18 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline void gprs_rlcmac_ul_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + +inline void gprs_rlcmac_dl_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + inline gprs_rlcmac_ul_tbf *as_ul_tbf(gprs_rlcmac_tbf *tbf) { if (tbf && tbf->direction == GPRS_RLCMAC_UL_TBF) -- To view, visit https://gerrit.osmocom.org/5335 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:34 +0000 Subject: [PATCH] osmo-pcu[master]: window: move encoding into functions Message-ID: Review at https://gerrit.osmocom.org/5336 window: move encoding into functions * move window size encoding and writing into separate functions * introduce necessary TBF wrappers to avoid direct m_window access This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 --- M src/encoding.cpp M src/encoding.h M src/tbf.h 3 files changed, 33 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/5336/1 diff --git a/src/encoding.cpp b/src/encoding.cpp index 6742efd..3e86222 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -60,6 +60,21 @@ } } +/* 3GPP TS 44.060 Table 12.5.2.1 */ +static inline uint16_t enc_ws(uint16_t ws) +{ + return (ws - 64) / 32; +} + +static inline void write_ws(bitvec *dest, unsigned int *write_index, uint16_t ws) +{ + dest->cur_bit = *write_index; + + bitvec_set_u64(dest, enc_ws(ws), 5, false); + + *write_index += 5; +} + /* 3GPP TS 44.060 ? 12.12: { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > @@ -114,9 +129,8 @@ // bitvec_write_field(dest, &wp,,0xb,4); if (tbf->is_egprs_enabled()) { /* see GMS 44.018, 10.5.2.16 */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp, 1, 1); // "H" - bitvec_write_field(dest, &wp, ws_enc, 5); // EGPRS Window Size + write_ws(dest, &wp, tbf->ws()); // EGPRS Window Size bitvec_write_field(dest, &wp, 0x0, 2); // LINK_QUALITY_MEASUREMENT_MODE bitvec_write_field(dest, &wp, 0, 1); // BEP_PERIOD2 not present } @@ -178,7 +192,6 @@ uint8_t alpha, uint8_t gamma, int8_t ta_idx, enum ph_burst_type burst_type, uint16_t ra) { - unsigned int ws_enc = 0; uint8_t extended_ra = 0; extended_ra = (ra & 0x1F); @@ -208,9 +221,6 @@ bitvec_write_field(dest, &wp, 0, 1); } else { - - ws_enc = (tbf->m_window.ws() - 64) / 32; - bitvec_write_field(dest, &wp, 1, 1); /* single block alloc */ bitvec_write_field(dest, &wp, tbf->tfi(), 5);/* TFI assignment */ bitvec_write_field(dest, &wp, 0, 1); /* polling bit */ @@ -224,7 +234,7 @@ bitvec_write_field(dest, &wp, tbf->tlli(), 1); bitvec_write_field(dest, &wp, 0, 1); /* BEP period present */ bitvec_write_field(dest, &wp, 0, 1); /* resegmentation */ - bitvec_write_field(dest, &wp, ws_enc, 5);/* egprs window_size */ + write_ws(dest, &wp, tbf->ws());/* egprs window_size */ if (alpha) { bitvec_write_field(dest, &wp, 0x1, 1); /* ALPHA =yes */ @@ -450,7 +460,6 @@ bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts); } else { /* EPGRS */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp,0x1,1); // Message escape bitvec_write_field(dest, &wp,0x0,2); // EGPRS message contents bitvec_write_field(dest, &wp,0x0,1); // No CONTENTION_RESOLUTION_TLLI @@ -458,7 +467,7 @@ bitvec_write_field(dest, &wp,tbf->current_cs().to_num()-1, 4); // EGPRS Modulation and Coding IE /* 0: no RESEGMENT, 1: Segmentation*/ bitvec_write_field(dest, &wp, 0x1, 1); - bitvec_write_field(dest, &wp,ws_enc,5); // EGPRS Window Size + write_ws(dest, &wp, tbf->ws()); // EGPRS Window Size bitvec_write_field(dest, &wp,0x0,1); // No Access Technologies Request bitvec_write_field(dest, &wp,0x0,1); // No ARAC RETRANSMISSION REQUEST bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING @@ -509,7 +518,7 @@ /* generate downlink assignment */ void Encoding::write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs) { @@ -518,7 +527,6 @@ PDA_AdditionsR99_t *pda_r99; uint8_t tn; - unsigned int ws_enc; block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header block->RRBP = rrbp; // 0: N+13 @@ -591,12 +599,10 @@ return; } - ws_enc = (tbf->window()->ws() - 64) / 32; - block->u.Packet_Downlink_Assignment.Exist_AdditionsR99 = 0x1; // AdditionsR99 = on pda_r99 = &block->u.Packet_Downlink_Assignment.AdditionsR99; pda_r99->Exist_EGPRS_Params = 1; - pda_r99->EGPRS_WindowSize = ws_enc; /* see TS 44.060, table 12.5.2.1 */ + pda_r99->EGPRS_WindowSize = enc_ws(tbf->ws()); /* see TS 44.060, table 12.5.2.1 */ pda_r99->LINK_QUALITY_MEASUREMENT_MODE = 0x0; /* no meas, see TS 44.060, table 11.2.7.2 */ pda_r99->Exist_BEP_PERIOD2 = 0; /* No extra EGPRS BEP PERIOD */ pda_r99->Exist_Packet_Extended_Timing_Advance = 0; diff --git a/src/encoding.h b/src/encoding.h index 6164b89..54cb057 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -68,7 +68,7 @@ static void write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs); diff --git a/src/tbf.h b/src/tbf.h index 558bd21..3b48238 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -441,7 +441,7 @@ bool keep_open(unsigned fn) const; int release(); int abort(); - + uint16_t ws() const; void egprs_calc_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); @@ -539,7 +539,7 @@ uint8_t *data, const uint8_t block_idx); void egprs_calc_ulwindow_size(); - + uint16_t ws() const; void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -576,6 +576,16 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline uint16_t gprs_rlcmac_ul_tbf::ws() const +{ + return m_window.ws(); +} + +inline uint16_t gprs_rlcmac_dl_tbf::ws() const +{ + return m_window.ws(); +} + inline void gprs_rlcmac_ul_tbf::enable_egprs() { m_window.set_sns(RLC_EGPRS_SNS); -- To view, visit https://gerrit.osmocom.org/5336 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:34 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-UL: simplify test helpers Message-ID: Review at https://gerrit.osmocom.org/5337 TBF-UL: simplify test helpers The functions to set v_r and v_q values are used only in TBF test, only at the same time and only to set both values to 0. Replace them with single function which does the same. Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2 --- M src/rlc.h M tests/tbf/TbfTest.cpp 2 files changed, 6 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/37/5337/1 diff --git a/src/rlc.h b/src/rlc.h index 14d2082..4471092 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -341,8 +341,7 @@ const uint16_t v_r() const; const uint16_t v_q() const; - const void set_v_r(int); - const void set_v_q(int); + void reset_v_x(); const uint16_t ssn() const; @@ -574,14 +573,10 @@ return is_in_window(bsn) && m_v_n.is_received(bsn) && offset_v_r < ws(); } -inline const void gprs_rlc_ul_window::set_v_r(int v_r) +inline void gprs_rlc_ul_window::reset_v_x() { - m_v_r = v_r; -} - -inline const void gprs_rlc_ul_window::set_v_q(int v_q) -{ - m_v_q = v_q; + m_v_r = 0; + m_v_q = 0; } inline const uint16_t gprs_rlc_ul_window::v_r() const diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..451568d 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1722,8 +1722,7 @@ "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.set_v_r(0); - ul_tbf->m_window.set_v_q(0); + ul_tbf->m_window.reset_v_x(); /* Function to generate URBB with length */ ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class, ul_tbf); @@ -1735,8 +1734,7 @@ send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.set_v_r(0); - ul_tbf->m_window.set_v_q(0); + ul_tbf->m_window.reset_v_x(); /* Function to generate CRBB */ bts->ws_base = 128; bts->ws_pdch = 64; -- To view, visit https://gerrit.osmocom.org/5337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:35 +0000 Subject: [PATCH] osmo-pcu[master]: Avoid code duplication in TBF test Message-ID: Review at https://gerrit.osmocom.org/5338 Avoid code duplication in TBF test Move repetitive checks into corresponding macros to avoid copy-pasted code. This also enables strickter checks some of which were apparently omitted while copy-pasting. This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: If7aa72f5aa66c5e9c255542c066b5494c098aab2 --- M tests/tbf/TbfTest.cpp 1 file changed, 73 insertions(+), 120 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/5338/1 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 451568d..9a5ce30 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -295,6 +295,13 @@ printf("=== end %s ===\n", __func__); } +/* Receive an ACK */ +#define RCV_ACK(fin, tbf, rbb) do { \ + tbf->rcvd_dl_ack(fin, tbf->m_window.v_s(), rbb); \ + if (!fin) \ + OSMO_ASSERT(tbf->m_window.window_empty()); \ + } while(0) + static void test_tbf_delayed_release() { BTS the_bts; @@ -340,16 +347,13 @@ /* ACK all blocks */ memset(rbb, 0xff, sizeof(rbb)); - /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(0, dl_tbf->m_window.v_s(), rbb); - OSMO_ASSERT(dl_tbf->m_window.window_empty()); + + RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */ /* Force sending of a single block containing an LLC dummy command */ request_dl_rlc_block(dl_tbf, &fn); - /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(0, dl_tbf->m_window.v_s(), rbb); - OSMO_ASSERT(dl_tbf->m_window.window_empty()); + RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */ /* Timeout (make sure fn % 52 remains valid) */ fn += 52 * ((msecs_to_frames(bts->dl_tbf_idle_msec + 100) + 51)/ 52); @@ -357,8 +361,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FINISHED)); - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2692,8 +2695,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2742,8 +2744,7 @@ { uint8_t rbb[64/8]; - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2752,6 +2753,30 @@ tbf_free(dl_tbf); } + +#define NACK(tbf, x) do { \ + tbf->m_window.m_v_b.mark_nacked(x); \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(x)); \ + } while(0) + +#define CHECK_UNACKED(tbf, cs, bsn) do { \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_unacked(bsn)); \ + OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ + } while(0) + +#define CHECK_NACKED(tbf, cs, bsn) do { \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(bsn)); \ + OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ + } while(0) + +#define MAKE_ACKED(m, tbf, fn, cs, check_unacked) do { \ + m = tbf->create_dl_acked_block(fn, tbf->control_ts); \ + OSMO_ASSERT(m); \ + if (check_unacked) \ + CHECK_UNACKED(tbf, cs, 0); \ + else \ + CHECK_NACKED(tbf, cs, 0); \ + } while(0) static void egprs_spb_to_normal_validation(BTS *the_bts, unsigned int mcs, unsigned int demanded_mcs) @@ -2777,15 +2802,13 @@ fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + + NACK(dl_tbf, 0); + OSMO_ASSERT(bsn1 == 0); dl_tbf->ms()->set_current_cs_dl @@ -2795,10 +2818,7 @@ fn = fn_add_blocks(fn, 1); /* Send first segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, false); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_FIRST_SEG_SENT); @@ -2809,10 +2829,7 @@ OSMO_ASSERT(egprs3->cps == 3); /* Send second segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_SECOND_SEG_SENT); @@ -2830,8 +2847,8 @@ (static_cast < GprsCodingScheme::Scheme > (GprsCodingScheme::CS4 + mcs)); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); + msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; @@ -2871,13 +2888,9 @@ fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); dl_tbf->ms()->set_current_cs_dl (static_cast < GprsCodingScheme::Scheme > @@ -2886,10 +2899,7 @@ fn = fn_add_blocks(fn, 1); /* Send first segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, false); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_FIRST_SEG_SENT); @@ -2913,10 +2923,7 @@ } /* Send second segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_SECOND_SEG_SENT); @@ -2965,19 +2972,11 @@ ((mcs == 7) && (demanded_mcs < 7))) { fn = fn_add_blocks(fn, 1); /* Send 2 RLC data block */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); /* Set the demanded MCS to demanded_mcs */ dl_tbf->ms()->set_current_cs_dl @@ -2986,43 +2985,26 @@ fn = fn_add_blocks(fn, 1); /* Retransmit the first RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_NACKED(dl_tbf, mcs, 1); fn = fn_add_blocks(fn, 1); /* Retransmit the second RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_UNACKED(dl_tbf, demanded_mcs, 1); } else if (((mcs == 5) && (demanded_mcs > 6)) || ((mcs == 6) && (demanded_mcs > 8))) { fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); fn = fn_add_blocks(fn, 1); /* Send second RLC data block BSN 1 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); dl_tbf->ms()->set_current_cs_dl (static_cast < GprsCodingScheme::Scheme > @@ -3030,63 +3012,34 @@ fn = fn_add_blocks(fn, 1); /* Send first, second RLC data blocks with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_UNACKED(dl_tbf, demanded_mcs, 1); } else if (mcs > 6) { /* No Mcs change cases are handled here for mcs > MCS6*/ fn = fn_add_blocks(fn, 1); /* Send first,second RLC data blocks */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); fn = fn_add_blocks(fn, 1); /* Send first,second RLC data blocks with demanded_mcs*/ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); } else { /* No MCS change cases are handled here for mcs <= MCS6*/ fn = fn_add_blocks(fn, 1); /* Send first RLC data block */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); fn = fn_add_blocks(fn, 1); /* Send first RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); } tbf_cleanup(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5338 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7aa72f5aa66c5e9c255542c066b5494c098aab2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:35 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-DL: mark rcvd_dl_ack() parameters as boolean Message-ID: Review at https://gerrit.osmocom.org/5339 TBF-DL: mark rcvd_dl_ack() parameters as boolean The final(_ack) parameter of rcvd_dl_ack() only used as boolean - mark it as such. Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac --- M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 3 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/5339/1 diff --git a/src/tbf.h b/src/tbf.h index 3b48238..f324cba 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -427,8 +427,8 @@ const uint16_t pdu_delay_csec, const uint8_t *data, const uint16_t len); - int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb); - int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb); + int rcvd_dl_ack(bool final, uint8_t ssn, uint8_t *rbb); + int rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb); struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts); void trigger_ass(struct gprs_rlcmac_tbf *old_tbf); void clear_poll_timeout_flag(); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..ad2f17f 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1168,7 +1168,7 @@ return 0; } -int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, +int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb) { int rc; @@ -1188,7 +1188,7 @@ return rc; } -int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, uint8_t ssn, uint8_t *rbb) +int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, uint8_t ssn, uint8_t *rbb) { LOGP(DRLCMACDL, LOGL_DEBUG, "%s downlink acknowledge\n", tbf_name(this)); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 9a5ce30..6ae0207 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -267,7 +267,7 @@ /* Queue a final ACK */ memset(rbb, 0, sizeof(rbb)); /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, 1, rbb); + dl_tbf->rcvd_dl_ack(true, 1, rbb); /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -348,12 +348,12 @@ /* ACK all blocks */ memset(rbb, 0xff, sizeof(rbb)); - RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */ + RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */ /* Force sending of a single block containing an LLC dummy command */ request_dl_rlc_block(dl_tbf, &fn); - RCV_ACK(0, dl_tbf, rbb); /* Receive an ACK */ + RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */ /* Timeout (make sure fn % 52 remains valid) */ fn += 52 * ((msecs_to_frames(bts->dl_tbf_idle_msec + 100) + 51)/ 52); @@ -361,7 +361,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FINISHED)); - RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2695,7 +2695,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); - RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2744,7 +2744,7 @@ { uint8_t rbb[64/8]; - RCV_ACK(1, dl_tbf, rbb); /* Receive a final ACK */ + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); -- To view, visit https://gerrit.osmocom.org/5339 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:35 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: move window parameters to UL/DL level Message-ID: Review at https://gerrit.osmocom.org/5340 TBF: move window parameters to UL/DL level The UL and DL TBF use different classes implementing window management. Hence it's better to use it explicitly instead of using the common window management superclass inside common TBF superclass. While at it, also remove the direct access to window class - use accessor functions instead. Related: OS#1759 Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6 --- M src/bts.cpp M src/encoding.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 7 files changed, 50 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/40/5340/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..feb6bcd 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1197,7 +1197,7 @@ num_blocks = Decoding::decode_gprs_acknack_bits( &ack_nack->Ack_Nack_Description, &bits, - &bsn_begin, &bsn_end, &tbf->m_window); + &bsn_begin, &bsn_end, tbf->window()); LOGP(DRLCMAC, LOGL_DEBUG, "Got GPRS DL ACK bitmap: SSN: %d, BSN %d to %d - 1 (%d blocks), " @@ -1271,8 +1271,8 @@ (void *)&ack_nack->EGPRS_AckNack.Desc, (int)offsetof(EGPRS_AckNack_t, Desc), (int)offsetof(EGPRS_AckNack_w_len_t, Desc), - tbf->m_window.v_a(), - tbf->m_window.v_s(), + tbf->window()->v_a(), + tbf->window()->v_s(), osmo_hexdump((const uint8_t *)&ack_nack->EGPRS_AckNack.Desc.URBB, sizeof(ack_nack->EGPRS_AckNack.Desc.URBB))); @@ -1282,7 +1282,7 @@ num_blocks = Decoding::decode_egprs_acknack_bits( &ack_nack->EGPRS_AckNack.Desc, &bits, - &bsn_begin, &bsn_end, &tbf->m_window); + &bsn_begin, &bsn_end, tbf->window()); LOGP(DRLCMAC, LOGL_DEBUG, "Got EGPRS DL ACK bitmap: SSN: %d, BSN %d to %d - 1 (%d blocks), " diff --git a/src/encoding.cpp b/src/encoding.cpp index 3e86222..4d9946d 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -695,7 +695,7 @@ { bitvec_write_field(dest, &wp, tbf->current_cs().to_num() - 1, 2); // CHANNEL_CODING_COMMAND - write_packet_ack_nack_desc_gprs(bts, dest, wp, &tbf->m_window, is_final); + write_packet_ack_nack_desc_gprs(bts, dest, wp, tbf->window(), is_final); bitvec_write_field(dest, &wp, 1, 1); // 1: have CONTENTION_RESOLUTION_TLLI bitvec_write_field(dest, &wp, tbf->tlli(), 32); // CONTENTION_RESOLUTION_TLLI @@ -892,7 +892,7 @@ /* -2 for last bit 0 mandatory and REL5 not supported */ unsigned bits_ack_nack = dest->data_len * 8 - wp - 2; - write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final, bits_ack_nack); + write_packet_ack_nack_desc_egprs(bts, dest, wp, tbf->window(), is_final, bits_ack_nack); bitvec_write_field(dest, &wp, 0, 1); // fixed 0 bitvec_write_field(dest, &wp, 0, 1); // 0: don't have REL 5 diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index f1dd25c..6362281 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -64,13 +64,13 @@ } if (tbf->trx != NULL) vty_out(vty, " TRX_ID=%d", tbf->trx->trx_no); - vty_out(vty, " CS=%s WS=%d", - tbf->current_cs().name(), tbf->window()->ws()); + vty_out(vty, " CS=%s", + tbf->current_cs().name()); if (ul_tbf) { - gprs_rlc_ul_window *win = &ul_tbf->m_window; - vty_out(vty, " V(Q)=%d V(R)=%d", - win->v_q(), win->v_r()); + gprs_rlc_ul_window *win = ul_tbf->window(); + vty_out(vty, " WS=%d V(Q)=%d V(R)=%d", + ul_tbf->ws(), win->v_q(), win->v_r()); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " TBF Statistics:%s", VTY_NEWLINE); if(GprsCodingScheme::GPRS == tbf->ms()->mode()) { @@ -80,9 +80,9 @@ } } if (dl_tbf) { - gprs_rlc_dl_window *win = &dl_tbf->m_window; - vty_out(vty, " V(A)=%d V(S)=%d nBSN=%d%s", - win->v_a(), win->v_s(), win->resend_needed(), + gprs_rlc_dl_window *win = dl_tbf->window(); + vty_out(vty, " WS=%d V(A)=%d V(S)=%d nBSN=%d%s", + dl_tbf->ws(), win->v_a(), win->v_s(), win->resend_needed(), win->window_stalled() ? " STALLED" : ""); vty_out(vty, "%s", VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", tbf->m_ctrs); diff --git a/src/tbf.cpp b/src/tbf.cpp index 98005dc..87101d0 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1449,6 +1449,11 @@ return ts == control_ts; } +gprs_rlc_ul_window *gprs_rlcmac_ul_tbf::window() +{ + return &m_window; +} + struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts) { diff --git a/src/tbf.h b/src/tbf.h index f324cba..26d6598 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -166,8 +166,6 @@ GprsMs *ms() const; void set_ms(GprsMs *ms); - gprs_rlc_window *window(); - uint8_t tsc() const; int rlcmac_diag(); @@ -413,7 +411,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_dl_tbf(BTS *bts); - + gprs_rlc_dl_window *window(); void cleanup(); void enable_egprs(); /* dispatch Unitdata.DL messages */ @@ -453,7 +451,6 @@ * All states that need reset must be in this struct, so this is why * variables are in both (dl and ul) structs and not outside union. */ - gprs_rlc_dl_window m_window; int32_t m_tx_counter; /* count all transmitted blocks */ uint8_t m_wait_confirm; /* wait for CCCH IMM.ASS cnf */ bool m_dl_ack_requested; @@ -504,11 +501,18 @@ enum egprs_rlcmac_dl_spb get_egprs_dl_spb(int bsn); struct osmo_timer_list m_llc_timer; + + /* Please note that all variables below will be reset when changing + * from WAIT RELEASE back to FLOW state (re-use of TBF). + * All states that need reset must be in this struct, so this is why + * variables are in both (dl and ul) structs and not outside union. + */ + gprs_rlc_dl_window m_window; }; struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_ul_tbf(BTS *bts); - + gprs_rlc_ul_window *window(); struct msgb *create_ul_ack(uint32_t fn, uint8_t ts); bool ctrl_ack_to_toggle(); bool handle_ctrl_ack(); @@ -547,7 +551,6 @@ * All states that need reset must be in this struct, so this is why * variables are in both (dl and ul) structs and not outside union. */ - gprs_rlc_ul_window m_window; int32_t m_rx_counter; /* count all received blocks */ uint8_t m_n3103; /* N3103 counter */ uint8_t m_usf[8]; /* list USFs per PDCH (timeslot) */ @@ -559,6 +562,13 @@ protected: void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc); + + /* Please note that all variables below will be reset when changing + * from WAIT RELEASE back to FLOW state (re-use of TBF). + * All states that need reset must be in this struct, so this is why + * variables are in both (dl and ul) structs and not outside union. + */ + gprs_rlc_ul_window m_window; }; #ifdef __cplusplus @@ -612,16 +622,6 @@ return static_cast(tbf); else return NULL; -} - -inline gprs_rlc_window *gprs_rlcmac_tbf::window() -{ - switch (direction) - { - case GPRS_RLCMAC_UL_TBF: return &as_ul_tbf(this)->m_window; - case GPRS_RLCMAC_DL_TBF: return &as_dl_tbf(this)->m_window; - } - return NULL; } #endif diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index ad2f17f..c3d2c89 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -985,6 +985,11 @@ return lost * 100 / (lost + received); } +gprs_rlc_dl_window *gprs_rlcmac_dl_tbf::window() +{ + return &m_window; +} + int gprs_rlcmac_dl_tbf::update_window(unsigned first_bsn, const struct bitvec *rbb) { diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 6ae0207..60a1ac3 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -297,9 +297,9 @@ /* Receive an ACK */ #define RCV_ACK(fin, tbf, rbb) do { \ - tbf->rcvd_dl_ack(fin, tbf->m_window.v_s(), rbb); \ + tbf->rcvd_dl_ack(fin, tbf->window()->v_s(), rbb); \ if (!fin) \ - OSMO_ASSERT(tbf->m_window.window_empty()); \ + OSMO_ASSERT(tbf->window()->window_empty()); \ } while(0) static void test_tbf_delayed_release() @@ -1725,7 +1725,7 @@ "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.reset_v_x(); + ul_tbf->window()->reset_v_x(); /* Function to generate URBB with length */ ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class, ul_tbf); @@ -1737,7 +1737,7 @@ send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.reset_v_x(); + ul_tbf->window()->reset_v_x(); /* Function to generate CRBB */ bts->ws_base = 128; bts->ws_pdch = 64; @@ -2529,7 +2529,7 @@ dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); - prlcdlwindow = &dl_tbf->m_window; + prlcdlwindow = dl_tbf->window(); prlcmvb = &prlcdlwindow->m_v_b; prlcdlwindow->m_v_s = 1288; prlcdlwindow->m_v_a = 1176; @@ -2561,7 +2561,7 @@ Decoding::decode_egprs_acknack_bits( &ack_nack->EGPRS_AckNack.Desc, &bits, - &bsn_begin, &bsn_end, &dl_tbf->m_window); + &bsn_begin, &bsn_end, dl_tbf->window()); dl_tbf->rcvd_dl_ack( ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, @@ -2755,17 +2755,17 @@ } #define NACK(tbf, x) do { \ - tbf->m_window.m_v_b.mark_nacked(x); \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(x)); \ + tbf->window()->m_v_b.mark_nacked(x); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_nacked(x)); \ } while(0) #define CHECK_UNACKED(tbf, cs, bsn) do { \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_unacked(bsn)); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_unacked(bsn)); \ OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ } while(0) #define CHECK_NACKED(tbf, cs, bsn) do { \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(bsn)); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_nacked(bsn)); \ OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ } while(0) -- To view, visit https://gerrit.osmocom.org/5340 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 11:33:35 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-DL: move priority computation into function Message-ID: Review at https://gerrit.osmocom.org/5341 TBF-DL: move priority computation into function Improve readability by moving priority computation into separate function. Change-Id: Icdca0106a544036eaa94a25f0d4f84e4282f4568 --- M src/gprs_rlcmac_sched.cpp M src/tbf.h 2 files changed, 37 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/41/5341/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 2350808..8925032 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -207,27 +207,41 @@ return NULL; } +static inline enum tbf_dl_prio tbf_compute_priority(const struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_dl_tbf *tbf, + uint8_t ts, uint32_t fn, int age) +{ + const gprs_rlc_dl_window *w = tbf->window(); + int age_thresh1 = msecs_to_frames(200), + age_thresh2 = msecs_to_frames(OSMO_MIN(BTS::TIMER_T3190_MSEC/2, bts->dl_tbf_idle_msec)); + + if (tbf->is_control_ts(ts) && tbf->need_control_ts()) + return DL_PRIO_CONTROL; + + if (tbf->is_control_ts(ts) && age > age_thresh2 && age_thresh2 > 0) + return DL_PRIO_HIGH_AGE; + + if ((tbf->state_is(GPRS_RLCMAC_FLOW) && tbf->have_data()) || w->resend_needed() >= 0) + return DL_PRIO_NEW_DATA; + + if (tbf->is_control_ts(ts) && age > age_thresh1 && tbf->keep_open(fn)) + return DL_PRIO_LOW_AGE; + + if (!w->window_empty()) + return DL_PRIO_SENT_DATA; + + return DL_PRIO_NONE; +} + static struct msgb *sched_select_downlink(struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr, struct gprs_rlcmac_pdch *pdch) { struct msgb *msg = NULL; struct gprs_rlcmac_dl_tbf *tbf, *prio_tbf = NULL; - enum { - DL_PRIO_NONE, - DL_PRIO_SENT_DATA, /* the data has been sent and not (yet) nacked */ - DL_PRIO_LOW_AGE, /* the age has reached the first threshold */ - DL_PRIO_NEW_DATA, /* the data has not been sent yet or nacked */ - DL_PRIO_HIGH_AGE, /* the age has reached the second threshold */ - DL_PRIO_CONTROL, /* a control block needs to be sent */ - } prio, max_prio = DL_PRIO_NONE; + enum tbf_dl_prio prio, max_prio = DL_PRIO_NONE; uint8_t i, tfi, prio_tfi; int age; - const int age_thresh1 = msecs_to_frames(200); - const int high_prio_msecs = - OSMO_MIN(BTS::TIMER_T3190_MSEC/2, bts->dl_tbf_idle_msec); - const int age_thresh2 = msecs_to_frames(high_prio_msecs); /* select downlink resource */ for (i = 0, tfi = pdch->next_dl_tfi; i < 32; @@ -251,20 +265,8 @@ age = tbf->frames_since_last_poll(fn); /* compute priority */ - if (tbf->is_control_ts(ts) && tbf->need_control_ts()) - prio = DL_PRIO_CONTROL; - else if (tbf->is_control_ts(ts) && - age > age_thresh2 && age_thresh2 > 0) - prio = DL_PRIO_HIGH_AGE; - else if ((tbf->state_is(GPRS_RLCMAC_FLOW) && tbf->have_data()) || - tbf->m_window.resend_needed() >= 0) - prio = DL_PRIO_NEW_DATA; - else if (tbf->is_control_ts(ts) && - age > age_thresh1 && tbf->keep_open(fn)) - prio = DL_PRIO_LOW_AGE; - else if (!tbf->m_window.window_empty()) - prio = DL_PRIO_SENT_DATA; - else + prio = tbf_compute_priority(bts, tbf, ts, fn, age); + if (prio == DL_PRIO_NONE) continue; /* get the TBF with the highest priority */ diff --git a/src/tbf.h b/src/tbf.h index 26d6598..891e0fa 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -94,6 +94,15 @@ GPRS_RLCMAC_UL_TBF }; +enum tbf_dl_prio { + DL_PRIO_NONE, + DL_PRIO_SENT_DATA, /* the data has been sent and not (yet) nacked */ + DL_PRIO_LOW_AGE, /* the age has reached the first threshold */ + DL_PRIO_NEW_DATA, /* the data has not been sent yet or nacked */ + DL_PRIO_HIGH_AGE, /* the age has reached the second threshold */ + DL_PRIO_CONTROL, /* a control block needs to be sent */ +}; + enum tbf_counters { TBF_CTR_RLC_NACKED, }; -- To view, visit https://gerrit.osmocom.org/5341 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdca0106a544036eaa94a25f0d4f84e4282f4568 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:51:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 11:51:34 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3109 default from 19s to 5s In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5283 to look at the new patch set (#3). Reduce T3109 default from 19s to 5s T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/5283/3 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 776fcfe..104d6e8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -274,7 +274,7 @@ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ +#define GSM_T3109_DEFAULT 5 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ #define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:51:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 11:51:35 +0000 Subject: [PATCH] osmo-bsc[master]: libbsc: paging: more reasonable (and detailed) paging statis... Message-ID: Review at https://gerrit.osmocom.org/5342 libbsc: paging: more reasonable (and detailed) paging statistics Counting the number of T3113 expirations (one per subscriber per BTS) vs the number of paging attempts (Bsc global) is a ueseless figure, as you cannot relate each other. We count on the BSC level: * how many PAGING we received from the MSC (total) * how many of those were for cells/LACs we don't serve * how many of those resulted in PAGING RESPONSE We count on the BTS leve: * how many PAGING CMD we sent to the BTS (total) * how many of those we ignored as we were already paging * how many of those resulted in PAGING RESPONSE * how many were expired due to T3113 expiring Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/paging.c 3 files changed, 23 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/5342/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a6c8198..3fdc826 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -197,6 +197,10 @@ BTS_CTR_CODEC_EFR, BTS_CTR_CODEC_V1_FR, BTS_CTR_CODEC_V1_HR, + BTS_CTR_PAGING_ATTEMPTED, + BTS_CTR_PAGING_ALREADY, + BTS_CTR_PAGING_RESPONDED, + BTS_CTR_PAGING_EXPIRED, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -211,6 +215,11 @@ [BTS_CTR_CODEC_EFR] = {"codec:efr", "Count the usage of EFR codec by channel mode requested."}, [BTS_CTR_CODEC_V1_FR] = {"codec:fr", "Count the usage of FR codec by channel mode requested."}, [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, + + [BTS_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, + [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, + [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, + [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -229,8 +238,7 @@ BSC_CTR_HANDOVER_FAILED, BSC_CTR_PAGING_ATTEMPTED, BSC_CTR_PAGING_DETACHED, - BSC_CTR_PAGING_COMPLETED, - BSC_CTR_PAGING_EXPIRED, + BSC_CTR_PAGING_RESPONDED, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -239,10 +247,10 @@ [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Count the amount of timeouts of timer T3103."}, [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Received handover completed."}, [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Receive HO FAIL messages."}, - [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a MS."}, + + [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, [BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, - [BSC_CTR_PAGING_COMPLETED] = {"paging:completed", "Paging successful completed."}, - [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, + [BSC_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful response."}, }; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 42b7165..9500645 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -3794,10 +3794,9 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) { - vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s", + vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" responded%s", net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current, - net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current, - net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current, + net->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED].current, VTY_NEWLINE); } diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 42ecdcf..314dfdd 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -277,7 +277,7 @@ req, bsc_subscr_name(req->bsub)); /* must be destroyed before calling cbfn, to prevent double free */ - rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); + rate_ctr_inc(&req->bts->bts_ctrs->ctr[BTS_CTR_PAGING_EXPIRED]); /* destroy it now. Do not access req afterwards */ paging_remove_request(&req->bts->paging, req); @@ -295,9 +295,12 @@ struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ATTEMPTED]); + if (paging_pending_request(bts_entry, bsub)) { LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", bsc_subscr_name(bsub)); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ALREADY]); return -EEXIST; } @@ -423,8 +426,11 @@ log_set_context(LOG_CTX_BSC_SUBSCR, bsub); /* Stop this first and dispatch the request */ - if (_bts) + if (_bts) { _paging_request_stop(_bts, bsub, conn, msg); + rate_ctr_inc(&_bts->bts_ctrs->ctr[BTS_CTR_PAGING_RESPONDED]); + rate_ctr_inc(&_bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED]); + } /* Make sure to cancel this everywhere else */ llist_for_each_entry(bts, bts_list, list) { -- To view, visit https://gerrit.osmocom.org/5342 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:51:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 11:51:36 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3113 default from 60s to 10s Message-ID: Review at https://gerrit.osmocom.org/5343 Reduce T3113 default from 60s to 10s Our T3113 timer default of 60s was set early in the development of OpenBSC, where we didn't really know what values to use and used excessively large/safe values. Paging the same MS for 60 seconds (even if there's no paging response) will however create a lot of PCH load for no good reason. It seems there's no clear guidance as to what the value should be. Other implementations use something in the order of 10 seconds (OpenBTS, yateBTS), which seems more realistic. THe Siemens BS-11 has a default of 5 seconds. Let's be conservative and go to 10s as a default, which is already 6 times less potential PCH usage than our default so far... Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 --- M include/osmocom/bsc/gsm_data.h M src/libcommon/gsm_data_shared.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5343/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3fdc826..776fcfe 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -276,7 +276,7 @@ #define GSM_T3107_DEFAULT 5 /* s */ #define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 +#define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 #define GSM_T3117_DEFAULT 10 #define GSM_T3119_DEFAULT 10 diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 30ef1ca..c14047d 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -347,7 +347,7 @@ sizeof(bts->gprs.cell.rlc_cfg)); /* init statistics */ - bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); if (!bts->bts_ctrs) { talloc_free(bts); return NULL; -- To view, visit https://gerrit.osmocom.org/5343 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:52:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 11:52:17 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3109 default from 19s to 5s In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5283 to look at the new patch set (#4). Reduce T3109 default from 19s to 5s T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/5283/4 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 776fcfe..104d6e8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -274,7 +274,7 @@ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ +#define GSM_T3109_DEFAULT 5 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ #define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 11:52:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 11:52:17 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3113 default from 60s to 10s In-Reply-To: References: Message-ID: Reduce T3113 default from 60s to 10s Our T3113 timer default of 60s was set early in the development of OpenBSC, where we didn't really know what values to use and used excessively large/safe values. Paging the same MS for 60 seconds (even if there's no paging response) will however create a lot of PCH load for no good reason. It seems there's no clear guidance as to what the value should be. Other implementations use something in the order of 10 seconds (OpenBTS, yateBTS), which seems more realistic. THe Siemens BS-11 has a default of 5 seconds. Let's be conservative and go to 10s as a default, which is already 6 times less potential PCH usage than our default so far... Closes: OS#2756 Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 --- M include/osmocom/bsc/gsm_data.h M src/libcommon/gsm_data_shared.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5343/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3fdc826..776fcfe 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -276,7 +276,7 @@ #define GSM_T3107_DEFAULT 5 /* s */ #define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 +#define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 #define GSM_T3117_DEFAULT 10 #define GSM_T3119_DEFAULT 10 diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 30ef1ca..c14047d 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -347,7 +347,7 @@ sizeof(bts->gprs.cell.rlc_cfg)); /* init statistics */ - bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); if (!bts->bts_ctrs) { talloc_free(bts); return NULL; -- To view, visit https://gerrit.osmocom.org/5343 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:03:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:03:33 +0000 Subject: osmo-bsc[master]: libbsc: paging: more reasonable (and detailed) paging statis... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5342 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:06:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:06:38 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3109 default from 19s to 5s In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5283 to look at the new patch set (#5). Reduce T3109 default from 19s to 5s T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/5283/5 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 776fcfe..104d6e8 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -274,7 +274,7 @@ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ #define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ +#define GSM_T3109_DEFAULT 5 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ #define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5283 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:06:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:06:38 +0000 Subject: [PATCH] osmo-bsc[master]: Reduce T3113 default from 60s to 10s In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5343 to look at the new patch set (#3). Reduce T3113 default from 60s to 10s Our T3113 timer default of 60s was set early in the development of OpenBSC, where we didn't really know what values to use and used excessively large/safe values. Paging the same MS for 60 seconds (even if there's no paging response) will however create a lot of PCH load for no good reason. It seems there's no clear guidance as to what the value should be. Other implementations use something in the order of 10 seconds (OpenBTS, yateBTS), which seems more realistic. THe Siemens BS-11 has a default of 5 seconds. Let's be conservative and go to 10s as a default, which is already 6 times less potential PCH usage than our default so far... Closes: OS#2756 Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5343/3 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3fdc826..776fcfe 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -276,7 +276,7 @@ #define GSM_T3107_DEFAULT 5 /* s */ #define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 +#define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 #define GSM_T3117_DEFAULT 10 #define GSM_T3119_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5343 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:06:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:06:38 +0000 Subject: [PATCH] osmo-bsc[master]: Fix per-BTS counter group index Message-ID: Review at https://gerrit.osmocom.org/5344 Fix per-BTS counter group index I discovered that the per-BTS counter group could only be requested for BTS 0 but didn't work for any further BTSs. This is a bug introduced in Change-Id I5bd9e6e333b1c396beae46630986b17e7f8b82ef where we introudce the per-BTS counters,t but allocate all of them with index '0'. Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de --- M src/libcommon/gsm_data_shared.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/5344/1 diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 30ef1ca..c14047d 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -347,7 +347,7 @@ sizeof(bts->gprs.cell.rlc_cfg)); /* init statistics */ - bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); if (!bts->bts_ctrs) { talloc_free(bts); return NULL; -- To view, visit https://gerrit.osmocom.org/5344 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:06:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:06:55 +0000 Subject: osmo-bsc[master]: Fix per-BTS counter group index In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5344 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:07:00 +0000 Subject: osmo-bsc[master]: Reduce T3113 default from 60s to 10s In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5343 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:25:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:25:32 +0000 Subject: [MERGED] osmo-bsc[master]: Fix per-BTS counter group index In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix per-BTS counter group index ...................................................................... Fix per-BTS counter group index I discovered that the per-BTS counter group could only be requested for BTS 0 but didn't work for any further BTSs. This is a bug introduced in Change-Id I5bd9e6e333b1c396beae46630986b17e7f8b82ef where we introudce the per-BTS counters,t but allocate all of them with index '0'. Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de --- M src/libcommon/gsm_data_shared.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c index 30ef1ca..c14047d 100644 --- a/src/libcommon/gsm_data_shared.c +++ b/src/libcommon/gsm_data_shared.c @@ -347,7 +347,7 @@ sizeof(bts->gprs.cell.rlc_cfg)); /* init statistics */ - bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0); + bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr); if (!bts->bts_ctrs) { talloc_free(bts); return NULL; -- To view, visit https://gerrit.osmocom.org/5344 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:25:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:25:35 +0000 Subject: [MERGED] osmo-bsc[master]: libbsc: paging: more reasonable (and detailed) paging statis... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libbsc: paging: more reasonable (and detailed) paging statistics ...................................................................... libbsc: paging: more reasonable (and detailed) paging statistics Counting the number of T3113 expirations (one per subscriber per BTS) vs the number of paging attempts (Bsc global) is a ueseless figure, as you cannot relate each other. We count on the BSC level: * how many PAGING we received from the MSC (total) * how many of those were for cells/LACs we don't serve * how many of those resulted in PAGING RESPONSE We count on the BTS leve: * how many PAGING CMD we sent to the BTS (total) * how many of those we ignored as we were already paging * how many of those resulted in PAGING RESPONSE * how many were expired due to T3113 expiring Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/paging.c 3 files changed, 23 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a6c8198..3fdc826 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -197,6 +197,10 @@ BTS_CTR_CODEC_EFR, BTS_CTR_CODEC_V1_FR, BTS_CTR_CODEC_V1_HR, + BTS_CTR_PAGING_ATTEMPTED, + BTS_CTR_PAGING_ALREADY, + BTS_CTR_PAGING_RESPONDED, + BTS_CTR_PAGING_EXPIRED, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -211,6 +215,11 @@ [BTS_CTR_CODEC_EFR] = {"codec:efr", "Count the usage of EFR codec by channel mode requested."}, [BTS_CTR_CODEC_V1_FR] = {"codec:fr", "Count the usage of FR codec by channel mode requested."}, [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, + + [BTS_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, + [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, + [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, + [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -229,8 +238,7 @@ BSC_CTR_HANDOVER_FAILED, BSC_CTR_PAGING_ATTEMPTED, BSC_CTR_PAGING_DETACHED, - BSC_CTR_PAGING_COMPLETED, - BSC_CTR_PAGING_EXPIRED, + BSC_CTR_PAGING_RESPONDED, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -239,10 +247,10 @@ [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Count the amount of timeouts of timer T3103."}, [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Received handover completed."}, [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Receive HO FAIL messages."}, - [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a MS."}, + + [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, [BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found."}, - [BSC_CTR_PAGING_COMPLETED] = {"paging:completed", "Paging successful completed."}, - [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, + [BSC_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful response."}, }; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 42b7165..9500645 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -3794,10 +3794,9 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) { - vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s", + vty_out(vty, "Paging : %"PRIu64" attempted, %"PRIu64" responded%s", net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current, - net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current, - net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current, + net->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED].current, VTY_NEWLINE); } diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c index 42ecdcf..314dfdd 100644 --- a/src/libbsc/paging.c +++ b/src/libbsc/paging.c @@ -277,7 +277,7 @@ req, bsc_subscr_name(req->bsub)); /* must be destroyed before calling cbfn, to prevent double free */ - rate_ctr_inc(&req->bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED]); + rate_ctr_inc(&req->bts->bts_ctrs->ctr[BTS_CTR_PAGING_EXPIRED]); /* destroy it now. Do not access req afterwards */ paging_remove_request(&req->bts->paging, req); @@ -295,9 +295,12 @@ struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req; + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ATTEMPTED]); + if (paging_pending_request(bts_entry, bsub)) { LOGP(DPAG, LOGL_INFO, "Paging request already pending for %s\n", bsc_subscr_name(bsub)); + rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_PAGING_ALREADY]); return -EEXIST; } @@ -423,8 +426,11 @@ log_set_context(LOG_CTX_BSC_SUBSCR, bsub); /* Stop this first and dispatch the request */ - if (_bts) + if (_bts) { _paging_request_stop(_bts, bsub, conn, msg); + rate_ctr_inc(&_bts->bts_ctrs->ctr[BTS_CTR_PAGING_RESPONDED]); + rate_ctr_inc(&_bts->network->bsc_ctrs->ctr[BSC_CTR_PAGING_RESPONDED]); + } /* Make sure to cancel this everywhere else */ llist_for_each_entry(bts, bts_list, list) { -- To view, visit https://gerrit.osmocom.org/5342 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 12:25:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 12:25:36 +0000 Subject: [MERGED] osmo-bsc[master]: Reduce T3113 default from 60s to 10s In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Reduce T3113 default from 60s to 10s ...................................................................... Reduce T3113 default from 60s to 10s Our T3113 timer default of 60s was set early in the development of OpenBSC, where we didn't really know what values to use and used excessively large/safe values. Paging the same MS for 60 seconds (even if there's no paging response) will however create a lot of PCH load for no good reason. It seems there's no clear guidance as to what the value should be. Other implementations use something in the order of 10 seconds (OpenBTS, yateBTS), which seems more realistic. THe Siemens BS-11 has a default of 5 seconds. Let's be conservative and go to 10s as a default, which is already 6 times less potential PCH usage than our default so far... Closes: OS#2756 Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3fdc826..776fcfe 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -276,7 +276,7 @@ #define GSM_T3107_DEFAULT 5 /* s */ #define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ #define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 +#define GSM_T3113_DEFAULT 10 /* s */ #define GSM_T3115_DEFAULT 10 #define GSM_T3117_DEFAULT 10 #define GSM_T3119_DEFAULT 10 -- To view, visit https://gerrit.osmocom.org/5343 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:27:43 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 13:27:43 +0000 Subject: [PATCH] osmo-ggsn[master]: cosmetic: sgsnemu.c: Fix trailing whitespace Message-ID: Review at https://gerrit.osmocom.org/5345 cosmetic: sgsnemu.c: Fix trailing whitespace Change-Id: Ic392ed35946e076a39aa5f7bf80a8c2ffe73562c --- M sgsnemu/sgsnemu.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/45/5345/1 diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 300183b..275c583 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1,13 +1,13 @@ -/* +/* * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * Copyright (C) 2017 Harald Welte - * + * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright * notice and this permission notice is included in all copies or * substantial portions of the software. - * + * */ /* @@ -372,10 +372,10 @@ /* foreground */ /* If fg flag not given run as a daemon */ - /* Do not allow sgsnemu to run as deamon + /* Do not allow sgsnemu to run as deamon if (!args_info.fg_flag) { - closelog(); + closelog(); freopen("/dev/null", "w", stdout); freopen("/dev/null", "w", stderr); freopen("/dev/null", "r", stdin); @@ -1700,7 +1700,7 @@ pdp->hisaddr0 = options.remote; pdp->hisaddr1 = options.remote; - pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, + pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, 512 = Flat rate, 256 = Hot billing */ pdp->tx_gpdu_seq = options.tx_gpdu_seq; -- To view, visit https://gerrit.osmocom.org/5345 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic392ed35946e076a39aa5f7bf80a8c2ffe73562c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:27:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 13:27:44 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn.c: Improve logging info on link-local ipv6 addr not found Message-ID: Review at https://gerrit.osmocom.org/5346 ggsn.c: Improve logging info on link-local ipv6 addr not found Change-Id: I18fb952514712ff30d18c7626f84309055d3efa1 --- M ggsn/ggsn.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/46/5346/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index fa3e20c..ef2357b 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -194,6 +194,7 @@ struct in46_prefix ipv6_tun_linklocal_ip; struct in46_prefix *blacklist; int blacklist_size; + int rc; if (apn->started) return 0; @@ -247,9 +248,10 @@ } if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { - if (tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK) < 1) { - LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of " - "interface: %s\n", strerror(errno)); + rc = tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK); + if (rc < 1) { + LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", + rc ? strerror(errno) : "tun interface has no link-local IP assigned"); apn_stop(apn, false); return -1; } -- To view, visit https://gerrit.osmocom.org/5346 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I18fb952514712ff30d18c7626f84309055d3efa1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:27:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 13:27:44 +0000 Subject: [PATCH] osmo-ggsn[master]: tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr Message-ID: Review at https://gerrit.osmocom.org/5347 tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr First of all, dstaddr can be NULL, avoid copying it in that case. Second, we want to copy the addr data, not the pointer. I tested it and the IP was not added (not shown in ip addr) until I copied the content instead of the address. Change-Id: I8da637b155f0e913cab6c5b0dde355c9f33375b5 --- M lib/tun.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/47/5347/1 diff --git a/lib/tun.c b/lib/tun.c index d8e4b62..3081575 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -333,8 +333,9 @@ return -1; } - tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); - tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(*addr)); + if (dstaddr) + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(*dstaddr)); if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); -- To view, visit https://gerrit.osmocom.org/5347 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8da637b155f0e913cab6c5b0dde355c9f33375b5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:27:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 13:27:44 +0000 Subject: [PATCH] osmo-ggsn[master]: Set tun_addaddr ipv agnostic and add support for ipv6 Message-ID: Review at https://gerrit.osmocom.org/5348 Set tun_addaddr ipv agnostic and add support for ipv6 sgsnemu (the only user of this API so far) has been modified to use the new API with in46_addr. FreeBSD code for IPv6 has not been tested. Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767 --- M lib/tun.c M lib/tun.h M sgsnemu/sgsnemu.c 3 files changed, 193 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/48/5348/1 diff --git a/lib/tun.c b/lib/tun.c index 3081575..f6d3503 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -295,7 +295,7 @@ } } -int tun_addaddr(struct tun_t *this, +static int tun_addaddr4(struct tun_t *this, struct in_addr *addr, struct in_addr *dstaddr, struct in_addr *netmask) { @@ -465,6 +465,185 @@ } +static int tun_addaddr6(struct tun_t *this, + struct in6_addr *addr, + struct in6_addr *dstaddr, int prefixlen) +{ + +#if defined(__linux__) + struct { + struct nlmsghdr n; + struct ifaddrmsg i; + char buf[TUN_NLBUFSIZE]; + } req; + + struct sockaddr_nl local; + socklen_t addr_len; + int fd; + int status; + + struct sockaddr_nl nladdr; + struct iovec iov; + struct msghdr msg; + + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr6(this, addr, dstaddr, prefixlen); + + memset(&req, 0, sizeof(req)); + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; + req.n.nlmsg_type = RTM_NEWADDR; + req.i.ifa_family = AF_INET6; + req.i.ifa_prefixlen = 64; /* 64 FOR IPv6 */ + req.i.ifa_flags = 0; + req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ + req.i.ifa_index = if_nametoindex(this->devname); + if (!req.i.ifa_index) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); + return -1; + } + + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(*addr)); + if (dstaddr) + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(*dstaddr)); + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + memset(&local, 0, sizeof(local)); + local.nl_family = AF_NETLINK; + local.nl_groups = 0; + + if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); + close(fd); + return -1; + } + + addr_len = sizeof(local); + if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "getsockname() failed"); + close(fd); + return -1; + } + + if (addr_len != sizeof(local)) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address length %d", addr_len); + close(fd); + return -1; + } + + if (local.nl_family != AF_NETLINK) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address family %d", local.nl_family); + close(fd); + return -1; + } + + iov.iov_base = (void *)&req.n; + iov.iov_len = req.n.nlmsg_len; + + msg.msg_name = (void *)&nladdr; + msg.msg_namelen = sizeof(nladdr); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + + memset(&nladdr, 0, sizeof(nladdr)); + nladdr.nl_family = AF_NETLINK; + nladdr.nl_pid = 0; + nladdr.nl_groups = 0; + + req.n.nlmsg_seq = 0; + req.n.nlmsg_flags |= NLM_F_ACK; + + status = sendmsg(fd, &msg, 0); + if (status != req.n.nlmsg_len) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); + close(fd); + return -1; + } + + status = tun_sifflags(this, IFF_UP | IFF_RUNNING); + if (status == -1) { + close(fd); + return -1; + } + + + close(fd); + this->addrs++; + return 0; + +#elif defined (__FreeBSD__) || defined (__APPLE__) + + int fd; + struct ifaliasreq areq; + + /* TODO: Is this needed on FreeBSD? */ + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr6(this, addr, dstaddr, netmask); /* TODO dstaddr */ + + memset(&areq, 0, sizeof(areq)); + + /* Set up interface name */ + strncpy(areq.ifra_name, this->devname, IFNAMSIZ); + areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ + + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_len = sizeof(areq.ifra_addr); + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_addr.s6_addr = addr->s6_addr; + + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_len = sizeof(areq.ifra_mask); + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_addr.s6_addr = netmask->s6_addr; + + /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_len = sizeof(areq.ifra_broadaddr); + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_addr.s6_addr = dstaddr->s6_addr; + + /* Create a channel to the NET kernel. */ + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "ioctl(SIOCAIFADDR) failed"); + close(fd); + return -1; + } + + close(fd); + this->addrs++; + return 0; + +#endif + +} + +int tun_addaddr(struct tun_t *this, struct in46_addr *addr, struct in46_addr *dstaddr, size_t prefixlen) +{ + struct in_addr netmask; + switch (addr->len) { + case 4: + netmask.s_addr = htonl(0xffffffff << (32 - prefixlen)); + return tun_addaddr4(this, &addr->v4, dstaddr ? &dstaddr->v4 : NULL, &netmask); + case 16: + return tun_addaddr6(this, &addr->v6, dstaddr ? &dstaddr->v6 : NULL, prefixlen); + default: + return -1; + } +} + static int tun_route(struct tun_t *this, struct in_addr *dst, struct in_addr *gateway, struct in_addr *mask, int delete) diff --git a/lib/tun.h b/lib/tun.h index 411deea..6f7c0ff 100644 --- a/lib/tun.h +++ b/lib/tun.h @@ -80,8 +80,8 @@ extern int tun_decaps(struct tun_t *this); extern int tun_encaps(struct tun_t *tun, void *pack, unsigned len); -extern int tun_addaddr(struct tun_t *this, struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask); +extern int tun_addaddr(struct tun_t *this, struct in46_addr *addr, + struct in46_addr *dstaddr, size_t prefixlen); extern int tun_setaddr(struct tun_t *this, struct in46_addr *our_adr, struct in46_addr *his_adr, size_t prefixlen); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 275c583..bb55b1c 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -85,7 +85,7 @@ int debug; /* Print debug messages */ int createif; /* Create local network interface */ char *tun_dev_name; - struct in_addr netaddr, destaddr, net; /* Network interface */ + struct in46_addr netaddr, destaddr, net; /* Network interface */ size_t prefixlen; char *ipup, *ipdown; /* Filename of scripts */ int defaultroute; /* Set up default route */ @@ -873,23 +873,21 @@ /* net */ /* Store net as in_addr net and mask */ if (args_info.net_arg) { - struct in46_addr in46; if (ippool_aton - (&in46, &options.prefixlen, args_info.net_arg, 0)) { + (&options.net, &options.prefixlen, args_info.net_arg, 0)) { SYS_ERR(DSGSN, LOGL_ERROR, 0, "Invalid network address: %s!", args_info.net_arg); exit(1); } - options.net.s_addr = in46.v4.s_addr; - options.netaddr.s_addr = options.net.s_addr; - options.destaddr.s_addr = options.net.s_addr; + options.netaddr = options.net; + options.destaddr = options.net; } else { - options.net.s_addr = 0; + memset(&options.net, 0, sizeof(options.net)); options.prefixlen = 0; - options.netaddr.s_addr = 0; - options.destaddr.s_addr = 0; + memset(&options.netaddr, 0, sizeof(options.netaddr)); + memset(&options.destaddr, 0, sizeof(options.destaddr)); } /* ipup */ @@ -1427,7 +1425,7 @@ break; } - if ((options.createif) && (!options.net.s_addr)) { + if ((options.createif) && (!options.net.len)) { size_t prefixlen = 32; if (addr.len == 16) prefixlen = 64; @@ -1580,15 +1578,13 @@ maxfd = tun->fd; } - if ((options.createif) && (options.net.s_addr)) { - struct in_addr mask; - mask.s_addr = options.prefixlen ? (0xFFFFFFFF >> (32 - options.prefixlen)) : 0; + if ((options.createif) && (options.net.len)) { /* printf("Setting up interface and routing\n"); */ - tun_addaddr(tun, &options.netaddr, &options.destaddr, &mask); + tun_addaddr(tun, &options.netaddr, &options.destaddr, options.prefixlen); if (options.defaultroute) { struct in_addr rm; rm.s_addr = 0; - tun_addroute(tun, &rm, &options.destaddr, &rm); + tun_addroute(tun, &rm, &options.destaddr.v4, &rm); } if (options.ipup) tun_runscript(tun, options.ipup); -- To view, visit https://gerrit.osmocom.org/5348 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:27:44 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 13:27:44 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn: Add 'ipv6 link-local' vty cmd Message-ID: Review at https://gerrit.osmocom.org/5349 ggsn: Add 'ipv6 link-local' vty cmd This vty cmd let's you set up a new link-local IP for a specific APN to be used during ICMPv6 Router Advertisement procedure. osmo-ggsn hence requires a link-local IPv6 address to be added to the tun interface, otherwise the apn will not be configured correctly and it won't be able to allocate addresses from the ipv6 pool later on. This feature is useful in case your OS doesn't support autoconfiguring link-local IPs when the interface is brought up (some linux versions are known to fail at this) or in case you configured your OS specifically to avoid automatic set up (sysctl net.ipv6.conf.*.autoconf). If "no ipv6 link-local" is provided (default), osmo-ggsn will rely on the OS or the ipup-script setting up the link-local IP for the tun interface at creation time, then fetching it after ipup-script time and using the first link-local ip found. On the other hand, if the "ipv6 link-local" cmd is provided, osmo-ggsn will add the link-local IP to the interface manually and use that one for later Router Advertisement procedures. Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 --- M ggsn/ggsn.c M ggsn/ggsn.h M ggsn/ggsn_vty.c 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/49/5349/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index ef2357b..3e095f0 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -241,13 +241,28 @@ } } + if (apn->v6.cfg.ll_prefix.addr.len) { + LOGPAPN(LOGL_INFO, apn, "Setting tun IPv6 link-local address %s\n", + in46p_ntoa(&apn->v6.cfg.ll_prefix)); + if (tun_addaddr(apn->tun.tun, &apn->v6.cfg.ll_prefix.addr, NULL, + apn->v6.cfg.ll_prefix.prefixlen)) { + LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 link-local address %s: %s. " + "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", + in46p_ntoa(&apn->v6.cfg.ll_prefix), strerror(errno)); + apn_stop(apn, false); + return -1; + } + apn->v6_lladdr = apn->v6.cfg.ll_prefix.addr.v6; + } + if (apn->tun.cfg.ipup_script) { LOGPAPN(LOGL_INFO, apn, "Running ip-up script %s\n", apn->tun.cfg.ipup_script); tun_runscript(apn->tun.tun, apn->tun.cfg.ipup_script); } - if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6) && + apn->v6.cfg.ll_prefix.addr.len == 0) { rc = tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK); if (rc < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h index c0774c4..e252548 100644 --- a/ggsn/ggsn.h +++ b/ggsn/ggsn.h @@ -22,6 +22,7 @@ struct apn_ctx_ip { struct { struct in46_prefix ifconfig_prefix; + struct in46_prefix ll_prefix; struct in46_prefix static_prefix; struct in46_prefix dynamic_prefix; /* v4 DNS server names */ diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 6e15ae4..db392fa 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -513,6 +513,24 @@ return CMD_SUCCESS; } +DEFUN(cfg_apn_ipv6_linklocal, cfg_apn_ipv6_linklocal_cmd, + "ipv6 link-local X:X::X:X/M", + IP6_STR IFCONFIG_STR "IPv6 Link-local Adress/Prefix-Length\n") +{ + struct apn_ctx *apn = (struct apn_ctx *) vty->index; + str2prefix(&apn->v6.cfg.ll_prefix, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_no_ipv6_linklocal, cfg_apn_no_ipv6_linklocal_cmd, + "no ipv6 link-local", + NO_STR IP6_STR IFCONFIG_STR) +{ + struct apn_ctx *apn = (struct apn_ctx *) vty->index; + memset(&apn->v6.cfg.ll_prefix, 0, sizeof(apn->v6.cfg.ll_prefix)); + return CMD_SUCCESS; +} + #define DNS_STRINGS "Configure DNS Server\n" "primary/secondary DNS\n" "IP address of DNS Sever\n" DEFUN(cfg_apn_ip_dns, cfg_apn_ip_dns_cmd, @@ -893,6 +911,8 @@ install_element(APN_NODE, &cfg_apn_no_ip_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_ipv6_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ipv6_ifconfig_cmd); + install_element(APN_NODE, &cfg_apn_ipv6_linklocal_cmd); + install_element(APN_NODE, &cfg_apn_no_ipv6_linklocal_cmd); install_element(APN_NODE, &cfg_apn_gpdu_seq_cmd); install_element(APN_NODE, &cfg_apn_no_gpdu_seq_cmd); -- To view, visit https://gerrit.osmocom.org/5349 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:53:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:53:50 +0000 Subject: [PATCH] osmo-ci[master]: add libgtpnl also to 'latest', not just to 'nightly' Message-ID: Review at https://gerrit.osmocom.org/5350 add libgtpnl also to 'latest', not just to 'nightly' Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94 --- M scripts/osmocom-latest-packages.sh 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/50/5350/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index bf20cfe..8fe074c 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -64,6 +64,7 @@ libosmo-netif libsmpp34 libasn1c + libgtpnl osmo-iuh osmo-ggsn osmo-sgsn -- To view, visit https://gerrit.osmocom.org/5350 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:13 +0000 Subject: osmo-ci[master]: add libgtpnl also to 'latest', not just to 'nightly' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5350 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:14 +0000 Subject: [MERGED] osmo-ci[master]: add libgtpnl also to 'latest', not just to 'nightly' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add libgtpnl also to 'latest', not just to 'nightly' ...................................................................... add libgtpnl also to 'latest', not just to 'nightly' Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94 --- M scripts/osmocom-latest-packages.sh 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index bf20cfe..8fe074c 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -64,6 +64,7 @@ libosmo-netif libsmpp34 libasn1c + libgtpnl osmo-iuh osmo-ggsn osmo-sgsn -- To view, visit https://gerrit.osmocom.org/5350 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd9b3c6e98d890f135356648ef3f9a62c07dcf94 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:29 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Make as_Tguard() more robust (don't abort after R... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5330 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:39 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5331 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:40 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK ...................................................................... BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK ... and replace it with a function Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679 --- M bsc/BSC_Tests.ttcn 1 file changed, 15 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index aa8150a..14ba97d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -255,10 +255,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); /* expect BSC to disable the channel again if there's no RLL EST IND */ rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX); @@ -274,10 +271,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); var octetstring l3 := '00010203040506'O f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -299,10 +293,7 @@ f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)); + var RslChannelNr chan_nr := f_chreq_act_ack(); var octetstring l3 := '00010203040506'O f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -321,18 +312,25 @@ RslChannelNr rsl_chan_nr } +/* Send CHAN RQD and wait for allocation; acknowledge it */ +private function f_chreq_act_ack(OCT1 ra := '23'O, GsmFrameNumber fn := 23) +runs on test_CT return RslChannelNr { + var RSL_Message rx_rsl; + f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); + var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; + f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10)); + return chan_nr; +} + /* helper function to establish a dedicated channel via BTS and MSC */ function f_est_dchan(OCT1 ra, GsmFrameNumber fn, octetstring l3) runs on test_CT return DchanTuple { var BSSAP_N_CONNECT_ind rx_c_ind; - var RSL_Message rx_rsl; var DchanTuple dt; /* Send CHAN RQD and wait for allocation; acknowledge it */ - f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn)); - rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); - dt.rsl_chan_nr := rx_rsl.ies[0].body.chan_nr; - f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(dt.rsl_chan_nr, fn+1)); + dt.rsl_chan_nr := f_chreq_act_ack(ra, fn); f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); @@ -409,7 +407,6 @@ /* Test behavior of channel release after hard Clear Command from MSC */ testcase TC_chan_rel_hard_clear() runs on test_CT { var BSSAP_N_DATA_ind rx_di; - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); @@ -456,7 +453,6 @@ /* Test behavior of channel release after hard RLSD from MSC */ testcase TC_chan_rel_hard_rlsd() runs on test_CT { - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); @@ -496,7 +492,6 @@ /* Test behavior of channel release after BSSMAP RESET from MSC */ testcase TC_chan_rel_a_reset() runs on test_CT { - var RSL_Message rx_rsl; var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); -- To view, visit https://gerrit.osmocom.org/5331 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:40 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Make as_Tguard() more robust (don't abort after R... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Make as_Tguard() more robust (don't abort after RESET) ...................................................................... BSC_Tests: Make as_Tguard() more robust (don't abort after RESET) Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775 --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 2e48e0b..aa8150a 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -163,6 +163,7 @@ [] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value ud_ind { BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, ts_BSSMAP_ResetAck)); + repeat; } } -- To view, visit https://gerrit.osmocom.org/5330 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:50 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add more tests about invalid channel activations In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5332 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8a44b5eab6c6e09330305547d145820983f90140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 13:55:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 13:55:52 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add more tests about invalid channel activations In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add more tests about invalid channel activations ...................................................................... BSC_Tests: Add more tests about invalid channel activations Change-Id: I8a44b5eab6c6e09330305547d145820983f90140 --- M bsc/BSC_Tests.ttcn 1 file changed, 107 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 14ba97d..c8016d7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -538,6 +538,108 @@ setverdict(pass); } +/* Test behavior if RSL EST IND for non-active channel */ +testcase TC_rll_est_ind_inact_lchan() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var octetstring l3 := '00010203040506'O; + var RslChannelNr chan_nr := valueof(t_RslChanNr_Bm(6)); + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for non-active lchan"); + } + [] BSSAP.receive {} + [] IPA_RSL[0].receive {} + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SAPI */ +testcase TC_rll_est_ind_inval_sapi1() runs on test_CT { + var RslChannelNr chan_nr; + + f_init(); + f_bssap_reset(); + + chan_nr := f_chreq_act_ack() + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(1)), l3)); + + timer T := 2.0; + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid SAPI 1"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SAPI */ +testcase TC_rll_est_ind_inval_sapi3() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var RslChannelNr chan_nr := f_chreq_act_ack(); + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(3)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid SAPI 3"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + +/* Test behavior if RSL EST IND for invalid SACCH */ +testcase TC_rll_est_ind_inval_sacch() runs on test_CT { + timer T := 2.0; + + f_init(); + f_bssap_reset(); + + var RslChannelNr chan_nr := f_chreq_act_ack(); + + var octetstring l3 := '00010203040506'O; + f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_SACCH(0)), l3)); + + T.start; + alt { + [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) { + setverdict(fail, "MSC received COMPL L3 for invalid Link SACCH"); + } + [] BSSAP.receive { repeat; } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout {} + } + + setverdict(pass); +} + + + testcase TC_ctrl_msc_connection_status() runs on test_CT { var charstring ctrl_resp; @@ -851,6 +953,11 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_rll_est_ind_inact_lchan() ); + execute( TC_rll_est_ind_inval_sapi1() ); + execute( TC_rll_est_ind_inval_sapi3() ); + execute( TC_rll_est_ind_inval_sacch() ); + execute( TC_paging_imsi_nochan() ); execute( TC_paging_tmsi_nochan() ); execute( TC_paging_tmsi_any() ); -- To view, visit https://gerrit.osmocom.org/5332 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a44b5eab6c6e09330305547d145820983f90140 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:03:50 +0000 Subject: [PATCH] osmo-bsc[master]: Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT Message-ID: Review at https://gerrit.osmocom.org/5351 Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/5351/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 776fcfe..44fba86 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -201,6 +201,8 @@ BTS_CTR_PAGING_ALREADY, BTS_CTR_PAGING_RESPONDED, BTS_CTR_PAGING_EXPIRED, + BTS_CTR_CHAN_ACT_TOTAL, + BTS_CTR_CHAN_ACT_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -220,6 +222,8 @@ [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, + [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, + [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index fbaaf09..0f5361e 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -691,6 +691,8 @@ msg->dst = lchan->ts->trx->rsl_link; + rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_ACT_TOTAL]); + return abis_rsl_sendmsg(msg); } @@ -1314,6 +1316,8 @@ osmo_timer_del(&msg->lchan->act_timer); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_ACT_NACK]); + if (msg->lchan->state == LCHAN_S_BROKEN) { LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK for broken channel.\n", -- To view, visit https://gerrit.osmocom.org/5351 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:03:50 +0000 Subject: [PATCH] osmo-bsc[master]: Add new per-BTS "rsl:unknown" counter to count unknown RSL m... Message-ID: Review at https://gerrit.osmocom.org/5352 Add new per-BTS "rsl:unknown" counter to count unknown RSL messages Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/5352/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 44fba86..0341138 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -203,6 +203,7 @@ BTS_CTR_PAGING_EXPIRED, BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_NACK, + BTS_CTR_RSL_UNKNOWN, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -224,6 +225,7 @@ [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, + [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 0f5361e..54e7b82 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1667,10 +1667,12 @@ case RSL_MT_MR_CODEC_MOD_PER: LOGP(DRSL, LOGL_NOTICE, "%s Unimplemented Abis RSL DChan " "msg 0x%02x\n", ts_name, rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); break; default: LOGP(DRSL, LOGL_NOTICE, "%s unknown Abis RSL DChan msg 0x%02x\n", ts_name, rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } @@ -1724,6 +1726,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "%s Unknown Abis RSL TRX message " "type 0x%02x\n", gsm_trx_name(sign_link->trx), rslh->msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } return rc; @@ -2057,6 +2060,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "Unknown Abis RSL TRX message type " "0x%02x\n", rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } @@ -2197,6 +2201,7 @@ DEBUGPC(DRLL, "UNKNOWN\n"); LOGP(DRLL, LOGL_NOTICE, "unknown Abis RLL message " "type 0x%02x\n", rllh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); } return rc; } @@ -2564,6 +2569,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "Unknown ip.access msg_type 0x%02x\n", rllh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); break; } @@ -2770,6 +2776,7 @@ /* Entry-point where L2 RSL from BTS enters */ int abis_rsl_rcvmsg(struct msgb *msg) { + struct e1inp_sign_link *sign_link; struct abis_rsl_common_hdr *rslh; int rc = 0; @@ -2784,6 +2791,7 @@ return -1; } + sign_link = msg->dst; rslh = msgb_l2(msg); switch (rslh->msg_discr & 0xfe) { @@ -2809,6 +2817,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "unknown RSL message discriminator " "0x%02x\n", rslh->msg_discr); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); rc = -EINVAL; } msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5352 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:03:50 +0000 Subject: [PATCH] osmo-bsc[master]: Add a new counter "rsl:ipa_nack" to count number of IPA rela... Message-ID: Review at https://gerrit.osmocom.org/5353 Add a new counter "rsl:ipa_nack" to count number of IPA related NACKs Those NACKs (CRCX/MDCX/PDCH_ACT) shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/5353/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0341138..7cd7539 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -204,6 +204,7 @@ BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_NACK, BTS_CTR_RSL_UNKNOWN, + BTS_CTR_RSL_IPA_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -226,6 +227,7 @@ [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, + [BTS_CTR_RSL_IPA_NACK] = {"rsl:ipa_nack", "Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 54e7b82..c9d0a20 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1649,6 +1649,7 @@ break; case RSL_MT_IPAC_PDCH_ACT_NACK: LOGP(DRSL, LOGL_ERROR, "%s IPAC PDCH ACT NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_PDCH_DEACT_ACK: DEBUGP(DRSL, "%s IPAC PDCH DEACT ACK\n", ts_name); @@ -1656,6 +1657,7 @@ break; case RSL_MT_IPAC_PDCH_DEACT_NACK: LOGP(DRSL, LOGL_ERROR, "%s IPAC PDCH DEACT NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_PHY_CONTEXT_CONF: case RSL_MT_PREPROC_MEAS_RES: @@ -2551,6 +2553,7 @@ /* somehow the BTS was unable to bind the lchan to its local * port?!? */ LOGP(DRSL, LOGL_ERROR, "%s IPAC_CRCX_NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_MDCX_ACK: /* the BTS tells us that a connect operation was successful */ @@ -2561,6 +2564,7 @@ /* somehow the BTS was unable to connect the lchan to a remote * port */ LOGP(DRSL, LOGL_ERROR, "%s IPAC_MDCX_NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_DLCX_IND: DEBUGP(DRSL, "%s IPAC_DLCX_IND ", ts_name); -- To view, visit https://gerrit.osmocom.org/5353 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:03:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:03:51 +0000 Subject: [PATCH] osmo-bsc[master]: Add new "chan:mode_modify_nack" counter to count RSL MODE MO... Message-ID: Review at https://gerrit.osmocom.org/5354 Add new "chan:mode_modify_nack" counter to count RSL MODE MODIFY NACK Those NACKs shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/5354/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7cd7539..cbb809b 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -205,6 +205,7 @@ BTS_CTR_CHAN_ACT_NACK, BTS_CTR_RSL_UNKNOWN, BTS_CTR_RSL_IPA_NACK, + BTS_CTR_MODE_MODIFY_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -228,6 +229,7 @@ [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, [BTS_CTR_RSL_IPA_NACK] = {"rsl:ipa_nack", "Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS"}, + [BTS_CTR_MODE_MODIFY_NACK] = {"chan:mode_modify_nack", "Number of Channel Mode Modify NACKs received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index c9d0a20..ef7a6fb 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1642,6 +1642,7 @@ break; case RSL_MT_MODE_MODIFY_NACK: LOGP(DRSL, LOGL_ERROR, "%s CHANNEL MODE MODIFY NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_MODE_MODIFY_NACK]); break; case RSL_MT_IPAC_PDCH_ACT_ACK: DEBUGP(DRSL, "%s IPAC PDCH ACT ACK\n", ts_name); -- To view, visit https://gerrit.osmocom.org/5354 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:04:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 14:04:26 +0000 Subject: [PATCH] osmo-pcu[master]: window: move encoding into functions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5336 to look at the new patch set (#2). window: move encoding into functions * move window size encoding and writing into separate functions * introduce necessary TBF wrappers to avoid direct m_window access This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 --- M src/encoding.cpp M src/encoding.h M src/pcu_vty_functions.cpp M src/tbf.h M tests/tbf/TbfTest.cpp 5 files changed, 43 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/5336/2 diff --git a/src/encoding.cpp b/src/encoding.cpp index 7bf2859..30de427 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -60,6 +60,21 @@ } } +/* 3GPP TS 44.060 Table 12.5.2.1 */ +static inline uint16_t enc_ws(uint16_t ws) +{ + return (ws - 64) / 32; +} + +static inline void write_ws(bitvec *dest, unsigned int *write_index, uint16_t ws) +{ + dest->cur_bit = *write_index; + + bitvec_set_u64(dest, enc_ws(ws), 5, false); + + *write_index += 5; +} + /* 3GPP TS 44.060 ? 12.12: { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > @@ -114,9 +129,8 @@ // bitvec_write_field(dest, &wp,,0xb,4); if (tbf->is_egprs_enabled()) { /* see GMS 44.018, 10.5.2.16 */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp, 1, 1); // "H" - bitvec_write_field(dest, &wp, ws_enc, 5); // EGPRS Window Size + write_ws(dest, &wp, tbf->window_size()); // EGPRS Window Size bitvec_write_field(dest, &wp, 0x0, 2); // LINK_QUALITY_MEASUREMENT_MODE bitvec_write_field(dest, &wp, 0, 1); // BEP_PERIOD2 not present } @@ -178,7 +192,6 @@ uint8_t alpha, uint8_t gamma, int8_t ta_idx, enum ph_burst_type burst_type, uint16_t ra) { - unsigned int ws_enc = 0; uint8_t extended_ra = 0; extended_ra = (ra & 0x1F); @@ -208,9 +221,6 @@ bitvec_write_field(dest, &wp, 0, 1); } else { - - ws_enc = (tbf->m_window.ws() - 64) / 32; - bitvec_write_field(dest, &wp, 1, 1); /* single block alloc */ bitvec_write_field(dest, &wp, tbf->tfi(), 5);/* TFI assignment */ bitvec_write_field(dest, &wp, 0, 1); /* polling bit */ @@ -224,7 +234,7 @@ bitvec_write_field(dest, &wp, tbf->tlli(), 1); bitvec_write_field(dest, &wp, 0, 1); /* BEP period present */ bitvec_write_field(dest, &wp, 0, 1); /* resegmentation */ - bitvec_write_field(dest, &wp, ws_enc, 5);/* egprs window_size */ + write_ws(dest, &wp, tbf->window_size());/* egprs window_size */ if (alpha) { bitvec_write_field(dest, &wp, 0x1, 1); /* ALPHA =yes */ @@ -450,7 +460,6 @@ bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts); } else { /* EPGRS */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp,0x1,1); // Message escape bitvec_write_field(dest, &wp,0x0,2); // EGPRS message contents bitvec_write_field(dest, &wp,0x0,1); // No CONTENTION_RESOLUTION_TLLI @@ -458,7 +467,7 @@ bitvec_write_field(dest, &wp,tbf->current_cs().to_num()-1, 4); // EGPRS Modulation and Coding IE /* 0: no RESEGMENT, 1: Segmentation*/ bitvec_write_field(dest, &wp, 0x1, 1); - bitvec_write_field(dest, &wp,ws_enc,5); // EGPRS Window Size + write_ws(dest, &wp, tbf->window_size()); // EGPRS Window Size bitvec_write_field(dest, &wp,0x0,1); // No Access Technologies Request bitvec_write_field(dest, &wp,0x0,1); // No ARAC RETRANSMISSION REQUEST bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING @@ -509,7 +518,7 @@ /* generate downlink assignment */ void Encoding::write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs) { @@ -518,7 +527,6 @@ PDA_AdditionsR99_t *pda_r99; uint8_t tn; - unsigned int ws_enc; block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header block->RRBP = rrbp; // 0: N+13 @@ -591,12 +599,10 @@ return; } - ws_enc = (tbf->window()->ws() - 64) / 32; - block->u.Packet_Downlink_Assignment.Exist_AdditionsR99 = 0x1; // AdditionsR99 = on pda_r99 = &block->u.Packet_Downlink_Assignment.AdditionsR99; pda_r99->Exist_EGPRS_Params = 1; - pda_r99->EGPRS_WindowSize = ws_enc; /* see TS 44.060, table 12.5.2.1 */ + pda_r99->EGPRS_WindowSize = enc_ws(tbf->window_size()); /* see TS 44.060, table 12.5.2.1 */ pda_r99->LINK_QUALITY_MEASUREMENT_MODE = 0x0; /* no meas, see TS 44.060, table 11.2.7.2 */ pda_r99->Exist_BEP_PERIOD2 = 0; /* No extra EGPRS BEP PERIOD */ pda_r99->Exist_Packet_Extended_Timing_Advance = 0; diff --git a/src/encoding.h b/src/encoding.h index 6164b89..54cb057 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -68,7 +68,7 @@ static void write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs); diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 6362281..129959b 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -70,7 +70,7 @@ if (ul_tbf) { gprs_rlc_ul_window *win = ul_tbf->window(); vty_out(vty, " WS=%d V(Q)=%d V(R)=%d", - ul_tbf->ws(), win->v_q(), win->v_r()); + ul_tbf->window_size(), win->v_q(), win->v_r()); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " TBF Statistics:%s", VTY_NEWLINE); if(GprsCodingScheme::GPRS == tbf->ms()->mode()) { @@ -82,7 +82,7 @@ if (dl_tbf) { gprs_rlc_dl_window *win = dl_tbf->window(); vty_out(vty, " WS=%d V(A)=%d V(S)=%d nBSN=%d%s", - dl_tbf->ws(), win->v_a(), win->v_s(), win->resend_needed(), + dl_tbf->window_size(), win->v_a(), win->v_s(), win->resend_needed(), win->window_stalled() ? " STALLED" : ""); vty_out(vty, "%s", VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", tbf->m_ctrs); diff --git a/src/tbf.h b/src/tbf.h index 1499369..40d1380 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -448,7 +448,7 @@ bool keep_open(unsigned fn) const; int release(); int abort(); - + uint16_t window_size() const; void egprs_calc_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); @@ -552,7 +552,7 @@ uint8_t *data, const uint8_t block_idx); void egprs_calc_ulwindow_size(); - + uint16_t window_size() const; void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -595,6 +595,16 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline uint16_t gprs_rlcmac_ul_tbf::window_size() const +{ + return m_window.ws(); +} + +inline uint16_t gprs_rlcmac_dl_tbf::window_size() const +{ + return m_window.ws(); +} + inline void gprs_rlcmac_ul_tbf::enable_egprs() { m_window.set_sns(RLC_EGPRS_SNS); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 60a1ac3..b950af0 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2215,9 +2215,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 64); + OSMO_ASSERT(dl_tbf->window_size() == 64); tbf_free(dl_tbf); /* EGPRS-only */ @@ -2230,9 +2230,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 4 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 4 * 64); tbf_free(dl_tbf); printf("=== end %s ===\n", __func__); @@ -2274,9 +2274,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 1); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 1 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 1 * 64); dl_tbf->update(); @@ -2285,9 +2285,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 4 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 4 * 64); tbf_free(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5336 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:04:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 14:04:27 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: unify EGPRS window calculation Message-ID: Review at https://gerrit.osmocom.org/5355 TBF: unify EGPRS window calculation Move actual calculation into shared function and use it to set window size for TBF. TBT test output requires cosmetic adjuestements due to extended debug output. Change-Id: Ib9f4a277082da3c71007f5f3b4f2acac8b994540 Related: OS#1759 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 5 files changed, 57 insertions(+), 70 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/55/5355/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 87101d0..ecc6120 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -478,6 +478,14 @@ talloc_free(tbf); } +uint16_t egprs_window_size(const struct gprs_rlcmac_bts *bts_data, uint8_t slots) +{ + uint8_t num_pdch = pcu_bitcount(slots); + + return OSMO_MIN((num_pdch != 1) ? (128 * num_pdch) : 192, + OSMO_MAX(64, (bts_data->ws_base + num_pdch * bts_data->ws_pdch) / 32 * 32)); +} + int gprs_rlcmac_tbf::update() { struct gprs_rlcmac_bts *bts_data = bts->bts_data(); @@ -500,7 +508,7 @@ if (is_egprs_enabled()) { gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); if (dl_tbf) - dl_tbf->egprs_calc_window_size(); + dl_tbf->set_window_size(); } return 0; @@ -870,7 +878,7 @@ rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot); if (tbf->is_egprs_enabled()) - tbf->egprs_calc_ulwindow_size(); + tbf->set_window_size(); /* if no resource */ if (rc < 0) { @@ -968,7 +976,7 @@ } if (tbf->is_egprs_enabled()) { - tbf->egprs_calc_window_size(); + tbf->set_window_size(); tbf->m_dl_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_egprs_ctrg_desc, 0); if (!tbf->m_dl_egprs_ctrs) { LOGP(DRLCMAC, LOGL_ERROR, "Couldn't allocate EGPRS DL counters\n"); diff --git a/src/tbf.h b/src/tbf.h index 40d1380..ac29a3e 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -449,7 +449,7 @@ int release(); int abort(); uint16_t window_size() const; - void egprs_calc_window_size(); + void set_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); /* TODO: add the gettimeofday as parameter */ @@ -551,8 +551,8 @@ struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); - void egprs_calc_ulwindow_size(); uint16_t window_size() const; + void set_window_size(); void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -633,4 +633,6 @@ return NULL; } +uint16_t egprs_window_size(const struct gprs_rlcmac_bts *bts_data, uint8_t slots); + #endif diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c3d2c89..6d6d5c1 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1384,23 +1384,11 @@ return EGPRS_RLCMAC_DL_NO_RETX; } -void gprs_rlcmac_dl_tbf::egprs_calc_window_size() +void gprs_rlcmac_dl_tbf::set_window_size() { - struct gprs_rlcmac_bts *bts_data = bts->bts_data(); - unsigned int num_pdch = pcu_bitcount(dl_slots()); - unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; - - ws = (ws / 32) * 32; - ws = OSMO_MAX(64, ws); - - if (num_pdch == 1) - ws = OSMO_MIN(192, ws); - else - ws = OSMO_MIN(128 * num_pdch, ws); - - LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d\n", - name(), ws); - + uint16_t ws = egprs_window_size(bts->bts_data(), dl_slots()); + LOGP(DRLCMAC, LOGL_INFO, "%s: setting EGPRS DL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", + name(), ws, bts->bts_data()->ws_base, pcu_bitcount(dl_slots()), bts->bts_data()->ws_pdch); m_window.set_ws(ws); } diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..407fd4c 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -610,21 +610,10 @@ } } -void gprs_rlcmac_ul_tbf::egprs_calc_ulwindow_size() +void gprs_rlcmac_ul_tbf::set_window_size() { - struct gprs_rlcmac_bts *bts_data = bts->bts_data(); - unsigned int num_pdch = pcu_bitcount(ul_slots()); - unsigned int ws = bts_data->ws_base + num_pdch * bts_data->ws_pdch; - ws = (ws / 32) * 32; - ws = OSMO_MAX(64, ws); - - if (num_pdch == 1) - ws = OSMO_MIN(192, ws); - else - ws = OSMO_MIN(128 * num_pdch, ws); - - LOGP(DRLCMAC, LOGL_INFO, "%s: Setting EGPRS window size to %d, base(%d) slots(%d) ws_pdch(%d)\n", - name(), ws, bts_data->ws_base, num_pdch, bts_data->ws_pdch); - + uint16_t ws = egprs_window_size(bts->bts_data(), ul_slots()); + LOGP(DRLCMAC, LOGL_INFO, "%s: setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", + name(), ws, bts->bts_data()->ws_base, pcu_bitcount(ul_slots()), bts->bts_data()->ws_pdch); m_window.set_ws(ws); } diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f534c54..c36847d 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -3387,7 +3387,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 3c -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 384, base(128) slots(4) ws_pdch(64) ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING @@ -3432,7 +3432,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): setting EGPRS UL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. @@ -3484,7 +3484,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START @@ -3526,7 +3526,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): setting EGPRS UL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. @@ -3741,7 +3741,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START @@ -3771,7 +3771,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -4130,7 +4130,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -4429,7 +4429,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -4683,7 +4683,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -4898,7 +4898,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5089,7 +5089,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5259,7 +5259,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5423,7 +5423,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5573,7 +5573,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5724,7 +5724,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5778,7 +5778,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5832,7 +5832,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5886,7 +5886,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -5959,7 +5959,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6032,7 +6032,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6105,7 +6105,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6178,7 +6178,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6239,7 +6239,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6300,7 +6300,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6361,7 +6361,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -6441,7 +6441,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): setting EGPRS UL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. @@ -6523,7 +6523,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START @@ -6555,7 +6555,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 192, base(128) slots(1) ws_pdch(64) ws(192) DL TBF slots: 0x10, N: 1, WS: 192 ********** TBF update ********** @@ -6572,7 +6572,7 @@ PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. - Assigning DL TS 5 PDCH(TS 5, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001. -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 384, base(128) slots(4) ws_pdch(64) ws(384) DL TBF slots: 0x3c, N: 4, WS: 384 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING @@ -6617,7 +6617,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 64, base(0) slots(1) ws_pdch(0) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): setting EGPRS UL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. @@ -6687,7 +6687,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START @@ -6717,7 +6717,7 @@ - Setting Control TS 4 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 10, dl_slots = 10 -TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 64 +TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 64, base(0) slots(1) ws_pdch(0) ws(64) Modifying MS object, TLLI = 0x00000000, TA 220 -> 0 TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW @@ -7077,7 +7077,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 00 -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): Setting EGPRS window size to 192, base(128) slots(1) ws_pdch(64) +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS): setting EGPRS UL window size to 192, base(128) slots(1) ws_pdch(64) ws(192) TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 0 sec. 0 microsec. @@ -7941,7 +7941,7 @@ - Setting Control TS 7 Attaching TBF to MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) Allocated TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): trx = 0, ul_slots = 80, dl_slots = 80 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 192 +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS): setting EGPRS DL window size to 192, base(128) slots(1) ws_pdch(64) ws(192) Modifying MS object, TLLI: 0xf1223344 confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=NULL EGPRS) [DOWNLINK] START -- To view, visit https://gerrit.osmocom.org/5355 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9f4a277082da3c71007f5f3b4f2acac8b994540 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:25:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:25:14 +0000 Subject: osmo-bsc[master]: Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5351 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:25:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:25:27 +0000 Subject: osmo-bsc[master]: Add new per-BTS "rsl:unknown" counter to count unknown RSL m... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5352 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:25:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:25:48 +0000 Subject: osmo-bsc[master]: Add a new counter "rsl:ipa_nack" to count number of IPA rela... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5353 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:25:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:25:56 +0000 Subject: osmo-bsc[master]: Add new "chan:mode_modify_nack" counter to count RSL MODE MO... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5354 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:35:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 14:35:17 +0000 Subject: [PATCH] osmo-ci[master]: Remove OpenBSC from Coverity submission Message-ID: Review at https://gerrit.osmocom.org/5356 Remove OpenBSC from Coverity submission The OpenBSC codebase only receive occasional backports hence none of the issues uncovered by Coverity would be fixed unless it's also fixed in corresponding Osmo* project. Let's not clutter output with the information about issues which won't be fixed anyway. Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a --- M coverity/build_Osmocom.sh M coverity/prepare_source_Osmcocom.sh 2 files changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/56/5356/1 diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 9ccee28..b2e6bc8 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -42,14 +42,6 @@ popd } -build_openbsc() { - pushd openbsc/openbsc - #IU git checkout sysmocom/iu - - do_build --enable-osmo-bsc --enable-nat --enable-smpp --enable-mgcp-transcoding #IU --enable-iu - popd -} - build_osmobts() { pushd osmo-bts @@ -89,7 +81,6 @@ #IU build_default osmo-iuh build_osmopcu build_osmobts -build_openbsc build_default osmo-mgw build_default osmo-bsc build_default osmo-msc diff --git a/coverity/prepare_source_Osmcocom.sh b/coverity/prepare_source_Osmcocom.sh index 05e50e4..d5ecad7 100755 --- a/coverity/prepare_source_Osmcocom.sh +++ b/coverity/prepare_source_Osmcocom.sh @@ -13,7 +13,6 @@ libosmo-netif \ libosmo-sccp \ libsmpp34 \ - openbsc \ osmo-bsc \ osmo-msc \ osmo-mgw \ @@ -40,4 +39,3 @@ #IU git -C asn1c checkout aper-prefix #IU git -C libosmo-netif checkout sysmocom/sctp #IU git -C libosmo-sccp checkout sysmocom/iu -#IU git -C openbsc checkout sysmocom/iu -- To view, visit https://gerrit.osmocom.org/5356 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:43:22 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 14:43:22 +0000 Subject: [PATCH] osmo-ggsn[master]: contrib: jenkins.sh: Build libgtpnl as dep when building wit... Message-ID: Review at https://gerrit.osmocom.org/5357 contrib: jenkins.sh: Build libgtpnl as dep when building with gtp kernel support Change-Id: I7ee741d4940e3c10a4944b676c9765d6808afba9 --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/57/5357/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4437541..06c24e5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,6 +18,9 @@ mkdir "$deps" || true +if [ "x$GTP" == "x--enable-gtp-linux" ]; then + osmo-build-dep.sh libgtpnl +fi osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") -- To view, visit https://gerrit.osmocom.org/5357 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ee741d4940e3c10a4944b676c9765d6808afba9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:41 +0000 Subject: [MERGED] osmo-bsc[master]: Add new "chan:mode_modify_nack" counter to count RSL MODE MO... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add new "chan:mode_modify_nack" counter to count RSL MODE MODIFY NACK ...................................................................... Add new "chan:mode_modify_nack" counter to count RSL MODE MODIFY NACK Those NACKs shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7cd7539..cbb809b 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -205,6 +205,7 @@ BTS_CTR_CHAN_ACT_NACK, BTS_CTR_RSL_UNKNOWN, BTS_CTR_RSL_IPA_NACK, + BTS_CTR_MODE_MODIFY_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -228,6 +229,7 @@ [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, [BTS_CTR_RSL_IPA_NACK] = {"rsl:ipa_nack", "Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS"}, + [BTS_CTR_MODE_MODIFY_NACK] = {"chan:mode_modify_nack", "Number of Channel Mode Modify NACKs received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index c9d0a20..ef7a6fb 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1642,6 +1642,7 @@ break; case RSL_MT_MODE_MODIFY_NACK: LOGP(DRSL, LOGL_ERROR, "%s CHANNEL MODE MODIFY NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_MODE_MODIFY_NACK]); break; case RSL_MT_IPAC_PDCH_ACT_ACK: DEBUGP(DRSL, "%s IPAC PDCH ACT ACK\n", ts_name); -- To view, visit https://gerrit.osmocom.org/5354 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:42 +0000 Subject: [MERGED] osmo-bsc[master]: Add a new counter "rsl:ipa_nack" to count number of IPA rela... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add a new counter "rsl:ipa_nack" to count number of IPA related NACKs ...................................................................... Add a new counter "rsl:ipa_nack" to count number of IPA related NACKs Those NACKs (CRCX/MDCX/PDCH_ACT) shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0341138..7cd7539 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -204,6 +204,7 @@ BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_NACK, BTS_CTR_RSL_UNKNOWN, + BTS_CTR_RSL_IPA_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -226,6 +227,7 @@ [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, + [BTS_CTR_RSL_IPA_NACK] = {"rsl:ipa_nack", "Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 54e7b82..c9d0a20 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1649,6 +1649,7 @@ break; case RSL_MT_IPAC_PDCH_ACT_NACK: LOGP(DRSL, LOGL_ERROR, "%s IPAC PDCH ACT NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_PDCH_DEACT_ACK: DEBUGP(DRSL, "%s IPAC PDCH DEACT ACK\n", ts_name); @@ -1656,6 +1657,7 @@ break; case RSL_MT_IPAC_PDCH_DEACT_NACK: LOGP(DRSL, LOGL_ERROR, "%s IPAC PDCH DEACT NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_PHY_CONTEXT_CONF: case RSL_MT_PREPROC_MEAS_RES: @@ -2551,6 +2553,7 @@ /* somehow the BTS was unable to bind the lchan to its local * port?!? */ LOGP(DRSL, LOGL_ERROR, "%s IPAC_CRCX_NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_MDCX_ACK: /* the BTS tells us that a connect operation was successful */ @@ -2561,6 +2564,7 @@ /* somehow the BTS was unable to connect the lchan to a remote * port */ LOGP(DRSL, LOGL_ERROR, "%s IPAC_MDCX_NACK\n", ts_name); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_IPA_NACK]); break; case RSL_MT_IPAC_DLCX_IND: DEBUGP(DRSL, "%s IPAC_DLCX_IND ", ts_name); -- To view, visit https://gerrit.osmocom.org/5353 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:42 +0000 Subject: [MERGED] osmo-bsc[master]: Add new per-BTS "rsl:unknown" counter to count unknown RSL m... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add new per-BTS "rsl:unknown" counter to count unknown RSL messages ...................................................................... Add new per-BTS "rsl:unknown" counter to count unknown RSL messages Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 11 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 44fba86..0341138 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -203,6 +203,7 @@ BTS_CTR_PAGING_EXPIRED, BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_NACK, + BTS_CTR_RSL_UNKNOWN, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -224,6 +225,7 @@ [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, + [BTS_CTR_RSL_UNKNOWN] = {"rsl:unknown", "Number of unknown/unsupported RSL messages received from BTS"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 0f5361e..54e7b82 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -1667,10 +1667,12 @@ case RSL_MT_MR_CODEC_MOD_PER: LOGP(DRSL, LOGL_NOTICE, "%s Unimplemented Abis RSL DChan " "msg 0x%02x\n", ts_name, rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); break; default: LOGP(DRSL, LOGL_NOTICE, "%s unknown Abis RSL DChan msg 0x%02x\n", ts_name, rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } @@ -1724,6 +1726,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "%s Unknown Abis RSL TRX message " "type 0x%02x\n", gsm_trx_name(sign_link->trx), rslh->msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } return rc; @@ -2057,6 +2060,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "Unknown Abis RSL TRX message type " "0x%02x\n", rslh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); return -EINVAL; } @@ -2197,6 +2201,7 @@ DEBUGPC(DRLL, "UNKNOWN\n"); LOGP(DRLL, LOGL_NOTICE, "unknown Abis RLL message " "type 0x%02x\n", rllh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); } return rc; } @@ -2564,6 +2569,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "Unknown ip.access msg_type 0x%02x\n", rllh->c.msg_type); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); break; } @@ -2770,6 +2776,7 @@ /* Entry-point where L2 RSL from BTS enters */ int abis_rsl_rcvmsg(struct msgb *msg) { + struct e1inp_sign_link *sign_link; struct abis_rsl_common_hdr *rslh; int rc = 0; @@ -2784,6 +2791,7 @@ return -1; } + sign_link = msg->dst; rslh = msgb_l2(msg); switch (rslh->msg_discr & 0xfe) { @@ -2809,6 +2817,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "unknown RSL message discriminator " "0x%02x\n", rslh->msg_discr); + rate_ctr_inc(&sign_link->trx->bts->bts_ctrs->ctr[BTS_CTR_RSL_UNKNOWN]); rc = -EINVAL; } msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5352 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:42 +0000 Subject: [MERGED] osmo-bsc[master]: Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT ...................................................................... Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACT Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff --- M include/osmocom/bsc/gsm_data.h M src/libbsc/abis_rsl.c 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 776fcfe..44fba86 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -201,6 +201,8 @@ BTS_CTR_PAGING_ALREADY, BTS_CTR_PAGING_RESPONDED, BTS_CTR_PAGING_EXPIRED, + BTS_CTR_CHAN_ACT_TOTAL, + BTS_CTR_CHAN_ACT_NACK, }; static const struct rate_ctr_desc bts_ctr_description[] = { @@ -220,6 +222,8 @@ [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, + [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, + [BTS_CTR_CHAN_ACT_NACK] = {"chan_act:nack", "Number of Channel Activations that the BTS NACKed"}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index fbaaf09..0f5361e 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -691,6 +691,8 @@ msg->dst = lchan->ts->trx->rsl_link; + rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_ACT_TOTAL]); + return abis_rsl_sendmsg(msg); } @@ -1314,6 +1316,8 @@ osmo_timer_del(&msg->lchan->act_timer); + rate_ctr_inc(&msg->lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_ACT_NACK]); + if (msg->lchan->state == LCHAN_S_BROKEN) { LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK for broken channel.\n", -- To view, visit https://gerrit.osmocom.org/5351 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:52 +0000 Subject: osmo-ggsn[master]: contrib: jenkins.sh: Build libgtpnl as dep when building wit... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5357 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7ee741d4940e3c10a4944b676c9765d6808afba9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:45:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:45:54 +0000 Subject: [MERGED] osmo-ggsn[master]: contrib: jenkins.sh: Build libgtpnl as dep when building wit... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib: jenkins.sh: Build libgtpnl as dep when building with gtp kernel support ...................................................................... contrib: jenkins.sh: Build libgtpnl as dep when building with gtp kernel support Change-Id: I7ee741d4940e3c10a4944b676c9765d6808afba9 --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4437541..06c24e5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,6 +18,9 @@ mkdir "$deps" || true +if [ "x$GTP" == "x--enable-gtp-linux" ]; then + osmo-build-dep.sh libgtpnl +fi osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") -- To view, visit https://gerrit.osmocom.org/5357 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ee741d4940e3c10a4944b676c9765d6808afba9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:47:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:47:44 +0000 Subject: osmo-ggsn[master]: ggsn: Add 'ipv6 link-local' vty cmd In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5349/1/ggsn/ggsn.c File ggsn/ggsn.c: PS1, Line 247: tun_addaddr did you verify that the kernel automatically detects this as a link-local address and lists it as "scope link"? -- To view, visit https://gerrit.osmocom.org/5349 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:47:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:47:51 +0000 Subject: osmo-ggsn[master]: cosmetic: sgsnemu.c: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5345 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic392ed35946e076a39aa5f7bf80a8c2ffe73562c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:48:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:48:11 +0000 Subject: osmo-ggsn[master]: ggsn.c: Improve logging info on link-local ipv6 addr not found In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5346 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18fb952514712ff30d18c7626f84309055d3efa1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:48:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:48:35 +0000 Subject: osmo-ggsn[master]: tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5347 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8da637b155f0e913cab6c5b0dde355c9f33375b5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:04 +0000 Subject: osmo-ggsn[master]: Set tun_addaddr ipv agnostic and add support for ipv6 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5348 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:12 +0000 Subject: [MERGED] osmo-ggsn[master]: Set tun_addaddr ipv agnostic and add support for ipv6 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Set tun_addaddr ipv agnostic and add support for ipv6 ...................................................................... Set tun_addaddr ipv agnostic and add support for ipv6 sgsnemu (the only user of this API so far) has been modified to use the new API with in46_addr. FreeBSD code for IPv6 has not been tested. Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767 --- M lib/tun.c M lib/tun.h M sgsnemu/sgsnemu.c 3 files changed, 193 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index 3081575..f6d3503 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -295,7 +295,7 @@ } } -int tun_addaddr(struct tun_t *this, +static int tun_addaddr4(struct tun_t *this, struct in_addr *addr, struct in_addr *dstaddr, struct in_addr *netmask) { @@ -465,6 +465,185 @@ } +static int tun_addaddr6(struct tun_t *this, + struct in6_addr *addr, + struct in6_addr *dstaddr, int prefixlen) +{ + +#if defined(__linux__) + struct { + struct nlmsghdr n; + struct ifaddrmsg i; + char buf[TUN_NLBUFSIZE]; + } req; + + struct sockaddr_nl local; + socklen_t addr_len; + int fd; + int status; + + struct sockaddr_nl nladdr; + struct iovec iov; + struct msghdr msg; + + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr6(this, addr, dstaddr, prefixlen); + + memset(&req, 0, sizeof(req)); + req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); + req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE; + req.n.nlmsg_type = RTM_NEWADDR; + req.i.ifa_family = AF_INET6; + req.i.ifa_prefixlen = 64; /* 64 FOR IPv6 */ + req.i.ifa_flags = 0; + req.i.ifa_scope = RT_SCOPE_HOST; /* TODO or 0 */ + req.i.ifa_index = if_nametoindex(this->devname); + if (!req.i.ifa_index) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for %s", this->devname); + return -1; + } + + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(*addr)); + if (dstaddr) + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(*dstaddr)); + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + memset(&local, 0, sizeof(local)); + local.nl_family = AF_NETLINK; + local.nl_groups = 0; + + if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed"); + close(fd); + return -1; + } + + addr_len = sizeof(local); + if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "getsockname() failed"); + close(fd); + return -1; + } + + if (addr_len != sizeof(local)) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address length %d", addr_len); + close(fd); + return -1; + } + + if (local.nl_family != AF_NETLINK) { + SYS_ERR(DTUN, LOGL_ERROR, 0, + "Wrong address family %d", local.nl_family); + close(fd); + return -1; + } + + iov.iov_base = (void *)&req.n; + iov.iov_len = req.n.nlmsg_len; + + msg.msg_name = (void *)&nladdr; + msg.msg_namelen = sizeof(nladdr); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + + memset(&nladdr, 0, sizeof(nladdr)); + nladdr.nl_family = AF_NETLINK; + nladdr.nl_pid = 0; + nladdr.nl_groups = 0; + + req.n.nlmsg_seq = 0; + req.n.nlmsg_flags |= NLM_F_ACK; + + status = sendmsg(fd, &msg, 0); + if (status != req.n.nlmsg_len) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned %d", status); + close(fd); + return -1; + } + + status = tun_sifflags(this, IFF_UP | IFF_RUNNING); + if (status == -1) { + close(fd); + return -1; + } + + + close(fd); + this->addrs++; + return 0; + +#elif defined (__FreeBSD__) || defined (__APPLE__) + + int fd; + struct ifaliasreq areq; + + /* TODO: Is this needed on FreeBSD? */ + if (!this->addrs) /* Use ioctl for first addr to make ping work */ + return tun_setaddr6(this, addr, dstaddr, netmask); /* TODO dstaddr */ + + memset(&areq, 0, sizeof(areq)); + + /* Set up interface name */ + strncpy(areq.ifra_name, this->devname, IFNAMSIZ); + areq.ifra_name[IFNAMSIZ - 1] = 0; /* Make sure to terminate */ + + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_len = sizeof(areq.ifra_addr); + ((struct sockaddr_in6 *)&areq.ifra_addr)->sin6_addr.s6_addr = addr->s6_addr; + + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_len = sizeof(areq.ifra_mask); + ((struct sockaddr_in6 *)&areq.ifra_mask)->sin6_addr.s6_addr = netmask->s6_addr; + + /* For some reason FreeBSD uses ifra_broadcast for specifying dstaddr */ + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_family = AF_INET6; + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_len = sizeof(areq.ifra_broadaddr); + ((struct sockaddr_in6 *)&areq.ifra_broadaddr)->sin6_addr.s6_addr = dstaddr->s6_addr; + + /* Create a channel to the NET kernel. */ + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); + return -1; + } + + if (ioctl(fd, SIOCAIFADDR, (void *)&areq) < 0) { + SYS_ERR(DTUN, LOGL_ERROR, errno, + "ioctl(SIOCAIFADDR) failed"); + close(fd); + return -1; + } + + close(fd); + this->addrs++; + return 0; + +#endif + +} + +int tun_addaddr(struct tun_t *this, struct in46_addr *addr, struct in46_addr *dstaddr, size_t prefixlen) +{ + struct in_addr netmask; + switch (addr->len) { + case 4: + netmask.s_addr = htonl(0xffffffff << (32 - prefixlen)); + return tun_addaddr4(this, &addr->v4, dstaddr ? &dstaddr->v4 : NULL, &netmask); + case 16: + return tun_addaddr6(this, &addr->v6, dstaddr ? &dstaddr->v6 : NULL, prefixlen); + default: + return -1; + } +} + static int tun_route(struct tun_t *this, struct in_addr *dst, struct in_addr *gateway, struct in_addr *mask, int delete) diff --git a/lib/tun.h b/lib/tun.h index 411deea..6f7c0ff 100644 --- a/lib/tun.h +++ b/lib/tun.h @@ -80,8 +80,8 @@ extern int tun_decaps(struct tun_t *this); extern int tun_encaps(struct tun_t *tun, void *pack, unsigned len); -extern int tun_addaddr(struct tun_t *this, struct in_addr *addr, - struct in_addr *dstaddr, struct in_addr *netmask); +extern int tun_addaddr(struct tun_t *this, struct in46_addr *addr, + struct in46_addr *dstaddr, size_t prefixlen); extern int tun_setaddr(struct tun_t *this, struct in46_addr *our_adr, struct in46_addr *his_adr, size_t prefixlen); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 275c583..bb55b1c 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -85,7 +85,7 @@ int debug; /* Print debug messages */ int createif; /* Create local network interface */ char *tun_dev_name; - struct in_addr netaddr, destaddr, net; /* Network interface */ + struct in46_addr netaddr, destaddr, net; /* Network interface */ size_t prefixlen; char *ipup, *ipdown; /* Filename of scripts */ int defaultroute; /* Set up default route */ @@ -873,23 +873,21 @@ /* net */ /* Store net as in_addr net and mask */ if (args_info.net_arg) { - struct in46_addr in46; if (ippool_aton - (&in46, &options.prefixlen, args_info.net_arg, 0)) { + (&options.net, &options.prefixlen, args_info.net_arg, 0)) { SYS_ERR(DSGSN, LOGL_ERROR, 0, "Invalid network address: %s!", args_info.net_arg); exit(1); } - options.net.s_addr = in46.v4.s_addr; - options.netaddr.s_addr = options.net.s_addr; - options.destaddr.s_addr = options.net.s_addr; + options.netaddr = options.net; + options.destaddr = options.net; } else { - options.net.s_addr = 0; + memset(&options.net, 0, sizeof(options.net)); options.prefixlen = 0; - options.netaddr.s_addr = 0; - options.destaddr.s_addr = 0; + memset(&options.netaddr, 0, sizeof(options.netaddr)); + memset(&options.destaddr, 0, sizeof(options.destaddr)); } /* ipup */ @@ -1427,7 +1425,7 @@ break; } - if ((options.createif) && (!options.net.s_addr)) { + if ((options.createif) && (!options.net.len)) { size_t prefixlen = 32; if (addr.len == 16) prefixlen = 64; @@ -1580,15 +1578,13 @@ maxfd = tun->fd; } - if ((options.createif) && (options.net.s_addr)) { - struct in_addr mask; - mask.s_addr = options.prefixlen ? (0xFFFFFFFF >> (32 - options.prefixlen)) : 0; + if ((options.createif) && (options.net.len)) { /* printf("Setting up interface and routing\n"); */ - tun_addaddr(tun, &options.netaddr, &options.destaddr, &mask); + tun_addaddr(tun, &options.netaddr, &options.destaddr, options.prefixlen); if (options.defaultroute) { struct in_addr rm; rm.s_addr = 0; - tun_addroute(tun, &rm, &options.destaddr, &rm); + tun_addroute(tun, &rm, &options.destaddr.v4, &rm); } if (options.ipup) tun_runscript(tun, options.ipup); -- To view, visit https://gerrit.osmocom.org/5348 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:12 +0000 Subject: [MERGED] osmo-ggsn[master]: tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr ...................................................................... tun.c: tun_addaddr: Fix segfault and wrong usage of tun_nlattr First of all, dstaddr can be NULL, avoid copying it in that case. Second, we want to copy the addr data, not the pointer. I tested it and the IP was not added (not shown in ip addr) until I copied the content instead of the address. Change-Id: I8da637b155f0e913cab6c5b0dde355c9f33375b5 --- M lib/tun.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/lib/tun.c b/lib/tun.c index d8e4b62..3081575 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -333,8 +333,9 @@ return -1; } - tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr)); - tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr)); + tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(*addr)); + if (dstaddr) + tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(*dstaddr)); if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) { SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed"); -- To view, visit https://gerrit.osmocom.org/5347 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8da637b155f0e913cab6c5b0dde355c9f33375b5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:12 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn.c: Improve logging info on link-local ipv6 addr not found In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn.c: Improve logging info on link-local ipv6 addr not found ...................................................................... ggsn.c: Improve logging info on link-local ipv6 addr not found Change-Id: I18fb952514712ff30d18c7626f84309055d3efa1 --- M ggsn/ggsn.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index fa3e20c..ef2357b 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -194,6 +194,7 @@ struct in46_prefix ipv6_tun_linklocal_ip; struct in46_prefix *blacklist; int blacklist_size; + int rc; if (apn->started) return 0; @@ -247,9 +248,10 @@ } if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { - if (tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK) < 1) { - LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of " - "interface: %s\n", strerror(errno)); + rc = tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK); + if (rc < 1) { + LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", + rc ? strerror(errno) : "tun interface has no link-local IP assigned"); apn_stop(apn, false); return -1; } -- To view, visit https://gerrit.osmocom.org/5346 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18fb952514712ff30d18c7626f84309055d3efa1 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:13 +0000 Subject: [MERGED] osmo-ggsn[master]: cosmetic: sgsnemu.c: Fix trailing whitespace In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: sgsnemu.c: Fix trailing whitespace ...................................................................... cosmetic: sgsnemu.c: Fix trailing whitespace Change-Id: Ic392ed35946e076a39aa5f7bf80a8c2ffe73562c --- M sgsnemu/sgsnemu.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 300183b..275c583 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1,13 +1,13 @@ -/* +/* * OsmoGGSN - Gateway GPRS Support Node * Copyright (C) 2002, 2003, 2004 Mondru AB. * Copyright (C) 2017 Harald Welte - * + * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright * notice and this permission notice is included in all copies or * substantial portions of the software. - * + * */ /* @@ -372,10 +372,10 @@ /* foreground */ /* If fg flag not given run as a daemon */ - /* Do not allow sgsnemu to run as deamon + /* Do not allow sgsnemu to run as deamon if (!args_info.fg_flag) { - closelog(); + closelog(); freopen("/dev/null", "w", stdout); freopen("/dev/null", "w", stderr); freopen("/dev/null", "r", stdin); @@ -1700,7 +1700,7 @@ pdp->hisaddr0 = options.remote; pdp->hisaddr1 = options.remote; - pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, + pdp->cch_pdp = options.cch; /* 2048 = Normal, 1024 = Prepaid, 512 = Flat rate, 256 = Hot billing */ pdp->tx_gpdu_seq = options.tx_gpdu_seq; -- To view, visit https://gerrit.osmocom.org/5345 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic392ed35946e076a39aa5f7bf80a8c2ffe73562c Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:49:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:49:42 +0000 Subject: osmo-pcu[master]: DL window: constify resend_needed() function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5d672bfd654198aebb187772de464c52b3209435 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:50:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:50:29 +0000 Subject: osmo-pcu[master]: TBF: move EGPRS enablement into (U|D)L-TBF In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5335 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:51:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:51:19 +0000 Subject: osmo-pcu[master]: TBF-UL: simplify test helpers In-Reply-To: References: Message-ID: Patch Set 2: I'm not quite sure what we gain, and wheter thre are any future use cases in which it makes sense to set them independent of each other. -- To view, visit https://gerrit.osmocom.org/5337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:52:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:52:17 +0000 Subject: osmo-pcu[master]: Avoid code duplication in TBF test In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5338 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7aa72f5aa66c5e9c255542c066b5494c098aab2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:52:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:52:49 +0000 Subject: osmo-pcu[master]: TBF-DL: mark rcvd_dl_ack() parameters as boolean In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5339 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:53:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:53:51 +0000 Subject: osmo-pcu[master]: TBF: move window parameters to UL/DL level In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5340 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:54:27 +0000 Subject: osmo-pcu[master]: TBF-DL: move priority computation into function In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5341 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icdca0106a544036eaa94a25f0d4f84e4282f4568 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 14:54:41 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 Message-ID: Review at https://gerrit.osmocom.org/5358 osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1, which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which osmo-hlr uses to interpret the numbers from the hlr.db). This explains why our "xor" tests are succeeding even though libosmocore doesn't support XOR at all: we were using comp128v1 all the while. Fix the auth algo mapping: - define correct mappings, copying enum osmo_auth_algo, in util.py - add a function to get the enum value from name, in util.py - use this in osmo_hlr.py Change subscriber_add() API to take the algorithm string instead of a number. The number is libosmocore internal and we should not expose it within our API beyond above dict. There are no callers using this parameter yet anyway. Adjust resources.conf to indicate COMP128v1 which we are actually using and which means we're still using algorithm number 1 after this change. BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured similar CTRL, which it doesn't yet, this code could be more robust.) Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 --- M example/resources.conf M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/util.py 4 files changed, 26 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/58/5358/1 diff --git a/example/resources.conf b/example/resources.conf index 35e3a2d..bec17b4 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -71,7 +71,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -79,7 +79,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -87,7 +87,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'ussd', 'gprs'] @@ -95,6 +95,6 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['gprs'] diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index f7dd80a..20eaf02 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -32,10 +32,6 @@ process = None next_subscriber_id = 1 - AUTH_ALGO_NONE = 0 - AUTH_ALGO_XOR = 1 - AUTH_ALGO_COMP128v1 = 2 - def __init__(self, suite_run, ip_address): super().__init__(log.C_RUN, 'osmo-hlr_%s' % ip_address.get('addr')) self.suite_run = suite_run @@ -107,25 +103,23 @@ log.ctx(proc) raise log.Error('Exited in error') - def subscriber_add(self, modem, msisdn=None, algo=None): + def subscriber_add(self, modem, msisdn=None, algo_str=None): if msisdn is None: msisdn = self.suite_run.resources_pool.next_msisdn(modem) modem.set_msisdn(msisdn) subscriber_id = self.next_subscriber_id self.next_subscriber_id += 1 - if not algo: - alg_str = modem.auth_algo() - if alg_str is None or alg_str == 'none': - algo = self.AUTH_ALGO_NONE - elif alg_str == 'comp128v1': - algo = self.AUTH_ALGO_COMP128v1 - elif alg_str == 'xor': - algo = self.AUTH_ALGO_XOR - if algo != self.AUTH_ALGO_NONE and not modem.ki(): - raise log.Error("Auth algo %r selected and no KI specified" % algo) + if algo_str is None: + algo_str = modem.auth_algo() or util.OSMO_AUTH_ALGO_NONE - self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, algo=algo) + if algo_str != util.OSMO_AUTH_ALGO_NONE and not modem.ki(): + raise log.Error("Auth algo %r selected but no KI specified" % algo_str) + + algo = util.osmo_auth_algo_by_name(algo_str) + + self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, + algo_str=algo_str, algo=algo) conn = sqlite3.connect(self.db_file) try: c = conn.cursor() diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index f92d1db..6c0b2b7 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -20,7 +20,7 @@ import re from . import log -from .util import is_dict, is_list, str2bool +from .util import is_dict, is_list, str2bool, ENUM_OSMO_AUTH_ALGO KEY_RE = re.compile('[a-zA-Z][a-zA-Z0-9_]*') IPV4_RE = re.compile('([0-9]{1,3}.){3}[0-9]{1,3}') @@ -62,9 +62,8 @@ match_re('MSISDN', MSISDN_RE, val) def auth_algo(val): - if val in ('none', 'xor', 'comp128v1'): - return - raise ValueError('Unknown Authentication Algorithm: %r' % val) + if val not in ENUM_OSMO_AUTH_ALGO: + raise ValueError('Unknown Authentication Algorithm: %r' % val) def uint(val): n = int(val) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index ed1a258..edf7599 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -32,6 +32,15 @@ import readline import subprocess +# This mirrors enum osmo_auth_algo in libosmocore/include/osmocom/crypt/auth.h +# so that the index within the tuple matches the enum value. +OSMO_AUTH_ALGO_NONE = 'none' +ENUM_OSMO_AUTH_ALGO = (OSMO_AUTH_ALGO_NONE, 'comp128v1', 'comp128v2', 'comp128v3', 'xor', 'milenage') + +def osmo_auth_algo_by_name(algo_str): + 'Return enum osmo_auth_algo numeric value as from libosmocore, raise ValueError if not defined.' + return ENUM_OSMO_AUTH_ALGO.index(algo_str.lower()) + def prepend_library_path(path): lp = os.getenv('LD_LIBRARY_PATH') if not lp: -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:54:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 14:54:41 +0000 Subject: [PATCH] osmo-gsm-tester[master]: cosmetic: adjust resource_test to comp128v1 Message-ID: Review at https://gerrit.osmocom.org/5359 cosmetic: adjust resource_test to comp128v1 Since libosmocore doesn't support XOR at all, it seems weird to use it in the test, even though it's just a selftest without libosmocore involved... Change-Id: I51edec255e7ef277907817b3187c2f492465467f --- M selftest/conf/resources.conf M selftest/resource_test.ok 2 files changed, 20 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/59/5359/1 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index 9e4e015..51f4abc 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -65,7 +65,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -74,7 +74,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -83,7 +83,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -92,7 +92,7 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 650a8bc..884c6b3 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -80,29 +80,29 @@ 'addr': '10.42.42.5'}, {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c', 'addr': '10.42.42.6'}], - 'modem': [{'_hash': 'f392ed391f9d39abb6ae01431b26b4f44079a447', - 'auth_algo': 'xor', + 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009031', 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD', 'label': 'sierra_1', 'path': '/sierra_1'}, - {'_hash': '1b3cf2a04bde791a84fcc462c29f73391b1f7313', - 'auth_algo': 'xor', + {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009029', 'ki': '00969E283349D354A8239E877F2E0866', 'label': 'sierra_2', 'path': '/sierra_2'}, - {'_hash': '83f7b4a07c355487d31db6f068146e48bb1ed118', - 'auth_algo': 'xor', + {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009030', 'ki': 'BB70807226393CDBAC8DD3439FF54252', 'label': 'gobi_0', 'path': '/gobi_0'}, - {'_hash': 'a5f8f08a24df0eca067c5b51d55c3c4fd8721908', - 'auth_algo': 'xor', + {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009032', 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A', @@ -143,8 +143,8 @@ --- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c addr: 10.42.42.2 --- testowner: Reserving 2 x modem (candidates: 4) ---- testowner: DBG: Picked - _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 - auth_algo: xor +--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -152,8 +152,8 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 - auth_algo: xor +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -199,9 +199,9 @@ _reserved_by: testowner-123-1490837279 addr: 10.42.42.2 modem: -- _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 +- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -209,9 +209,9 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 -- To view, visit https://gerrit.osmocom.org/5359 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51edec255e7ef277907817b3187c2f492465467f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:56:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:56:48 +0000 Subject: osmo-ci[master]: Remove OpenBSC from Coverity submission In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5356 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:56:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:56:50 +0000 Subject: osmo-ci[master]: Remove OpenBSC from Coverity submission In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5356 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:56:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:56:51 +0000 Subject: [MERGED] osmo-ci[master]: Remove OpenBSC from Coverity submission In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove OpenBSC from Coverity submission ...................................................................... Remove OpenBSC from Coverity submission The OpenBSC codebase only receive occasional backports hence none of the issues uncovered by Coverity would be fixed unless it's also fixed in corresponding Osmo* project. Let's not clutter output with the information about issues which won't be fixed anyway. Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a --- M coverity/build_Osmocom.sh M coverity/prepare_source_Osmcocom.sh 2 files changed, 0 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 9ccee28..b2e6bc8 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -42,14 +42,6 @@ popd } -build_openbsc() { - pushd openbsc/openbsc - #IU git checkout sysmocom/iu - - do_build --enable-osmo-bsc --enable-nat --enable-smpp --enable-mgcp-transcoding #IU --enable-iu - popd -} - build_osmobts() { pushd osmo-bts @@ -89,7 +81,6 @@ #IU build_default osmo-iuh build_osmopcu build_osmobts -build_openbsc build_default osmo-mgw build_default osmo-bsc build_default osmo-msc diff --git a/coverity/prepare_source_Osmcocom.sh b/coverity/prepare_source_Osmcocom.sh index 05e50e4..d5ecad7 100755 --- a/coverity/prepare_source_Osmcocom.sh +++ b/coverity/prepare_source_Osmcocom.sh @@ -13,7 +13,6 @@ libosmo-netif \ libosmo-sccp \ libsmpp34 \ - openbsc \ osmo-bsc \ osmo-msc \ osmo-mgw \ @@ -40,4 +39,3 @@ #IU git -C asn1c checkout aper-prefix #IU git -C libosmo-netif checkout sysmocom/sctp #IU git -C libosmo-sccp checkout sysmocom/iu -#IU git -C openbsc checkout sysmocom/iu -- To view, visit https://gerrit.osmocom.org/5356 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:58:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 14:58:23 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:58:56 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 14:58:56 +0000 Subject: [PATCH] libosmo-netif[master]: contrib: jenkins.sh: Disable building doxygen for deps Message-ID: Review at https://gerrit.osmocom.org/5360 contrib: jenkins.sh: Disable building doxygen for deps Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/60/5360/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3fb014b..ac898f7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -23,7 +23,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis set +x -- To view, visit https://gerrit.osmocom.org/5360 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:59:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 14:59:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1, which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which osmo-hlr uses to interpret the numbers from the hlr.db). This explains why our "xor" tests are succeeding even though libosmocore doesn't support XOR at all: we were using comp128v1 all the while. Fix the auth algo mapping: - define correct mappings, copying enum osmo_auth_algo, in util.py - add a function to get the enum value from name, in util.py - use this in osmo_hlr.py Change subscriber_add() API to take the algorithm string instead of a number. The number is libosmocore internal and we should not expose it within our API beyond above dict. There are no callers using this parameter yet anyway. Adjust resources.conf to indicate COMP128v1 which we are actually using and which means we're still using algorithm number 1 after this change. BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured similar CTRL, which it doesn't yet, this code could be more robust.) Related: OS#2758 Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 --- M example/resources.conf M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/util.py 4 files changed, 26 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/58/5358/2 diff --git a/example/resources.conf b/example/resources.conf index 35e3a2d..bec17b4 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -71,7 +71,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -79,7 +79,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -87,7 +87,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'ussd', 'gprs'] @@ -95,6 +95,6 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['gprs'] diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index f7dd80a..20eaf02 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -32,10 +32,6 @@ process = None next_subscriber_id = 1 - AUTH_ALGO_NONE = 0 - AUTH_ALGO_XOR = 1 - AUTH_ALGO_COMP128v1 = 2 - def __init__(self, suite_run, ip_address): super().__init__(log.C_RUN, 'osmo-hlr_%s' % ip_address.get('addr')) self.suite_run = suite_run @@ -107,25 +103,23 @@ log.ctx(proc) raise log.Error('Exited in error') - def subscriber_add(self, modem, msisdn=None, algo=None): + def subscriber_add(self, modem, msisdn=None, algo_str=None): if msisdn is None: msisdn = self.suite_run.resources_pool.next_msisdn(modem) modem.set_msisdn(msisdn) subscriber_id = self.next_subscriber_id self.next_subscriber_id += 1 - if not algo: - alg_str = modem.auth_algo() - if alg_str is None or alg_str == 'none': - algo = self.AUTH_ALGO_NONE - elif alg_str == 'comp128v1': - algo = self.AUTH_ALGO_COMP128v1 - elif alg_str == 'xor': - algo = self.AUTH_ALGO_XOR - if algo != self.AUTH_ALGO_NONE and not modem.ki(): - raise log.Error("Auth algo %r selected and no KI specified" % algo) + if algo_str is None: + algo_str = modem.auth_algo() or util.OSMO_AUTH_ALGO_NONE - self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, algo=algo) + if algo_str != util.OSMO_AUTH_ALGO_NONE and not modem.ki(): + raise log.Error("Auth algo %r selected but no KI specified" % algo_str) + + algo = util.osmo_auth_algo_by_name(algo_str) + + self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, + algo_str=algo_str, algo=algo) conn = sqlite3.connect(self.db_file) try: c = conn.cursor() diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index f92d1db..6c0b2b7 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -20,7 +20,7 @@ import re from . import log -from .util import is_dict, is_list, str2bool +from .util import is_dict, is_list, str2bool, ENUM_OSMO_AUTH_ALGO KEY_RE = re.compile('[a-zA-Z][a-zA-Z0-9_]*') IPV4_RE = re.compile('([0-9]{1,3}.){3}[0-9]{1,3}') @@ -62,9 +62,8 @@ match_re('MSISDN', MSISDN_RE, val) def auth_algo(val): - if val in ('none', 'xor', 'comp128v1'): - return - raise ValueError('Unknown Authentication Algorithm: %r' % val) + if val not in ENUM_OSMO_AUTH_ALGO: + raise ValueError('Unknown Authentication Algorithm: %r' % val) def uint(val): n = int(val) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index ed1a258..edf7599 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -32,6 +32,15 @@ import readline import subprocess +# This mirrors enum osmo_auth_algo in libosmocore/include/osmocom/crypt/auth.h +# so that the index within the tuple matches the enum value. +OSMO_AUTH_ALGO_NONE = 'none' +ENUM_OSMO_AUTH_ALGO = (OSMO_AUTH_ALGO_NONE, 'comp128v1', 'comp128v2', 'comp128v3', 'xor', 'milenage') + +def osmo_auth_algo_by_name(algo_str): + 'Return enum osmo_auth_algo numeric value as from libosmocore, raise ValueError if not defined.' + return ENUM_OSMO_AUTH_ALGO.index(algo_str.lower()) + def prepend_library_path(path): lp = os.getenv('LD_LIBRARY_PATH') if not lp: -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 14:59:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 14:59:47 +0000 Subject: [PATCH] osmo-gsm-tester[master]: cosmetic: adjust resource_test to comp128v1 In-Reply-To: References: Message-ID: cosmetic: adjust resource_test to comp128v1 Since libosmocore doesn't support XOR at all, it seems weird to use it in the test, even though it's just a selftest without libosmocore involved... Change-Id: I51edec255e7ef277907817b3187c2f492465467f --- M selftest/conf/resources.conf M selftest/resource_test.ok 2 files changed, 20 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/59/5359/2 diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index 9e4e015..51f4abc 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -65,7 +65,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -74,7 +74,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -83,7 +83,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -92,7 +92,7 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 650a8bc..884c6b3 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -80,29 +80,29 @@ 'addr': '10.42.42.5'}, {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c', 'addr': '10.42.42.6'}], - 'modem': [{'_hash': 'f392ed391f9d39abb6ae01431b26b4f44079a447', - 'auth_algo': 'xor', + 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009031', 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD', 'label': 'sierra_1', 'path': '/sierra_1'}, - {'_hash': '1b3cf2a04bde791a84fcc462c29f73391b1f7313', - 'auth_algo': 'xor', + {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009029', 'ki': '00969E283349D354A8239E877F2E0866', 'label': 'sierra_2', 'path': '/sierra_2'}, - {'_hash': '83f7b4a07c355487d31db6f068146e48bb1ed118', - 'auth_algo': 'xor', + {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009030', 'ki': 'BB70807226393CDBAC8DD3439FF54252', 'label': 'gobi_0', 'path': '/gobi_0'}, - {'_hash': 'a5f8f08a24df0eca067c5b51d55c3c4fd8721908', - 'auth_algo': 'xor', + {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009032', 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A', @@ -143,8 +143,8 @@ --- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c addr: 10.42.42.2 --- testowner: Reserving 2 x modem (candidates: 4) ---- testowner: DBG: Picked - _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 - auth_algo: xor +--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -152,8 +152,8 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 - auth_algo: xor +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -199,9 +199,9 @@ _reserved_by: testowner-123-1490837279 addr: 10.42.42.2 modem: -- _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 +- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -209,9 +209,9 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 -- To view, visit https://gerrit.osmocom.org/5359 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I51edec255e7ef277907817b3187c2f492465467f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:04:06 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 15:04:06 +0000 Subject: [PATCH] osmo-bts[master]: debian/control: Remove uneeded dep libosmo-netif-dev Message-ID: Review at https://gerrit.osmocom.org/5361 debian/control: Remove uneeded dep libosmo-netif-dev I didn't see any related libosmo-netif code dependency in the project. Change-Id: I2da1935bcc3ce507cfb21419a1e340aa3361cd65 --- M debian/control 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/5361/1 diff --git a/debian/control b/debian/control index 074f687..fbf82e2 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ pkg-config, libosmocore-dev, libosmo-abis-dev, - libosmo-netif-dev, libgps-dev, libortp-dev, txt2man -- To view, visit https://gerrit.osmocom.org/5361 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2da1935bcc3ce507cfb21419a1e340aa3361cd65 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:04:10 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 15:04:10 +0000 Subject: [PATCH] osmo-bts[master]: jenkins.sh: Disable building doxygen for deps Message-ID: Review at https://gerrit.osmocom.org/5362 jenkins.sh: Disable building doxygen for deps Change-Id: I2ed207a5febe8017a20a0e7de0ba575fd7966af6 --- M contrib/jenkins_bts_trx.sh M contrib/jenkins_lc15.sh M contrib/jenkins_oct.sh M contrib/jenkins_oct_and_bts_trx.sh M contrib/jenkins_sysmobts.sh 5 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/5362/1 diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh index 9a181f2..7309ba0 100755 --- a/contrib/jenkins_bts_trx.sh +++ b/contrib/jenkins_bts_trx.sh @@ -7,7 +7,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh index feef302..11cf934 100755 --- a/contrib/jenkins_lc15.sh +++ b/contrib/jenkins_lc15.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 1e139af..4595c0d 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" diff --git a/contrib/jenkins_oct_and_bts_trx.sh b/contrib/jenkins_oct_and_bts_trx.sh index ac8ef6d..fef9f5d 100755 --- a/contrib/jenkins_oct_and_bts_trx.sh +++ b/contrib/jenkins_oct_and_bts_trx.sh @@ -7,7 +7,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index d7caf0f..faeb7c9 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -- To view, visit https://gerrit.osmocom.org/5362 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ed207a5febe8017a20a0e7de0ba575fd7966af6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:06:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 15:06:05 +0000 Subject: osmo-ggsn[master]: ggsn: Add 'ipv6 link-local' vty cmd In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5349/1/ggsn/ggsn.c File ggsn/ggsn.c: PS1, Line 247: tun_addaddr > did you verify that the kernel automatically detects this as a link-local a In my PC, I use this cfg line: ipv6 link-local fe80::1111:1111:1111:1111/64 And I get: 28: tun46: mtu 1500 state UNKNOWN qlen 500 inet6 fde4:8dba:82e1:2000::/56 scope global valid_lft forever preferred_lft forever inet6 fe80::1111:1111:1111:1111/64 scope link valid_lft forever preferred_lft forever inet6 fe80::7188:724c:8617:788a/64 scope link stable-privacy valid_lft forever preferred_lft forever -- To view, visit https://gerrit.osmocom.org/5349 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:06:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 15:06:37 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: move EGPRS enablement into (U|D)L-TBF In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: TBF: move EGPRS enablement into (U|D)L-TBF ...................................................................... TBF: move EGPRS enablement into (U|D)L-TBF This is preparation patch for transition to separate UL/DL window variables instead of current shared generic window. The setting of window parameters is performed in functions specific to UL/DL TBFs but the general EGPRS flag remains the same and is set via the same function which is now marked as protected since it's only meant to be used by UL/DL subclasses. Related: OS#1759 Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 --- M src/tbf.cpp M src/tbf.h 2 files changed, 15 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..98005dc 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -862,7 +862,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); @@ -956,7 +955,6 @@ if (egprs_ms_class > 0 && bts->egprs_enabled) { tbf->enable_egprs(); - tbf->m_window.set_sns(RLC_EGPRS_SNS); setup_egprs_mode(bts, ms); LOGP(DRLCMAC, LOGL_INFO, "Enabled EGPRS for %s, mode %s\n", tbf->name(), GprsCodingScheme::modeName(ms->mode())); diff --git a/src/tbf.h b/src/tbf.h index 80249df..558bd21 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -210,7 +210,6 @@ /* EGPRS */ bool is_egprs_enabled() const; - void enable_egprs(); void disable_egprs(); /* attempt to make things a bit more fair */ @@ -286,7 +285,7 @@ protected: gprs_rlcmac_bts *bts_data() const; - + void enable_egprs(); int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); @@ -416,7 +415,7 @@ gprs_rlcmac_dl_tbf(BTS *bts); void cleanup(); - + void enable_egprs(); /* dispatch Unitdata.DL messages */ static int handle(struct gprs_rlcmac_bts *bts, const uint32_t tlli, const uint32_t old_tlli, @@ -513,7 +512,7 @@ struct msgb *create_ul_ack(uint32_t fn, uint8_t ts); bool ctrl_ack_to_toggle(); bool handle_ctrl_ack(); - + void enable_egprs(); /* blocks were acked */ int rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, @@ -577,6 +576,18 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline void gprs_rlcmac_ul_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + +inline void gprs_rlcmac_dl_tbf::enable_egprs() +{ + m_window.set_sns(RLC_EGPRS_SNS); + gprs_rlcmac_tbf::enable_egprs(); +} + inline gprs_rlcmac_ul_tbf *as_ul_tbf(gprs_rlcmac_tbf *tbf) { if (tbf && tbf->direction == GPRS_RLCMAC_UL_TBF) -- To view, visit https://gerrit.osmocom.org/5335 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:06:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 15:06:37 +0000 Subject: [MERGED] osmo-pcu[master]: DL window: constify resend_needed() function In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: DL window: constify resend_needed() function ...................................................................... DL window: constify resend_needed() function It doesn't change any state so mark it as const. Change-Id: I5d672bfd654198aebb187772de464c52b3209435 --- M src/rlc.cpp M src/rlc.h 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlc.cpp b/src/rlc.cpp index acd4169..c52417d 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -58,7 +58,7 @@ m_v_b.reset(); } -int gprs_rlc_dl_window::resend_needed() +int gprs_rlc_dl_window::resend_needed() const { for (uint16_t bsn = v_a(); bsn != v_s(); bsn = mod_sns(bsn + 1)) { if (m_v_b.is_nacked(bsn) || m_v_b.is_resend(bsn)) diff --git a/src/rlc.h b/src/rlc.h index ee86c2a..14d2082 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -303,7 +303,7 @@ const uint16_t distance() const; /* Methods to manage reception */ - int resend_needed(); + int resend_needed() const; int mark_for_resend(); void update(BTS *bts, char *show_rbb, uint16_t ssn, uint16_t *lost, uint16_t *received); -- To view, visit https://gerrit.osmocom.org/5334 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d672bfd654198aebb187772de464c52b3209435 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:43:57 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 15:43:57 +0000 Subject: osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5358/2/src/osmo_gsm_tester/util.py File src/osmo_gsm_tester/util.py: Line 38: ENUM_OSMO_AUTH_ALGO = (OSMO_AUTH_ALGO_NONE, 'comp128v1', 'comp128v2', 'comp128v3', 'xor', 'milenage') I see no changes in the NITB, why? If this is only used in OsmoHlr, I'd prefer having a generic list of algos (non osmocom specific, sort order not important) in here or directly in schema, then have the function to transform to algo id in OsmoHlr. -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 14 15:44:11 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 15:44:11 +0000 Subject: osmo-gsm-tester[master]: cosmetic: adjust resource_test to comp128v1 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5359 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I51edec255e7ef277907817b3187c2f492465467f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 16:51:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 16:51:31 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests / RSL_Types: Add enumerated for RSL Cause value Message-ID: Review at https://gerrit.osmocom.org/5363 BSC_Tests / RSL_Types: Add enumerated for RSL Cause value this looks much more human-readable in the logs... Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502 --- M bsc/BSC_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 44 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/5363/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c8016d7..b70c63a 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -377,7 +377,7 @@ dt := f_est_dchan('23'O, 23, '00010203040506'O); /* simulate CONN FAIL IND */ - f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(dt.rsl_chan_nr, 0)); + f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(dt.rsl_chan_nr, RSL_ERR_RADIO_LINK_FAIL)); /* TODO: different cause values? */ /* expect BSC to disable the channel */ diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index e3740eb..3e9baaa 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -382,7 +382,49 @@ } /* 9.3.26 */ - type uint7_t RSL_Cause; + type enumerated RSL_Cause { + /* normal event */ + RSL_ERR_RADIO_IF_FAIL ('00'O), + RSL_ERR_RADIO_LINK_FAIL ('01'O), + RSL_ERR_HANDOVER_ACC_FAIL ('02'O), + RSL_ERR_TALKER_ACC_FAIL ('03'O), + RSL_ERR_OM_INTERVENTION ('07'O), + RSL_ERR_NORMAL_UNSPEC ('0f'O), + RSL_ERR_T_MSRFPCI_EXP ('18'O), + /* resource unavailable */ + RSL_ERR_EQUIPMENT_FAIL ('20'O), + RSL_ERR_RR_UNAVAIL ('21'O), + RSL_ERR_TERR_CH_FAIL ('22'O), + RSL_ERR_CCCH_OVERLOAD ('23'O), + RSL_ERR_ACCH_OVERLOAD ('24'O), + RSL_ERR_PROCESSOR_OVERLOAD ('25'O), + RSL_ERR_BTS_NOT_EQUIPPED ('27'O), + RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), + RSL_ERR_NOTIF_OVERFLOW ('29'O), + RSL_ERR_RES_UNAVAIL ('2f'O), + /* service or option not available */ + RSL_ERR_TRANSC_UNAVAIL ('30'O), + RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), + /* service or option not implemented */ + RSL_ERR_ENCR_UNIMPL ('40'O), + RSL_ERR_SERV_OPT_UNIMPL ('4f'O), + /* invalid message */ + RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), + RSL_ERR_INVALID_MESSAGE ('5f'O), + /* protocol error */ + RSL_ERR_MSG_DISCR ('60'O), + RSL_ERR_MSG_TYPE ('61'O), + RSL_ERR_MSG_SEQ ('62'O), + RSL_ERR_IE_ERROR ('63'O), + RSL_ERR_MAND_IE_ERROR ('64'O), + RSL_ERR_OPT_IE_ERROR ('65'O), + RSL_ERR_IE_NONEXIST ('66'O), + RSL_ERR_IE_LENGTH ('67'O), + RSL_ERR_IE_CONTENT ('68'O), + RSL_ERR_PROTO ('6f'O), + /* interworking */ + RSL_ERR_INTERWORKING ('7f'O) + }; type record RSL_IE_Cause { uint8_t len, uint1_t e, -- To view, visit https://gerrit.osmocom.org/5363 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 16:51:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 16:51:31 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_paging_counter to test paging related coun... Message-ID: Review at https://gerrit.osmocom.org/5364 BSC_Tests: Add TC_paging_counter to test paging related counters Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d --- M bsc/BSC_Tests.ttcn M bsc/osmo-bsc.cfg 2 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/5364/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b70c63a..a161c39 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -901,6 +901,45 @@ } } +/* Verify PCH load */ +testcase TC_paging_counter() runs on test_CT { + var BSSMAP_FIELD_CellIdentificationList cid_list; + timer T := 4.0; + var integer i; + var integer paging_attempted_bsc; + var integer paging_attempted_bts[NUM_BTS]; + var integer paging_expired_bts[NUM_BTS]; + cid_list := valueof(ts_BSSMAP_CIL_noCell); + + f_init(); + + /* read counters before paging */ + paging_attempted_bsc := f_ctrl_get_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted"); + for (i := 0; i < NUM_BTS; i := i+1) { + paging_attempted_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted"); + paging_expired_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired"); + } + + f_pageing_helper('001230000000001'H, cid_list, c_BtsId_all); + + /* expect the attempted pages on BSC and each BTSs to have incremented by one */ + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted", paging_attempted_bsc+1); + for (i := 0; i < NUM_BTS; i := i+1) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted", + paging_attempted_bts[i]+1); + } + + /* assume that 12s later the paging on all BTSs have expired and hence incremented by 1 */ + f_sleep(12.0); + for (i := 0; i < NUM_BTS; i := i+1) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired", + paging_expired_bts[i]+1); + } + setverdict(pass); + +} + + /* Verify paging stops after A-RESET */ testcase TC_paging_imsi_a_reset() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index ac1553e..9b45904 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -86,6 +86,7 @@ handover maximum distance 9999 dyn_ts_allow_tch_f 1 periodic location update 30 + timer t3113 10 bts 0 type sysmobts band DCS1800 -- To view, visit https://gerrit.osmocom.org/5364 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 16:51:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 16:51:31 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate... Message-ID: Review at https://gerrit.osmocom.org/5365 BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate NACK Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68 --- M bsc/BSC_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/5365/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a161c39..9cdfe27 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -307,6 +307,31 @@ setverdict(pass); } +/* CHAN RQD -> CHAN ACT -> CHAN ACT NACK -> RF CHAN REL */ +testcase TC_chan_act_nack() runs on test_CT { + var RSL_Message rx_rsl; + var integer chact_nack; + + f_init(); + f_bssap_reset(); + + chact_nack := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack"); + + f_ipa_tx(0, ts_RSL_CHAN_RQD('33'O, 33)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); + var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; + + f_ipa_tx(0, ts_RSL_CHAN_ACT_NACK(chan_nr, RSL_ERR_EQUIPMENT_FAIL)); + + /* wait for some time to hope the NACK arrives before the CTRL GET below */ + f_sleep(0.5); + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); + + setverdict(pass); +} + + type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -986,6 +1011,7 @@ execute( TC_chan_act_ack_noest() ); execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); + execute( TC_chan_act_nack() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5365 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 16:51:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 16:51:32 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_exhaustion to test for channel exhaus... Message-ID: Review at https://gerrit.osmocom.org/5366 BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion We ensure that all channels are allocated, and that the first allocation beyond the avialable channels will fail and generate an IMM_ASS_REJ. WE also verify that the related counters are incremented as expected. Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 --- M bsc/BSC_Tests.ttcn 1 file changed, 48 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5366/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 9cdfe27..85fb249 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -331,6 +331,53 @@ setverdict(pass); } +/* Test for channel exhaustion due to RACH overload */ +testcase TC_chan_exhaustion() runs on test_CT { + var ASP_RSL_Unitdata rsl_ud; + var integer i; + var integer chreq_total, chreq_nochan; + + f_init(); + f_bssap_reset(); + + chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); + chreq_nochan := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel"); + + /* expect 5xTCH/F to succeed */ + for (i := 0; i < NUM_TCHF_PER_BTS; i := i+1) { + f_chreq_act_ack('23'O, i); + } + + IPA_RSL[0].clear; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+NUM_TCHF_PER_BTS); + + /* now expect additional channel activations to fail */ + f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42)); + + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) { + setverdict(fail, "Received CHAN ACT ACK without resources?!?"); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud { + var GsmRrMessage rr; + /* match on IMM ASS REJ */ + rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload); + if (rr.header.message_type == IMMEDIATE_ASSIGNMENT_REJECT) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", + chreq_total+NUM_TCHF_PER_BTS+1); + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel", + chreq_nochan+1); + setverdict(pass); + } else { + repeat; + } + } + [] IPA_RSL[0].receive { repeat; } + } +} + type record DchanTuple { integer sccp_conn_id, @@ -1012,6 +1059,7 @@ execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); execute( TC_chan_act_nack() ); + execute( TC_chan_exhaustion() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5366 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 16:56:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 14 Dec 2017 16:56:58 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: cleanup state flag handling Message-ID: Review at https://gerrit.osmocom.org/5367 TBF: cleanup state flag handling * introduce generic function to check whether particular flag was set for'a TBF and clear it if necessary. Use this instead of clear_poll_timeout_flag() * add function to explicitly set assignment and appropriate state flags Overall this makes the code easier to read and debug. Change-Id: Ic4560280c72f91700f2e19c6c7f6658dc29625c2 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 36 insertions(+), 33 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/67/5367/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..c0aee96 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1025,25 +1025,21 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_CCCH)) { /* We now know that the PACCH really existed */ LOGP(DRLCMAC, LOGL_INFO, "The TBF has been confirmed on the PACCH, " "changed type from CCCH to PACCH for %s\n", tbf_name(new_tbf)); - new_tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH); new_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ new_tbf->stop_timer("control acked (DL-TBF)"); - if ((new_tbf->state_flags & - (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { - new_tbf->state_flags &= - ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ASS); + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ASS)) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered downlink " "assignment for %s\n", tbf_name(new_tbf)); - } + tbf_assign_control_ts(new_tbf); return; } @@ -1064,13 +1060,10 @@ tbf_free(tbf); new_tbf->set_state(GPRS_RLCMAC_FLOW); - if ((new_tbf->state_flags & - (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) { - new_tbf->state_flags &= - ~(1 << GPRS_RLCMAC_FLAG_TO_UL_ASS); + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ASS)) LOGP(DRLCMAC, LOGL_NOTICE, "Recovered uplink " "assignment for UL %s\n", tbf_name(new_tbf)); - } + tbf_assign_control_ts(new_tbf); /* there might be LLC packets waiting in the queue, but the DL * TBF might have been released while the UL TBF has been diff --git a/src/tbf.cpp b/src/tbf.cpp index 7b609c8..3408edf 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -392,8 +392,7 @@ return NULL; } tbf->m_contention_resolution_done = 1; - tbf->set_state(GPRS_RLCMAC_ASSIGN); - tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + tbf->set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, false); tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -1470,8 +1469,7 @@ llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); ul_tbf->bts->tbf_ul_created(); - ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); - ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + ul_tbf->set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, false); ul_tbf->set_ms(ms); ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); diff --git a/src/tbf.h b/src/tbf.h index 80249df..a93fc60 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -155,6 +155,8 @@ bool state_is(enum gprs_rlcmac_tbf_state rhs) const; bool state_is_not(enum gprs_rlcmac_tbf_state rhs) const; void set_state(enum gprs_rlcmac_tbf_state new_state); + bool check_n_clear(uint8_t state_flag); + void set_assigned_on(uint8_t state_flag, bool check_ccch); const char *state_name() const; const char *name() const; @@ -349,12 +351,33 @@ return tbf_state_name[state]; } +/* Set assignment state and corrsponding flags */ +inline void gprs_rlcmac_tbf::set_assigned_on(uint8_t state_flag, bool check_ccch) +{ + set_state(GPRS_RLCMAC_ASSIGN); + if (check_ccch) { + if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) + state_flags |= (1 << state_flag); + } else + state_flags |= (1 << state_flag); +} + inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state) { LOGP(DRLCMAC, LOGL_DEBUG, "%s changes state from %s to %s\n", tbf_name(this), tbf_state_name[state], tbf_state_name[new_state]); state = new_state; +} + +inline bool gprs_rlcmac_tbf::check_n_clear(uint8_t state_flag) +{ + if ((state_flags & (1 << state_flag))) { + state_flags &= ~(1 << state_flag); + return true; + } + + return false; } inline LListHead& gprs_rlcmac_tbf::list() @@ -432,7 +455,7 @@ int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb); struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts); void trigger_ass(struct gprs_rlcmac_tbf *old_tbf); - void clear_poll_timeout_flag(); + bool handle_ack_nack(); void request_dl_ack(); bool need_control_ts() const; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..33467f8 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -497,9 +497,7 @@ old_tbf->was_releasing = old_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); - if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) - state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, true); /* start timer */ tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); @@ -509,8 +507,7 @@ was_releasing = state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); - state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); + set_assigned_on(GPRS_RLCMAC_FLAG_CCCH, false); /* send immediate assignment */ bts->snd_dl_ass(this, 0, imsi()); @@ -641,18 +638,12 @@ return bsn; } -void gprs_rlcmac_dl_tbf::clear_poll_timeout_flag() -{ - state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ACK); -} - bool gprs_rlcmac_dl_tbf::handle_ack_nack() { bool ack_recovered = false; state_flags |= (1 << GPRS_RLCMAC_FLAG_DL_ACK); - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ACK))) { - clear_poll_timeout_flag(); + if (check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ACK)) { ack_recovered = true; } @@ -863,7 +854,7 @@ if (is_final) tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); - clear_poll_timeout_flag(); + state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ACK); /* clear poll timeout flag */ /* Clear request flag */ m_dl_ack_requested = false; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817..dad44af 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -97,10 +97,8 @@ bool gprs_rlcmac_ul_tbf::ctrl_ack_to_toggle() { - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK))) { - state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_UL_ACK); + if (check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ACK)) return true; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was set, now cleared */ - } state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK); return false; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was unset, now set */ -- To view, visit https://gerrit.osmocom.org/5367 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4560280c72f91700f2e19c6c7f6658dc29625c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:21 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_exhaustion to test for channel exhaus... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5366 to look at the new patch set (#2). BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion We ensure that all channels are allocated, and that the first allocation beyond the avialable channels will fail and generate an IMM_ASS_REJ. WE also verify that the related counters are incremented as expected. Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 --- M bsc/BSC_Tests.ttcn 1 file changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5366/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 9cdfe27..5988b28 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -25,6 +25,9 @@ const integer NUM_BTS := 3; const float T3101_MAX := 12.0; +/* make sure to sync this with the osmo-bts.cfg you're using */ +const integer NUM_TCHF_PER_BTS := 5; + /* BSC specific CTRL helper functions */ function f_ctrl_get_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix) return CtrlValue { @@ -329,6 +332,53 @@ f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); setverdict(pass); +} + +/* Test for channel exhaustion due to RACH overload */ +testcase TC_chan_exhaustion() runs on test_CT { + var ASP_RSL_Unitdata rsl_ud; + var integer i; + var integer chreq_total, chreq_nochan; + + f_init(); + f_bssap_reset(); + + chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); + chreq_nochan := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel"); + + /* expect 5xTCH/F to succeed */ + for (i := 0; i < NUM_TCHF_PER_BTS; i := i+1) { + f_chreq_act_ack('23'O, i); + } + + IPA_RSL[0].clear; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+NUM_TCHF_PER_BTS); + + /* now expect additional channel activations to fail */ + f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42)); + + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) { + setverdict(fail, "Received CHAN ACT ACK without resources?!?"); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud { + var GsmRrMessage rr; + /* match on IMM ASS REJ */ + rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload); + if (rr.header.message_type == IMMEDIATE_ASSIGNMENT_REJECT) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", + chreq_total+NUM_TCHF_PER_BTS+1); + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel", + chreq_nochan+1); + setverdict(pass); + } else { + repeat; + } + } + [] IPA_RSL[0].receive { repeat; } + } } @@ -1012,6 +1062,7 @@ execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); execute( TC_chan_act_nack() ); + execute( TC_chan_exhaustion() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5366 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:22 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add test case for RSL link drop counter Message-ID: Review at https://gerrit.osmocom.org/5368 BSC_Tests: Add test case for RSL link drop counter Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120 --- M bsc/BSC_Tests.ttcn 1 file changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/68/5368/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 5988b28..b6d28b1 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1053,6 +1053,24 @@ } } +/* Test RSL link drop causes counter increment */ +testcase TC_rsl_drop_counter() runs on test_CT { + var integer rsl_fail; + + f_init(); + f_bssap_reset(); + + rsl_fail := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail"); + + bts[0].rsl.vc_IPA.stop; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail", rsl_fail+1); + + setverdict(pass); +} + +/* TODO: Test OML link drop causes counter increment */ + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); @@ -1088,6 +1106,8 @@ execute( TC_paging_imsi_nochan_all() ); execute( TC_paging_imsi_a_reset() ); execute( TC_paging_imsi_load() ); + + execute( TC_rsl_drop_counter() ); } } -- To view, visit https://gerrit.osmocom.org/5368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:38 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5365 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:39 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_paging_counter to test paging related coun... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5364 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:41 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests / RSL_Types: Add enumerated for RSL Cause value In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5363 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:43 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests / RSL_Types: Add enumerated for RSL Cause value In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests / RSL_Types: Add enumerated for RSL Cause value ...................................................................... BSC_Tests / RSL_Types: Add enumerated for RSL Cause value this looks much more human-readable in the logs... Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502 --- M bsc/BSC_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 44 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c8016d7..b70c63a 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -377,7 +377,7 @@ dt := f_est_dchan('23'O, 23, '00010203040506'O); /* simulate CONN FAIL IND */ - f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(dt.rsl_chan_nr, 0)); + f_ipa_tx(0, ts_RSL_CONN_FAIL_IND(dt.rsl_chan_nr, RSL_ERR_RADIO_LINK_FAIL)); /* TODO: different cause values? */ /* expect BSC to disable the channel */ diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index e3740eb..3e9baaa 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -382,7 +382,49 @@ } /* 9.3.26 */ - type uint7_t RSL_Cause; + type enumerated RSL_Cause { + /* normal event */ + RSL_ERR_RADIO_IF_FAIL ('00'O), + RSL_ERR_RADIO_LINK_FAIL ('01'O), + RSL_ERR_HANDOVER_ACC_FAIL ('02'O), + RSL_ERR_TALKER_ACC_FAIL ('03'O), + RSL_ERR_OM_INTERVENTION ('07'O), + RSL_ERR_NORMAL_UNSPEC ('0f'O), + RSL_ERR_T_MSRFPCI_EXP ('18'O), + /* resource unavailable */ + RSL_ERR_EQUIPMENT_FAIL ('20'O), + RSL_ERR_RR_UNAVAIL ('21'O), + RSL_ERR_TERR_CH_FAIL ('22'O), + RSL_ERR_CCCH_OVERLOAD ('23'O), + RSL_ERR_ACCH_OVERLOAD ('24'O), + RSL_ERR_PROCESSOR_OVERLOAD ('25'O), + RSL_ERR_BTS_NOT_EQUIPPED ('27'O), + RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), + RSL_ERR_NOTIF_OVERFLOW ('29'O), + RSL_ERR_RES_UNAVAIL ('2f'O), + /* service or option not available */ + RSL_ERR_TRANSC_UNAVAIL ('30'O), + RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), + /* service or option not implemented */ + RSL_ERR_ENCR_UNIMPL ('40'O), + RSL_ERR_SERV_OPT_UNIMPL ('4f'O), + /* invalid message */ + RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), + RSL_ERR_INVALID_MESSAGE ('5f'O), + /* protocol error */ + RSL_ERR_MSG_DISCR ('60'O), + RSL_ERR_MSG_TYPE ('61'O), + RSL_ERR_MSG_SEQ ('62'O), + RSL_ERR_IE_ERROR ('63'O), + RSL_ERR_MAND_IE_ERROR ('64'O), + RSL_ERR_OPT_IE_ERROR ('65'O), + RSL_ERR_IE_NONEXIST ('66'O), + RSL_ERR_IE_LENGTH ('67'O), + RSL_ERR_IE_CONTENT ('68'O), + RSL_ERR_PROTO ('6f'O), + /* interworking */ + RSL_ERR_INTERWORKING ('7f'O) + }; type record RSL_IE_Cause { uint8_t len, uint1_t e, -- To view, visit https://gerrit.osmocom.org/5363 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bc3de37a3059cc16c6293df45e5c4d620422502 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:43 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_paging_counter to test paging related coun... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add TC_paging_counter to test paging related counters ...................................................................... BSC_Tests: Add TC_paging_counter to test paging related counters Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d --- M bsc/BSC_Tests.ttcn M bsc/osmo-bsc.cfg 2 files changed, 40 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b70c63a..a161c39 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -901,6 +901,45 @@ } } +/* Verify PCH load */ +testcase TC_paging_counter() runs on test_CT { + var BSSMAP_FIELD_CellIdentificationList cid_list; + timer T := 4.0; + var integer i; + var integer paging_attempted_bsc; + var integer paging_attempted_bts[NUM_BTS]; + var integer paging_expired_bts[NUM_BTS]; + cid_list := valueof(ts_BSSMAP_CIL_noCell); + + f_init(); + + /* read counters before paging */ + paging_attempted_bsc := f_ctrl_get_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted"); + for (i := 0; i < NUM_BTS; i := i+1) { + paging_attempted_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted"); + paging_expired_bts[i] := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired"); + } + + f_pageing_helper('001230000000001'H, cid_list, c_BtsId_all); + + /* expect the attempted pages on BSC and each BTSs to have incremented by one */ + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bsc", 0, "paging:attempted", paging_attempted_bsc+1); + for (i := 0; i < NUM_BTS; i := i+1) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:attempted", + paging_attempted_bts[i]+1); + } + + /* assume that 12s later the paging on all BTSs have expired and hence incremented by 1 */ + f_sleep(12.0); + for (i := 0; i < NUM_BTS; i := i+1) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired", + paging_expired_bts[i]+1); + } + setverdict(pass); + +} + + /* Verify paging stops after A-RESET */ testcase TC_paging_imsi_a_reset() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index ac1553e..9b45904 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -86,6 +86,7 @@ handover maximum distance 9999 dyn_ts_allow_tch_f 1 periodic location update 30 + timer t3113 10 bts 0 type sysmobts band DCS1800 -- To view, visit https://gerrit.osmocom.org/5364 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48057cb4eeb96637a663940cf4de4df1a9f2e85d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:44 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate NACK ...................................................................... BSC_Tests: Add TC_chan_act_nack to test RSL Channel Activate NACK Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68 --- M bsc/BSC_Tests.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a161c39..9cdfe27 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -307,6 +307,31 @@ setverdict(pass); } +/* CHAN RQD -> CHAN ACT -> CHAN ACT NACK -> RF CHAN REL */ +testcase TC_chan_act_nack() runs on test_CT { + var RSL_Message rx_rsl; + var integer chact_nack; + + f_init(); + f_bssap_reset(); + + chact_nack := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack"); + + f_ipa_tx(0, ts_RSL_CHAN_RQD('33'O, 33)); + rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV)); + var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr; + + f_ipa_tx(0, ts_RSL_CHAN_ACT_NACK(chan_nr, RSL_ERR_EQUIPMENT_FAIL)); + + /* wait for some time to hope the NACK arrives before the CTRL GET below */ + f_sleep(0.5); + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); + + setverdict(pass); +} + + type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -986,6 +1011,7 @@ execute( TC_chan_act_ack_noest() ); execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); + execute( TC_chan_act_nack() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5365 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0188065f50d29c44d7bf220f2ef881997a14b68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:50 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_exhaustion to test for channel exhaus... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5366 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:52 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add test case for RSL link drop counter In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:54 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add test case for RSL link drop counter In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add test case for RSL link drop counter ...................................................................... BSC_Tests: Add test case for RSL link drop counter Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120 --- M bsc/BSC_Tests.ttcn 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 5988b28..b6d28b1 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1053,6 +1053,24 @@ } } +/* Test RSL link drop causes counter increment */ +testcase TC_rsl_drop_counter() runs on test_CT { + var integer rsl_fail; + + f_init(); + f_bssap_reset(); + + rsl_fail := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail"); + + bts[0].rsl.vc_IPA.stop; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail", rsl_fail+1); + + setverdict(pass); +} + +/* TODO: Test OML link drop causes counter increment */ + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); @@ -1088,6 +1106,8 @@ execute( TC_paging_imsi_nochan_all() ); execute( TC_paging_imsi_a_reset() ); execute( TC_paging_imsi_load() ); + + execute( TC_rsl_drop_counter() ); } } -- To view, visit https://gerrit.osmocom.org/5368 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b692cceaed07c112f8c62b87081cfdb322c8120 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 17:31:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 17:31:54 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_chan_exhaustion to test for channel exhaus... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion ...................................................................... BSC_Tests: Add TC_chan_exhaustion to test for channel exhaustion We ensure that all channels are allocated, and that the first allocation beyond the avialable channels will fail and generate an IMM_ASS_REJ. WE also verify that the related counters are incremented as expected. Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 --- M bsc/BSC_Tests.ttcn 1 file changed, 51 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 9cdfe27..5988b28 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -25,6 +25,9 @@ const integer NUM_BTS := 3; const float T3101_MAX := 12.0; +/* make sure to sync this with the osmo-bts.cfg you're using */ +const integer NUM_TCHF_PER_BTS := 5; + /* BSC specific CTRL helper functions */ function f_ctrl_get_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix) return CtrlValue { @@ -329,6 +332,53 @@ f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack", chact_nack+1); setverdict(pass); +} + +/* Test for channel exhaustion due to RACH overload */ +testcase TC_chan_exhaustion() runs on test_CT { + var ASP_RSL_Unitdata rsl_ud; + var integer i; + var integer chreq_total, chreq_nochan; + + f_init(); + f_bssap_reset(); + + chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); + chreq_nochan := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel"); + + /* expect 5xTCH/F to succeed */ + for (i := 0; i < NUM_TCHF_PER_BTS; i := i+1) { + f_chreq_act_ack('23'O, i); + } + + IPA_RSL[0].clear; + + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+NUM_TCHF_PER_BTS); + + /* now expect additional channel activations to fail */ + f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42)); + + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) { + setverdict(fail, "Received CHAN ACT ACK without resources?!?"); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud { + var GsmRrMessage rr; + /* match on IMM ASS REJ */ + rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload); + if (rr.header.message_type == IMMEDIATE_ASSIGNMENT_REJECT) { + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", + chreq_total+NUM_TCHF_PER_BTS+1); + f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:no_channel", + chreq_nochan+1); + setverdict(pass); + } else { + repeat; + } + } + [] IPA_RSL[0].receive { repeat; } + } } @@ -1012,6 +1062,7 @@ execute( TC_chan_act_ack_est_ind_noreply() ); execute( TC_chan_act_ack_est_ind_refused() ); execute( TC_chan_act_nack() ); + execute( TC_chan_exhaustion() ); execute( TC_chan_rel_rll_rel_ind() ); execute( TC_chan_rel_conn_fail() ); execute( TC_chan_rel_hard_clear() ); -- To view, visit https://gerrit.osmocom.org/5366 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 18:19:16 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 18:19:16 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Create bts abstract classes to avoid code duplication and ea... Message-ID: Review at https://gerrit.osmocom.org/5369 Create bts abstract classes to avoid code duplication and ease development A lot of code can be shared by all osmocom related BTS we currently use (sysmo, octphy, trx). This commits moves all this easily shareable code to an abstract class OsmoBts which all (osmocom) BTS use. Some bits of code do not apply for osmo-bts-sysmo but it's still shared by BTS running in the main unit (octphy, trx), for instance the pcu socket handling. Those are put together in OsmoBtsMainUnit. This way we have: log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx log.Origin<-OsmoBts<-OsmoBtsSysmo Also take the chance to categorize the different APIs in the new abstract class based on their use and scope. Some code changes while moving which were required: - A new protected abstract API "create_pcu", which returns an object of "pcu" interface. Subclasses implement this API returning either a PcySysmo or a PcuOsmo object. This is needed to abstract the pcu() getter into the base class. - For BTS running in the main unit, pcu_sk_tmp_dir object is allocated when first used (API pcu_socket_path()) instead of doing it in the constructor. This is moved into OsmoBtsMainUnit Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2 --- M src/osmo_gsm_tester/bts_octphy.py A src/osmo_gsm_tester/bts_osmo.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 4 files changed, 157 insertions(+), 173 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/69/5369/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index f25823c..fd8d078 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -20,56 +20,21 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop, pcu_osmo +from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo -class OsmoBtsOctphy(log.Origin): - suite_run = None - bsc = None - sgsn = None +class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit): run_dir = None inst = None env = None - pcu_sk_tmp_dir = None - values = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, OsmoBtsOctphy.BIN_BTS_OCTPHY) - self.suite_run = suite_run - self.conf = conf + super().__init__(suite_run, conf, OsmoBtsOctphy.BIN_BTS_OCTPHY) self.env = {} self.values = {} - self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') - if len(self.pcu_socket_path().encode()) > 107: - raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) - - def cleanup(self): - if self.pcu_sk_tmp_dir: - try: - os.remove(self.pcu_socket_path()) - except OSError: - pass - os.rmdir(self.pcu_sk_tmp_dir) - - def pcu(self): - if self._pcu is None: - self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) - return self._pcu - - def pcu_socket_path(self): - return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') - - def remote_addr(self): - return self.conf.get('addr') def start(self): if self.bsc is None: @@ -184,28 +149,5 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py new file mode 100644 index 0000000..16e79cf --- /dev/null +++ b/src/osmo_gsm_tester/bts_osmo.py @@ -0,0 +1,146 @@ +# osmo_gsm_tester: base classes to share code among BTS subclasses. +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from abc import ABCMeta, abstractmethod +from . import log, config, util, template, process, event_loop, pcu_osmo + +class OsmoBts(log.Origin, metaclass=ABCMeta): + suite_run = None + proc_bts = None + bsc = None + sgsn = None + lac = None + rac = None + cellid = None + bvci = None + _pcu = None + +############## +# PROTECTED +############## + def __init__(self, suite_run, conf, name): + super().__init__(log.C_RUN, name) + self.suite_run = suite_run + self.conf = conf + if len(self.pcu_socket_path().encode()) > 107: + raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + +######################## +# PUBLIC - INTERNAL API +######################## + @abstractmethod + def conf_for_bsc(self): + 'Used by bsc objects to get path to socket.' + pass + + @abstractmethod + def pcu_socket_path(self): + 'Used by pcu objects to get path to socket.' + pass + + @abstractmethod + def create_pcu(self): + 'Used by base class. Subclass can create different pcu implementations.' + pass + + def remote_addr(self): + return self.conf.get('addr') + + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + + def cleanup(self): + 'Nothing to do by default. Subclass can override if required.' + pass + +################### +# PUBLIC (test API included) +################### + @abstractmethod + def start(self): + 'Starts BTS proccess and sets self.proc_bts with an object of Process interface' + pass + + def pcu(self): + if self._pcu is None: + self._pcu = self.create_pcu(self.suite_run, self, self.conf) + return self._pcu + + def set_bsc(self, bsc): + self.bsc = bsc + + def set_sgsn(self, sgsn): + self.sgsn = sgsn + + def set_lac(self, lac): + self.lac = lac + + def set_rac(self, rac): + self.rac = rac + + def set_cellid(self, cellid): + self.cellid = cellid + + def set_bvci(self, bvci): + self.bvci = bvci + + +class OsmoBtsMainUnit(OsmoBts, metaclass=ABCMeta): +############## +# PROTECTED +############## + pcu_sk_tmp_dir = None + + def __init__(self, suite_run, conf, name): + super().__init__(suite_run, conf, name) + +######################## +# PUBLIC - INTERNAL API +######################## + @abstractmethod + def conf_for_bsc(self): + pass + + def cleanup(self): + if self.pcu_sk_tmp_dir: + try: + os.remove(self.pcu_socket_path()) + except OSError: + pass + os.rmdir(self.pcu_sk_tmp_dir) + + def create_pcu(self): + return pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) + + def pcu_socket_path(self): + if self.pcu_sk_tmp_dir is None: + self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') + return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') + +################### +# PUBLIC (test API included) +################### + @abstractmethod + def start(self): + pass diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9b1f077..fb13545 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,23 +20,13 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop, pcu_osmo +from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo -class OsmoBtsTrx(log.Origin): - suite_run = None - bsc = None - sgsn = None +class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit): run_dir = None inst = None env = None trx = None - pcu_sk_tmp_dir = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -44,32 +34,8 @@ CONF_BTS_TRX = 'osmo-bts-trx.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, OsmoBtsTrx.BIN_BTS_TRX) - self.suite_run = suite_run - self.conf = conf + super().__init__(suite_run, conf, OsmoBtsTrx.BIN_BTS_TRX) self.env = {} - self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') - if len(self.pcu_socket_path().encode()) > 107: - raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) - - def cleanup(self): - if self.pcu_sk_tmp_dir: - try: - os.remove(self.pcu_socket_path()) - except OSError: - pass - os.rmdir(self.pcu_sk_tmp_dir) - - def pcu(self): - if self._pcu is None: - self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) - return self._pcu - - def pcu_socket_path(self): - return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') - - def remote_addr(self): - return self.conf.get('addr') def trx_remote_ip(self): conf_ip = self.conf.get('trx_remote_ip', None) @@ -162,29 +128,6 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci class OsmoTrx(log.Origin): suite_run = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1d2dbf6..d286d02 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,33 +19,20 @@ import os import pprint -from . import log, config, util, template, process, pcu_sysmo +from . import log, config, util, template, process, pcu_sysmo, bts_osmo -class SysmoBts(log.Origin): - suite_run = None - bsc = None - sgsn = None +class SysmoBts(bts_osmo.OsmoBts): run_dir = None inst = None remote_inst = None - remote_env = None remote_dir = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, self.BTS_SYSMO_BIN) - self.suite_run = suite_run - self.conf = conf - self.remote_env = {} + super().__init__(suite_run, conf, SysmoBts.BTS_SYSMO_BIN) self.remote_user = 'root' def start(self): @@ -91,14 +78,8 @@ self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) - def cleanup(self): - pass - def _direct_pcu_enabled(self): return util.str2bool(self.conf.get('direct_pcu')) - - def pcu_socket_path(self): - return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) @@ -128,13 +109,8 @@ log.ctx(proc) raise log.Error('Exited in error') - def pcu(self): - if self._pcu is None: - self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) - return self._pcu - - def remote_addr(self): - return self.conf.get('addr') + def create_pcu(self): + return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -181,28 +157,5 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5369 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 18:19:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 18:19:17 +0000 Subject: [PATCH] osmo-gsm-tester[master]: cosmetic: bts_octphy: Sort members according to scope Message-ID: Review at https://gerrit.osmocom.org/5370 cosmetic: bts_octphy: Sort members according to scope Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 37 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/70/5370/1 diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index fd8d078..f5fa90b 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -23,6 +23,10 @@ from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit): + +############## +# PROTECTED +############## run_dir = None inst = None env = None @@ -35,33 +39,6 @@ super().__init__(suite_run, conf, OsmoBtsOctphy.BIN_BTS_OCTPHY) self.env = {} self.values = {} - - def start(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') - self.suite_run.poll() - - self.log('Starting to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) - self.configure() - - self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) - btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) - lib = self.inst.child('lib') - if not os.path.isdir(lib): - raise RuntimeError('No lib/ in %r' % self.inst) - - # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. - self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) - util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) - # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: - self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) - util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) - - self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', - '-c', os.path.abspath(self.config_file), - '-i', self.bsc.addr(), '-t', str(self.num_trx())) - self.suite_run.poll() def launch_process(self, binary_name, *args): binary = os.path.abspath(self.inst.child('bin', binary_name)) @@ -131,6 +108,9 @@ self.dbg(r) f.write(r) +######################## +# PUBLIC - INTERNAL API +######################## def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) @@ -150,4 +130,34 @@ self.dbg(conf=values) return values +################### +# PUBLIC (test API included) +################### + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: + self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) + + self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr(), '-t', str(self.num_trx())) + self.suite_run.poll() + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5370 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 18:19:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 18:19:17 +0000 Subject: [PATCH] osmo-gsm-tester[master]: cosmetic: bts_osmotrx: Sort members according to scope Message-ID: Review at https://gerrit.osmocom.org/5371 cosmetic: bts_osmotrx: Sort members according to scope Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 35 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/71/5371/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index fb13545..ea644f1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -23,6 +23,9 @@ from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit): +############## +# PROTECTED +############## run_dir = None inst = None env = None @@ -46,32 +49,6 @@ def launch_trx_enabled(self): return util.str2bool(self.conf.get('launch_trx')) - - def start(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') - self.suite_run.poll() - - self.log('Starting to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) - self.configure() - - if self.launch_trx_enabled(): - self.trx = OsmoTrx(self.suite_run, self.trx_remote_ip(), self.remote_addr()) - self.trx.start() - self.log('Waiting for osmo-trx to start up...') - event_loop.wait(self, self.trx.trx_ready) - - self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) - lib = self.inst.child('lib') - if not os.path.isdir(lib): - raise RuntimeError('No lib/ in %r' % self.inst) - self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - - self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', - '-c', os.path.abspath(self.config_file), - '-i', self.bsc.addr()) - self.suite_run.poll() def launch_process(self, binary_name, *args): binary = os.path.abspath(self.inst.child('bin', binary_name)) @@ -110,6 +87,9 @@ self.dbg(r) f.write(r) +######################## +# PUBLIC - INTERNAL API +######################## def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) @@ -129,6 +109,35 @@ self.dbg(conf=values) return values +################### +# PUBLIC (test API included) +################### + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + if self.launch_trx_enabled(): + self.trx = OsmoTrx(self.suite_run, self.trx_remote_ip(), self.remote_addr()) + self.trx.start() + self.log('Waiting for osmo-trx to start up...') + event_loop.wait(self, self.trx.trx_ready) + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr()) + self.suite_run.poll() + class OsmoTrx(log.Origin): suite_run = None run_dir = None -- To view, visit https://gerrit.osmocom.org/5371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 18:19:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Thu, 14 Dec 2017 18:19:17 +0000 Subject: [PATCH] osmo-gsm-tester[master]: cosmetic: bts_sysmo: Sort members according to scope Message-ID: Review at https://gerrit.osmocom.org/5372 cosmetic: bts_sysmo: Sort members according to scope Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a --- M src/osmo_gsm_tester/bts_sysmo.py 1 file changed, 89 insertions(+), 80 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/72/5372/1 diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index d286d02..7a41033 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -22,6 +22,9 @@ from . import log, config, util, template, process, pcu_sysmo, bts_osmo class SysmoBts(bts_osmo.OsmoBts): +############## +# PROTECTED +############## run_dir = None inst = None remote_inst = None @@ -35,6 +38,92 @@ super().__init__(suite_run, conf, SysmoBts.BTS_SYSMO_BIN) self.remote_user = 'root' + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def create_pcu(self): + return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + + def configure(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') + + self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_bts_sysmo': { + 'oml_remote_ip': self.bsc.addr(), + 'pcu_socket_path': self.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_bts_sysmo': self.conf }) + + self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(SysmoBts.BTS_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +######################## +# PUBLIC - INTERNAL API +######################## + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') + + def conf_for_bsc(self): + values = config.get_defaults('bsc_bts') + config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) + config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + + self.dbg(conf=values) + return values + +################### +# PUBLIC (test API included) +################### def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') @@ -77,85 +166,5 @@ args += ('-M',) self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) - - def _direct_pcu_enabled(self): - return util.str2bool(self.conf.get('direct_pcu')) - - def _process_remote(self, name, popen_args, remote_cwd=None): - run_dir = self.run_dir.new_dir(name) - return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, - popen_args) - - def run_remote(self, name, popen_args, remote_cwd=None): - proc = self._process_remote(name, popen_args, remote_cwd) - proc.launch() - proc.wait() - if proc.result != 0: - log.ctx(proc) - raise log.Error('Exited in error') - - def launch_remote(self, name, popen_args, remote_cwd=None): - proc = self._process_remote(name, popen_args, remote_cwd) - self.suite_run.remember_to_stop(proc) - proc.launch() - return proc - - def run_local(self, name, popen_args): - run_dir = self.run_dir.new_dir(name) - proc = process.Process(name, run_dir, popen_args) - proc.launch() - proc.wait() - if proc.result != 0: - log.ctx(proc) - raise log.Error('Exited in error') - - def create_pcu(self): - return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) - - def pcu_socket_path(self): - return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') - - def configure(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - - self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) - self.dbg(config_file=self.config_file) - - values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') } - config.overlay(values, self.suite_run.config()) - config.overlay(values, { - 'osmo_bts_sysmo': { - 'oml_remote_ip': self.bsc.addr(), - 'pcu_socket_path': self.pcu_socket_path(), - } - }) - config.overlay(values, { 'osmo_bts_sysmo': self.conf }) - - self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) - - with open(self.config_file, 'w') as f: - r = template.render(SysmoBts.BTS_SYSMO_CFG, values) - self.dbg(r) - f.write(r) - - def conf_for_bsc(self): - values = config.get_defaults('bsc_bts') - config.overlay(values, config.get_defaults('osmo_bts_sysmo')) - if self.lac is not None: - config.overlay(values, { 'location_area_code': self.lac }) - if self.rac is not None: - config.overlay(values, { 'routing_area_code': self.rac }) - if self.cellid is not None: - config.overlay(values, { 'cell_identity': self.cellid }) - if self.bvci is not None: - config.overlay(values, { 'bvci': self.bvci }) - config.overlay(values, self.conf) - - sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() - config.overlay(values, sgsn_conf) - - self.dbg(conf=values) - return values # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:18 +0000 Subject: osmo-ggsn[master]: ggsn: Add 'ipv6 link-local' vty cmd In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5349 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:21 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn: Add 'ipv6 link-local' vty cmd In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn: Add 'ipv6 link-local' vty cmd ...................................................................... ggsn: Add 'ipv6 link-local' vty cmd This vty cmd let's you set up a new link-local IP for a specific APN to be used during ICMPv6 Router Advertisement procedure. osmo-ggsn hence requires a link-local IPv6 address to be added to the tun interface, otherwise the apn will not be configured correctly and it won't be able to allocate addresses from the ipv6 pool later on. This feature is useful in case your OS doesn't support autoconfiguring link-local IPs when the interface is brought up (some linux versions are known to fail at this) or in case you configured your OS specifically to avoid automatic set up (sysctl net.ipv6.conf.*.autoconf). If "no ipv6 link-local" is provided (default), osmo-ggsn will rely on the OS or the ipup-script setting up the link-local IP for the tun interface at creation time, then fetching it after ipup-script time and using the first link-local ip found. On the other hand, if the "ipv6 link-local" cmd is provided, osmo-ggsn will add the link-local IP to the interface manually and use that one for later Router Advertisement procedures. Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 --- M ggsn/ggsn.c M ggsn/ggsn.h M ggsn/ggsn_vty.c 3 files changed, 37 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index ef2357b..3e095f0 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -241,13 +241,28 @@ } } + if (apn->v6.cfg.ll_prefix.addr.len) { + LOGPAPN(LOGL_INFO, apn, "Setting tun IPv6 link-local address %s\n", + in46p_ntoa(&apn->v6.cfg.ll_prefix)); + if (tun_addaddr(apn->tun.tun, &apn->v6.cfg.ll_prefix.addr, NULL, + apn->v6.cfg.ll_prefix.prefixlen)) { + LOGPAPN(LOGL_ERROR, apn, "Failed to set tun IPv6 link-local address %s: %s. " + "Ensure you have ipv6 support and not used the disable_ipv6 sysctl?\n", + in46p_ntoa(&apn->v6.cfg.ll_prefix), strerror(errno)); + apn_stop(apn, false); + return -1; + } + apn->v6_lladdr = apn->v6.cfg.ll_prefix.addr.v6; + } + if (apn->tun.cfg.ipup_script) { LOGPAPN(LOGL_INFO, apn, "Running ip-up script %s\n", apn->tun.cfg.ipup_script); tun_runscript(apn->tun.tun, apn->tun.cfg.ipup_script); } - if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6) && + apn->v6.cfg.ll_prefix.addr.len == 0) { rc = tun_ip_local_get(apn->tun.tun, &ipv6_tun_linklocal_ip, 1, IP_TYPE_IPv6_LINK); if (rc < 1) { LOGPAPN(LOGL_ERROR, apn, "Cannot obtain IPv6 link-local address of interface: %s\n", diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h index c0774c4..e252548 100644 --- a/ggsn/ggsn.h +++ b/ggsn/ggsn.h @@ -22,6 +22,7 @@ struct apn_ctx_ip { struct { struct in46_prefix ifconfig_prefix; + struct in46_prefix ll_prefix; struct in46_prefix static_prefix; struct in46_prefix dynamic_prefix; /* v4 DNS server names */ diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index 6e15ae4..db392fa 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -513,6 +513,24 @@ return CMD_SUCCESS; } +DEFUN(cfg_apn_ipv6_linklocal, cfg_apn_ipv6_linklocal_cmd, + "ipv6 link-local X:X::X:X/M", + IP6_STR IFCONFIG_STR "IPv6 Link-local Adress/Prefix-Length\n") +{ + struct apn_ctx *apn = (struct apn_ctx *) vty->index; + str2prefix(&apn->v6.cfg.ll_prefix, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_no_ipv6_linklocal, cfg_apn_no_ipv6_linklocal_cmd, + "no ipv6 link-local", + NO_STR IP6_STR IFCONFIG_STR) +{ + struct apn_ctx *apn = (struct apn_ctx *) vty->index; + memset(&apn->v6.cfg.ll_prefix, 0, sizeof(apn->v6.cfg.ll_prefix)); + return CMD_SUCCESS; +} + #define DNS_STRINGS "Configure DNS Server\n" "primary/secondary DNS\n" "IP address of DNS Sever\n" DEFUN(cfg_apn_ip_dns, cfg_apn_ip_dns_cmd, @@ -893,6 +911,8 @@ install_element(APN_NODE, &cfg_apn_no_ip_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_ipv6_ifconfig_cmd); install_element(APN_NODE, &cfg_apn_no_ipv6_ifconfig_cmd); + install_element(APN_NODE, &cfg_apn_ipv6_linklocal_cmd); + install_element(APN_NODE, &cfg_apn_no_ipv6_linklocal_cmd); install_element(APN_NODE, &cfg_apn_gpdu_seq_cmd); install_element(APN_NODE, &cfg_apn_no_gpdu_seq_cmd); -- To view, visit https://gerrit.osmocom.org/5349 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09ef27f54940d4c47150e5f9016d1cd4298c16b5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:37 +0000 Subject: osmo-bts[master]: jenkins.sh: Disable building doxygen for deps In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5362 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ed207a5febe8017a20a0e7de0ba575fd7966af6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:51 +0000 Subject: osmo-bts[master]: debian/control: Remove uneeded dep libosmo-netif-dev In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5361 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2da1935bcc3ce507cfb21419a1e340aa3361cd65 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:57 +0000 Subject: [MERGED] osmo-bts[master]: debian/control: Remove uneeded dep libosmo-netif-dev In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debian/control: Remove uneeded dep libosmo-netif-dev ...................................................................... debian/control: Remove uneeded dep libosmo-netif-dev I didn't see any related libosmo-netif code dependency in the project. Change-Id: I2da1935bcc3ce507cfb21419a1e340aa3361cd65 --- M debian/control 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 074f687..fbf82e2 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ pkg-config, libosmocore-dev, libosmo-abis-dev, - libosmo-netif-dev, libgps-dev, libortp-dev, txt2man -- To view, visit https://gerrit.osmocom.org/5361 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2da1935bcc3ce507cfb21419a1e340aa3361cd65 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:23:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:23:59 +0000 Subject: [MERGED] osmo-bts[master]: jenkins.sh: Disable building doxygen for deps In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jenkins.sh: Disable building doxygen for deps ...................................................................... jenkins.sh: Disable building doxygen for deps Change-Id: I2ed207a5febe8017a20a0e7de0ba575fd7966af6 --- M contrib/jenkins_bts_trx.sh M contrib/jenkins_lc15.sh M contrib/jenkins_oct.sh M contrib/jenkins_oct_and_bts_trx.sh M contrib/jenkins_sysmobts.sh 5 files changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh index 9a181f2..7309ba0 100755 --- a/contrib/jenkins_bts_trx.sh +++ b/contrib/jenkins_bts_trx.sh @@ -7,7 +7,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh index feef302..11cf934 100755 --- a/contrib/jenkins_lc15.sh +++ b/contrib/jenkins_lc15.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 1e139af..4595c0d 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" diff --git a/contrib/jenkins_oct_and_bts_trx.sh b/contrib/jenkins_oct_and_bts_trx.sh index ac8ef6d..fef9f5d 100755 --- a/contrib/jenkins_oct_and_bts_trx.sh +++ b/contrib/jenkins_oct_and_bts_trx.sh @@ -7,7 +7,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index d7caf0f..faeb7c9 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -4,7 +4,7 @@ # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -- To view, visit https://gerrit.osmocom.org/5362 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ed207a5febe8017a20a0e7de0ba575fd7966af6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:24:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:24:17 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_octphy: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5370 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:24:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:24:21 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_osmotrx: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:24:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:24:25 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_sysmo: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:25:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:25:05 +0000 Subject: osmo-gsm-tester[master]: Create bts abstract classes to avoid code duplication and ea... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5369 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:25:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:25:15 +0000 Subject: libosmo-netif[master]: contrib: jenkins.sh: Disable building doxygen for deps In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5360 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:25:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:25:18 +0000 Subject: [MERGED] libosmo-netif[master]: contrib: jenkins.sh: Disable building doxygen for deps In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib: jenkins.sh: Disable building doxygen for deps ...................................................................... contrib: jenkins.sh: Disable building doxygen for deps Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3fb014b..ac898f7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -23,7 +23,7 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -osmo-build-dep.sh libosmocore +osmo-build-dep.sh libosmocore "" --disable-doxygen osmo-build-dep.sh libosmo-abis set +x -- To view, visit https://gerrit.osmocom.org/5360 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I456b539ebdb86a6a27af0bec1d44d68b407ad912 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:25:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:25:42 +0000 Subject: osmo-gsm-tester[master]: cosmetic: adjust resource_test to comp128v1 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5359 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I51edec255e7ef277907817b3187c2f492465467f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:27:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:27:22 +0000 Subject: osmo-mgw[master]: client: mgcp_response_parse_params: check rtp port In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5318 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:28:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:28:29 +0000 Subject: osmo-pcu[master]: window: move encoding into functions In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5336 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:29:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:29:28 +0000 Subject: osmo-pcu[master]: TBF: unify EGPRS window calculation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5355 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9f4a277082da3c71007f5f3b4f2acac8b994540 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:29:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:29:28 +0000 Subject: osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: Patch Set 2: > I see no changes in the NITB, why? please read the commit log message. > If this is only used in OsmoHlr incidentally it is, and if osmo_hlr chooses to have proper ctrl commands we could actually drop the mapping to numbers from osmo-gsm-tester. >, I'd prefer having a generic list of algos I first had this in osmo_hlr.py, but we're using the same names in schema.py. I did not want to duplicate the algo strings in schema.py, so wanted a common definition. I didn't want to put enum specific code in schema.py, it should just have the list of names. The most useful place common to schema.py and osmo_hlr.py seems to be util.py. (importing osmo_hlr.py from schema.py is not an option). So I see it as a mapping in util.py that is giving us enum osmo_auth_algo from libosmocore. We happen to need it in current osmo_hlr.py and can also use it to define the algo names in schema.py. A future step if osmo_hlr accepts the names on the ctrl interface will be to drop the mapping to numbers. But what is the proper place to define names available on NITB's and MSC's ctrl interface? I think util.py might still be a good place, short of defining a new libosmocore_defs.py. Do you want me to add a libosmocore_defs.py instead? schema.py? Is it fine as it is? -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:29:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:29:46 +0000 Subject: osmo-msc[master]: fix vty write: add missing 'authentication optional/required... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5333 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:29:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 20:29:55 +0000 Subject: [MERGED] osmo-msc[master]: fix vty write: add missing 'authentication optional/required... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix vty write: add missing 'authentication optional/required' output ...................................................................... fix vty write: add missing 'authentication optional/required' output Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2 --- M src/libmsc/msc_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index d070b4d..14ad19e 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -151,6 +151,8 @@ vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); + vty_out(vty, " authentication %s%s", + gsmnet->authentication_required ? "required" : "optional", VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5333 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:31:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:31:55 +0000 Subject: [PATCH] osmo-msc[master]: compiler warning: drop double 'const' in a_iface_tx_cipher_m... Message-ID: Review at https://gerrit.osmocom.org/5373 compiler warning: drop double 'const' in a_iface_tx_cipher_mode() Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0 --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/73/5373/1 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index 40ad9c8..f0da248 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv); + int cipher, const uint8_t *key, int len, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..83ec82f 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -164,7 +164,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv) + int cipher, const uint8_t *key, int len, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; -- To view, visit https://gerrit.osmocom.org/5373 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:31:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:31:56 +0000 Subject: [PATCH] osmo-msc[master]: debug log: enrich Cipher Mode Cmd log in a_iface_tx_cipher_m... Message-ID: Review at https://gerrit.osmocom.org/5374 debug log: enrich Cipher Mode Cmd log in a_iface_tx_cipher_mode() Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 --- M src/libmsc/a_iface.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/5374/1 diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 83ec82f..6f9bdd0 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -172,7 +173,9 @@ OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "Passing Cipher mode command message from MSC to BSC (conn_id=%i)\n", conn->a.conn_id); + LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," + " cipher=%d key=%s\n", + vlr_subscr_name(conn->vsub), conn->a.conn_id, cipher, osmo_hexdump_nospc(key, len)); uint8_t crm = 0x01; uint8_t *crm_ptr = NULL; -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:31:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:31:56 +0000 Subject: [PATCH] osmo-msc[master]: vlr: debug log: log Ciphering Mode details Message-ID: Review at https://gerrit.osmocom.org/5375 vlr: debug log: log Ciphering Mode details Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 5 files changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/75/5375/1 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 59eb37d..16f365e 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1104,6 +1104,8 @@ case VLR_CIPH_A5_1: case VLR_CIPH_A5_3: + LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode: %d=%s\n", + ciph_mode, vlr_ciph_name(ciph_mode)); return vlr->ops.set_ciph_mode(msc_conn_ref, ciph_mode, retrieve_imeisv); diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 7149d83..662074d 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -489,6 +489,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -665,6 +666,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -793,6 +795,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1459,6 +1462,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1635,6 +1639,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1749,6 +1754,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1863,6 +1869,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2329,6 +2336,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2519,6 +2527,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 5ffab4a..c7c7d8d 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -63,6 +63,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -225,6 +226,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -409,6 +411,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -579,6 +582,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 07f5e55..711ca48 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -61,6 +61,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -222,6 +223,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -366,6 +368,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -542,6 +545,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -740,6 +744,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -884,6 +889,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1060,6 +1066,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1279,6 +1286,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1487,6 +1495,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 0621ac2..41bdf49 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -523,6 +523,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -705,6 +706,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -840,6 +842,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1249,6 +1252,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) -- To view, visit https://gerrit.osmocom.org/5375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:34:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:34:36 +0000 Subject: [PATCH] osmo-msc[master]: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms Message-ID: Review at https://gerrit.osmocom.org/5376 fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a --- M include/osmocom/msc/vlr.h M src/libmsc/a_iface.c 2 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/5376/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 9e6b12c..640d35b 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -7,6 +7,7 @@ #include #include #include +#include #include // for GSM_NAME_LENGTH #include @@ -172,6 +173,21 @@ VLR_CIPH_A5_3, /*< A5/3, 'new secure' encryption */ }; +static inline uint8_t vlr_ciph_to_gsm0808_alg_id(enum vlr_ciph ciph) +{ + switch (ciph) { + default: + case VLR_CIPH_NONE: + return GSM0808_ALG_ID_A5_0; + case VLR_CIPH_A5_1: + return GSM0808_ALG_ID_A5_1; + case VLR_CIPH_A5_2: + return GSM0808_ALG_ID_A5_2; + case VLR_CIPH_A5_3: + return GSM0808_ALG_ID_A5_3; + } +} + struct vlr_ops { /* encode + transmit an AUTH REQ towards the MS. * \param[in] at auth tuple providing rand, key_seq and autn. diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 6f9bdd0..e264aee 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -193,7 +193,7 @@ if (include_imeisv) crm_ptr = &crm; - ei.perm_algo[0] = (uint8_t) (1 << cipher); + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); ei.perm_algo_len = 1; msg_resp = gsm0808_create_cipher(&ei, crm_ptr); -- To view, visit https://gerrit.osmocom.org/5376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:34:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:34:37 +0000 Subject: [PATCH] osmo-msc[master]: Cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... Message-ID: Review at https://gerrit.osmocom.org/5377 Cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 20 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/1 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..30a10af 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index e264aee..9083f0e 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -165,38 +165,20 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," - " cipher=%d key=%s\n", - vlr_subscr_name(conn->vsub), conn->a.conn_id, cipher, osmo_hexdump_nospc(key, len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; + LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC, %u ciphers (%s)", + vlr_subscr_name(conn->vsub), conn->a.conn_id, ei->perm_algo_len, + osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..f2cb9ca 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3410,8 +3410,18 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + OSMO_ASSERT(sizeof(ei.key) >= sizeof(tuple->vec.kc)); + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:36:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:36:47 +0000 Subject: [PATCH] osmo-msc[master]: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms In-Reply-To: References: Message-ID: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Provide vlr_ciph_to_gsm0808_alg_id() to translate the enum vlr_ciph to the GSM0808_* constants we need to put in the gsm0808_encrypt_info struct instead. Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a --- M include/osmocom/msc/vlr.h M src/libmsc/a_iface.c 2 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/5376/2 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 9e6b12c..640d35b 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -7,6 +7,7 @@ #include #include #include +#include #include // for GSM_NAME_LENGTH #include @@ -172,6 +173,21 @@ VLR_CIPH_A5_3, /*< A5/3, 'new secure' encryption */ }; +static inline uint8_t vlr_ciph_to_gsm0808_alg_id(enum vlr_ciph ciph) +{ + switch (ciph) { + default: + case VLR_CIPH_NONE: + return GSM0808_ALG_ID_A5_0; + case VLR_CIPH_A5_1: + return GSM0808_ALG_ID_A5_1; + case VLR_CIPH_A5_2: + return GSM0808_ALG_ID_A5_2; + case VLR_CIPH_A5_3: + return GSM0808_ALG_ID_A5_3; + } +} + struct vlr_ops { /* encode + transmit an AUTH REQ towards the MS. * \param[in] at auth tuple providing rand, key_seq and autn. diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 6f9bdd0..e264aee 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -193,7 +193,7 @@ if (include_imeisv) crm_ptr = &crm; - ei.perm_algo[0] = (uint8_t) (1 << cipher); + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); ei.perm_algo_len = 1; msg_resp = gsm0808_create_cipher(&ei, crm_ptr); -- To view, visit https://gerrit.osmocom.org/5376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:36:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:36:47 +0000 Subject: [PATCH] osmo-msc[master]: Cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 20 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/2 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..30a10af 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index e264aee..9083f0e 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -165,38 +165,20 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," - " cipher=%d key=%s\n", - vlr_subscr_name(conn->vsub), conn->a.conn_id, cipher, osmo_hexdump_nospc(key, len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; + LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC, %u ciphers (%s)", + vlr_subscr_name(conn->vsub), conn->a.conn_id, ei->perm_algo_len, + osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..f2cb9ca 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3410,8 +3410,18 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + OSMO_ASSERT(sizeof(ei.key) >= sizeof(tuple->vec.kc)); + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:36:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:36:47 +0000 Subject: [PATCH] osmo-msc[master]: vlr: debug log: log Ciphering Mode details In-Reply-To: References: Message-ID: vlr: debug log: log Ciphering Mode details Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 5 files changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/75/5375/3 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 59eb37d..16f365e 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1104,6 +1104,8 @@ case VLR_CIPH_A5_1: case VLR_CIPH_A5_3: + LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode: %d=%s\n", + ciph_mode, vlr_ciph_name(ciph_mode)); return vlr->ops.set_ciph_mode(msc_conn_ref, ciph_mode, retrieve_imeisv); diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 7149d83..662074d 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -489,6 +489,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -665,6 +666,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -793,6 +795,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1459,6 +1462,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1635,6 +1639,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1749,6 +1754,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1863,6 +1869,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2329,6 +2336,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2519,6 +2527,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 5ffab4a..c7c7d8d 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -63,6 +63,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -225,6 +226,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -409,6 +411,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -579,6 +582,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 07f5e55..711ca48 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -61,6 +61,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -222,6 +223,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -366,6 +368,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -542,6 +545,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -740,6 +744,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -884,6 +889,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1060,6 +1066,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1279,6 +1286,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1487,6 +1495,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 0621ac2..41bdf49 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -523,6 +523,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -705,6 +706,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -840,6 +842,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1249,6 +1252,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) -- To view, visit https://gerrit.osmocom.org/5375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:37:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:37:52 +0000 Subject: [PATCH] osmo-msc[master]: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms In-Reply-To: References: Message-ID: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Provide vlr_ciph_to_gsm0808_alg_id() to translate the enum vlr_ciph to the GSM0808_* constants we need to put in the gsm0808_encrypt_info struct instead. Related: OS#2745 Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a --- M include/osmocom/msc/vlr.h M src/libmsc/a_iface.c 2 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/5376/3 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 9e6b12c..640d35b 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -7,6 +7,7 @@ #include #include #include +#include #include // for GSM_NAME_LENGTH #include @@ -172,6 +173,21 @@ VLR_CIPH_A5_3, /*< A5/3, 'new secure' encryption */ }; +static inline uint8_t vlr_ciph_to_gsm0808_alg_id(enum vlr_ciph ciph) +{ + switch (ciph) { + default: + case VLR_CIPH_NONE: + return GSM0808_ALG_ID_A5_0; + case VLR_CIPH_A5_1: + return GSM0808_ALG_ID_A5_1; + case VLR_CIPH_A5_2: + return GSM0808_ALG_ID_A5_2; + case VLR_CIPH_A5_3: + return GSM0808_ALG_ID_A5_3; + } +} + struct vlr_ops { /* encode + transmit an AUTH REQ towards the MS. * \param[in] at auth tuple providing rand, key_seq and autn. diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 6f9bdd0..e264aee 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -193,7 +193,7 @@ if (include_imeisv) crm_ptr = &crm; - ei.perm_algo[0] = (uint8_t) (1 << cipher); + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); ei.perm_algo_len = 1; msg_resp = gsm0808_create_cipher(&ei, crm_ptr); -- To view, visit https://gerrit.osmocom.org/5376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:41:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:41:19 +0000 Subject: [PATCH] osmo-bsc[master]: log typo fix in gsm0808_cipher_mode() Message-ID: Review at https://gerrit.osmocom.org/5378 log typo fix in gsm0808_cipher_mode() Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f --- M src/libbsc/bsc_api.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5378/1 diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 44c50c1..5ba2cde 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -721,7 +721,7 @@ const uint8_t *key, int len, int include_imeisv) { if (cipher > 0 && key == NULL) { - LOGP(DRSL, LOGL_ERROR, "Need to have an encrytpion key.\n"); + LOGP(DRSL, LOGL_ERROR, "Need to have an encryption key.\n"); return -1; } -- To view, visit https://gerrit.osmocom.org/5378 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:41:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:41:20 +0000 Subject: [PATCH] osmo-bsc[master]: debug log: log Cipher Mode info upon sending down RSL/A-bis Message-ID: Review at https://gerrit.osmocom.org/5379 debug log: log Cipher Mode info upon sending down RSL/A-bis Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689 --- M src/libbsc/bsc_api.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/5379/1 diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 5ba2cde..845b1b7 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -730,6 +731,9 @@ return -1; } + LOGP(DRSL, LOGL_DEBUG, "(subscr %s) Cipher Mode: cipher=%d key=%s include_imeisv=%d\n", + bsc_subscr_name(conn->bsub), cipher, osmo_hexdump_nospc(key, len), include_imeisv); + conn->lchan->encr.alg_id = RSL_ENC_ALG_A5(cipher); if (key) { conn->lchan->encr.key_len = len; -- To view, visit https://gerrit.osmocom.org/5379 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 20:41:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 14 Dec 2017 20:41:20 +0000 Subject: [PATCH] osmo-bsc[master]: fix bssmap_handle_cipher_mode()'s encryption decision Message-ID: Review at https://gerrit.osmocom.org/5380 fix bssmap_handle_cipher_mode()'s encryption decision Properly match up any A5/N with the MSC's list of permitted algos. Properly set the reject cause in case of mismatching algorithm choices. Actually allow choosing A5/1 thru 3 as configured on the VTY, by passing a5_encryption through to gsm0808_cipher_mode() (instead of a hardcoded 1). Properly handle failure rc of gsm0808_cipher_mode() by sending a reject message. Cosmetically clarify which GSM0808_IE_ENCRYPTION_INFORMATION bits mean what by means of local variables; add some comments on expected encryption formats; add comment that the BSC should be able to have more than one a5_encryption. Related: OS#2745 OS#2755 Change-Id: Ide8a615905555e35be4584b458d4d40345686175 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 29 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/80/5380/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 051b74e..4fd43aa 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -397,6 +397,10 @@ struct msgb *resp; int reject_cause = -1; int include_imeisv = 1; + uint8_t *enc_key; + uint16_t enc_key_len; + uint8_t enc_bits_bsc; + uint8_t enc_bits_msc; if (!conn->conn) { LOGP(DMSC, LOGL_ERROR, "No lchan/msc_data in cipher mode command.\n"); @@ -430,19 +434,38 @@ network = conn->conn->bts->network; data = TLVP_VAL(&tp, GSM0808_IE_ENCRYPTION_INFORMATION); + enc_bits_msc = data[0]; + enc_key = &data[1]; + enc_key_len = len - 1; if (TLVP_PRESENT(&tp, GSM0808_IE_CIPHER_RESPONSE_MODE)) include_imeisv = TLVP_VAL(&tp, GSM0808_IE_CIPHER_RESPONSE_MODE)[0] & 0x1; - if (network->a5_encryption == 0 && (data[0] & 0x1) == 0x1) { - gsm0808_cipher_mode(conn->conn, 0, NULL, 0, include_imeisv); - } else if (network->a5_encryption != 0 && (data[0] & 0x2) == 0x2) { - gsm0808_cipher_mode(conn->conn, 1, &data[1], len - 1, include_imeisv); - } else { - LOGP(DMSC, LOGL_ERROR, "Can not select encryption...\n"); + /* FIXME: match up the list of permitted ciphering algorithms received from the MSC with a list + * of ciphering algorithms configured for this BSC (the config of more than one is TODO). Finally + * pick one of the remaining options. */ + + /* Identical to the GSM0808_IE_ENCRYPTION_INFORMATION above: + * a5_encryption == 0 --> 0x01 + * a5_encryption == 1 --> 0x02 + * a5_encryption == 2 --> 0x04 ... */ + enc_bits_bsc = 1 << network->a5_encryption; + enc_bits_msc = data[0]; + + if (!(enc_bits_msc & enc_bits_bsc)) { + LOGP(DMSC, LOGL_ERROR, "MSC does not permit A5/%d (permitted algorithms mask: 0x%x)\n", + network->a5_encryption, enc_bits_msc); + reject_cause = GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED; goto reject; } + /* To complete the confusion, gsm0808_cipher_mode again expects the encryption as a number + * from 0 to 7. */ + if (gsm0808_cipher_mode(conn->conn, network->a5_encryption, enc_key, enc_key_len, + include_imeisv)) { + reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC; + goto reject; + } return 0; reject: -- To view, visit https://gerrit.osmocom.org/5380 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide8a615905555e35be4584b458d4d40345686175 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:23 +0000 Subject: osmo-bsc[master]: debug log: log Cipher Mode info upon sending down RSL/A-bis In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5379 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:33 +0000 Subject: osmo-bsc[master]: log typo fix in gsm0808_cipher_mode() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5378 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:42 +0000 Subject: osmo-bsc[master]: fix bssmap_handle_cipher_mode()'s encryption decision In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5380 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide8a615905555e35be4584b458d4d40345686175 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:44 +0000 Subject: [MERGED] osmo-bsc[master]: fix bssmap_handle_cipher_mode()'s encryption decision In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix bssmap_handle_cipher_mode()'s encryption decision ...................................................................... fix bssmap_handle_cipher_mode()'s encryption decision Properly match up any A5/N with the MSC's list of permitted algos. Properly set the reject cause in case of mismatching algorithm choices. Actually allow choosing A5/1 thru 3 as configured on the VTY, by passing a5_encryption through to gsm0808_cipher_mode() (instead of a hardcoded 1). Properly handle failure rc of gsm0808_cipher_mode() by sending a reject message. Cosmetically clarify which GSM0808_IE_ENCRYPTION_INFORMATION bits mean what by means of local variables; add some comments on expected encryption formats; add comment that the BSC should be able to have more than one a5_encryption. Related: OS#2745 OS#2755 Change-Id: Ide8a615905555e35be4584b458d4d40345686175 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 29 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 051b74e..4fd43aa 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -397,6 +397,10 @@ struct msgb *resp; int reject_cause = -1; int include_imeisv = 1; + uint8_t *enc_key; + uint16_t enc_key_len; + uint8_t enc_bits_bsc; + uint8_t enc_bits_msc; if (!conn->conn) { LOGP(DMSC, LOGL_ERROR, "No lchan/msc_data in cipher mode command.\n"); @@ -430,19 +434,38 @@ network = conn->conn->bts->network; data = TLVP_VAL(&tp, GSM0808_IE_ENCRYPTION_INFORMATION); + enc_bits_msc = data[0]; + enc_key = &data[1]; + enc_key_len = len - 1; if (TLVP_PRESENT(&tp, GSM0808_IE_CIPHER_RESPONSE_MODE)) include_imeisv = TLVP_VAL(&tp, GSM0808_IE_CIPHER_RESPONSE_MODE)[0] & 0x1; - if (network->a5_encryption == 0 && (data[0] & 0x1) == 0x1) { - gsm0808_cipher_mode(conn->conn, 0, NULL, 0, include_imeisv); - } else if (network->a5_encryption != 0 && (data[0] & 0x2) == 0x2) { - gsm0808_cipher_mode(conn->conn, 1, &data[1], len - 1, include_imeisv); - } else { - LOGP(DMSC, LOGL_ERROR, "Can not select encryption...\n"); + /* FIXME: match up the list of permitted ciphering algorithms received from the MSC with a list + * of ciphering algorithms configured for this BSC (the config of more than one is TODO). Finally + * pick one of the remaining options. */ + + /* Identical to the GSM0808_IE_ENCRYPTION_INFORMATION above: + * a5_encryption == 0 --> 0x01 + * a5_encryption == 1 --> 0x02 + * a5_encryption == 2 --> 0x04 ... */ + enc_bits_bsc = 1 << network->a5_encryption; + enc_bits_msc = data[0]; + + if (!(enc_bits_msc & enc_bits_bsc)) { + LOGP(DMSC, LOGL_ERROR, "MSC does not permit A5/%d (permitted algorithms mask: 0x%x)\n", + network->a5_encryption, enc_bits_msc); + reject_cause = GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED; goto reject; } + /* To complete the confusion, gsm0808_cipher_mode again expects the encryption as a number + * from 0 to 7. */ + if (gsm0808_cipher_mode(conn->conn, network->a5_encryption, enc_key, enc_key_len, + include_imeisv)) { + reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC; + goto reject; + } return 0; reject: -- To view, visit https://gerrit.osmocom.org/5380 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide8a615905555e35be4584b458d4d40345686175 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:44 +0000 Subject: [MERGED] osmo-bsc[master]: log typo fix in gsm0808_cipher_mode() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: log typo fix in gsm0808_cipher_mode() ...................................................................... log typo fix in gsm0808_cipher_mode() Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f --- M src/libbsc/bsc_api.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 44c50c1..5ba2cde 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -721,7 +721,7 @@ const uint8_t *key, int len, int include_imeisv) { if (cipher > 0 && key == NULL) { - LOGP(DRSL, LOGL_ERROR, "Need to have an encrytpion key.\n"); + LOGP(DRSL, LOGL_ERROR, "Need to have an encryption key.\n"); return -1; } -- To view, visit https://gerrit.osmocom.org/5378 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 14 21:07:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 14 Dec 2017 21:07:44 +0000 Subject: [MERGED] osmo-bsc[master]: debug log: log Cipher Mode info upon sending down RSL/A-bis In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debug log: log Cipher Mode info upon sending down RSL/A-bis ...................................................................... debug log: log Cipher Mode info upon sending down RSL/A-bis Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689 --- M src/libbsc/bsc_api.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 5ba2cde..845b1b7 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -730,6 +731,9 @@ return -1; } + LOGP(DRSL, LOGL_DEBUG, "(subscr %s) Cipher Mode: cipher=%d key=%s include_imeisv=%d\n", + bsc_subscr_name(conn->bsub), cipher, osmo_hexdump_nospc(key, len), include_imeisv); + conn->lchan->encr.alg_id = RSL_ENC_ALG_A5(cipher); if (key) { conn->lchan->encr.key_len = len; -- To view, visit https://gerrit.osmocom.org/5379 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 01:57:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 01:57:56 +0000 Subject: [PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... Message-ID: Review at https://gerrit.osmocom.org/5381 iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than one LAC per OsmoHNBGW. iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page successfully in a setup with multiple LACs (read: multiple hNodeB) connected to an OsmoHNBGW. Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 --- M src/iu_client.c 1 file changed, 75 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/1 diff --git a/src/iu_client.c b/src/iu_client.c index 3ee900c..c8a8b11 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -47,6 +47,13 @@ uint16_t rnc_id; }; +struct iu_lac_rac_entry { + struct llist_head entry; + + uint16_t lac; + uint8_t rac; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -58,9 +65,10 @@ struct llist_head entry; uint16_t rnc_id; - uint16_t lac; /* Location Area Code (used for CS and PS) */ - uint8_t rac; /* Routing Area Code (used for PS only) */ struct osmo_sccp_addr sccp_addr; + + /* A list of struct iu_lac_rac_entry */ + struct llist_head lac_rac_list; }; void *talloc_iu_ctx; @@ -119,53 +127,75 @@ return NULL; } -static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, uint8_t rac, - struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); + OSMO_ASSERT(rnc); + + INIT_LLIST_HEAD(&rnc->lac_rac_list); rnc->rnc_id = rnc_id; - rnc->lac = lac; - rnc->rac = rac; rnc->sccp_addr = *addr; llist_add(&rnc->entry, &rnc_list); - LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n", - rnc->rnc_id, rnc->lac, rnc->rac); + LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, osmo_sccp_addr_dump(addr)); return rnc; +} + +static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +{ + char buf[256]; + osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); + return !strcmp(buf, osmo_sccp_addr_dump(b)); } static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac, uint8_t rac, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; + struct iu_lac_rac_entry *e; + bool found_rnc; + bool found_lac_rac; + + found_rnc = false; llist_for_each_entry(rnc, &rnc_list, entry) { + if (rnc->rnc_id != rnc_id) continue; - /* We have this RNC Id registered already. Make sure that the - * details match. */ - - /* TODO should a mismatch be an error? */ - if (rnc->lac != lac || rnc->rac != rac) - LOGPIU(LOGL_NOTICE, "RNC %d changes its details:" - " LAC=%d RAC=%d --> LAC=%d RAC=%d\n", - rnc->rnc_id, rnc->lac, rnc->rac, - lac, rac); - rnc->lac = lac; - rnc->rac = rac; - - if (addr && memcmp(&rnc->sccp_addr, addr, sizeof(*addr))) - LOGPIU(LOGL_NOTICE, "RNC %d on New SCCP Addr %s" - " (LAC=%d RAC=%d)\n", - rnc->rnc_id, osmo_sccp_addr_dump(addr), rnc->lac, rnc->rac); - rnc->sccp_addr = *addr; - return rnc; + found_rnc = true; + break; } - /* Not found, make a new one. */ - return iu_rnc_alloc(rnc_id, lac, rac, addr); + if (!found_rnc) { + rnc = iu_rnc_alloc(rnc_id, addr); + found_lac_rac = false; + } else { + if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + LOGPIU(LOGL_NOTICE, "RNC %u on New SCCP Addr %s (LAC=%u RAC=%u)\n", + rnc_id, osmo_sccp_addr_dump(addr), lac, rac); + rnc->sccp_addr = *addr; + } + + found_lac_rac = false; + llist_for_each_entry(e, &rnc->lac_rac_list, entry) { + if (e->lac == lac && e->rac == rac) { + found_lac_rac = true; + break; + } + } + } + + if (!found_lac_rac) { + LOGPIU(LOGL_NOTICE, "RNC %u: new LAC %u RAC %u\n", rnc_id, lac, rac); + e = talloc_zero(rnc, struct iu_lac_rac_entry); + e->lac = lac; + e->rac = rac; + llist_add(&e->entry, &rnc->lac_rac_list); + } + + return rnc; } /*********************************************************************** @@ -602,15 +632,16 @@ struct msgb *msg; msg = ranap_new_msg_paging_cmd(imsi, tmsi, is_ps? 1 : 0, paging_cause); msg->l2h = msg->data; - osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); - return 0; + return osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); } static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi, uint16_t lac, uint8_t rac, bool is_ps) { struct ranap_iu_rnc *rnc; + struct iu_lac_rac_entry *e; int pagings_sent = 0; + int rc; if (tmsi_or_ptimsi) { LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" @@ -628,19 +659,22 @@ } llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->lac != lac) - continue; - if (is_ps && rnc->rac != rac) - continue; + llist_for_each_entry(e, &rnc->lac_rac_list, entry) { + if (e->lac != lac) + continue; + if (is_ps && e->rac != rac) + continue; - /* Found a match! */ - if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0) - == 0) { - LOGPIU(LOGL_DEBUG, - "%s: Paged for IMSI %s on RNC %d, on SCCP addr %s\n", + /* Found a match! */ + rc = iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0); + LOGPIU(rc ? LOGL_ERROR : LOGL_DEBUG, + "%s: %s for IMSI %s on RNC %u LAC %u RAC %u SCCP addr %s\n", is_ps? "IuPS" : "IuCS", - imsi, rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); - pagings_sent ++; + rc ? "Paging failed" : "Paging", + imsi, rnc->rnc_id, lac, rac, + osmo_sccp_addr_dump(&rnc->sccp_addr)); + if (!rc) + pagings_sent ++; } } -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 03:26:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 03:26:44 +0000 Subject: python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" In-Reply-To: References: Message-ID: Neels Hofmeyr has reverted this change. Change subject: Revert "Add osmo_ipa.py to setup's install" ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 03:26:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 03:26:44 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" Message-ID: Review at https://gerrit.osmocom.org/5382 Revert "Add osmo_ipa.py to setup's install" This reverts commit 751491cdf9fba3a46911ac46bf0f640588bec286. osmo_ipa.py is not actually a runnable script, and it should be installed as a python module in lib/, not in bin/. Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 --- M setup.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/82/5382/1 diff --git a/setup.py b/setup.py index 3e147c4..daff5ea 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,6 @@ "osmopy/osmo_interact_ctrl.py", "osmopy/soap.py", "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", "osmopy/twisted_ipa.py", "osmopy/osmo_verify_transcript_vty.py", "osmopy/osmo_verify_transcript_ctrl.py"] -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 03:35:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 03:35:36 +0000 Subject: [PATCH] python/osmo-python-tests[master]: add contrib/jenkins.sh from current jenkins.osmocom.org job Message-ID: Review at https://gerrit.osmocom.org/5383 add contrib/jenkins.sh from current jenkins.osmocom.org job i.e. from https://jenkins.osmocom.org/jenkins/job/update-osmocom-python-on-slaves Change-Id: Iefa0261303982fc66d0845348b9c4a0ff6b94ab5 --- A contrib/jenkins.sh 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/83/5383/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..802ba2d --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,4 @@ +#!/bin/sh +python2 ./setup.py install || python ./setup.py install +rm -rf ./build +python3 ./setup.py install -- To view, visit https://gerrit.osmocom.org/5383 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefa0261303982fc66d0845348b9c4a0ff6b94ab5 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 03:36:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 03:36:06 +0000 Subject: python/osmo-python-tests[master]: add contrib/jenkins.sh from current jenkins.osmocom.org job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5383 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefa0261303982fc66d0845348b9c4a0ff6b94ab5 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 03:36:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 03:36:09 +0000 Subject: [MERGED] python/osmo-python-tests[master]: add contrib/jenkins.sh from current jenkins.osmocom.org job In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: add contrib/jenkins.sh from current jenkins.osmocom.org job ...................................................................... add contrib/jenkins.sh from current jenkins.osmocom.org job i.e. from https://jenkins.osmocom.org/jenkins/job/update-osmocom-python-on-slaves Change-Id: Iefa0261303982fc66d0845348b9c4a0ff6b94ab5 --- A contrib/jenkins.sh 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..802ba2d --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,4 @@ +#!/bin/sh +python2 ./setup.py install || python ./setup.py install +rm -rf ./build +python3 ./setup.py install -- To view, visit https://gerrit.osmocom.org/5383 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iefa0261303982fc66d0845348b9c4a0ff6b94ab5 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 04:37:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 04:37:26 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: jenkins.sh: incorporate publish step, for master build Message-ID: Review at https://gerrit.osmocom.org/5384 jenkins.sh: incorporate publish step, for master build Change-Id: I3c14f4e0266a4eb2702ca9fa9cf05dd54fc5d853 --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/84/5384/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 290fc62..59fcfd7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,6 +2,8 @@ set -ex +publish="$1" + base="$PWD" deps="$base/deps" export deps @@ -17,4 +19,10 @@ $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" check +if [ "x$publish" = "x--publish" ]; then + mkdir out/ + cp */*.pdf out/ + rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ +fi + osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/5384 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c14f4e0266a4eb2702ca9fa9cf05dd54fc5d853 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 04:38:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 04:38:06 +0000 Subject: osmo-gsm-manuals[master]: jenkins.sh: incorporate publish step, for master build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5384 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c14f4e0266a4eb2702ca9fa9cf05dd54fc5d853 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 04:38:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 04:38:12 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: jenkins.sh: incorporate publish step, for master build In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: incorporate publish step, for master build ...................................................................... jenkins.sh: incorporate publish step, for master build Change-Id: I3c14f4e0266a4eb2702ca9fa9cf05dd54fc5d853 --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 290fc62..59fcfd7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,6 +2,8 @@ set -ex +publish="$1" + base="$PWD" deps="$base/deps" export deps @@ -17,4 +19,10 @@ $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" check +if [ "x$publish" = "x--publish" ]; then + mkdir out/ + cp */*.pdf out/ + rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ +fi + osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/5384 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c14f4e0266a4eb2702ca9fa9cf05dd54fc5d853 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 07:49:29 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 07:49:29 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 4: (2 comments) > (2 comments) https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: enum gsm48_chan_mode chan_mode; > (makes me think ... this requires that we only have a single MGCP transacti Yes, since we execute them one after another. This will also be the case in the future. I think this won't hurt in performance and we benefit from a clear structured FSM. https://gerrit.osmocom.org/#/c/5157/1/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 825: mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); > Can it happen that no mgw_pending_trans was set? If yes, we might cancel an It should not because we do this only when an MGW transaction timed out, so that should be ok. Maybe we can define a TRANS_ID_INVALID for mgcp_trans_id_t so that we can initalize the variable before we start, but I think that is not necessary. -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 08:39:36 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 08:39:36 +0000 Subject: [PATCH] libosmocore[master]: codec: add GSM FR bit offet definition Message-ID: Review at https://gerrit.osmocom.org/5385 codec: add GSM FR bit offet definition Add enum to define the GSM FR bit positions as described in RFC 3551 Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed --- M include/Makefile.am A include/osmocom/codec/gsm610_bits.h 2 files changed, 273 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/5385/1 diff --git a/include/Makefile.am b/include/Makefile.am index 4714003..09f5ca6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,7 @@ nobase_include_HEADERS = \ osmocom/codec/codec.h \ + osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ osmocom/core/backtrace.h \ osmocom/core/bit16gen.h \ diff --git a/include/osmocom/codec/gsm610_bits.h b/include/osmocom/codec/gsm610_bits.h new file mode 100644 index 0000000..cef4cf4 --- /dev/null +++ b/include/osmocom/codec/gsm610_bits.h @@ -0,0 +1,272 @@ +/*! \file gsm610_bits.h */ + +#pragma once + +/* This enumeration describs a GSM-FR (GSM 06.10) frame in ints RTP bit order + * representation. See also RFC 3551 Table 3: GSM payload format */ +enum gsm610_rtp_bit_offsets { + GSM610_RTP_SIGNATURE_0, + GSM610_RTP_SIGNATURE_1, + GSM610_RTP_SIGNATURE_2, + GSM610_RTP_SIGNATURE_3, + GSM610_RTP_LARC0_0, + GSM610_RTP_LARC0_1, + GSM610_RTP_LARC0_2, + GSM610_RTP_LARC0_3, + GSM610_RTP_LARC0_4, + GSM610_RTP_LARC0_5, + GSM610_RTP_LARC1_0, + GSM610_RTP_LARC1_1, + GSM610_RTP_LARC1_2, + GSM610_RTP_LARC1_3, + GSM610_RTP_LARC1_4, + GSM610_RTP_LARC1_5, + GSM610_RTP_LARC2_0, + GSM610_RTP_LARC2_1, + GSM610_RTP_LARC2_2, + GSM610_RTP_LARC2_3, + GSM610_RTP_LARC2_4, + GSM610_RTP_LARC3_0, + GSM610_RTP_LARC3_1, + GSM610_RTP_LARC3_2, + GSM610_RTP_LARC3_3, + GSM610_RTP_LARC3_4, + GSM610_RTP_LARC4_0, + GSM610_RTP_LARC4_1, + GSM610_RTP_LARC4_2, + GSM610_RTP_LARC4_3, + GSM610_RTP_LARC5_0, + GSM610_RTP_LARC5_1, + GSM610_RTP_LARC5_2, + GSM610_RTP_LARC5_3, + GSM610_RTP_LARC6_0, + GSM610_RTP_LARC6_1, + GSM610_RTP_LARC6_2, + GSM610_RTP_LARC7_0, + GSM610_RTP_LARC7_1, + GSM610_RTP_LARC7_2, + GSM610_RTP_NC0_0, + GSM610_RTP_NC0_1, + GSM610_RTP_NC0_2, + GSM610_RTP_NC0_3, + GSM610_RTP_NC0_4, + GSM610_RTP_NC0_5, + GSM610_RTP_NC0_6, + GSM610_RTP_BC0_0, + GSM610_RTP_BC0_1, + GSM610_RTP_MC0_0, + GSM610_RTP_MC0_1, + GSM610_RTP_XMAXC00, + GSM610_RTP_XMAXC01, + GSM610_RTP_XMAXC02, + GSM610_RTP_XMAXC03, + GSM610_RTP_XMAXC04, + GSM610_RTP_XMAXC05, + GSM610_RTP_XMC0_0, + GSM610_RTP_XMC0_1, + GSM610_RTP_XMC0_2, + GSM610_RTP_XMC1_0, + GSM610_RTP_XMC1_1, + GSM610_RTP_XMC1_2, + GSM610_RTP_XMC2_0, + GSM610_RTP_XMC2_1, + GSM610_RTP_XMC2_2, + GSM610_RTP_XMC3_0, + GSM610_RTP_XMC3_1, + GSM610_RTP_XMC3_2, + GSM610_RTP_XMC4_0, + GSM610_RTP_XMC4_1, + GSM610_RTP_XMC4_2, + GSM610_RTP_XMC5_0, + GSM610_RTP_XMC5_1, + GSM610_RTP_XMC5_2, + GSM610_RTP_XMC6_0, + GSM610_RTP_XMC6_1, + GSM610_RTP_XMC6_2, + GSM610_RTP_XMC7_0, + GSM610_RTP_XMC7_1, + GSM610_RTP_XMC7_2, + GSM610_RTP_XMC8_0, + GSM610_RTP_XMC8_1, + GSM610_RTP_XMC8_2, + GSM610_RTP_XMC9_0, + GSM610_RTP_XMC9_1, + GSM610_RTP_XMC9_2, + GSM610_RTP_XMC10_0, + GSM610_RTP_XMC10_1, + GSM610_RTP_XMC10_2, + GSM610_RTP_XMC11_0, + GSM610_RTP_XMC11_1, + GSM610_RTP_XMC11_2, + GSM610_RTP_XMC12_0, + GSM610_RTP_XMC12_1, + GSM610_RTP_XCM12_2, + GSM610_RTP_NC1_0, + GSM610_RTP_NC1_1, + GSM610_RTP_NC1_2, + GSM610_RTP_NC1_3, + GSM610_RTP_NC1_4, + GSM610_RTP_NC1_5, + GSM610_RTP_NC1_6, + GSM610_RTP_BC1_0, + GSM610_RTP_BC1_1, + GSM610_RTP_MC1_0, + GSM610_RTP_MC1_1, + GSM610_RTP_XMAXC10, + GSM610_RTP_XMAXC11, + GSM610_RTP_XMAXC12, + GSM610_RTP_XMAXC13, + GSM610_RTP_XMAXC14, + GSM610_RTP_XMAX15, + GSM610_RTP_XMC13_0, + GSM610_RTP_XMC13_1, + GSM610_RTP_XMC13_2, + GSM610_RTP_XMC14_0, + GSM610_RTP_XMC14_1, + GSM610_RTP_XMC14_2, + GSM610_RTP_XMC15_0, + GSM610_RTP_XMC15_1, + GSM610_RTP_XMC15_2, + GSM610_RTP_XMC16_0, + GSM610_RTP_XMC16_1, + GSM610_RTP_XMC16_2, + GSM610_RTP_XMC17_0, + GSM610_RTP_XMC17_1, + GSM610_RTP_XMC17_2, + GSM610_RTP_XMC18_0, + GSM610_RTP_XMC18_1, + GSM610_RTP_XMC18_2, + GSM610_RTP_XMC19_0, + GSM610_RTP_XMC19_1, + GSM610_RTP_XMC19_2, + GSM610_RTP_XMC20_0, + GSM610_RTP_XMC20_1, + GSM610_RTP_XMC20_2, + GSM610_RTP_XMC21_0, + GSM610_RTP_XMC21_1, + GSM610_RTP_XMC21_2, + GSM610_RTP_XMC22_0, + GSM610_RTP_XMC22_1, + GSM610_RTP_XMC22_2, + GSM610_RTP_XMC23_0, + GSM610_RTP_XMC23_1, + GSM610_RTP_XMC23_2, + GSM610_RTP_XMC24_0, + GSM610_RTP_XMC24_1, + GSM610_RTP_XMC24_2, + GSM610_RTP_XMC25_0, + GSM610_RTP_XMC25_1, + GSM610_RTP_XMC25_2, + GSM610_RTP_NC2_0, + GSM610_RTP_NC2_1, + GSM610_RTP_NC2_2, + GSM610_RTP_NC2_3, + GSM610_RTP_NC2_4, + GSM610_RTP_NC2_5, + GSM610_RTP_NC2_6, + GSM610_RTP_BC2_0, + GSM610_RTP_BC2_1, + GSM610_RTP_MC2_0, + GSM610_RTP_MC2_1, + GSM610_RTP_XMAXC20, + GSM610_RTP_XMAXC21, + GSM610_RTP_XMAXC22, + GSM610_RTP_XMAXC23, + GSM610_RTP_XMAXC24, + GSM610_RTP_XMAXC25, + GSM610_RTP_XMC26_0, + GSM610_RTP_XMC26_1, + GSM610_RTP_XMC26_2, + GSM610_RTP_XMC27_0, + GSM610_RTP_XMC27_1, + GSM610_RTP_XMC27_2, + GSM610_RTP_XMC28_0, + GSM610_RTP_XMC28_1, + GSM610_RTP_XMC28_2, + GSM610_RTP_XMC29_0, + GSM610_RTP_XMC29_1, + GSM610_RTP_XMC29_2, + GSM610_RTP_XMC30_0, + GSM610_RTP_XMC30_1, + GSM610_RTP_XMC30_2, + GSM610_RTP_XMC31_0, + GSM610_RTP_XMC31_1, + GSM610_RTP_XMC31_2, + GSM610_RTP_XMC32_0, + GSM610_RTP_XMC32_1, + GSM610_RTP_XMC32_2, + GSM610_RTP_XMC33_0, + GSM610_RTP_XMC33_1, + GSM610_RTP_XMC33_2, + GSM610_RTP_XMC34_0, + GSM610_RTP_XMC34_1, + GSM610_RTP_XMC34_2, + GSM610_RTP_XMC35_0, + GSM610_RTP_XMC35_1, + GSM610_RTP_XMC35_2, + GSM610_RTP_XMC36_0, + GSM610_RTP_XMC36_1, + GSM610_RTP_XMC36_2, + GSM610_RTP_XMC37_0, + GSM610_RTP_XMC37_1, + GSM610_RTP_XMC37_2, + GSM610_RTP_XMC38_0, + GSM610_RTP_XMC38_1, + GSM610_RTP_XMC38_2, + GSM610_RTP_NC3_0, + GSM610_RTP_NC3_1, + GSM610_RTP_NC3_2, + GSM610_RTP_NC3_3, + GSM610_RTP_NC3_4, + GSM610_RTP_NC3_5, + GSM610_RTP_NC3_6, + GSM610_RTP_BC3_0, + GSM610_RTP_BC3_1, + GSM610_RTP_MC3_0, + GSM610_RTP_MC3_1, + GSM610_RTP_XMAXC30, + GSM610_RTP_XMAXC31, + GSM610_RTP_XMAXC32, + GSM610_RTP_XMAXC33, + GSM610_RTP_XMAXC34, + GSM610_RTP_XMAXC35, + GSM610_RTP_XMC39_0, + GSM610_RTP_XMC39_1, + GSM610_RTP_XMC39_2, + GSM610_RTP_XMC40_0, + GSM610_RTP_XMC40_1, + GSM610_RTP_XMC40_2, + GSM610_RTP_XMC41_0, + GSM610_RTP_XMC41_1, + GSM610_RTP_XMC41_2, + GSM610_RTP_XMC42_0, + GSM610_RTP_XMC42_1, + GSM610_RTP_XMC42_2, + GSM610_RTP_XMC43_0, + GSM610_RTP_XMC43_1, + GSM610_RTP_XMC43_2, + GSM610_RTP_XMC44_0, + GSM610_RTP_XMC44_1, + GSM610_RTP_XMC44_2, + GSM610_RTP_XMC45_0, + GSM610_RTP_XMC45_1, + GSM610_RTP_XMC45_2, + GSM610_RTP_XMC46_0, + GSM610_RTP_XMC46_1, + GSM610_RTP_XMC46_2, + GSM610_RTP_XMC47_0, + GSM610_RTP_XMC47_1, + GSM610_RTP_XMC47_2, + GSM610_RTP_XMC48_0, + GSM610_RTP_XMC48_1, + GSM610_RTP_XMC48_2, + GSM610_RTP_XMC49_0, + GSM610_RTP_XMC49_1, + GSM610_RTP_XMC49_2, + GSM610_RTP_XMC50_0, + GSM610_RTP_XMC50_1, + GSM610_RTP_XMC50_2, + GSM610_RTP_XMC51_0, + GSM610_RTP_XMC51_1, + GSM610_RTP_XMC51_2 +}; -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 08:47:51 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 08:47:51 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Hello Vadim Yanitskiy, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5214 to look at the new patch set (#4). osmo-bts-trx: add error concealment unit for GSM-FR When a bad GSM-FR voice frame is received, the frame replaced ith a silence frame. This may cause unpleasant audio effects. Add a functionality (see ecu_fr.c, ecu_fr_conceal() and ecu_fr_reset() to craft a replacement frame from the last known good frame. Add unit test (ecu_fr_test.c) Integrate into osmo-bts-trx Depends: libosmocore I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M configure.ac M include/osmo-bts/Makefile.am A include/osmo-bts/ecu_fr.h M include/osmo-bts/gsm_data_shared.h M src/common/Makefile.am A src/common/ecu_fr.c M src/osmo-bts-trx/scheduler_trx.c M tests/Makefile.am A tests/ecu_fr/Makefile.am A tests/ecu_fr/ecu_fr_test.c A tests/ecu_fr/ecu_fr_test.ok M tests/meas/meas_test.c M tests/testsuite.at 13 files changed, 560 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/4 diff --git a/configure.ac b/configure.ac index e3ea9ca..0d1a882 100644 --- a/configure.ac +++ b/configure.ac @@ -180,4 +180,5 @@ tests/tx_power/Makefile tests/power/Makefile tests/meas/Makefile + tests/ecu_fr/Makefile Makefile) diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index a15ce3d..86bcdf1 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -2,4 +2,4 @@ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ power_control.h scheduler.h scheduler_backend.h phy_link.h \ - dtx_dl_amr_fsm.h + dtx_dl_amr_fsm.h ecu_fr.h diff --git a/include/osmo-bts/ecu_fr.h b/include/osmo-bts/ecu_fr.h new file mode 100644 index 0000000..3954457 --- /dev/null +++ b/include/osmo-bts/ecu_fr.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#include + +/* Context information for the full rate ECU states */ +struct ecu_fr_ctx { + bool subsequent_lost_frame; + uint8_t frame_backup[GSM_FR_BYTES]; +}; + +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame); +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..37d6e0b 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -19,6 +19,7 @@ #include #include +#include #ifndef ROLE_BSC #include @@ -381,6 +382,8 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + struct ecu_fr_ctx ecu_fr_ctx; #endif }; diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 67f3e80..d2d6ec6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -12,6 +12,6 @@ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ l1sap.c cbch.c power_control.c main.c phy_link.c \ - dtx_dl_amr_fsm.c + dtx_dl_amr_fsm.c ecu_fr.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/ecu_fr.c b/src/common/ecu_fr.c new file mode 100644 index 0000000..a1e8ef3 --- /dev/null +++ b/src/common/ecu_fr.c @@ -0,0 +1,148 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* See also GSM 6.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/* Reduce the XMAXC field. When the XMAXC field reaches + * zero, then the function will return true */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, unsigned int index) +{ + unsigned int field_index; + uint64_t field; + bool silent = true; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + if (field != 0) + silent = false; + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return silent; +} + +/* Reduce all XMAXC fields in the frame. When all XMAXC fields reach + * zero, then the function will return true */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30)) + silent = true; + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static void conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + bool silent; + int rc; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) { + goto leave_nofree; + } + + /* Convert to bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, no memory to store the resulting bitvec!\n"); + goto leave_nofree; + } + rc = bitvec_unpack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Unpacking GSM-FR frame failed, wrong number of bits unpacked!\n"); + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + rc = bitvec_pack(frame_bitvec, frame); + if (rc != GSM_FR_BYTES) { + LOGP(DL1P, LOGL_ERROR, "Packing GSM-FR frame failed, wrong number of bits packed!\n"); + goto leave; + } + +leave: + bitvec_free(frame_bitvec); +leave_nofree: + return; +} + +/* To be called whan a good frame is received. This function will then create + * a backup of the frame and reset its internal state */ +void ecu_fr_reset(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + ctx->subsequent_lost_frame = false; + memcpy(ctx->frame_backup, frame, sizeof(ctx->frame_backup)); +} + +/* To be called when a bad frame is received. This function will then generate + * a replacement frame that can be used to conceal the dropout */ +void ecu_fr_conceal(struct ecu_fr_ctx *ctx, uint8_t *frame) +{ + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup. */ + if (ctx->subsequent_lost_frame) { + conceal_frame(ctx->frame_backup); + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, ctx->frame_backup, sizeof(ctx->frame_backup)); + ctx->subsequent_lost_frame = true; +} diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..dfcd031 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -968,6 +968,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1059,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1082,7 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + ecu_fr_conceal(&lchan->ecu_fr_ctx, tch_data); rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1110,9 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) + ecu_fr_reset(&lchan->ecu_fr_ctx, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); diff --git a/tests/Makefile.am b/tests/Makefile.am index 1eb28d6..e77a355 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = paging cipher agch misc handover tx_power power meas +SUBDIRS = paging cipher agch misc handover tx_power power meas ecu_fr if ENABLE_SYSMOBTS SUBDIRS += sysmobts diff --git a/tests/ecu_fr/Makefile.am b/tests/ecu_fr/Makefile.am new file mode 100644 index 0000000..2f1e3f6 --- /dev/null +++ b/tests/ecu_fr/Makefile.am @@ -0,0 +1,8 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOCODEC_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) +noinst_PROGRAMS = ecu_fr_test +EXTRA_DIST = ecu_fr_test.ok + +ecu_fr_test_SOURCES = ecu_fr_test.c +ecu_fr_test_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD) diff --git a/tests/ecu_fr/ecu_fr_test.c b/tests/ecu_fr/ecu_fr_test.c new file mode 100644 index 0000000..bc1cc56 --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +/* Set with sample fullrate voice frames and some intentional dropouts. */ +char *fr_voice[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Start with a good voice frame and then simulate 20 consecutive bad frames, + * watch how the error concealment decreases the XMAXC parameters */ +void test_fr_concealment(void *ctx) +{ + char frame_hex[] = + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + uint8_t *frame; + unsigned int len; + int i; + struct ecu_fr_ctx ecu_fr_ctx; + + len = strlen(frame_hex); + frame = talloc_zero_size(ctx, GSM_FR_BYTES); + len = osmo_hexparse(frame_hex, frame, GSM_FR_BYTES); + OSMO_ASSERT(len == GSM_FR_BYTES); + + printf(" Start with: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Reset the ECU with the proposed known good frame */ + ecu_fr_reset(&ecu_fr_ctx, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf("conceal: %02i, result: %s\n", i, + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } + + talloc_free(frame); +} + +/* Simulate a real life situation, voce frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + uint8_t frame[GSM_FR_BYTES]; + unsigned int len; + unsigned int id = 0; + struct ecu_fr_ctx ecu_fr_ctx; + + while (1) { + /* Detect end of test samples */ + if (fr_voice[id] == NULL) + return; + + printf("Frame No. %03i:\n", id); + len = strlen(fr_voice[id]) / 2; + + if (len != GSM_FR_BYTES) { + memset(frame, 0, GSM_FR_BYTES); + ecu_fr_conceal(&ecu_fr_ctx, frame); + printf(" * input: (bad)\n"); + } else { + osmo_hexparse(fr_voice[id], frame, GSM_FR_BYTES); + printf(" * input: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + ecu_fr_reset(&ecu_fr_ctx, frame); + } + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + id++; + } +} + +int main(int argc, char **argv) +{ + void *tall_bts_ctx; + + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + bts_log_init(NULL); + osmo_stderr_target->categories[DL1C].loglevel = LOGL_DEBUG; + + test_fr_concealment(tall_bts_ctx); + test_fr_concealment_realistic(); + + printf("Success\n"); + talloc_report_full(tall_bts_ctx, stderr); + printf("Talloc total blocks: %lu\n", talloc_total_blocks(tall_bts_ctx)); + OSMO_ASSERT(talloc_total_blocks(tall_bts_ctx) == 2); + + return 0; +} diff --git a/tests/ecu_fr/ecu_fr_test.ok b/tests/ecu_fr/ecu_fr_test.ok new file mode 100644 index 0000000..fab883e --- /dev/null +++ b/tests/ecu_fr/ecu_fr_test.ok @@ -0,0 +1,194 @@ + Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 +Success +Talloc total blocks: 2 diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c index acebab5..74bbab7 100644 --- a/tests/meas/meas_test.c +++ b/tests/meas/meas_test.c @@ -1,38 +1,13 @@ +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include -#include -#include - -#include #include -#include -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include static struct gsm_bts *bts; struct gsm_bts_trx *trx; diff --git a/tests/testsuite.at b/tests/testsuite.at index 2d1cefd..c6196a5 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -49,3 +49,9 @@ cat $abs_srcdir/meas/meas_test.ok > expout AT_CHECK([$abs_top_builddir/tests/meas/meas_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([ecu_fr]) +AT_KEYWORDS([ecu_fr]) +cat $abs_srcdir/ecu_fr/ecu_fr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/ecu_fr/ecu_fr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 08:55:23 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 08:55:23 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 4: Hello Vadim, I have moved at least the bit offsets to libosmocore now. See #5385 for that. I also wanted to move the code for the ecu, but then I realized that in its current form it would not be so helpful. The probelm I see is that since it runs on the BTS it uses the RTP bit ordering, but you probably need the GSM bit ordering. I am not sure how easy it is to fix this, probably we just have to add a GSM version of the bit offset table und have it parameterizable which of the two to use. Probably it makes sense if you just take the patch from osmo-bsc and add a parameter for the table. If that works for you and the original unit-test still passes I could re-test on osmo-bts-trx. best regards. Philipp -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:05:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:05:36 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 4: > I also wanted to move the code for the ecu, but then I realized > that in its > current form it would not be so helpful. The probelm I see is that > since it > runs on the BTS it uses the RTP bit ordering, but you probably need > the GSM > bit ordering. AFAIK OsmocomBB also does the re-ordering to RTP as it uses the MNCC interface towards external MNCC handlers, and I think the bit-ordering/format of the TCH messages there is identical to RTP. In any case, MNCC is identical on the MS and the MSC side. -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:06:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:06:09 +0000 Subject: libosmocore[master]: codec: add GSM FR bit offet definition In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:08:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:08:19 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: mgcp_trans_id_t mgw_pending_trans; > Yes, since we execute them one after another. This will also be the case in Is this "one pending MGCP transaction per call" or "one pending MGCP transaction all over the MSC"? The latter is certainly not acceptable, as there can be may hundreds to thousands of parallel calls, and what happens if a MGW is slow in responding or there is some temporary packet loss, ... ? -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:08:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:08:37 +0000 Subject: python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:09:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:09:48 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 4: -Code-Review (1 comment) https://gerrit.osmocom.org/#/c/5029/4/setup.py File setup.py: Line 29: "osmopy/rate_ctr2csv.py", naming wise, I don't think we should install anything *new* into the system without an osmo- prefix. -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:11:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:11:54 +0000 Subject: osmo-msc[master]: debug log: enrich Cipher Mode Cmd log in a_iface_tx_cipher_m... In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5374/2/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 176: LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," please introduce a helper macro like we have in many other places so we can do something like LOGPCONN(LOGL_DEBUG, conn, ...) which then prints the context information in a consistent manner. -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:12:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:12:16 +0000 Subject: osmo-msc[master]: vlr: debug log: log Ciphering Mode details In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:13:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:13:18 +0000 Subject: osmo-msc[master]: Cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:13:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:13:43 +0000 Subject: osmo-msc[master]: compiler warning: drop double 'const' in a_iface_tx_cipher_m... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5373 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:14:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:14:07 +0000 Subject: osmo-msc[master]: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:21:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 09:21:13 +0000 Subject: osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) next to the question of timeout/age for the entries, I'm wondering how to inquire the current system state. There is no VTY command that can help the administrator to "show" which RAC/LAC are served by a given RNC. https://gerrit.osmocom.org/#/c/5381/1/src/iu_client.c File src/iu_client.c: Line 182: llist_for_each_entry(e, &rnc->lac_rac_list, entry) { we typically introduce a helper function for the look-up. You have this inline list iteration here as well as further down in ranap_iu_rab_act; why not have a "static bool rnc_has_lac_rac()" instead? Line 195: llist_add(&e->entry, &rnc->lac_rac_list); so we always keep adding RAC+LAC to the list but don't ever remove them. This might lead to memory exhaustion and also possible configuration inconsistencies e.g. if you start to reconfigure your network and move a certain LAC from one RNC to another. It would be great if there would be some kind of "age' or "timeout" attached, so that if we haven't seen a given RNC report anything from a given LAC/RAC for some time (let's say an hour?) they get removed again. But then, that might be an optimization left for later on. -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:30:34 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 09:30:34 +0000 Subject: python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" In-Reply-To: References: Message-ID: Patch Set 1: The same effect is achieved by gerrit 5278 which is blocked by lack of reviews on gerrit 5277. -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 09:50:39 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 09:50:39 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) > (1 comment) > (1 comment) https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: mgcp_trans_id_t mgw_pending_trans; > Is this "one pending MGCP transaction per call" or "one pending MGCP transa When I send out an MGCP message using mgcp_client_tx() I expect that the client is queuing the massage and is also able to handle other messages while it waits for the MGW to respond. As far as I can see this is the case. Probably @neels can acknowledge this? On Packet loss the FSM will run into timeout and the call fails. This is because the client does not support a resend mechanism yet. In the current configuration we expect the MGW to respond within 4 seconds, which I think is very relaxed. -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:09:52 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:09:52 +0000 Subject: osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 > proper place to define names available on NITB's and MSC's ctrl > interface? In this case probably it would make sense to have a shared base class as probably they share more parts, but it's not worth investing on it specifically for this commit. > defining a new libosmocore_defs.py. Do you want me to add a > libosmocore_defs.py instead? schema.py? Is it fine as it is? I also run into the same questions sometimes, I guess we will end up creating a osmocom_defs.py or osmocom_shared.py or something at some point. It's fine for now, let's not waste more time that necessary for what is needed so far. -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:19 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_octphy: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5370 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:21 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:21 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_osmotrx: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:23 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:23 +0000 Subject: osmo-gsm-tester[master]: cosmetic: bts_sysmo: Sort members according to scope In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:29 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:29 +0000 Subject: [MERGED] osmo-gsm-tester[master]: cosmetic: bts_sysmo: Sort members according to scope In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: cosmetic: bts_sysmo: Sort members according to scope ...................................................................... cosmetic: bts_sysmo: Sort members according to scope Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a --- M src/osmo_gsm_tester/bts_sysmo.py 1 file changed, 89 insertions(+), 80 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index d286d02..7a41033 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -22,6 +22,9 @@ from . import log, config, util, template, process, pcu_sysmo, bts_osmo class SysmoBts(bts_osmo.OsmoBts): +############## +# PROTECTED +############## run_dir = None inst = None remote_inst = None @@ -35,6 +38,92 @@ super().__init__(suite_run, conf, SysmoBts.BTS_SYSMO_BIN) self.remote_user = 'root' + def _direct_pcu_enabled(self): + return util.str2bool(self.conf.get('direct_pcu')) + + def _process_remote(self, name, popen_args, remote_cwd=None): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, + popen_args) + + def run_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def launch_remote(self, name, popen_args, remote_cwd=None): + proc = self._process_remote(name, popen_args, remote_cwd) + self.suite_run.remember_to_stop(proc) + proc.launch() + return proc + + def run_local(self, name, popen_args): + run_dir = self.run_dir.new_dir(name) + proc = process.Process(name, run_dir, popen_args) + proc.launch() + proc.wait() + if proc.result != 0: + log.ctx(proc) + raise log.Error('Exited in error') + + def create_pcu(self): + return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) + + def configure(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') + + self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) + self.dbg(config_file=self.config_file) + + values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') } + config.overlay(values, self.suite_run.config()) + config.overlay(values, { + 'osmo_bts_sysmo': { + 'oml_remote_ip': self.bsc.addr(), + 'pcu_socket_path': self.pcu_socket_path(), + } + }) + config.overlay(values, { 'osmo_bts_sysmo': self.conf }) + + self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(SysmoBts.BTS_SYSMO_CFG, values) + self.dbg(r) + f.write(r) + +######################## +# PUBLIC - INTERNAL API +######################## + def pcu_socket_path(self): + return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') + + def conf_for_bsc(self): + values = config.get_defaults('bsc_bts') + config.overlay(values, config.get_defaults('osmo_bts_sysmo')) + if self.lac is not None: + config.overlay(values, { 'location_area_code': self.lac }) + if self.rac is not None: + config.overlay(values, { 'routing_area_code': self.rac }) + if self.cellid is not None: + config.overlay(values, { 'cell_identity': self.cellid }) + if self.bvci is not None: + config.overlay(values, { 'bvci': self.bvci }) + config.overlay(values, self.conf) + + sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() + config.overlay(values, sgsn_conf) + + self.dbg(conf=values) + return values + +################### +# PUBLIC (test API included) +################### def start(self): if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') @@ -77,85 +166,5 @@ args += ('-M',) self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) - - def _direct_pcu_enabled(self): - return util.str2bool(self.conf.get('direct_pcu')) - - def _process_remote(self, name, popen_args, remote_cwd=None): - run_dir = self.run_dir.new_dir(name) - return process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, - popen_args) - - def run_remote(self, name, popen_args, remote_cwd=None): - proc = self._process_remote(name, popen_args, remote_cwd) - proc.launch() - proc.wait() - if proc.result != 0: - log.ctx(proc) - raise log.Error('Exited in error') - - def launch_remote(self, name, popen_args, remote_cwd=None): - proc = self._process_remote(name, popen_args, remote_cwd) - self.suite_run.remember_to_stop(proc) - proc.launch() - return proc - - def run_local(self, name, popen_args): - run_dir = self.run_dir.new_dir(name) - proc = process.Process(name, run_dir, popen_args) - proc.launch() - proc.wait() - if proc.result != 0: - log.ctx(proc) - raise log.Error('Exited in error') - - def create_pcu(self): - return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) - - def pcu_socket_path(self): - return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') - - def configure(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be configured') - - self.config_file = self.run_dir.new_file(SysmoBts.BTS_SYSMO_CFG) - self.dbg(config_file=self.config_file) - - values = { 'osmo_bts_sysmo': config.get_defaults('osmo_bts_sysmo') } - config.overlay(values, self.suite_run.config()) - config.overlay(values, { - 'osmo_bts_sysmo': { - 'oml_remote_ip': self.bsc.addr(), - 'pcu_socket_path': self.pcu_socket_path(), - } - }) - config.overlay(values, { 'osmo_bts_sysmo': self.conf }) - - self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) - - with open(self.config_file, 'w') as f: - r = template.render(SysmoBts.BTS_SYSMO_CFG, values) - self.dbg(r) - f.write(r) - - def conf_for_bsc(self): - values = config.get_defaults('bsc_bts') - config.overlay(values, config.get_defaults('osmo_bts_sysmo')) - if self.lac is not None: - config.overlay(values, { 'location_area_code': self.lac }) - if self.rac is not None: - config.overlay(values, { 'routing_area_code': self.rac }) - if self.cellid is not None: - config.overlay(values, { 'cell_identity': self.cellid }) - if self.bvci is not None: - config.overlay(values, { 'bvci': self.bvci }) - config.overlay(values, self.conf) - - sgsn_conf = {} if self.sgsn is None else self.sgsn.conf_for_client() - config.overlay(values, sgsn_conf) - - self.dbg(conf=values) - return values # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5372 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:30 +0000 Subject: [MERGED] osmo-gsm-tester[master]: cosmetic: bts_osmotrx: Sort members according to scope In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: cosmetic: bts_osmotrx: Sort members according to scope ...................................................................... cosmetic: bts_osmotrx: Sort members according to scope Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 35 insertions(+), 26 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index fb13545..ea644f1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -23,6 +23,9 @@ from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit): +############## +# PROTECTED +############## run_dir = None inst = None env = None @@ -46,32 +49,6 @@ def launch_trx_enabled(self): return util.str2bool(self.conf.get('launch_trx')) - - def start(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') - self.suite_run.poll() - - self.log('Starting to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) - self.configure() - - if self.launch_trx_enabled(): - self.trx = OsmoTrx(self.suite_run, self.trx_remote_ip(), self.remote_addr()) - self.trx.start() - self.log('Waiting for osmo-trx to start up...') - event_loop.wait(self, self.trx.trx_ready) - - self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) - lib = self.inst.child('lib') - if not os.path.isdir(lib): - raise RuntimeError('No lib/ in %r' % self.inst) - self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - - self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', - '-c', os.path.abspath(self.config_file), - '-i', self.bsc.addr()) - self.suite_run.poll() def launch_process(self, binary_name, *args): binary = os.path.abspath(self.inst.child('bin', binary_name)) @@ -110,6 +87,9 @@ self.dbg(r) f.write(r) +######################## +# PUBLIC - INTERNAL API +######################## def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) @@ -129,6 +109,35 @@ self.dbg(conf=values) return values +################### +# PUBLIC (test API included) +################### + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + if self.launch_trx_enabled(): + self.trx = OsmoTrx(self.suite_run, self.trx_remote_ip(), self.remote_addr()) + self.trx.start() + self.log('Waiting for osmo-trx to start up...') + event_loop.wait(self, self.trx.trx_ready) + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.proc_bts = self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr()) + self.suite_run.poll() + class OsmoTrx(log.Origin): suite_run = None run_dir = None -- To view, visit https://gerrit.osmocom.org/5371 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:30 +0000 Subject: [MERGED] osmo-gsm-tester[master]: cosmetic: bts_octphy: Sort members according to scope In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: cosmetic: bts_octphy: Sort members according to scope ...................................................................... cosmetic: bts_octphy: Sort members according to scope Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b --- M src/osmo_gsm_tester/bts_octphy.py 1 file changed, 37 insertions(+), 27 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index fd8d078..f5fa90b 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -23,6 +23,10 @@ from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit): + +############## +# PROTECTED +############## run_dir = None inst = None env = None @@ -35,33 +39,6 @@ super().__init__(suite_run, conf, OsmoBtsOctphy.BIN_BTS_OCTPHY) self.env = {} self.values = {} - - def start(self): - if self.bsc is None: - raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') - self.suite_run.poll() - - self.log('Starting to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) - self.configure() - - self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) - btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) - lib = self.inst.child('lib') - if not os.path.isdir(lib): - raise RuntimeError('No lib/ in %r' % self.inst) - - # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. - self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) - util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) - # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: - self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) - util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) - - self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', - '-c', os.path.abspath(self.config_file), - '-i', self.bsc.addr(), '-t', str(self.num_trx())) - self.suite_run.poll() def launch_process(self, binary_name, *args): binary = os.path.abspath(self.inst.child('bin', binary_name)) @@ -131,6 +108,9 @@ self.dbg(r) f.write(r) +######################## +# PUBLIC - INTERNAL API +######################## def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) @@ -150,4 +130,34 @@ self.dbg(conf=values) return values +################### +# PUBLIC (test API included) +################### + def start(self): + if self.bsc is None: + raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') + self.suite_run.poll() + + self.log('Starting to connect to', self.bsc) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) + btsoct_path = self.inst.child('bin', OsmoBtsOctphy.BIN_BTS_OCTPHY) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise RuntimeError('No lib/ in %r' % self.inst) + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.change_elf_rpath(btsoct_path, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # osmo-bty-octphy requires CAP_NET_RAW to open AF_PACKET socket: + self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY) + util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw')) + + self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1', + '-c', os.path.abspath(self.config_file), + '-i', self.bsc.addr(), '-t', str(self.num_trx())) + self.suite_run.poll() + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5370 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:10:31 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:10:31 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Create bts abstract classes to avoid code duplication and ea... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Create bts abstract classes to avoid code duplication and ease development ...................................................................... Create bts abstract classes to avoid code duplication and ease development A lot of code can be shared by all osmocom related BTS we currently use (sysmo, octphy, trx). This commits moves all this easily shareable code to an abstract class OsmoBts which all (osmocom) BTS use. Some bits of code do not apply for osmo-bts-sysmo but it's still shared by BTS running in the main unit (octphy, trx), for instance the pcu socket handling. Those are put together in OsmoBtsMainUnit. This way we have: log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx log.Origin<-OsmoBts<-OsmoBtsSysmo Also take the chance to categorize the different APIs in the new abstract class based on their use and scope. Some code changes while moving which were required: - A new protected abstract API "create_pcu", which returns an object of "pcu" interface. Subclasses implement this API returning either a PcySysmo or a PcuOsmo object. This is needed to abstract the pcu() getter into the base class. - For BTS running in the main unit, pcu_sk_tmp_dir object is allocated when first used (API pcu_socket_path()) instead of doing it in the constructor. This is moved into OsmoBtsMainUnit Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2 --- M src/osmo_gsm_tester/bts_octphy.py A src/osmo_gsm_tester/bts_osmo.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py 4 files changed, 157 insertions(+), 173 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index f25823c..fd8d078 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -20,56 +20,21 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop, pcu_osmo +from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo -class OsmoBtsOctphy(log.Origin): - suite_run = None - bsc = None - sgsn = None +class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit): run_dir = None inst = None env = None - pcu_sk_tmp_dir = None - values = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' CONF_BTS_OCTPHY = 'osmo-bts-octphy.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, OsmoBtsOctphy.BIN_BTS_OCTPHY) - self.suite_run = suite_run - self.conf = conf + super().__init__(suite_run, conf, OsmoBtsOctphy.BIN_BTS_OCTPHY) self.env = {} self.values = {} - self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') - if len(self.pcu_socket_path().encode()) > 107: - raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) - - def cleanup(self): - if self.pcu_sk_tmp_dir: - try: - os.remove(self.pcu_socket_path()) - except OSError: - pass - os.rmdir(self.pcu_sk_tmp_dir) - - def pcu(self): - if self._pcu is None: - self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) - return self._pcu - - def pcu_socket_path(self): - return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') - - def remote_addr(self): - return self.conf.get('addr') def start(self): if self.bsc is None: @@ -184,28 +149,5 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py new file mode 100644 index 0000000..16e79cf --- /dev/null +++ b/src/osmo_gsm_tester/bts_osmo.py @@ -0,0 +1,146 @@ +# osmo_gsm_tester: base classes to share code among BTS subclasses. +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint +import tempfile +from abc import ABCMeta, abstractmethod +from . import log, config, util, template, process, event_loop, pcu_osmo + +class OsmoBts(log.Origin, metaclass=ABCMeta): + suite_run = None + proc_bts = None + bsc = None + sgsn = None + lac = None + rac = None + cellid = None + bvci = None + _pcu = None + +############## +# PROTECTED +############## + def __init__(self, suite_run, conf, name): + super().__init__(log.C_RUN, name) + self.suite_run = suite_run + self.conf = conf + if len(self.pcu_socket_path().encode()) > 107: + raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) + +######################## +# PUBLIC - INTERNAL API +######################## + @abstractmethod + def conf_for_bsc(self): + 'Used by bsc objects to get path to socket.' + pass + + @abstractmethod + def pcu_socket_path(self): + 'Used by pcu objects to get path to socket.' + pass + + @abstractmethod + def create_pcu(self): + 'Used by base class. Subclass can create different pcu implementations.' + pass + + def remote_addr(self): + return self.conf.get('addr') + + def ready_for_pcu(self): + if not self.proc_bts or not self.proc_bts.is_running: + return False + return 'BTS is up' in (self.proc_bts.get_stderr() or '') + + def cleanup(self): + 'Nothing to do by default. Subclass can override if required.' + pass + +################### +# PUBLIC (test API included) +################### + @abstractmethod + def start(self): + 'Starts BTS proccess and sets self.proc_bts with an object of Process interface' + pass + + def pcu(self): + if self._pcu is None: + self._pcu = self.create_pcu(self.suite_run, self, self.conf) + return self._pcu + + def set_bsc(self, bsc): + self.bsc = bsc + + def set_sgsn(self, sgsn): + self.sgsn = sgsn + + def set_lac(self, lac): + self.lac = lac + + def set_rac(self, rac): + self.rac = rac + + def set_cellid(self, cellid): + self.cellid = cellid + + def set_bvci(self, bvci): + self.bvci = bvci + + +class OsmoBtsMainUnit(OsmoBts, metaclass=ABCMeta): +############## +# PROTECTED +############## + pcu_sk_tmp_dir = None + + def __init__(self, suite_run, conf, name): + super().__init__(suite_run, conf, name) + +######################## +# PUBLIC - INTERNAL API +######################## + @abstractmethod + def conf_for_bsc(self): + pass + + def cleanup(self): + if self.pcu_sk_tmp_dir: + try: + os.remove(self.pcu_socket_path()) + except OSError: + pass + os.rmdir(self.pcu_sk_tmp_dir) + + def create_pcu(self): + return pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) + + def pcu_socket_path(self): + if self.pcu_sk_tmp_dir is None: + self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') + return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') + +################### +# PUBLIC (test API included) +################### + @abstractmethod + def start(self): + pass diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9b1f077..fb13545 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -20,23 +20,13 @@ import os import pprint import tempfile -from . import log, config, util, template, process, event_loop, pcu_osmo +from . import log, config, util, template, process, event_loop, pcu_osmo, bts_osmo -class OsmoBtsTrx(log.Origin): - suite_run = None - bsc = None - sgsn = None +class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit): run_dir = None inst = None env = None trx = None - pcu_sk_tmp_dir = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -44,32 +34,8 @@ CONF_BTS_TRX = 'osmo-bts-trx.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, OsmoBtsTrx.BIN_BTS_TRX) - self.suite_run = suite_run - self.conf = conf + super().__init__(suite_run, conf, OsmoBtsTrx.BIN_BTS_TRX) self.env = {} - self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') - if len(self.pcu_socket_path().encode()) > 107: - raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) - - def cleanup(self): - if self.pcu_sk_tmp_dir: - try: - os.remove(self.pcu_socket_path()) - except OSError: - pass - os.rmdir(self.pcu_sk_tmp_dir) - - def pcu(self): - if self._pcu is None: - self._pcu = pcu_osmo.OsmoPcu(self.suite_run, self, self.conf) - return self._pcu - - def pcu_socket_path(self): - return os.path.join(self.pcu_sk_tmp_dir, 'pcu_bts') - - def remote_addr(self): - return self.conf.get('addr') def trx_remote_ip(self): conf_ip = self.conf.get('trx_remote_ip', None) @@ -162,29 +128,6 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci class OsmoTrx(log.Origin): suite_run = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 1d2dbf6..d286d02 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,33 +19,20 @@ import os import pprint -from . import log, config, util, template, process, pcu_sysmo +from . import log, config, util, template, process, pcu_sysmo, bts_osmo -class SysmoBts(log.Origin): - suite_run = None - bsc = None - sgsn = None +class SysmoBts(bts_osmo.OsmoBts): run_dir = None inst = None remote_inst = None - remote_env = None remote_dir = None - lac = None - rac = None - cellid = None - bvci = None - proc_bts = None - _pcu = None REMOTE_DIR = '/osmo-gsm-tester-bts' BTS_SYSMO_BIN = 'osmo-bts-sysmo' BTS_SYSMO_CFG = 'osmo-bts-sysmo.cfg' def __init__(self, suite_run, conf): - super().__init__(log.C_RUN, self.BTS_SYSMO_BIN) - self.suite_run = suite_run - self.conf = conf - self.remote_env = {} + super().__init__(suite_run, conf, SysmoBts.BTS_SYSMO_BIN) self.remote_user = 'root' def start(self): @@ -91,14 +78,8 @@ self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir) - def cleanup(self): - pass - def _direct_pcu_enabled(self): return util.str2bool(self.conf.get('direct_pcu')) - - def pcu_socket_path(self): - return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') def _process_remote(self, name, popen_args, remote_cwd=None): run_dir = self.run_dir.new_dir(name) @@ -128,13 +109,8 @@ log.ctx(proc) raise log.Error('Exited in error') - def pcu(self): - if self._pcu is None: - self._pcu = pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) - return self._pcu - - def remote_addr(self): - return self.conf.get('addr') + def create_pcu(self): + return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) def pcu_socket_path(self): return os.path.join(SysmoBts.REMOTE_DIR, 'pcu_bts') @@ -181,28 +157,5 @@ self.dbg(conf=values) return values - - def ready_for_pcu(self): - if not self.proc_bts or not self.proc_bts.is_running: - return False - return 'BTS is up' in (self.proc_bts.get_stderr() or '') - - def set_bsc(self, bsc): - self.bsc = bsc - - def set_sgsn(self, sgsn): - self.sgsn = sgsn - - def set_lac(self, lac): - self.lac = lac - - def set_rac(self, rac): - self.rac = rac - - def set_cellid(self, cellid): - self.cellid = cellid - - def set_bvci(self, bvci): - self.bvci = bvci # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/5369 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:32:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:32:05 +0000 Subject: [PATCH] osmo-pcu[master]: window: move encoding into functions In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5336 to look at the new patch set (#3). window: move encoding into functions * move window size encoding and writing into separate functions * introduce necessary TBF wrappers to avoid direct m_window access This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 --- M src/encoding.cpp M src/encoding.h M src/pcu_vty_functions.cpp M src/tbf.h M tests/tbf/TbfTest.cpp 5 files changed, 46 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/5336/3 diff --git a/src/encoding.cpp b/src/encoding.cpp index 6742efd..87c6f08 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -60,6 +60,21 @@ } } +/* 3GPP TS 44.060 Table 12.5.2.1 */ +static inline uint16_t enc_ws(uint16_t ws) +{ + return (ws - 64) / 32; +} + +static inline void write_ws(bitvec *dest, unsigned int *write_index, uint16_t ws) +{ + dest->cur_bit = *write_index; + + bitvec_set_u64(dest, enc_ws(ws), 5, false); + + *write_index += 5; +} + /* 3GPP TS 44.060 ? 12.12: { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > @@ -114,9 +129,8 @@ // bitvec_write_field(dest, &wp,,0xb,4); if (tbf->is_egprs_enabled()) { /* see GMS 44.018, 10.5.2.16 */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp, 1, 1); // "H" - bitvec_write_field(dest, &wp, ws_enc, 5); // EGPRS Window Size + write_ws(dest, &wp, tbf->window_size()); // EGPRS Window Size bitvec_write_field(dest, &wp, 0x0, 2); // LINK_QUALITY_MEASUREMENT_MODE bitvec_write_field(dest, &wp, 0, 1); // BEP_PERIOD2 not present } @@ -178,7 +192,6 @@ uint8_t alpha, uint8_t gamma, int8_t ta_idx, enum ph_burst_type burst_type, uint16_t ra) { - unsigned int ws_enc = 0; uint8_t extended_ra = 0; extended_ra = (ra & 0x1F); @@ -208,9 +221,6 @@ bitvec_write_field(dest, &wp, 0, 1); } else { - - ws_enc = (tbf->m_window.ws() - 64) / 32; - bitvec_write_field(dest, &wp, 1, 1); /* single block alloc */ bitvec_write_field(dest, &wp, tbf->tfi(), 5);/* TFI assignment */ bitvec_write_field(dest, &wp, 0, 1); /* polling bit */ @@ -224,7 +234,7 @@ bitvec_write_field(dest, &wp, tbf->tlli(), 1); bitvec_write_field(dest, &wp, 0, 1); /* BEP period present */ bitvec_write_field(dest, &wp, 0, 1); /* resegmentation */ - bitvec_write_field(dest, &wp, ws_enc, 5);/* egprs window_size */ + write_ws(dest, &wp, tbf->window_size()); /* EGPRS window size */ if (alpha) { bitvec_write_field(dest, &wp, 0x1, 1); /* ALPHA =yes */ @@ -450,7 +460,6 @@ bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts); } else { /* EPGRS */ - unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, &wp,0x1,1); // Message escape bitvec_write_field(dest, &wp,0x0,2); // EGPRS message contents bitvec_write_field(dest, &wp,0x0,1); // No CONTENTION_RESOLUTION_TLLI @@ -458,7 +467,7 @@ bitvec_write_field(dest, &wp,tbf->current_cs().to_num()-1, 4); // EGPRS Modulation and Coding IE /* 0: no RESEGMENT, 1: Segmentation*/ bitvec_write_field(dest, &wp, 0x1, 1); - bitvec_write_field(dest, &wp,ws_enc,5); // EGPRS Window Size + write_ws(dest, &wp, tbf->window_size()); // EGPRS Window Size bitvec_write_field(dest, &wp,0x0,1); // No Access Technologies Request bitvec_write_field(dest, &wp,0x0,1); // No ARAC RETRANSMISSION REQUEST bitvec_write_field(dest, &wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING @@ -509,7 +518,7 @@ /* generate downlink assignment */ void Encoding::write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs) { @@ -518,7 +527,6 @@ PDA_AdditionsR99_t *pda_r99; uint8_t tn; - unsigned int ws_enc; block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header block->RRBP = rrbp; // 0: N+13 @@ -591,12 +599,10 @@ return; } - ws_enc = (tbf->window()->ws() - 64) / 32; - block->u.Packet_Downlink_Assignment.Exist_AdditionsR99 = 0x1; // AdditionsR99 = on pda_r99 = &block->u.Packet_Downlink_Assignment.AdditionsR99; pda_r99->Exist_EGPRS_Params = 1; - pda_r99->EGPRS_WindowSize = ws_enc; /* see TS 44.060, table 12.5.2.1 */ + pda_r99->EGPRS_WindowSize = enc_ws(tbf->window_size()); /* see TS 44.060, table 12.5.2.1 */ pda_r99->LINK_QUALITY_MEASUREMENT_MODE = 0x0; /* no meas, see TS 44.060, table 11.2.7.2 */ pda_r99->Exist_BEP_PERIOD2 = 0; /* No extra EGPRS BEP PERIOD */ pda_r99->Exist_Packet_Extended_Timing_Advance = 0; diff --git a/src/encoding.h b/src/encoding.h index 6164b89..54cb057 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -68,7 +68,7 @@ static void write_packet_downlink_assignment(RlcMacDownlink_t * block, bool old_tfi_is_valid, uint8_t old_tfi, uint8_t old_downlink, - struct gprs_rlcmac_tbf *tbf, uint8_t poll, uint8_t rrbp, + struct gprs_rlcmac_dl_tbf *tbf, uint8_t poll, uint8_t rrbp, uint8_t alpha, uint8_t gamma, int8_t ta_idx, uint8_t ta_ts, bool use_egprs); diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index f1dd25c..0a80a23 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -64,13 +64,12 @@ } if (tbf->trx != NULL) vty_out(vty, " TRX_ID=%d", tbf->trx->trx_no); - vty_out(vty, " CS=%s WS=%d", - tbf->current_cs().name(), tbf->window()->ws()); + vty_out(vty, " CS=%s", tbf->current_cs().name()); if (ul_tbf) { gprs_rlc_ul_window *win = &ul_tbf->m_window; - vty_out(vty, " V(Q)=%d V(R)=%d", - win->v_q(), win->v_r()); + vty_out(vty, " WS=%u V(Q)=%d V(R)=%d", + ul_tbf->window_size(), win->v_q(), win->v_r()); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " TBF Statistics:%s", VTY_NEWLINE); if(GprsCodingScheme::GPRS == tbf->ms()->mode()) { @@ -81,8 +80,8 @@ } if (dl_tbf) { gprs_rlc_dl_window *win = &dl_tbf->m_window; - vty_out(vty, " V(A)=%d V(S)=%d nBSN=%d%s", - win->v_a(), win->v_s(), win->resend_needed(), + vty_out(vty, " WS=%u V(A)=%d V(S)=%d nBSN=%d%s", + dl_tbf->window_size(), win->v_a(), win->v_s(), win->resend_needed(), win->window_stalled() ? " STALLED" : ""); vty_out(vty, "%s", VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", tbf->m_ctrs); diff --git a/src/tbf.h b/src/tbf.h index e764309..1486899 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -441,7 +441,7 @@ bool keep_open(unsigned fn) const; int release(); int abort(); - + uint16_t window_size() const; void egprs_calc_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); @@ -539,7 +539,7 @@ uint8_t *data, const uint8_t block_idx); void egprs_calc_ulwindow_size(); - + uint16_t window_size() const; void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -576,6 +576,16 @@ ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline uint16_t gprs_rlcmac_ul_tbf::window_size() const +{ + return m_window.ws(); +} + +inline uint16_t gprs_rlcmac_dl_tbf::window_size() const +{ + return m_window.ws(); +} + inline void gprs_rlcmac_ul_tbf::enable_egprs() { m_window.set_sns(RLC_EGPRS_SNS); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 42594c3..5b24775 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2214,9 +2214,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 64); + OSMO_ASSERT(dl_tbf->window_size() == 64); tbf_free(dl_tbf); /* EGPRS-only */ @@ -2229,9 +2229,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 4 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 4 * 64); tbf_free(dl_tbf); printf("=== end %s ===\n", __func__); @@ -2273,9 +2273,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 1); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 1 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 1 * 64); dl_tbf->update(); @@ -2284,9 +2284,9 @@ fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), pcu_bitcount(dl_tbf->dl_slots()), - dl_tbf->window()->ws()); + dl_tbf->window_size()); OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4); - OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 4 * 64); + OSMO_ASSERT(dl_tbf->window_size() == 128 + 4 * 64); tbf_free(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5336 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:32:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:32:05 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-UL: add simpler test helper In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5337 to look at the new patch set (#3). TBF-UL: add simpler test helper Add function to set both V_R and V_Q values to 0 which is useful for TBF test. Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2 --- M src/rlc.h M tests/tbf/TbfTest.cpp 2 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/37/5337/3 diff --git a/src/rlc.h b/src/rlc.h index 14d2082..5f0284c 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -343,6 +343,7 @@ const void set_v_r(int); const void set_v_q(int); + void reset_v_x(); const uint16_t ssn() const; @@ -574,6 +575,12 @@ return is_in_window(bsn) && m_v_n.is_received(bsn) && offset_v_r < ws(); } +inline void gprs_rlc_ul_window::reset_v_x() +{ + m_v_r = 0; + m_v_q = 0; +} + inline const void gprs_rlc_ul_window::set_v_r(int v_r) { m_v_r = v_r; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 5b24775..1370867 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1722,8 +1722,7 @@ "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.set_v_r(0); - ul_tbf->m_window.set_v_q(0); + ul_tbf->m_window.reset_v_x(); /* Function to generate URBB with length */ ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class, ul_tbf); @@ -1735,8 +1734,7 @@ send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.set_v_r(0); - ul_tbf->m_window.set_v_q(0); + ul_tbf->m_window.reset_v_x(); /* Function to generate CRBB */ bts->ws_base = 128; bts->ws_pdch = 64; -- To view, visit https://gerrit.osmocom.org/5337 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:32:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:32:05 +0000 Subject: [PATCH] osmo-pcu[master]: Avoid code duplication in TBF test In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5338 to look at the new patch set (#3). Avoid code duplication in TBF test Move repetitive checks into corresponding macros to avoid copy-pasted code. This also enables strickter checks some of which were apparently omitted while copy-pasting. This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: If7aa72f5aa66c5e9c255542c066b5494c098aab2 --- M tests/tbf/TbfTest.cpp 1 file changed, 73 insertions(+), 120 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/5338/3 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 1370867..acf12e6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -295,6 +295,13 @@ printf("=== end %s ===\n", __func__); } +/* Receive an ACK */ +#define RCV_ACK(fin, tbf, rbb) do { \ + tbf->rcvd_dl_ack(fin, tbf->m_window.v_s(), rbb); \ + if (!fin) \ + OSMO_ASSERT(tbf->m_window.window_empty()); \ + } while(0) + static void test_tbf_delayed_release() { BTS the_bts; @@ -340,16 +347,13 @@ /* ACK all blocks */ memset(rbb, 0xff, sizeof(rbb)); - /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(false, dl_tbf->m_window.v_s(), rbb); - OSMO_ASSERT(dl_tbf->m_window.window_empty()); + + RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */ /* Force sending of a single block containing an LLC dummy command */ request_dl_rlc_block(dl_tbf, &fn); - /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(false, dl_tbf->m_window.v_s(), rbb); - OSMO_ASSERT(dl_tbf->m_window.window_empty()); + RCV_ACK(false, dl_tbf, rbb); /* Receive an ACK */ /* Timeout (make sure fn % 52 remains valid) */ fn += 52 * ((msecs_to_frames(bts->dl_tbf_idle_msec + 100) + 51)/ 52); @@ -357,8 +361,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FINISHED)); - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2692,8 +2695,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2742,8 +2744,7 @@ { uint8_t rbb[64/8]; - /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); + RCV_ACK(true, dl_tbf, rbb); /* Receive a final ACK */ /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2752,6 +2753,30 @@ tbf_free(dl_tbf); } + +#define NACK(tbf, x) do { \ + tbf->m_window.m_v_b.mark_nacked(x); \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(x)); \ + } while(0) + +#define CHECK_UNACKED(tbf, cs, bsn) do { \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_unacked(bsn)); \ + OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ + } while(0) + +#define CHECK_NACKED(tbf, cs, bsn) do { \ + OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(bsn)); \ + OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ + } while(0) + +#define MAKE_ACKED(m, tbf, fn, cs, check_unacked) do { \ + m = tbf->create_dl_acked_block(fn, tbf->control_ts); \ + OSMO_ASSERT(m); \ + if (check_unacked) \ + CHECK_UNACKED(tbf, cs, 0); \ + else \ + CHECK_NACKED(tbf, cs, 0); \ + } while(0) static void egprs_spb_to_normal_validation(BTS *the_bts, unsigned int mcs, unsigned int demanded_mcs) @@ -2777,15 +2802,13 @@ fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + + NACK(dl_tbf, 0); + OSMO_ASSERT(bsn1 == 0); dl_tbf->ms()->set_current_cs_dl @@ -2795,10 +2818,7 @@ fn = fn_add_blocks(fn, 1); /* Send first segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, false); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_FIRST_SEG_SENT); @@ -2809,10 +2829,7 @@ OSMO_ASSERT(egprs3->cps == 3); /* Send second segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_SECOND_SEG_SENT); @@ -2830,8 +2847,8 @@ (static_cast < GprsCodingScheme::Scheme > (GprsCodingScheme::CS4 + mcs)); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); + msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; @@ -2871,13 +2888,9 @@ fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); dl_tbf->ms()->set_current_cs_dl (static_cast < GprsCodingScheme::Scheme > @@ -2886,10 +2899,7 @@ fn = fn_add_blocks(fn, 1); /* Send first segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, false); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_FIRST_SEG_SENT); @@ -2913,10 +2923,7 @@ } /* Send second segment with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); OSMO_ASSERT(dl_tbf->m_rlc.block(0)->spb_status.block_status_dl == EGPRS_RESEG_SECOND_SEG_SENT); @@ -2965,19 +2972,11 @@ ((mcs == 7) && (demanded_mcs < 7))) { fn = fn_add_blocks(fn, 1); /* Send 2 RLC data block */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); /* Set the demanded MCS to demanded_mcs */ dl_tbf->ms()->set_current_cs_dl @@ -2986,43 +2985,26 @@ fn = fn_add_blocks(fn, 1); /* Retransmit the first RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_NACKED(dl_tbf, mcs, 1); fn = fn_add_blocks(fn, 1); /* Retransmit the second RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_UNACKED(dl_tbf, demanded_mcs, 1); } else if (((mcs == 5) && (demanded_mcs > 6)) || ((mcs == 6) && (demanded_mcs > 8))) { fn = fn_add_blocks(fn, 1); /* Send first RLC data block BSN 0 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); fn = fn_add_blocks(fn, 1); /* Send second RLC data block BSN 1 */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); dl_tbf->ms()->set_current_cs_dl (static_cast < GprsCodingScheme::Scheme > @@ -3030,63 +3012,34 @@ fn = fn_add_blocks(fn, 1); /* Send first, second RLC data blocks with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == demanded_mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == demanded_mcs); + MAKE_ACKED(msg, dl_tbf, fn, demanded_mcs, true); + CHECK_UNACKED(dl_tbf, demanded_mcs, 1); } else if (mcs > 6) { /* No Mcs change cases are handled here for mcs > MCS6*/ fn = fn_add_blocks(fn, 1); /* Send first,second RLC data blocks */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); - dl_tbf->m_window.m_v_b.mark_nacked(0); - dl_tbf->m_window.m_v_b.mark_nacked(1); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(1)); + NACK(dl_tbf, 0); + NACK(dl_tbf, 1); fn = fn_add_blocks(fn, 1); /* Send first,second RLC data blocks with demanded_mcs*/ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(1)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); - OSMO_ASSERT(dl_tbf->m_rlc.block(1)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); + CHECK_UNACKED(dl_tbf, mcs, 1); } else { /* No MCS change cases are handled here for mcs <= MCS6*/ fn = fn_add_blocks(fn, 1); /* Send first RLC data block */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); - dl_tbf->m_window.m_v_b.mark_nacked(0); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); + NACK(dl_tbf, 0); fn = fn_add_blocks(fn, 1); /* Send first RLC data block with demanded_mcs */ - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); - OSMO_ASSERT(msg); - OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_unacked(0)); - OSMO_ASSERT(dl_tbf->m_rlc.block(0)->cs_current_trans.to_num() - == mcs); + MAKE_ACKED(msg, dl_tbf, fn, mcs, true); } tbf_cleanup(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5338 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If7aa72f5aa66c5e9c255542c066b5494c098aab2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:32:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:32:05 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-DL: mark rcvd_dl_ack() parameters as boolean In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5339 to look at the new patch set (#3). TBF-DL: mark rcvd_dl_ack() parameters as boolean The final(_ack) parameter of rcvd_dl_ack() only used as boolean - mark it as such. Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac --- M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 3 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/5339/3 diff --git a/src/tbf.h b/src/tbf.h index 558bd21..e764309 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -427,8 +427,8 @@ const uint16_t pdu_delay_csec, const uint8_t *data, const uint16_t len); - int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb); - int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb); + int rcvd_dl_ack(bool final, uint8_t ssn, uint8_t *rbb); + int rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb); struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts); void trigger_ass(struct gprs_rlcmac_tbf *old_tbf); void clear_poll_timeout_flag(); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..ad2f17f 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1168,7 +1168,7 @@ return 0; } -int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, +int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb) { int rc; @@ -1188,7 +1188,7 @@ return rc; } -int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, uint8_t ssn, uint8_t *rbb) +int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, uint8_t ssn, uint8_t *rbb) { LOGP(DRLCMACDL, LOGL_DEBUG, "%s downlink acknowledge\n", tbf_name(this)); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..42594c3 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -267,7 +267,7 @@ /* Queue a final ACK */ memset(rbb, 0, sizeof(rbb)); /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, 1, rbb); + dl_tbf->rcvd_dl_ack(true, 1, rbb); /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -341,14 +341,14 @@ /* ACK all blocks */ memset(rbb, 0xff, sizeof(rbb)); /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(0, dl_tbf->m_window.v_s(), rbb); + dl_tbf->rcvd_dl_ack(false, dl_tbf->m_window.v_s(), rbb); OSMO_ASSERT(dl_tbf->m_window.window_empty()); /* Force sending of a single block containing an LLC dummy command */ request_dl_rlc_block(dl_tbf, &fn); /* Receive an ACK */ - dl_tbf->rcvd_dl_ack(0, dl_tbf->m_window.v_s(), rbb); + dl_tbf->rcvd_dl_ack(false, dl_tbf->m_window.v_s(), rbb); OSMO_ASSERT(dl_tbf->m_window.window_empty()); /* Timeout (make sure fn % 52 remains valid) */ @@ -358,7 +358,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FINISHED)); /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2695,7 +2695,7 @@ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); @@ -2745,7 +2745,7 @@ uint8_t rbb[64/8]; /* Receive a final ACK */ - dl_tbf->rcvd_dl_ack(1, dl_tbf->m_window.v_s(), rbb); + dl_tbf->rcvd_dl_ack(true, dl_tbf->m_window.v_s(), rbb); /* Clean up and ensure tbfs are in the correct state */ OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)); -- To view, visit https://gerrit.osmocom.org/5339 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:32:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:32:05 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: move window parameters to UL/DL level In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5340 to look at the new patch set (#3). TBF: move window parameters to UL/DL level The UL and DL TBF use different classes implementing window management. Hence it's better to use it explicitly instead of using the common window management superclass inside common TBF superclass. While at it, also remove the direct access to window class - use accessor functions instead. Related: OS#1759 Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6 --- M src/bts.cpp M src/encoding.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp 6 files changed, 42 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/40/5340/3 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..feb6bcd 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1197,7 +1197,7 @@ num_blocks = Decoding::decode_gprs_acknack_bits( &ack_nack->Ack_Nack_Description, &bits, - &bsn_begin, &bsn_end, &tbf->m_window); + &bsn_begin, &bsn_end, tbf->window()); LOGP(DRLCMAC, LOGL_DEBUG, "Got GPRS DL ACK bitmap: SSN: %d, BSN %d to %d - 1 (%d blocks), " @@ -1271,8 +1271,8 @@ (void *)&ack_nack->EGPRS_AckNack.Desc, (int)offsetof(EGPRS_AckNack_t, Desc), (int)offsetof(EGPRS_AckNack_w_len_t, Desc), - tbf->m_window.v_a(), - tbf->m_window.v_s(), + tbf->window()->v_a(), + tbf->window()->v_s(), osmo_hexdump((const uint8_t *)&ack_nack->EGPRS_AckNack.Desc.URBB, sizeof(ack_nack->EGPRS_AckNack.Desc.URBB))); @@ -1282,7 +1282,7 @@ num_blocks = Decoding::decode_egprs_acknack_bits( &ack_nack->EGPRS_AckNack.Desc, &bits, - &bsn_begin, &bsn_end, &tbf->m_window); + &bsn_begin, &bsn_end, tbf->window()); LOGP(DRLCMAC, LOGL_DEBUG, "Got EGPRS DL ACK bitmap: SSN: %d, BSN %d to %d - 1 (%d blocks), " diff --git a/src/encoding.cpp b/src/encoding.cpp index 87c6f08..b2da1e8 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -695,7 +695,7 @@ { bitvec_write_field(dest, &wp, tbf->current_cs().to_num() - 1, 2); // CHANNEL_CODING_COMMAND - write_packet_ack_nack_desc_gprs(bts, dest, wp, &tbf->m_window, is_final); + write_packet_ack_nack_desc_gprs(bts, dest, wp, tbf->window(), is_final); bitvec_write_field(dest, &wp, 1, 1); // 1: have CONTENTION_RESOLUTION_TLLI bitvec_write_field(dest, &wp, tbf->tlli(), 32); // CONTENTION_RESOLUTION_TLLI @@ -892,7 +892,7 @@ /* -2 for last bit 0 mandatory and REL5 not supported */ unsigned bits_ack_nack = dest->data_len * 8 - wp - 2; - write_packet_ack_nack_desc_egprs(bts, dest, wp, &tbf->m_window, is_final, bits_ack_nack); + write_packet_ack_nack_desc_egprs(bts, dest, wp, tbf->window(), is_final, bits_ack_nack); bitvec_write_field(dest, &wp, 0, 1); // fixed 0 bitvec_write_field(dest, &wp, 0, 1); // 0: don't have REL 5 diff --git a/src/tbf.cpp b/src/tbf.cpp index 98005dc..87101d0 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1449,6 +1449,11 @@ return ts == control_ts; } +gprs_rlc_ul_window *gprs_rlcmac_ul_tbf::window() +{ + return &m_window; +} + struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts) { diff --git a/src/tbf.h b/src/tbf.h index 1486899..4e601f3 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -166,8 +166,6 @@ GprsMs *ms() const; void set_ms(GprsMs *ms); - gprs_rlc_window *window(); - uint8_t tsc() const; int rlcmac_diag(); @@ -413,7 +411,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_dl_tbf(BTS *bts); - + gprs_rlc_dl_window *window(); void cleanup(); void enable_egprs(); /* dispatch Unitdata.DL messages */ @@ -453,7 +451,6 @@ * All states that need reset must be in this struct, so this is why * variables are in both (dl and ul) structs and not outside union. */ - gprs_rlc_dl_window m_window; int32_t m_tx_counter; /* count all transmitted blocks */ uint8_t m_wait_confirm; /* wait for CCCH IMM.ASS cnf */ bool m_dl_ack_requested; @@ -504,11 +501,18 @@ enum egprs_rlcmac_dl_spb get_egprs_dl_spb(int bsn); struct osmo_timer_list m_llc_timer; + + /* Please note that all variables below will be reset when changing + * from WAIT RELEASE back to FLOW state (re-use of TBF). + * All states that need reset must be in this struct, so this is why + * variables are in both (dl and ul) structs and not outside union. + */ + gprs_rlc_dl_window m_window; }; struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_ul_tbf(BTS *bts); - + gprs_rlc_ul_window *window(); struct msgb *create_ul_ack(uint32_t fn, uint8_t ts); bool ctrl_ack_to_toggle(); bool handle_ctrl_ack(); @@ -547,7 +551,6 @@ * All states that need reset must be in this struct, so this is why * variables are in both (dl and ul) structs and not outside union. */ - gprs_rlc_ul_window m_window; int32_t m_rx_counter; /* count all received blocks */ uint8_t m_n3103; /* N3103 counter */ uint8_t m_usf[8]; /* list USFs per PDCH (timeslot) */ @@ -559,6 +562,13 @@ protected: void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc); + + /* Please note that all variables below will be reset when changing + * from WAIT RELEASE back to FLOW state (re-use of TBF). + * All states that need reset must be in this struct, so this is why + * variables are in both (dl and ul) structs and not outside union. + */ + gprs_rlc_ul_window m_window; }; #ifdef __cplusplus @@ -612,16 +622,6 @@ return static_cast(tbf); else return NULL; -} - -inline gprs_rlc_window *gprs_rlcmac_tbf::window() -{ - switch (direction) - { - case GPRS_RLCMAC_UL_TBF: return &as_ul_tbf(this)->m_window; - case GPRS_RLCMAC_DL_TBF: return &as_dl_tbf(this)->m_window; - } - return NULL; } #endif diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index ad2f17f..c3d2c89 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -985,6 +985,11 @@ return lost * 100 / (lost + received); } +gprs_rlc_dl_window *gprs_rlcmac_dl_tbf::window() +{ + return &m_window; +} + int gprs_rlcmac_dl_tbf::update_window(unsigned first_bsn, const struct bitvec *rbb) { diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index acf12e6..b950af0 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -297,9 +297,9 @@ /* Receive an ACK */ #define RCV_ACK(fin, tbf, rbb) do { \ - tbf->rcvd_dl_ack(fin, tbf->m_window.v_s(), rbb); \ + tbf->rcvd_dl_ack(fin, tbf->window()->v_s(), rbb); \ if (!fin) \ - OSMO_ASSERT(tbf->m_window.window_empty()); \ + OSMO_ASSERT(tbf->window()->window_empty()); \ } while(0) static void test_tbf_delayed_release() @@ -1725,7 +1725,7 @@ "Got MS: TLLI = 0x%08x, TA = %d\n", ms->tlli(), ms->ta()); send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.reset_v_x(); + ul_tbf->window()->reset_v_x(); /* Function to generate URBB with length */ ul_tbf = establish_ul_tbf_two_phase_puan_URBB_with_length(&the_bts, ts_no, tlli, &fn, qta, ms_class, egprs_ms_class, ul_tbf); @@ -1737,7 +1737,7 @@ send_dl_data(&the_bts, tlli, imsi, test_data, sizeof(test_data)); - ul_tbf->m_window.reset_v_x(); + ul_tbf->window()->reset_v_x(); /* Function to generate CRBB */ bts->ws_base = 128; bts->ws_pdch = 64; @@ -2529,7 +2529,7 @@ dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); - prlcdlwindow = &dl_tbf->m_window; + prlcdlwindow = dl_tbf->window(); prlcmvb = &prlcdlwindow->m_v_b; prlcdlwindow->m_v_s = 1288; prlcdlwindow->m_v_a = 1176; @@ -2561,7 +2561,7 @@ Decoding::decode_egprs_acknack_bits( &ack_nack->EGPRS_AckNack.Desc, &bits, - &bsn_begin, &bsn_end, &dl_tbf->m_window); + &bsn_begin, &bsn_end, dl_tbf->window()); dl_tbf->rcvd_dl_ack( ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, @@ -2755,17 +2755,17 @@ } #define NACK(tbf, x) do { \ - tbf->m_window.m_v_b.mark_nacked(x); \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(x)); \ + tbf->window()->m_v_b.mark_nacked(x); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_nacked(x)); \ } while(0) #define CHECK_UNACKED(tbf, cs, bsn) do { \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_unacked(bsn)); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_unacked(bsn)); \ OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ } while(0) #define CHECK_NACKED(tbf, cs, bsn) do { \ - OSMO_ASSERT(tbf->m_window.m_v_b.is_nacked(bsn)); \ + OSMO_ASSERT(tbf->window()->m_v_b.is_nacked(bsn)); \ OSMO_ASSERT(tbf->m_rlc.block(bsn)->cs_current_trans.to_num() == cs); \ } while(0) -- To view, visit https://gerrit.osmocom.org/5340 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:35:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:35:27 +0000 Subject: [PATCH] osmo-pcu[master]: TBF-DL: fix misleading idle time check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5218 to look at the new patch set (#2). TBF-DL: fix misleading idle time check The dl_tbf_idle_msec is uint32_t so it cannot be < 0. Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/5218/2 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..4fc60e4 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1252,7 +1252,7 @@ { int keep_time_frames; - if (bts_data()->dl_tbf_idle_msec <= 0) + if (bts_data()->dl_tbf_idle_msec == 0) return false; keep_time_frames = msecs_to_frames(bts_data()->dl_tbf_idle_msec); -- To view, visit https://gerrit.osmocom.org/5218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:46:43 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 10:46:43 +0000 Subject: osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Since https://gerrit.osmocom.org/#/c/5383/ is already merged and verified by Neels, we can merge this one as well. -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:50:30 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:50:30 +0000 Subject: [PATCH] osmo-gsm-tester[master]: bts_osmo: Use correct parameters for create_pcu Message-ID: Review at https://gerrit.osmocom.org/5386 bts_osmo: Use correct parameters for create_pcu Commit c9817a50ff8d4138f9659a4e6e146f9843662af1 moved code from different BTS into a shared base class, and create_pcu method was created to be implemented by subclasses to get a new pcu object. However, parameters where wrongly copied over from pcu() method during refactoring. create_pcu() has no parameters. Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4 --- M src/osmo_gsm_tester/bts_osmo.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/86/5386/1 diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py index 16e79cf..f4210b8 100644 --- a/src/osmo_gsm_tester/bts_osmo.py +++ b/src/osmo_gsm_tester/bts_osmo.py @@ -84,7 +84,7 @@ def pcu(self): if self._pcu is None: - self._pcu = self.create_pcu(self.suite_run, self, self.conf) + self._pcu = self.create_pcu() return self._pcu def set_bsc(self, bsc): -- To view, visit https://gerrit.osmocom.org/5386 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:50:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:50:59 +0000 Subject: osmo-gsm-tester[master]: bts_osmo: Use correct parameters for create_pcu In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5386 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 10:51:01 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 10:51:01 +0000 Subject: [MERGED] osmo-gsm-tester[master]: bts_osmo: Use correct parameters for create_pcu In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: bts_osmo: Use correct parameters for create_pcu ...................................................................... bts_osmo: Use correct parameters for create_pcu Commit c9817a50ff8d4138f9659a4e6e146f9843662af1 moved code from different BTS into a shared base class, and create_pcu method was created to be implemented by subclasses to get a new pcu object. However, parameters where wrongly copied over from pcu() method during refactoring. create_pcu() has no parameters. Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4 --- M src/osmo_gsm_tester/bts_osmo.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved; Verified diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py index 16e79cf..f4210b8 100644 --- a/src/osmo_gsm_tester/bts_osmo.py +++ b/src/osmo_gsm_tester/bts_osmo.py @@ -84,7 +84,7 @@ def pcu(self): if self._pcu is None: - self._pcu = self.create_pcu(self.suite_run, self, self.conf) + self._pcu = self.create_pcu() return self._pcu def set_bsc(self, bsc): -- To view, visit https://gerrit.osmocom.org/5386 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:15:32 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:15:32 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activ... Message-ID: Review at https://gerrit.osmocom.org/5387 Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activate test osmo-ggsn requires a link-local IPv6 address to be added to the tun interface, otherwise the apn will not be configured correctly and it won't be able to allocate addresses from the ipv6 pool later on. Some OS don't support autoconfiguring link-local IPv6 addresses when the interface is brought up (some linux versions are known to fail at it). This is the case for our Prod osmo-gsm-tester setup (running debian8 with kernel 3.16.51). Make sure we configure correctly the interface by forcing osmo-ggsn to set on the interface and use a specific IPv6 link-local address. This is done by using the "ipv6 link-local" vty cmd in osmo-ggsn. After this modification, we can re-enable ipv6 gprs context creation as it will work in Prod setup. Related: OS#2746 Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34 --- M src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl M suites/gprs/ping.py 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/87/5387/1 diff --git a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl index 1ee19d1..1692db6 100644 --- a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl @@ -56,6 +56,7 @@ ipv6 dns 0 2001:4860:4860::8888 ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 link-local fe80::1111:1111:1111:1111/64 no shutdown apn inet46 gtpu-mode tun @@ -69,6 +70,7 @@ ipv6 dns 0 2001:4860:4860::8888 ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 link-local fe80::1111:1111:1111:1112/64 no shutdown default-apn internet no shutdown ggsn diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 5d2d847..1b6d85c 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -52,12 +52,11 @@ # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) -# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in Prod main unit (OS#2746) # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) -# sleep(5) +ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +sleep(5) # TODO: send ping to server or open TCP conn with a socket in python -# ms.deactivate_context(ctx_id_v6) +ms.deactivate_context(ctx_id_v6) # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) -- To view, visit https://gerrit.osmocom.org/5387 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:17:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:17:46 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#2). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/2 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:17:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:17:46 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI integration In-Reply-To: References: Message-ID: Expand CI integration * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..eafc2f4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,11 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install + rm -rf ./build python3 ./setup.py install + +# TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:17:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:17:46 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#2). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/2 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:17:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:17:46 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5279 to look at the new patch set (#2). Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically fin package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/2 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:18:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:18:08 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Add python 3 support to jenkins tests In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Add python 3 support to jenkins tests ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5281 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I5695899d902664da47ec5f9d64bd8087d9037ab1 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:26:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:26:12 +0000 Subject: [PATCH] osmo-gsm-tester[master]: Add git-review config Message-ID: Review at https://gerrit.osmocom.org/5388 Add git-review config Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 --- A .gitreview 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/88/5388/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..88a6443 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-gsm-tester + -- To view, visit https://gerrit.osmocom.org/5388 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:27:15 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:27:15 +0000 Subject: osmo-gsm-tester[master]: Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5387 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:27:17 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:27:17 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activ... In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activate test ...................................................................... Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activate test osmo-ggsn requires a link-local IPv6 address to be added to the tun interface, otherwise the apn will not be configured correctly and it won't be able to allocate addresses from the ipv6 pool later on. Some OS don't support autoconfiguring link-local IPv6 addresses when the interface is brought up (some linux versions are known to fail at it). This is the case for our Prod osmo-gsm-tester setup (running debian8 with kernel 3.16.51). Make sure we configure correctly the interface by forcing osmo-ggsn to set on the interface and use a specific IPv6 link-local address. This is done by using the "ipv6 link-local" vty cmd in osmo-ggsn. After this modification, we can re-enable ipv6 gprs context creation as it will work in Prod setup. Related: OS#2746 Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34 --- M src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl M suites/gprs/ping.py 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl index 1ee19d1..1692db6 100644 --- a/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-ggsn.cfg.tmpl @@ -56,6 +56,7 @@ ipv6 dns 0 2001:4860:4860::8888 ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 link-local fe80::1111:1111:1111:1111/64 no shutdown apn inet46 gtpu-mode tun @@ -69,6 +70,7 @@ ipv6 dns 0 2001:4860:4860::8888 ipv6 dns 1 2001:4860:4860::8844 ipv6 ifconfig fde4:8dba:82e1:2000:0:0:0:0/56 + ipv6 link-local fe80::1111:1111:1111:1112/64 no shutdown default-apn internet no shutdown ggsn diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py index 5d2d847..1b6d85c 100755 --- a/suites/gprs/ping.py +++ b/suites/gprs/ping.py @@ -52,12 +52,11 @@ # TODO: send ping to server or open TCP conn with a socket in python ms.deactivate_context(ctx_id_v4) -# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in Prod main unit (OS#2746) # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713) -# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) -# sleep(5) +ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6) +sleep(5) # TODO: send ping to server or open TCP conn with a socket in python -# ms.deactivate_context(ctx_id_v6) +ms.deactivate_context(ctx_id_v6) # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation failed (36) # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46) -- To view, visit https://gerrit.osmocom.org/5387 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:28:19 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:28:19 +0000 Subject: osmo-gsm-tester[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5388 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:29:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:29:19 +0000 Subject: osmo-gsm-tester[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5388 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:29:21 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:29:21 +0000 Subject: [MERGED] osmo-gsm-tester[master]: Add git-review config In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add git-review config ...................................................................... Add git-review config Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 --- A .gitreview 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Max: Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..88a6443 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-gsm-tester + -- To view, visit https://gerrit.osmocom.org/5388 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:40:39 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:40:39 +0000 Subject: [PATCH] osmo-gsm-tester[master]: modem: activate_context: print protocol too in dbg log Message-ID: Review at https://gerrit.osmocom.org/5389 modem: activate_context: print protocol too in dbg log Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba --- M src/osmo_gsm_tester/modem.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/89/5389/1 diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index 206a081..7750740 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -596,7 +596,7 @@ connmgr.ResetContexts() # Requires Powered=false def activate_context(self, apn='internet', user='ogt', pwd='', protocol='ip'): - self.dbg('activate_context', apn=apn, user=user) + self.dbg('activate_context', apn=apn, user=user, protocol=protocol) connmgr = self.dbus.interface(I_CONNMGR) ctx_path = connmgr.AddContext('internet') -- To view, visit https://gerrit.osmocom.org/5389 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:45:03 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#3). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/3 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:45:03 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#3). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/3 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:45:03 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5279 to look at the new patch set (#3). Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/3 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:45:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 11:45:04 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add basic module import tests Message-ID: Review at https://gerrit.osmocom.org/5390 Add basic module import tests Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/90/5390/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eafc2f4..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,8 +4,10 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install +python2 tests/test_py2.py rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py # TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:46:40 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:46:40 +0000 Subject: osmo-gsm-tester[master]: modem: activate_context: print protocol too in dbg log In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5389 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 11:46:41 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 11:46:41 +0000 Subject: [MERGED] osmo-gsm-tester[master]: modem: activate_context: print protocol too in dbg log In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: activate_context: print protocol too in dbg log ...................................................................... modem: activate_context: print protocol too in dbg log Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba --- M src/osmo_gsm_tester/modem.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index 206a081..7750740 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -596,7 +596,7 @@ connmgr.ResetContexts() # Requires Powered=false def activate_context(self, apn='internet', user='ogt', pwd='', protocol='ip'): - self.dbg('activate_context', apn=apn, user=user) + self.dbg('activate_context', apn=apn, user=user, protocol=protocol) connmgr = self.dbus.interface(I_CONNMGR) ctx_path = connmgr.AddContext('internet') -- To view, visit https://gerrit.osmocom.org/5389 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:18 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fai... Message-ID: Review at https://gerrit.osmocom.org/5391 BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fail with only CIC) Change-Id: Iee7202841ad8466a65b5d54679262be100863e39 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/5391/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b6d28b1..faf1a6e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -381,6 +381,29 @@ } } +/* Test behavior if MSC answers with CREF to CR */ +testcase TC_assignment_cic_only() runs on test_CT { + var BSSAP_N_CONNECT_ind rx_c_ind; + var RSL_Message rx_rsl; + var DchanTuple dt; + + f_init(); + f_bssap_reset(); + + dt := f_est_dchan('23'O, 23, '00000000'O); + /* send assignment without AoIP IEs */ + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(0, 1))); + alt { + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { + setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); + } + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { + setverdict(pass); + } + [] BSSAP.receive { repeat; } + } +} + type record DchanTuple { integer sccp_conn_id, @@ -1087,6 +1110,8 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_assignment_cic_only() ); + execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); execute( TC_rll_est_ind_inval_sapi3() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 54e3f79..6e7813f 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -368,6 +368,22 @@ } } +template PDU_BSSAP tr_BSSMAP_AssignmentFail modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + assignmentFailure := { + messageType := '03'O, /* overwritten */ + rR_Cause := *, + circuitPool := *, + circuitPoolList := *, + talkerPriority := *, + codecList := * + } + } + } +} + + template (value) PDU_BSSAP ts_BSSMAP_ClearCommand(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { pdu := { -- To view, visit https://gerrit.osmocom.org/5391 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee7202841ad8466a65b5d54679262be100863e39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:18 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RSL_Types: Add various IPA / Abis-IP specific IEs + templates Message-ID: Review at https://gerrit.osmocom.org/5392 RSL_Types: Add various IPA / Abis-IP specific IEs + templates Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb --- M library/RSL_Types.ttcn 1 file changed, 226 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/5392/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 3e9baaa..a807ce2 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -487,6 +487,39 @@ RSL_SYSTEM_INFO_20 ('00101101'B) } with { variant "FIELDLENGTH(8)" } + type record RSL_IE_IPA_ConnectionStats { + uint8_t len, + uint32_t tx_packets, + uint32_t tx_octets, + uint32_t rx_packets, + uint32_t rx_octets, + uint32_t lost_packets, + uint32_t jitter, + uint32_t avg_delay + } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } + + type enumerated RSL_IPA_SpeechMode { + RSL_IPA_SPM_SENDRECV ('00'B), + RSL_IPA_SPM_RECVONLY ('01'B), + RSL_IPA_SPM_SENDONLY ('10'B), + RSL_IPA_SPM_RESERVED ('11'B) + } with { variant "FIELDLENGTH(2)" } + + type enumerated RSL_IPA_Codec { + RSL_IPA_CODEC_FR ('0000'B), + RSL_IPA_CODEC_EFR ('0001'B), + RSL_IPA_CODEC_AMR_F ('0010'B), + RSL_IPA_CODEC_HR ('0011'B), + RSL_IPA_CODEC_AMR_H ('0101'B), + RSL_IPA_CODEC_RTP_PT ('1111'B) + } with { variant "FIELDLENGTH(4)" } + + type record RSL_IE_IPA_SpeechMode { + BIT2 reserved, + RSL_IPA_SpeechMode mode, + RSL_IPA_Codec codec + } + /* union of all IE bodies */ type union RSL_IE_Body { RslChannelNr chan_nr, @@ -515,6 +548,16 @@ RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, + + uint16_t ipa_conn_id, + uint16_t ipa_local_port, + uint16_t ipa_remote_port, + uint32_t ipa_local_ip, + uint32_t ipa_remote_ip, + uint8_t ipa_rtp_pt, + uint8_t ipa_rtp_pt2, + RSL_IE_IPA_ConnectionStats ipa_stats, + RSL_IE_IPA_SpeechMode ipa_speech_mode, RSL_LV other } @@ -552,6 +595,16 @@ full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; ms_identity, iei = RSL_IE_MS_IDENTITY; other, iei = RSL_IE_FULL_BCCH_INFO; + + ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; + ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; + ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; + ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; + ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; + ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; + ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; + ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; + ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; other, OTHERWISE; )" }; @@ -866,4 +919,177 @@ } } + + /* Abis/IP specific messages */ + + template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + * + } + } + + template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, + uint16_t ipa_conn_id, uint32_t local_ip, + uint16_t local_port, uint7_t rtp_pt2) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), + t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), + t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) + } + } + + template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_MDCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + * + } + } + + template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, + uint32_t remote_ip, uint16_t remote_port, + uint7_t rtp_pt2) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), + t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), + /* optional: RTP Payload Type */ + t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) + } + } + + template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_MDCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional connection ID */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, + RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, + template uint16_t ipa_conn_id := omit) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + /* FIXME: optional conn_id */ + * + } + } + + template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, + template RSL_IE_IPA_ConnectionStats stats) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) + } + } + + template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional connection ID */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + + } with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/5392 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Enable use for AoIP, not just E1-CIC Message-ID: Review at https://gerrit.osmocom.org/5393 BSSMAP_Templates: Enable use for AoIP, not just E1-CIC Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205 --- M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Templates.ttcn 4 files changed, 29 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/5393/1 diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 6a9a57f..3fc11e9 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -86,9 +86,9 @@ [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { /* respond with ASSIGNMENT CMD */ g_state := MSC_STATE_WAIT_ASS_COMPL; - BSSAP.send(ts_BSSMAP_AssignmentReq(0, e1_timeslot)); + BSSAP.send(ts_BSSMAP_AssignmentReq(ts_BSSMAP_IE_CIC(0, e1_timeslot))); } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(?,*)) { /* FIXME: Send MGCP CRCX */ g_state := MSC_STATE_WAIT_CRCX_ACK; var MgcpTransId trans_id := f_mgcp_alloc_tid(); diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index faf1a6e..090ed0c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -392,7 +392,7 @@ dt := f_est_dchan('23'O, 23, '00000000'O); /* send assignment without AoIP IEs */ - BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(0, 1))); + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(ts_BSSMAP_IE_CIC(0, 1)))); alt { [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 6a9a57f..8fa71fb 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -86,9 +86,11 @@ [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { /* respond with ASSIGNMENT CMD */ g_state := MSC_STATE_WAIT_ASS_COMPL; - BSSAP.send(ts_BSSMAP_AssignmentReq(0, e1_timeslot)); + var BSSMAP_IE_AoIP_TransportLayerAddress tla; + tla := valueof(ts_BSSMAP_IE_AoIP_TLA({ipv4:='01020304'O}, 12345)); + BSSAP.send(ts_BSSMAP_AssignmentReq(omit, tla)); } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(*,?)) { /* FIXME: Send MGCP CRCX */ g_state := MSC_STATE_WAIT_CRCX_ACK; var MgcpTransId trans_id := f_mgcp_alloc_tid(); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 6e7813f..0d2db3d 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -256,7 +256,17 @@ cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5)) } -template (value) PDU_BSSAP ts_BSSMAP_AssignmentReq(uint11_t span, uint5_t ts) +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, + uint16_t udp_port) := { + elementIdentifier := '7C'O, + lengthIndicator := 0, /* overwritten */ + ipAddress := addr, + uDPPortValue := udp_port +} + +template PDU_BSSAP +ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -265,7 +275,7 @@ channelType := ts_BSSMAP_IE_ChannelType, layer3HeaderInfo := omit, priority := omit, - circuitIdentityCode := ts_BSSMAP_IE_CIC(span, ts), + circuitIdentityCode := cic, downLinkDTX_Flag := omit, interferenceBandToBeUsed := omit, classmarkInformationType2 := omit, @@ -276,7 +286,7 @@ serviceHandover := omit, encryptionInformation := omit, talkerPriority := omit, - aoIPTransportLayer := omit, + aoIPTransportLayer := aoip, codecList := omit, callIdentifier := omit, kC128 := omit, @@ -321,7 +331,9 @@ } } -template (value) PDU_BSSAP ts_BSSMAP_AssignmentComplete(BSSMAP_IE_CircuitIdentityCode cic) +template PDU_BSSAP +ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -336,7 +348,7 @@ speechVersion := omit, lSAIdentifier := omit, talkerPriority := omit, - aoIPTransportLayer := omit, + aoIPTransportLayer := aoip, speechCodec := omit, codecList := omit, lCLS_BSS_Status := omit @@ -345,13 +357,15 @@ } } -template PDU_BSSAP tr_BSSMAP_AssignmentComplete modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) +modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { assignmentComplete := { messageType := '02'O, /* overwritten */ rR_Cause := *, - circuitIdentityCode := ?, + circuitIdentityCode := cic, cellIdentifier := *, chosenChannel := *, chosenEncryptionAlgorithm := *, @@ -359,7 +373,7 @@ speechVersion := *, lSAIdentifier := *, talkerPriority := *, - aoIPTransportLayer := *, + aoIPTransportLayer := aoip, speechCodec := *, codecList := *, lCLS_BSS_Status := * -- To view, visit https://gerrit.osmocom.org/5393 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_outbound_connect to test if BSC rejects in... Message-ID: Review at https://gerrit.osmocom.org/5394 BSC_Tests: Add TC_outbound_connect to test if BSC rejects inbound SCCP connections Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121 --- M bsc/BSC_Tests.ttcn M library/BSSAP_CodecPort.ttcn 2 files changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/94/5394/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 090ed0c..41e3a84 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -381,6 +381,20 @@ } } +/*********************************************************************** + * Assignment Testing + ***********************************************************************/ + +/* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction) */ +testcase TC_outbound_connect() runs on test_CT { + f_init(); + f_bssap_reset(); + + BSSAP.send(ts_BSSAP_CONNECT_req(g_sccp_addr_peer, g_sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq)); + BSSAP.receive(tr_BSSAP_DISC_ind(2342, ?, ?)); + setverdict(pass); +} + /* Test behavior if MSC answers with CREF to CR */ testcase TC_assignment_cic_only() runs on test_CT { var BSSAP_N_CONNECT_ind rx_c_ind; @@ -1110,6 +1124,7 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_outbound_connect() ); execute( TC_assignment_cic_only() ); execute( TC_rll_est_ind_inact_lchan() ); diff --git a/library/BSSAP_CodecPort.ttcn b/library/BSSAP_CodecPort.ttcn index 5e43608..7470dd4 100644 --- a/library/BSSAP_CodecPort.ttcn +++ b/library/BSSAP_CodecPort.ttcn @@ -21,13 +21,14 @@ template BSSAP_N_CONNECT_req ts_BSSAP_CONNECT_req(SCCP_PAR_Address called, SCCP_PAR_Address calling, - template PDU_BSSAP bssap := *) := { + SCCP_PAR_Connection_Id conn_id, + template PDU_BSSAP bssap := omit) := { calledAddress := called, callingAddress := calling, expeditedDataSel := omit, qualityOfService := omit, userData := bssap, - connectionId := omit, + connectionId := conn_id, importance := omit } -- To view, visit https://gerrit.osmocom.org/5394 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define enum with 08.08 cause values Message-ID: Review at https://gerrit.osmocom.org/5395 BSSMAP_Templates: Define enum with 08.08 cause values Change-Id: I2fc122a510403d0da8da04ca323687065347c96a --- M library/BSSMAP_Templates.ttcn 1 file changed, 79 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/95/5395/1 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 0d2db3d..0a86765 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -7,6 +7,84 @@ type integer BssmapCause; +/* 48.008 3.2.2.5 - this actually belongs to BSSAP_Types.ttcn */ +type enumerated myBSSMAP_Cause { + /* 000 / 001: Normal event */ + GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE ('0000000'B), + GSM0808_CAUSE_RADIO_INTERFACE_FAILURE ('0000001'B), + GSM0808_CAUSE_UPLINK_QUALITY ('0000010'B), + GSM0808_CAUSE_UPLINK_STRENGTH ('0000011'B), + GSM0808_CAUSE_DOWNLINK_QUALITY ('0000100'B), + GSM0808_CAUSE_DOWNLINK_STRENGTH ('0000101'B), + GSM0808_CAUSE_DISTANCE ('0000110'B), + GSM0808_CAUSE_O_AND_M_INTERVENTION ('0000111'B), + GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION ('0001000'B), + GSM0808_CAUSE_CALL_CONTROL ('0001001'B), + GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION ('0001010'B), + GSM0808_CAUSE_HANDOVER_SUCCESSFUL ('0001011'B), + GSM0808_CAUSE_BETTER_CELL ('0001100'B), + GSM0808_CAUSE_DIRECTED_RETRY ('0001101'B), + GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL ('0001110'B), + GSM0808_CAUSE_TRAFFIC ('0001111'B), + GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL ('0010000'B), + GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL ('0010001'B), + GSM0808_CAUSE_RELOCATION_TRIGGERED ('0010010'B), + GSM0808_CAUSE_REQUSTED_OPT_NOT_AUTHORISED ('0010100'B), + GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED ('0010101'B), + GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG ('0010110'B), + GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT ('0010111'B), + GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE ('0011000'B), + /* reserved */ + /* 010: Resource unavailable */ + GSM0808_CAUSE_EQUIPMENT_FAILURE ('0100000'B), + GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE ('0100001'B), + GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE ('0100010'B), + GSM0808_CAUSE_CCCH_OVERLOAD ('0100011'B), + GSM0808_CAUSE_PROCESSOR_OVERLOAD ('0100100'B), + GSM0808_CAUSE_BSS_NOT_EQUIPPED ('0100101'B), + GSM0808_CAUSE_MS_NOT_EQUIPPED ('0100110'B), + GSM0808_CAUSE_INVALID_CELL ('0100111'B), + GSM0808_CAUSE_TRAFFIC_LOAD ('0101000'B), + GSM0808_CAUSE_PREEMPTION ('0101001'B), + GSM0808_CAUSE_DTM_HO_SGSN_FAILURE ('0101010'B), + GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE ('0101011'B), + /* reserved */ + /* 011: Service or option not available, but implemented */ + GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE ('0110000'B), + GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH ('0110001'B), + GSM0808_CAUSE_SWITCH_CIRCUIT_POOL ('0110010'B), + GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE ('0110011'B), + GSM0808_CAUSE_LSA_NOT_ALLOWED ('0110100'B), + GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL ('0110101'B), + GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL ('0110110'B), + GSM0808_CAUSE_INVALID_CSG_CELL ('0110111'B), + /* reserved */ + /* 100: Service or option not implemented or currently disabled */ + GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL ('0111111'B), + GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED ('1000000'B), + GSM0808_CAUSE_GERAN_IU_MODE_FAILURE ('1000001'B), + GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE ('1000010'B), + GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS ('1000011'B), + GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP ('1000100'B), + GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP ('1000101'B), + GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP ('1000110'B), + /* reserved */ + /* 101: Invalid message */ + GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED ('1010000'B), + GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS ('1010001'B), + GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING ('1010010'B), + GSM0808_CAUSE_INCORRECT_VALUE ('1010011'B), + GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE ('1010100'B), + GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT ('1010101'B), + GSM0808_CAUSE_DTM_HO_INVALID_PS_IND ('1010110'B), + GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC ('1010111'B), + /* reserved */ + /* 110: protocol error */ + GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC ('1100000'B), + GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTANT ('1100001'B), + GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B) +} with { variant "FIELDLENGTH(7)" }; + template PDU_BSSAP ts_BSSAP_BSSMAP := { discriminator := '0'B, spare := '0000000'B, @@ -544,5 +622,4 @@ } - -} +} with { encode "RAW" }; -- To view, visit https://gerrit.osmocom.org/5395 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fc122a510403d0da8da04ca323687065347c96a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define various ASSIGNMENT related template... Message-ID: Review at https://gerrit.osmocom.org/5396 BSSMAP_Templates: Define various ASSIGNMENT related templates/constants Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb --- M library/BSSMAP_Templates.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/96/5396/1 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 0a86765..071c66d 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -316,8 +316,15 @@ } } +const OCT1 ChRate_ANY := '00'O; const OCT1 ChRate_TCHF := '08'O; const OCT1 ChRate_TCHH := '09'O; +const OCT1 ChRate_TCHForH_Fpref := '0A'O; +const OCT1 ChRate_TCHForH_Hpref := '0B'O; +const OCT1 ChRate_TCHForH_Fpref_nochg := '1A'O; +const OCT1 ChRate_TCHForH_Hpref_nochg := '1B'O; +const OCT1 ChRate_TCHForH := '0F'O; +const OCT1 ChRate_TCHForH_nochg := '1F'O; template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := { elementIdentifier := '0B'O, /* overwritten */ @@ -327,6 +334,36 @@ channelRateAndType := ChRate_TCHF, speechId_DataIndicator := '01'O /* FRv1 */ } + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies ts_BSSMAP_IE_ChannelType := { + speechOrDataIndicator := '0100'B /* speech + CTM */ +} + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCSD := { + elementIdentifier := '0B'O, /* overwritten */ + lengthIndicator := 0, /* overwritten */ + speechOrDataIndicator := '0010'B, /* data */ + spare1_4 := '0000'B, + channelRateAndType := ChRate_TCHF, + speechId_DataIndicator := '10'O /* 9600 bps / transparent */ +} + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeSIGNAL := { + elementIdentifier := '0B'O, /* overwritten */ + lengthIndicator := 0, /* overwritten */ + speechOrDataIndicator := '0011'B, /* data */ + spare1_4 := '0000'B, + channelRateAndType := ChRate_ANY, + speechId_DataIndicator := '00'O /* spare */ +} + +template (value) BSSMAP_IE_EncryptionInformation ts_BSSMAP_IE_EncrInfo(OCT8 kc, OCT1 algs := '05'O) := { + elementIdentifier := '0A'O, + lengthIndicator := 0, /* overwritten */ + permittedAlgorithms := algs, + key := kc +} + template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, uint5_t ts) := { elementIdentifier := '01'O, /* overwritten */ @@ -342,6 +379,11 @@ uDPPortValue := udp_port } +template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { + elementIdentifier := '83'O, + kC128_Value := kc128 +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) -- To view, visit https://gerrit.osmocom.org/5396 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:19:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:19:19 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add whole bunch of new assignment tests Message-ID: Review at https://gerrit.osmocom.org/5397 BSC_Tests: Add whole bunch of new assignment tests Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 125 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/5397/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 41e3a84..77f3ef8 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -411,12 +411,125 @@ [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); } + /* TODO: Actually expect GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP */ [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { setverdict(pass); } [] BSSAP.receive { repeat; } } } + +/* Run everything required up to sending a caller-specified assignment command and expect response */ +function f_assignment_exp(PDU_BSSAP ass_cmd, template PDU_BSSAP exp, charstring fail_text) +runs on test_CT { + var BSSAP_N_CONNECT_ind rx_c_ind; + var RSL_Message rx_rsl; + var DchanTuple dt; + + f_init(); + f_bssap_reset(); + + dt := f_est_dchan('23'O, 23, '00000000'O); + /* send assignment without AoIP IEs */ + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ass_cmd)); + alt { + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { + if (ischosen(exp.pdu.bssmap.assignmentComplete)) { + setverdict(pass); + } else { + setverdict(fail, fail_text); + } + } + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { + if (ischosen(exp.pdu.bssmap.assignmentFailure)) { + setverdict(pass); + } else { + setverdict(fail, fail_text); + } + } + [] BSSAP.receive { repeat; } + } +} +testcase TC_assignment_csd() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD); + //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for CSD"); +} + +testcase TC_assignment_ctm() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCTM); + //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for Speech+CTM"); +} + +testcase TC_assignment_sign() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); +} + +testcase TC_assignment_fr_a5_0() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); +} + +testcase TC_assignment_fr_a5_1() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); +} + + +testcase TC_assignment_fr_a5_3() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); +} + +testcase TC_assignment_fr_a5_4() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + const OCT16 kc128 := kc & kc; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); + ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); + /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted TCH/F FR A5/4 assignment"); +} + + type record DchanTuple { @@ -1013,7 +1126,7 @@ } } -/* Verify PCH load */ +/* Verify Paging Counter */ testcase TC_paging_counter() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 4.0; @@ -1126,6 +1239,13 @@ execute( TC_outbound_connect() ); execute( TC_assignment_cic_only() ); + execute( TC_assignment_csd() ); + execute( TC_assignment_ctm() ); + execute( TC_assignment_sign() ); + execute( TC_assignment_fr_a5_0() ); + execute( TC_assignment_fr_a5_1() ); + execute( TC_assignment_fr_a5_3() ); + execute( TC_assignment_fr_a5_4() ); execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 071c66d..87d5628 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -378,6 +378,10 @@ ipAddress := addr, uDPPortValue := udp_port } +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) := + ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt); +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) := + ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt); template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { elementIdentifier := '83'O, -- To view, visit https://gerrit.osmocom.org/5397 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:30:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:30:21 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fai... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5391 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee7202841ad8466a65b5d54679262be100863e39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:30:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:30:29 +0000 Subject: osmo-ttcn3-hacks[master]: RSL_Types: Add various IPA / Abis-IP specific IEs + templates In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5392 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:30:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:30:54 +0000 Subject: osmo-ttcn3-hacks[master]: BSSMAP_Templates: Enable use for AoIP, not just E1-CIC In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5393 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:01 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_outbound_connect to test if BSC rejects in... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5394 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:08 +0000 Subject: osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define enum with 08.08 cause values In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5395 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fc122a510403d0da8da04ca323687065347c96a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:10 +0000 Subject: osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define various ASSIGNMENT related template... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5396 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:19 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Add whole bunch of new assignment tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5397 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add whole bunch of new assignment tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add whole bunch of new assignment tests ...................................................................... BSC_Tests: Add whole bunch of new assignment tests Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 125 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 41e3a84..77f3ef8 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -411,12 +411,125 @@ [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); } + /* TODO: Actually expect GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP */ [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { setverdict(pass); } [] BSSAP.receive { repeat; } } } + +/* Run everything required up to sending a caller-specified assignment command and expect response */ +function f_assignment_exp(PDU_BSSAP ass_cmd, template PDU_BSSAP exp, charstring fail_text) +runs on test_CT { + var BSSAP_N_CONNECT_ind rx_c_ind; + var RSL_Message rx_rsl; + var DchanTuple dt; + + f_init(); + f_bssap_reset(); + + dt := f_est_dchan('23'O, 23, '00000000'O); + /* send assignment without AoIP IEs */ + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ass_cmd)); + alt { + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { + if (ischosen(exp.pdu.bssmap.assignmentComplete)) { + setverdict(pass); + } else { + setverdict(fail, fail_text); + } + } + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { + if (ischosen(exp.pdu.bssmap.assignmentFailure)) { + setverdict(pass); + } else { + setverdict(fail, fail_text); + } + } + [] BSSAP.receive { repeat; } + } +} +testcase TC_assignment_csd() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD); + //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for CSD"); +} + +testcase TC_assignment_ctm() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCTM); + //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for Speech+CTM"); +} + +testcase TC_assignment_sign() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); +} + +testcase TC_assignment_fr_a5_0() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); +} + +testcase TC_assignment_fr_a5_1() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); +} + + +testcase TC_assignment_fr_a5_3() runs on test_CT { + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); +} + +testcase TC_assignment_fr_a5_4() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + const OCT16 kc128 := kc & kc; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); + ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); + /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ + f_assignment_exp(ass_cmd, exp_fail, "BSC accepted TCH/F FR A5/4 assignment"); +} + + type record DchanTuple { @@ -1013,7 +1126,7 @@ } } -/* Verify PCH load */ +/* Verify Paging Counter */ testcase TC_paging_counter() runs on test_CT { var BSSMAP_FIELD_CellIdentificationList cid_list; timer T := 4.0; @@ -1126,6 +1239,13 @@ execute( TC_outbound_connect() ); execute( TC_assignment_cic_only() ); + execute( TC_assignment_csd() ); + execute( TC_assignment_ctm() ); + execute( TC_assignment_sign() ); + execute( TC_assignment_fr_a5_0() ); + execute( TC_assignment_fr_a5_1() ); + execute( TC_assignment_fr_a5_3() ); + execute( TC_assignment_fr_a5_4() ); execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 071c66d..87d5628 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -378,6 +378,10 @@ ipAddress := addr, uDPPortValue := udp_port } +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) := + ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt); +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) := + ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt); template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { elementIdentifier := '83'O, -- To view, visit https://gerrit.osmocom.org/5397 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define various ASSIGNMENT related template... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSSMAP_Templates: Define various ASSIGNMENT related templates/constants ...................................................................... BSSMAP_Templates: Define various ASSIGNMENT related templates/constants Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb --- M library/BSSMAP_Templates.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 0a86765..071c66d 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -316,8 +316,15 @@ } } +const OCT1 ChRate_ANY := '00'O; const OCT1 ChRate_TCHF := '08'O; const OCT1 ChRate_TCHH := '09'O; +const OCT1 ChRate_TCHForH_Fpref := '0A'O; +const OCT1 ChRate_TCHForH_Hpref := '0B'O; +const OCT1 ChRate_TCHForH_Fpref_nochg := '1A'O; +const OCT1 ChRate_TCHForH_Hpref_nochg := '1B'O; +const OCT1 ChRate_TCHForH := '0F'O; +const OCT1 ChRate_TCHForH_nochg := '1F'O; template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := { elementIdentifier := '0B'O, /* overwritten */ @@ -327,6 +334,36 @@ channelRateAndType := ChRate_TCHF, speechId_DataIndicator := '01'O /* FRv1 */ } + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies ts_BSSMAP_IE_ChannelType := { + speechOrDataIndicator := '0100'B /* speech + CTM */ +} + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCSD := { + elementIdentifier := '0B'O, /* overwritten */ + lengthIndicator := 0, /* overwritten */ + speechOrDataIndicator := '0010'B, /* data */ + spare1_4 := '0000'B, + channelRateAndType := ChRate_TCHF, + speechId_DataIndicator := '10'O /* 9600 bps / transparent */ +} + +template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeSIGNAL := { + elementIdentifier := '0B'O, /* overwritten */ + lengthIndicator := 0, /* overwritten */ + speechOrDataIndicator := '0011'B, /* data */ + spare1_4 := '0000'B, + channelRateAndType := ChRate_ANY, + speechId_DataIndicator := '00'O /* spare */ +} + +template (value) BSSMAP_IE_EncryptionInformation ts_BSSMAP_IE_EncrInfo(OCT8 kc, OCT1 algs := '05'O) := { + elementIdentifier := '0A'O, + lengthIndicator := 0, /* overwritten */ + permittedAlgorithms := algs, + key := kc +} + template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, uint5_t ts) := { elementIdentifier := '01'O, /* overwritten */ @@ -342,6 +379,11 @@ uDPPortValue := udp_port } +template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { + elementIdentifier := '83'O, + kC128_Value := kc128 +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) -- To view, visit https://gerrit.osmocom.org/5396 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Define enum with 08.08 cause values In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSSMAP_Templates: Define enum with 08.08 cause values ...................................................................... BSSMAP_Templates: Define enum with 08.08 cause values Change-Id: I2fc122a510403d0da8da04ca323687065347c96a --- M library/BSSMAP_Templates.ttcn 1 file changed, 79 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 0d2db3d..0a86765 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -7,6 +7,84 @@ type integer BssmapCause; +/* 48.008 3.2.2.5 - this actually belongs to BSSAP_Types.ttcn */ +type enumerated myBSSMAP_Cause { + /* 000 / 001: Normal event */ + GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE ('0000000'B), + GSM0808_CAUSE_RADIO_INTERFACE_FAILURE ('0000001'B), + GSM0808_CAUSE_UPLINK_QUALITY ('0000010'B), + GSM0808_CAUSE_UPLINK_STRENGTH ('0000011'B), + GSM0808_CAUSE_DOWNLINK_QUALITY ('0000100'B), + GSM0808_CAUSE_DOWNLINK_STRENGTH ('0000101'B), + GSM0808_CAUSE_DISTANCE ('0000110'B), + GSM0808_CAUSE_O_AND_M_INTERVENTION ('0000111'B), + GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION ('0001000'B), + GSM0808_CAUSE_CALL_CONTROL ('0001001'B), + GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION ('0001010'B), + GSM0808_CAUSE_HANDOVER_SUCCESSFUL ('0001011'B), + GSM0808_CAUSE_BETTER_CELL ('0001100'B), + GSM0808_CAUSE_DIRECTED_RETRY ('0001101'B), + GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL ('0001110'B), + GSM0808_CAUSE_TRAFFIC ('0001111'B), + GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL ('0010000'B), + GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL ('0010001'B), + GSM0808_CAUSE_RELOCATION_TRIGGERED ('0010010'B), + GSM0808_CAUSE_REQUSTED_OPT_NOT_AUTHORISED ('0010100'B), + GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED ('0010101'B), + GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG ('0010110'B), + GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT ('0010111'B), + GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE ('0011000'B), + /* reserved */ + /* 010: Resource unavailable */ + GSM0808_CAUSE_EQUIPMENT_FAILURE ('0100000'B), + GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE ('0100001'B), + GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE ('0100010'B), + GSM0808_CAUSE_CCCH_OVERLOAD ('0100011'B), + GSM0808_CAUSE_PROCESSOR_OVERLOAD ('0100100'B), + GSM0808_CAUSE_BSS_NOT_EQUIPPED ('0100101'B), + GSM0808_CAUSE_MS_NOT_EQUIPPED ('0100110'B), + GSM0808_CAUSE_INVALID_CELL ('0100111'B), + GSM0808_CAUSE_TRAFFIC_LOAD ('0101000'B), + GSM0808_CAUSE_PREEMPTION ('0101001'B), + GSM0808_CAUSE_DTM_HO_SGSN_FAILURE ('0101010'B), + GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE ('0101011'B), + /* reserved */ + /* 011: Service or option not available, but implemented */ + GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE ('0110000'B), + GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH ('0110001'B), + GSM0808_CAUSE_SWITCH_CIRCUIT_POOL ('0110010'B), + GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE ('0110011'B), + GSM0808_CAUSE_LSA_NOT_ALLOWED ('0110100'B), + GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL ('0110101'B), + GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL ('0110110'B), + GSM0808_CAUSE_INVALID_CSG_CELL ('0110111'B), + /* reserved */ + /* 100: Service or option not implemented or currently disabled */ + GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL ('0111111'B), + GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED ('1000000'B), + GSM0808_CAUSE_GERAN_IU_MODE_FAILURE ('1000001'B), + GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE ('1000010'B), + GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS ('1000011'B), + GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP ('1000100'B), + GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP ('1000101'B), + GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP ('1000110'B), + /* reserved */ + /* 101: Invalid message */ + GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED ('1010000'B), + GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS ('1010001'B), + GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING ('1010010'B), + GSM0808_CAUSE_INCORRECT_VALUE ('1010011'B), + GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE ('1010100'B), + GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT ('1010101'B), + GSM0808_CAUSE_DTM_HO_INVALID_PS_IND ('1010110'B), + GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC ('1010111'B), + /* reserved */ + /* 110: protocol error */ + GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC ('1100000'B), + GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTANT ('1100001'B), + GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B) +} with { variant "FIELDLENGTH(7)" }; + template PDU_BSSAP ts_BSSAP_BSSMAP := { discriminator := '0'B, spare := '0000000'B, @@ -544,5 +622,4 @@ } - -} +} with { encode "RAW" }; -- To view, visit https://gerrit.osmocom.org/5395 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fc122a510403d0da8da04ca323687065347c96a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_outbound_connect to test if BSC rejects in... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add TC_outbound_connect to test if BSC rejects inbound SCCP connections ...................................................................... BSC_Tests: Add TC_outbound_connect to test if BSC rejects inbound SCCP connections Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121 --- M bsc/BSC_Tests.ttcn M library/BSSAP_CodecPort.ttcn 2 files changed, 18 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 090ed0c..41e3a84 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -381,6 +381,20 @@ } } +/*********************************************************************** + * Assignment Testing + ***********************************************************************/ + +/* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction) */ +testcase TC_outbound_connect() runs on test_CT { + f_init(); + f_bssap_reset(); + + BSSAP.send(ts_BSSAP_CONNECT_req(g_sccp_addr_peer, g_sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq)); + BSSAP.receive(tr_BSSAP_DISC_ind(2342, ?, ?)); + setverdict(pass); +} + /* Test behavior if MSC answers with CREF to CR */ testcase TC_assignment_cic_only() runs on test_CT { var BSSAP_N_CONNECT_ind rx_c_ind; @@ -1110,6 +1124,7 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_outbound_connect() ); execute( TC_assignment_cic_only() ); execute( TC_rll_est_ind_inact_lchan() ); diff --git a/library/BSSAP_CodecPort.ttcn b/library/BSSAP_CodecPort.ttcn index 5e43608..7470dd4 100644 --- a/library/BSSAP_CodecPort.ttcn +++ b/library/BSSAP_CodecPort.ttcn @@ -21,13 +21,14 @@ template BSSAP_N_CONNECT_req ts_BSSAP_CONNECT_req(SCCP_PAR_Address called, SCCP_PAR_Address calling, - template PDU_BSSAP bssap := *) := { + SCCP_PAR_Connection_Id conn_id, + template PDU_BSSAP bssap := omit) := { calledAddress := called, callingAddress := calling, expeditedDataSel := omit, qualityOfService := omit, userData := bssap, - connectionId := omit, + connectionId := conn_id, importance := omit } -- To view, visit https://gerrit.osmocom.org/5394 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9087df9ff9b48c8be242b1ae66cbca936b07121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSSMAP_Templates: Enable use for AoIP, not just E1-CIC In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSSMAP_Templates: Enable use for AoIP, not just E1-CIC ...................................................................... BSSMAP_Templates: Enable use for AoIP, not just E1-CIC Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205 --- M bsc-nat/MSC_ConnectionHandler.ttcn M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Templates.ttcn 4 files changed, 29 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 6a9a57f..3fc11e9 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -86,9 +86,9 @@ [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { /* respond with ASSIGNMENT CMD */ g_state := MSC_STATE_WAIT_ASS_COMPL; - BSSAP.send(ts_BSSMAP_AssignmentReq(0, e1_timeslot)); + BSSAP.send(ts_BSSMAP_AssignmentReq(ts_BSSMAP_IE_CIC(0, e1_timeslot))); } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(?,*)) { /* FIXME: Send MGCP CRCX */ g_state := MSC_STATE_WAIT_CRCX_ACK; var MgcpTransId trans_id := f_mgcp_alloc_tid(); diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index faf1a6e..090ed0c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -392,7 +392,7 @@ dt := f_est_dchan('23'O, 23, '00000000'O); /* send assignment without AoIP IEs */ - BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(0, 1))); + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(ts_BSSMAP_IE_CIC(0, 1)))); alt { [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 6a9a57f..8fa71fb 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -86,9 +86,11 @@ [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { /* respond with ASSIGNMENT CMD */ g_state := MSC_STATE_WAIT_ASS_COMPL; - BSSAP.send(ts_BSSMAP_AssignmentReq(0, e1_timeslot)); + var BSSMAP_IE_AoIP_TransportLayerAddress tla; + tla := valueof(ts_BSSMAP_IE_AoIP_TLA({ipv4:='01020304'O}, 12345)); + BSSAP.send(ts_BSSMAP_AssignmentReq(omit, tla)); } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(*,?)) { /* FIXME: Send MGCP CRCX */ g_state := MSC_STATE_WAIT_CRCX_ACK; var MgcpTransId trans_id := f_mgcp_alloc_tid(); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 6e7813f..0d2db3d 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -256,7 +256,17 @@ cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5)) } -template (value) PDU_BSSAP ts_BSSMAP_AssignmentReq(uint11_t span, uint5_t ts) +template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, + uint16_t udp_port) := { + elementIdentifier := '7C'O, + lengthIndicator := 0, /* overwritten */ + ipAddress := addr, + uDPPortValue := udp_port +} + +template PDU_BSSAP +ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -265,7 +275,7 @@ channelType := ts_BSSMAP_IE_ChannelType, layer3HeaderInfo := omit, priority := omit, - circuitIdentityCode := ts_BSSMAP_IE_CIC(span, ts), + circuitIdentityCode := cic, downLinkDTX_Flag := omit, interferenceBandToBeUsed := omit, classmarkInformationType2 := omit, @@ -276,7 +286,7 @@ serviceHandover := omit, encryptionInformation := omit, talkerPriority := omit, - aoIPTransportLayer := omit, + aoIPTransportLayer := aoip, codecList := omit, callIdentifier := omit, kC128 := omit, @@ -321,7 +331,9 @@ } } -template (value) PDU_BSSAP ts_BSSMAP_AssignmentComplete(BSSMAP_IE_CircuitIdentityCode cic) +template PDU_BSSAP +ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) modifies ts_BSSAP_BSSMAP := { pdu := { bssmap := { @@ -336,7 +348,7 @@ speechVersion := omit, lSAIdentifier := omit, talkerPriority := omit, - aoIPTransportLayer := omit, + aoIPTransportLayer := aoip, speechCodec := omit, codecList := omit, lCLS_BSS_Status := omit @@ -345,13 +357,15 @@ } } -template PDU_BSSAP tr_BSSMAP_AssignmentComplete modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, + template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *) +modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { assignmentComplete := { messageType := '02'O, /* overwritten */ rR_Cause := *, - circuitIdentityCode := ?, + circuitIdentityCode := cic, cellIdentifier := *, chosenChannel := *, chosenEncryptionAlgorithm := *, @@ -359,7 +373,7 @@ speechVersion := *, lSAIdentifier := *, talkerPriority := *, - aoIPTransportLayer := *, + aoIPTransportLayer := aoip, speechCodec := *, codecList := *, lCLS_BSS_Status := * -- To view, visit https://gerrit.osmocom.org/5393 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Add various IPA / Abis-IP specific IEs + templates In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RSL_Types: Add various IPA / Abis-IP specific IEs + templates ...................................................................... RSL_Types: Add various IPA / Abis-IP specific IEs + templates Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb --- M library/RSL_Types.ttcn 1 file changed, 226 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 3e9baaa..a807ce2 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -487,6 +487,39 @@ RSL_SYSTEM_INFO_20 ('00101101'B) } with { variant "FIELDLENGTH(8)" } + type record RSL_IE_IPA_ConnectionStats { + uint8_t len, + uint32_t tx_packets, + uint32_t tx_octets, + uint32_t rx_packets, + uint32_t rx_octets, + uint32_t lost_packets, + uint32_t jitter, + uint32_t avg_delay + } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } + + type enumerated RSL_IPA_SpeechMode { + RSL_IPA_SPM_SENDRECV ('00'B), + RSL_IPA_SPM_RECVONLY ('01'B), + RSL_IPA_SPM_SENDONLY ('10'B), + RSL_IPA_SPM_RESERVED ('11'B) + } with { variant "FIELDLENGTH(2)" } + + type enumerated RSL_IPA_Codec { + RSL_IPA_CODEC_FR ('0000'B), + RSL_IPA_CODEC_EFR ('0001'B), + RSL_IPA_CODEC_AMR_F ('0010'B), + RSL_IPA_CODEC_HR ('0011'B), + RSL_IPA_CODEC_AMR_H ('0101'B), + RSL_IPA_CODEC_RTP_PT ('1111'B) + } with { variant "FIELDLENGTH(4)" } + + type record RSL_IE_IPA_SpeechMode { + BIT2 reserved, + RSL_IPA_SpeechMode mode, + RSL_IPA_Codec codec + } + /* union of all IE bodies */ type union RSL_IE_Body { RslChannelNr chan_nr, @@ -515,6 +548,16 @@ RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, + + uint16_t ipa_conn_id, + uint16_t ipa_local_port, + uint16_t ipa_remote_port, + uint32_t ipa_local_ip, + uint32_t ipa_remote_ip, + uint8_t ipa_rtp_pt, + uint8_t ipa_rtp_pt2, + RSL_IE_IPA_ConnectionStats ipa_stats, + RSL_IE_IPA_SpeechMode ipa_speech_mode, RSL_LV other } @@ -552,6 +595,16 @@ full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; ms_identity, iei = RSL_IE_MS_IDENTITY; other, iei = RSL_IE_FULL_BCCH_INFO; + + ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; + ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; + ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; + ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; + ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; + ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; + ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; + ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; + ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; other, OTHERWISE; )" }; @@ -866,4 +919,177 @@ } } + + /* Abis/IP specific messages */ + + template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + * + } + } + + template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, + uint16_t ipa_conn_id, uint32_t local_ip, + uint16_t local_port, uint7_t rtp_pt2) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), + t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), + t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) + } + } + + template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_MDCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + * + } + } + + template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, + uint32_t remote_ip, uint16_t remote_port, + uint7_t rtp_pt2) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_CRCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), + t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), + /* optional: RTP Payload Type */ + t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) + } + } + + template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_MDCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional connection ID */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, + RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_IND, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, + template uint16_t ipa_conn_id := omit) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + /* FIXME: optional conn_id */ + * + } + } + + template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, + template RSL_IE_IPA_ConnectionStats stats) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) + } + } + + template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, + template uint16_t ipa_conn_id) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_DLCX_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + /* optional connection ID */ + t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) + } + } + + template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), + msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) + } + } + + + } with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/5392 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I683e7c23b217a993e0d8f079e5bf1a10403420bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 13:31:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 13:31:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fai... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fail with only CIC) ...................................................................... BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fail with only CIC) Change-Id: Iee7202841ad8466a65b5d54679262be100863e39 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 41 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b6d28b1..faf1a6e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -381,6 +381,29 @@ } } +/* Test behavior if MSC answers with CREF to CR */ +testcase TC_assignment_cic_only() runs on test_CT { + var BSSAP_N_CONNECT_ind rx_c_ind; + var RSL_Message rx_rsl; + var DchanTuple dt; + + f_init(); + f_bssap_reset(); + + dt := f_est_dchan('23'O, 23, '00000000'O); + /* send assignment without AoIP IEs */ + BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_AssignmentReq(0, 1))); + alt { + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentComplete)) { + setverdict(fail, "AoIP BSC cannot accept ASSIGNMENT without AoIP Transport IE"); + } + [] BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_AssignmentFail)) { + setverdict(pass); + } + [] BSSAP.receive { repeat; } + } +} + type record DchanTuple { integer sccp_conn_id, @@ -1087,6 +1110,8 @@ execute( TC_chan_rel_hard_rlsd() ); execute( TC_chan_rel_a_reset() ); + execute( TC_assignment_cic_only() ); + execute( TC_rll_est_ind_inact_lchan() ); execute( TC_rll_est_ind_inval_sapi1() ); execute( TC_rll_est_ind_inval_sapi3() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 54e3f79..6e7813f 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -368,6 +368,22 @@ } } +template PDU_BSSAP tr_BSSMAP_AssignmentFail modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + assignmentFailure := { + messageType := '03'O, /* overwritten */ + rR_Cause := *, + circuitPool := *, + circuitPoolList := *, + talkerPriority := *, + codecList := * + } + } + } +} + + template (value) PDU_BSSAP ts_BSSMAP_ClearCommand(BssmapCause cause) modifies ts_BSSAP_BSSMAP := { pdu := { -- To view, visit https://gerrit.osmocom.org/5391 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee7202841ad8466a65b5d54679262be100863e39 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:00:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:00:48 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT Message-ID: Review at https://gerrit.osmocom.org/5398 BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/5398/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 77f3ef8..42de6be 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -484,6 +484,7 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); @@ -496,10 +497,25 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); } + +/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */ +testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE"); +} + testcase TC_assignment_fr_a5_3() runs on test_CT { @@ -509,6 +525,7 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); @@ -522,6 +539,7 @@ const OCT16 kc128 := kc & kc; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); @@ -1244,6 +1262,7 @@ execute( TC_assignment_sign() ); execute( TC_assignment_fr_a5_0() ); execute( TC_assignment_fr_a5_1() ); + execute( TC_assignment_fr_a5_1_codec_missing() ); execute( TC_assignment_fr_a5_3() ); execute( TC_assignment_fr_a5_4() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 87d5628..24a888c 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -388,6 +388,42 @@ kC128_Value := kc128 } +/* 3.2.2.103 */ +template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := { + codecType := GSM_FR, + tF := '0'B, + pT := '0'B, + pI := '0'B, + fI := '1'B, + extendedCodecType := omit, + s0_7 := omit, + s8_15 := omit +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := { + codecType := GSM_FR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := { + codecType := GSM_EFR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := { + codecType := GSM_HR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := { + codecType := FR_AMR, + s0_7 := '11111111'B, + s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */ +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := { + codecType := HR_AMR, + s0_7 := '00111111'B, + s8_15 := '00000111'B /* S6 - S7 and S11 ? S15 are reserved and coded with zeroes */ +} +template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := { + elementIdentifier := '7D'O, + lengthIndicator := 0, /* overwritten */ + codecElements := valueof(elem) +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) -- To view, visit https://gerrit.osmocom.org/5398 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:17:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:17:21 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Update CFG with list of test cases Message-ID: Review at https://gerrit.osmocom.org/5399 BSC_Tests: Update CFG with list of test cases Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc --- M bsc/BSC_Tests.cfg 1 file changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/5399/1 diff --git a/bsc/BSC_Tests.cfg b/bsc/BSC_Tests.cfg index 86db26b..5fd3203 100644 --- a/bsc/BSC_Tests.cfg +++ b/bsc/BSC_Tests.cfg @@ -36,9 +36,44 @@ #BSC_Tests.TC_chan_act_ack_noest #BSC_Tests.TC_chan_act_ack_est_ind_noreply #BSC_Tests.TC_chan_act_ack_est_ind_refused +#BSC_Tests.TC_chan_act_nack +#BSC_Tests.TC_chan_exhaustion #BSC_Tests.TC_ctrl #BSC_Tests.TC_chan_rel_rll_rel_ind #BSC_Tests.TC_chan_rel_conn_fail #BSC_Tests.TC_chan_rel_hard_clear #BSC_Tests.TC_chan_rel_hard_rlsd #BSC_Tests.TC_chan_rel_a_reset + +#BSC_Tests.TC_rll_est_ind_inact_lchan +#BSC_Tests.TC_rll_est_ind_inval_sapi1 +#BSC_Tests.TC_rll_est_ind_inval_sapi3 +#BSC_Tests.TC_rll_est_ind_inval_sacch + +#BSC_Tests.TC_outbound_connect +#BSC_Tests.TC_assignment_cic_only +#BSC_Tests.TC_assignment_csd +#BSC_Tests.TC_assignment_ctm +#BSC_Tests.TC_assignment_sign +#BSC_Tests.TC_assignment_fr_a5_0 +#BSC_Tests.TC_assignment_fr_a5_1_codec_missing +#BSC_Tests.TC_assignment_fr_a5_1 +#BSC_Tests.TC_assignment_fr_a5_3 +#BSC_Tests.TC_assignment_fr_a5_4 + +#BSC_Tests.TC_paging_imsi_nochan +#BSC_Tests.TC_paging_tmsi_nochan +#BSC_Tests.TC_paging_tmsi_any +#BSC_Tests.TC_paging_tmsi_sdcch +#BSC_Tests.TC_paging_tmsi_tch_f +#BSC_Tests.TC_paging_tmsi_tch_hf +#BSC_Tests.TC_paging_imsi_nochan_cgi +#BSC_Tests.TC_paging_imsi_nochan_lac_ci +#BSC_Tests.TC_paging_imsi_nochan_ci +#BSC_Tests.TC_paging_imsi_nochan_lai +#BSC_Tests.TC_paging_imsi_nochan_lac +#BSC_Tests.TC_paging_imsi_nochan_all +#BSC_Tests.TC_paging_imsi_a_reset +#BSC_Tests.TC_paging_imsi_load +#BSC_Tests.TC_paging_counter +#BSC_Tests.TC_rsl_drop_counter -- To view, visit https://gerrit.osmocom.org/5399 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:17:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:17:21 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: update README.txt with status of current implementation Message-ID: Review at https://gerrit.osmocom.org/5400 update README.txt with status of current implementation Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b --- M bsc/README.txt 1 file changed, 33 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/5400/1 diff --git a/bsc/README.txt b/bsc/README.txt index aa82f32..52e212b 100644 --- a/bsc/README.txt +++ b/bsc/README.txt @@ -2,23 +2,36 @@ = exhaustion of resources -* send many CHAN RQD (any) and count if all channels get actually allocated -** verify BTS_CTR_CHREQ_TOTAL reflects number sent on RSL +x send many CHAN RQD (any) and count if all channels get actually allocated +xx verify BTS_CTR_CHREQ_TOTAL reflects number sent on RSL ** verify how quickly they get released again ** verify that CHAN RQD with same RA + FN get only on allocation -* verify that we get IMM_ASS_REJ once channels are exhausted -** verify BTS_CTR_CHREQ_NO_CHANNEL increments accordigly +x verify that we get IMM_ASS_REJ once channels are exhausted +xx verify BTS_CTR_CHREQ_NO_CHANNEL increments accordigly * verify for particular channel type / cause values * verify that IMM.ASS.REJ has increasing back-off * verify how BSC reacts to AGCH overload (DELETE IND) - = paging -* page by TMSI vs. page by IMSI -* verify if CCCH_LOAD_IND(PCH) slot count is observed -* verify paging expiration -* paging with different identity (lac/cgi/...) on A interface -> expect on right BSC(s) +x page by TMSI vs. page by IMSI +x verify if CCCH_LOAD_IND(PCH) slot count is observed +x verify paging expiration +x paging with different identity (lac/cgi/...) on A interface -> expect on right BSC(s) + += assignment + +x CSD call +x CTM telephony +x CIC on AoIP +x missing CodecList IE +* with no CIC and no AoIP +* with IPv6 Address in AoIP +* with LCLS information +* supported/unsupported/invalid ciphers +* supported/unsupported/invalid codecs +* inconsistent channel type + codec + codec-list +* on full BTS -> fail = hand-over @@ -27,21 +40,23 @@ = erroneous channel release -* no response to CHAN ACT -* CONN FAIL IND from BTS +x no response to CHAN ACT +x CONN FAIL IND from BTS ** verify counter increment of BTS_CTR_CHAN_RF_FAIL * no (or late?) response to RF CHAN REL * no (or late?) response to RLL RELEASE REQ -* RLL messages on not-activated channels +x RLL messages on not-activated channels = misc * SMS-CB -* behavior in case of CHAN ACT NACK +x behavior in case of CHAN ACT NACK * EST REQ for SAPI3 originating from core * behavior of BSC in various error cases (ERR IND) ** BTS_CTR_CHAN_RLL_ERR increment on T200_EXPIRED * MODE MODIFY with ACK / NACK / no response +* invalid message type / IE type +** verify BSSAP CONFUSION is sent in all applicable cases = IPA voice related @@ -55,11 +70,11 @@ = counters * test each and every counter in BSC, validate via CTRL interface -** RSL/OML failure: drop link, expect BTS_CTR_BTS_xxx_FAIL +1 -** paging -*** send PAGING from MSC side -*** expect BSC_CTR_PAGING_ATTEMPTED increase by one -*** expect BSC_CTR_PAGING_EXPIRED on T3113 expiration +xx RSL/OML failure: drop link, expect BTS_CTR_BTS_xxx_FAIL +1 +xx paging +xxx send PAGING from MSC side +xxx expect BSC_CTR_PAGING_ATTEMPTED increase by one +xxx expect BSC_CTR_PAGING_EXPIRED on T3113 expiration ** BTS_CTR_CODEC_* on CHAN_ACT_ACK * new counter ideas ** number of SCCP CR timeouts -- To view, visit https://gerrit.osmocom.org/5400 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:20 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5398 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:22 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Update CFG with list of test cases In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5399 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:24 +0000 Subject: osmo-ttcn3-hacks[master]: update README.txt with status of current implementation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5400 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:25 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: update README.txt with status of current implementation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: update README.txt with status of current implementation ...................................................................... update README.txt with status of current implementation Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b --- M bsc/README.txt 1 file changed, 33 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/README.txt b/bsc/README.txt index aa82f32..52e212b 100644 --- a/bsc/README.txt +++ b/bsc/README.txt @@ -2,23 +2,36 @@ = exhaustion of resources -* send many CHAN RQD (any) and count if all channels get actually allocated -** verify BTS_CTR_CHREQ_TOTAL reflects number sent on RSL +x send many CHAN RQD (any) and count if all channels get actually allocated +xx verify BTS_CTR_CHREQ_TOTAL reflects number sent on RSL ** verify how quickly they get released again ** verify that CHAN RQD with same RA + FN get only on allocation -* verify that we get IMM_ASS_REJ once channels are exhausted -** verify BTS_CTR_CHREQ_NO_CHANNEL increments accordigly +x verify that we get IMM_ASS_REJ once channels are exhausted +xx verify BTS_CTR_CHREQ_NO_CHANNEL increments accordigly * verify for particular channel type / cause values * verify that IMM.ASS.REJ has increasing back-off * verify how BSC reacts to AGCH overload (DELETE IND) - = paging -* page by TMSI vs. page by IMSI -* verify if CCCH_LOAD_IND(PCH) slot count is observed -* verify paging expiration -* paging with different identity (lac/cgi/...) on A interface -> expect on right BSC(s) +x page by TMSI vs. page by IMSI +x verify if CCCH_LOAD_IND(PCH) slot count is observed +x verify paging expiration +x paging with different identity (lac/cgi/...) on A interface -> expect on right BSC(s) + += assignment + +x CSD call +x CTM telephony +x CIC on AoIP +x missing CodecList IE +* with no CIC and no AoIP +* with IPv6 Address in AoIP +* with LCLS information +* supported/unsupported/invalid ciphers +* supported/unsupported/invalid codecs +* inconsistent channel type + codec + codec-list +* on full BTS -> fail = hand-over @@ -27,21 +40,23 @@ = erroneous channel release -* no response to CHAN ACT -* CONN FAIL IND from BTS +x no response to CHAN ACT +x CONN FAIL IND from BTS ** verify counter increment of BTS_CTR_CHAN_RF_FAIL * no (or late?) response to RF CHAN REL * no (or late?) response to RLL RELEASE REQ -* RLL messages on not-activated channels +x RLL messages on not-activated channels = misc * SMS-CB -* behavior in case of CHAN ACT NACK +x behavior in case of CHAN ACT NACK * EST REQ for SAPI3 originating from core * behavior of BSC in various error cases (ERR IND) ** BTS_CTR_CHAN_RLL_ERR increment on T200_EXPIRED * MODE MODIFY with ACK / NACK / no response +* invalid message type / IE type +** verify BSSAP CONFUSION is sent in all applicable cases = IPA voice related @@ -55,11 +70,11 @@ = counters * test each and every counter in BSC, validate via CTRL interface -** RSL/OML failure: drop link, expect BTS_CTR_BTS_xxx_FAIL +1 -** paging -*** send PAGING from MSC side -*** expect BSC_CTR_PAGING_ATTEMPTED increase by one -*** expect BSC_CTR_PAGING_EXPIRED on T3113 expiration +xx RSL/OML failure: drop link, expect BTS_CTR_BTS_xxx_FAIL +1 +xx paging +xxx send PAGING from MSC side +xxx expect BSC_CTR_PAGING_ATTEMPTED increase by one +xxx expect BSC_CTR_PAGING_EXPIRED on T3113 expiration ** BTS_CTR_CODEC_* on CHAN_ACT_ACK * new counter ideas ** number of SCCP CR timeouts -- To view, visit https://gerrit.osmocom.org/5400 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd5ac4273975b5c0e3ea373f1b8f6d6b2e534c0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:25 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Update CFG with list of test cases In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Update CFG with list of test cases ...................................................................... BSC_Tests: Update CFG with list of test cases Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc --- M bsc/BSC_Tests.cfg 1 file changed, 35 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.cfg b/bsc/BSC_Tests.cfg index 86db26b..5fd3203 100644 --- a/bsc/BSC_Tests.cfg +++ b/bsc/BSC_Tests.cfg @@ -36,9 +36,44 @@ #BSC_Tests.TC_chan_act_ack_noest #BSC_Tests.TC_chan_act_ack_est_ind_noreply #BSC_Tests.TC_chan_act_ack_est_ind_refused +#BSC_Tests.TC_chan_act_nack +#BSC_Tests.TC_chan_exhaustion #BSC_Tests.TC_ctrl #BSC_Tests.TC_chan_rel_rll_rel_ind #BSC_Tests.TC_chan_rel_conn_fail #BSC_Tests.TC_chan_rel_hard_clear #BSC_Tests.TC_chan_rel_hard_rlsd #BSC_Tests.TC_chan_rel_a_reset + +#BSC_Tests.TC_rll_est_ind_inact_lchan +#BSC_Tests.TC_rll_est_ind_inval_sapi1 +#BSC_Tests.TC_rll_est_ind_inval_sapi3 +#BSC_Tests.TC_rll_est_ind_inval_sacch + +#BSC_Tests.TC_outbound_connect +#BSC_Tests.TC_assignment_cic_only +#BSC_Tests.TC_assignment_csd +#BSC_Tests.TC_assignment_ctm +#BSC_Tests.TC_assignment_sign +#BSC_Tests.TC_assignment_fr_a5_0 +#BSC_Tests.TC_assignment_fr_a5_1_codec_missing +#BSC_Tests.TC_assignment_fr_a5_1 +#BSC_Tests.TC_assignment_fr_a5_3 +#BSC_Tests.TC_assignment_fr_a5_4 + +#BSC_Tests.TC_paging_imsi_nochan +#BSC_Tests.TC_paging_tmsi_nochan +#BSC_Tests.TC_paging_tmsi_any +#BSC_Tests.TC_paging_tmsi_sdcch +#BSC_Tests.TC_paging_tmsi_tch_f +#BSC_Tests.TC_paging_tmsi_tch_hf +#BSC_Tests.TC_paging_imsi_nochan_cgi +#BSC_Tests.TC_paging_imsi_nochan_lac_ci +#BSC_Tests.TC_paging_imsi_nochan_ci +#BSC_Tests.TC_paging_imsi_nochan_lai +#BSC_Tests.TC_paging_imsi_nochan_lac +#BSC_Tests.TC_paging_imsi_nochan_all +#BSC_Tests.TC_paging_imsi_a_reset +#BSC_Tests.TC_paging_imsi_load +#BSC_Tests.TC_paging_counter +#BSC_Tests.TC_rsl_drop_counter -- To view, visit https://gerrit.osmocom.org/5399 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3b8632e0528e862288f7c8565a2e1db04f9eebc Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:18:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:18:25 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT ...................................................................... BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 55 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 77f3ef8..42de6be 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -484,6 +484,7 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); @@ -496,10 +497,25 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); } + +/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */ +testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE"); +} + testcase TC_assignment_fr_a5_3() runs on test_CT { @@ -509,6 +525,7 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); @@ -522,6 +539,7 @@ const OCT16 kc128 := kc & kc; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); @@ -1244,6 +1262,7 @@ execute( TC_assignment_sign() ); execute( TC_assignment_fr_a5_0() ); execute( TC_assignment_fr_a5_1() ); + execute( TC_assignment_fr_a5_1_codec_missing() ); execute( TC_assignment_fr_a5_3() ); execute( TC_assignment_fr_a5_4() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 87d5628..24a888c 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -388,6 +388,42 @@ kC128_Value := kc128 } +/* 3.2.2.103 */ +template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := { + codecType := GSM_FR, + tF := '0'B, + pT := '0'B, + pI := '0'B, + fI := '1'B, + extendedCodecType := omit, + s0_7 := omit, + s8_15 := omit +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := { + codecType := GSM_FR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := { + codecType := GSM_EFR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := { + codecType := GSM_HR +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := { + codecType := FR_AMR, + s0_7 := '11111111'B, + s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */ +} +template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := { + codecType := HR_AMR, + s0_7 := '00111111'B, + s8_15 := '00000111'B /* S6 - S7 and S11 ? S15 are reserved and coded with zeroes */ +} +template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := { + elementIdentifier := '7D'O, + lengthIndicator := 0, /* overwritten */ + codecElements := valueof(elem) +} + template PDU_BSSAP ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit) -- To view, visit https://gerrit.osmocom.org/5398 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:26:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:26:30 +0000 Subject: python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:26:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:26:56 +0000 Subject: python/osmo-python-tests[master]: Expand CI integration In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:27:37 +0000 Subject: python/osmo-python-tests[master]: Add basic module import tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:28:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:28:14 +0000 Subject: osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:28:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:28:33 +0000 Subject: osmo-pcu[master]: TBF-DL: fix misleading idle time check In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:28:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:28:34 +0000 Subject: [MERGED] osmo-pcu[master]: TBF-DL: fix misleading idle time check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TBF-DL: fix misleading idle time check ...................................................................... TBF-DL: fix misleading idle time check The dl_tbf_idle_msec is uint32_t so it cannot be < 0. Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73708f5..4fc60e4 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1252,7 +1252,7 @@ { int keep_time_frames; - if (bts_data()->dl_tbf_idle_msec <= 0) + if (bts_data()->dl_tbf_idle_msec == 0) return false; keep_time_frames = msecs_to_frames(bts_data()->dl_tbf_idle_msec); -- To view, visit https://gerrit.osmocom.org/5218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:29:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 15 Dec 2017 14:29:00 +0000 Subject: osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 14:56:42 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 14:56:42 +0000 Subject: [PATCH] osmo-ggsn[master]: ggsn_vty.c: Print ipv6 link-local cmd when writing config to... Message-ID: Review at https://gerrit.osmocom.org/5401 ggsn_vty.c: Print ipv6 link-local cmd when writing config to file Previous commit added the ipv6 link-local vty cmd but forgot to add code to print its value in config_write_apn. Fixes: 37c45e3998fca240b5266abd3ac883d0a35bab50 Change-Id: I08aeaa98d6dc318b7e9740d837ba4ac48cd7051c --- M ggsn/ggsn_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/01/5401/1 diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index db392fa..6ddfc0d 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -686,6 +686,8 @@ } if (apn->v6.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ipv6 ifconfig", &apn->v6.cfg.ifconfig_prefix); + if (apn->v6.cfg.ll_prefix.addr.len) + vty_dump_prefix(vty, " ipv6 link-local", &apn->v6.cfg.ll_prefix); /* must be last */ vty_out(vty, " %sshutdown%s", apn->cfg.shutdown ? "" : "no ", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08aeaa98d6dc318b7e9740d837ba4ac48cd7051c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 15:18:13 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 15:18:13 +0000 Subject: [PATCH] osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() Message-ID: Review at https://gerrit.osmocom.org/5402 octphy: l1_oml: check returncode of trx_by_l1h() The function trx_by_l1h() is used to fetch the pointer to a an osmo_bts_trx from a list. The ID that is used to reference the transceiver comes from the incoming message. If the firmware sends odd identifiers (firmware bugs, damaged packets) the transceiver can not be found in the list and a nullpointer is returned, which then leads into a nullpointer derefernece problem. Check the returncode, and depending on the situation either return with -EINVAL or exit osmo-bts immediately. Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/5402/1 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index a1c384a..54a5c88 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -377,6 +377,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while lachan act\n", + ar->TrxId.byTrxId); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ar->LchId); sapi = ar->LchId.bySAPI; @@ -488,6 +493,12 @@ } trx = trx_by_l1h(fl1, pcr->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (pcr->TrxId.byTrxId=%u) while ciphering\n", + pcr->TrxId.byTrxId); + return -EINVAL; + } + OSMO_ASSERT(pcr->TrxId.byTrxId == trx->nr); ts = &trx->ts[pcr->PchId.byTimeslotNb]; /* for some strange reason the response does not tell which @@ -687,6 +698,11 @@ mOCTVC1_GSM_MSG_TRX_DEACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ldr); trx = trx_by_l1h(fl1, ldr->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ldr->TrxId.byTrxId=%u) while lchan deact\n", + ldr->TrxId.byTrxId); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ldr->LchId); @@ -1266,6 +1282,11 @@ mOCTVC1_GSM_MSG_TRX_OPEN_RSP_SWAP(or); trx = trx_by_l1h(fl1h, or->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (or->TrxId.byTrxId=%u) while opening trx -- abort\n", + or->TrxId.byTrxId); + exit(1); + } LOGP(DL1C, LOGL_INFO, "TRX-OPEN.resp(trx=%u) = %s\n", trx->nr, octvc1_rc2string(or->Header.ulReturnCode)); @@ -1394,6 +1415,12 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while activating physical channel -- abort\n", + ar->TrxId.byTrxId); + exit(1); + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); @@ -1472,6 +1499,12 @@ struct gsm_bts_trx_ts *ts; trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while disconnecting ts\n", + ar->TrxId.byTrxId); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; ts = &trx->ts[ts_nr]; @@ -1495,6 +1528,12 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while connecting ts\n", + ar->TrxId.byTrxId); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 15:33:44 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 15 Dec 2017 15:33:44 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#13). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/iucs_ranap.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 15 files changed, 1,289 insertions(+), 321 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/13 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..2fd44ef --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,56 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +/* MGCP state handler context. This context information stores all information + * to handle the direction of the RTP streams via MGCP. There is one instance + * of this context struct per subscriber connection. + * (see also struct gsm_subscriber_connection) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number. This number number identifies the endpoint + * on the MGW on which the RAN and CN connection is created. This + * endpoint number is assigned and released automatically. */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..2901df6 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -41,6 +41,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..5973234 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -408,8 +409,21 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); + + if (rtp_addr_in.sin_addr.s_addr == INADDR_NONE) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Address -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (rtp_addr_in.sin_port == 0) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Port -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..d0b24eb 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -596,11 +597,7 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + msc_mgcp_ass_complete(conn, osmo_ntohs(rtp_addr_in->sin_port), inet_ntoa(rtp_addr_in->sin_addr)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..4ce768c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #ifdef BUILD_IU @@ -78,6 +79,7 @@ #include #include +#include #include @@ -1328,8 +1330,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teardown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1390,6 +1392,7 @@ { struct gsm_trans *trans1 = trans_find_by_callref(net, bridge->callref[0]); struct gsm_trans *trans2 = trans_find_by_callref(net, bridge->callref[1]); + int rc; if (!trans1 || !trans2) return -EIO; @@ -1400,7 +1403,18 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + /* Bridge RTP streams */ + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1757,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1799,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2683,23 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; + + LOGP(DMNCC, LOGL_ERROR, "RTP create for non-existing trans\n"); + + if (addr == INADDR_NONE) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid IP-Address\n", + vlr_subscr_name(trans->vsub)); + return; + } + if (port == 0) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid Port\n", + vlr_subscr_name(trans->vsub)); + return; + } /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2739,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2755,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2782,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2798,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = osmo_htonl(rtp->ip); + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..7bb45b2 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,22 @@ #include #include +#include #include #include +#include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +201,53 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = osmo_htonl(inet_addr(conn->rtp.local_addr_ran)); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + if (rtp_ip == INADDR_NONE) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP IP-Address\n", + conn_id, rab_id); + return -EINVAL; + } + if (rtp_port == 0) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP Port\n", + conn_id, rab_id); + return -EINVAL; + } + + use_x213_nsap = + (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, rtp=%x:%u, use_x213_nsap=%d\n", + conn_id, rab_id, rtp_ip, rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, + "Failed to send RAB Assignment: conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/iucs_ranap.c b/src/libmsc/iucs_ranap.c index abf1812..db69b30 100644 --- a/src/libmsc/iucs_ranap.c +++ b/src/libmsc/iucs_ranap.c @@ -46,8 +46,18 @@ uint8_t rab_id; RANAP_RAB_SetupOrModifiedItem_t *item = &setup_ies->raB_SetupOrModifiedItem; + RANAP_TransportLayerAddress_t *addr; rab_id = item->rAB_ID.buf[0]; + if (item->transportLayerAddress != NULL) { + printf("transportLayerAddress present!\n"); + /* FIXME: The transportLayerAddress field contains the port and IP-Address of the + * nodeB. Extract this information and then call: + * msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) + * This will tell the FSM that controls the MGCP interface that port and address of the + * RAN (nodeB) are now known. */ + } + LOGP(DIUCS, LOGL_NOTICE, "Received RAB assignment event for %s rab_id=%hhd\n", vlr_subscr_name(conn->vsub), rab_id); diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..394771e --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1074 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 +#define MGCP_ASS_TIMEOUT 10 /* in seconds */ +#define MGCP_ASS_TIMEOUT_TIMER_NR 4 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_ASS_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, will be displayed by + * handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "call could not be completed in time (RAN)"}, + {MGCP_ERR_ASS_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_CN_COMPL, + ST_MDCX_RAN, + ST_MDCX_RAN_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and we + * may now forward IP/Port of the remote call leg to the MGW */ + EV_ASSIGN, + + /* External event: Notify that the Call is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: An error occurred that requires a controlled + * teardown of the RTP connections */ + EV_TEARDOWN_ERROR, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* We were unable to communicate with the MGW, unfortunately + * there is no meaningful action we can take now other than + * giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* If the logic that controls the RAN is unable to negotiate a + * connection, we presumably still have a working connection to + * the MGW, we will try to shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Under normal conditions, the MSC logic should always command + * to release the call at some point. However, the release may + * be missing due to errors in the MSC logic and we may have + * reached ST_HALT because of cascading errors and timeouts. In + * this and only in this case we will allow ST_HALT to free all + * context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_ASS_TIMEOUT_TIMER_NR) { + /* There may be rare cases in which the MSC is unable to + * complete the call assignment */ + handle_error(mgcp_ctx, MGCP_ERR_ASS_TIMEOUT); + } else { + /* Ther must not be any unsolicited timers in this FSM. If so, + * we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_CN_COMPL: wait for mgw response, move on with the MDCX + * for the RAN side if we already have valid IP/Port data for the RAN sided + * RTP stream. */ +static void fsm_mdcx_cn_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_subscriber_connection *conn; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Enter MDCX phase, but we must be sure that the Assigmnet on the A or + * IuCS interface is complete (IP-Address and Port are valid) */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_ASS_TIMEOUT, MGCP_ASS_TIMEOUT_TIMER_NR); + + /* If we already have a valid remote port and IP-Address from the RAN side + * call leg, the assignment has been completed before we got here, so we + * may move on immediately */ + if (conn->rtp.remote_port_ran != 0 || strlen(conn->rtp.remote_addr_ran) > 0) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: wait for assignment completion, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_ASSIGN: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_RAN_COMPL: check MGW response */ +static void fsm_mdcx_ran_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the RAN CRCX is received, then proceed with + sending the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on the + * RAT (Radio Access Technology) , this will either trigger an + * Assignment Request on the A-Interface or an RAB-Assignment on the + * IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, we + * will enter the MDCX phase by sending an MDCX for the CN side to the + * MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* We arrive in this state when the MDCX phase for the CN side as + * completed we will check the IP/Port of the RAN connection. If we + * this data is valid we may continue with the MDCX phase for the RAN + * side. If not we wait until the assinment completes on the A or on + * the IuCS interface. The completion of the assigmnet will fill in the + * port and IP-Address of the RAN side and way may continue then. */ + [ST_MDCX_CN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN_COMPL), + .action = fsm_mdcx_cn_compl_cb, + }, + /* When the response for the CN MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_ASSIGN), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The ran side MDCX phase is complete when the response is received + * from the MGW. The is then active and we change to ST_CALL and wait + * there until the call ends. */ + [ST_MDCX_RAN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN_COMPL), + .action = fsm_mdcx_ran_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Inform the FSM that the assignment (RAN connection) is now complete. + * Parameter: + * conn: subscriber connection context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, assignment completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, assignmnet completion failed.\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + /* Memorize port and IP-Address of the remote RAN call leg. We need this + * information at latest when we enter the MDCX phase for the RAN side. */ + conn->rtp.remote_port_ran = port; + osmo_strlcpy(conn->rtp.remote_addr_ran, addr, sizeof(conn->rtp.remote_addr_ran)); + + /* Note: We only dispatch the event if we are really waiting for the + * assignment, if we are not yet waiting, there is no need to loudly + * broadcast an event that the all other states do not understand anyway */ + if (mgcp_ctx->fsm->state == ST_MDCX_RAN) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already have passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call. + * Parameter: + * trans: connection context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 13 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 15:43:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 15:43:18 +0000 Subject: osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 15:43:22 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 15:43:22 +0000 Subject: [MERGED] osmo-ci[master]: Add osmo-python-tests to gerrit verification In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add osmo-python-tests to gerrit verification ...................................................................... Add osmo-python-tests to gerrit verification Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve; Verified Harald Welte: Looks good to me, approved diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 66d1751..c372075 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -157,6 +157,8 @@ (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") + - osmo-python-tests + - osmo-sgsn: concurrent: true a1_name: IU -- To view, visit https://gerrit.osmocom.org/5282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5db32b8ffe62f9578a55c9049d0c13fc6da7e83 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Dec 15 15:56:35 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 15:56:35 +0000 Subject: python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Please re-submit this to make sure it goes through jenkins job verification. -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:00:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:00:44 +0000 Subject: [PATCH] osmo-pcu[master]: Remove unused includes and forward declarations Message-ID: Review at https://gerrit.osmocom.org/5403 Remove unused includes and forward declarations Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 --- M src/gprs_bssgp_pcu.cpp M src/gprs_debug.cpp M src/gprs_debug.h M src/gprs_ms.h M src/gprs_rlcmac.cpp M src/gprs_rlcmac.h M src/llc.cpp M src/llc.h M src/rlc.cpp M src/rlc.h M src/sba.h M src/tbf.h 12 files changed, 0 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/03/5403/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 7b78e2f..a86e09d 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #define BSSGP_TIMER_T1 30 /* Guards the (un)blocking procedures */ #define BSSGP_TIMER_T2 30 /* Guards the reset procedure */ diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index c35eafa..283962f 100644 --- a/src/gprs_debug.cpp +++ b/src/gprs_debug.cpp @@ -16,16 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/gprs_debug.h b/src/gprs_debug.h index 863d76b..747465b 100644 --- a/src/gprs_debug.h +++ b/src/gprs_debug.h @@ -19,11 +19,9 @@ #pragma once -#include #ifdef __cplusplus extern "C" { #endif -#include #include #ifdef __cplusplus }; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 72a86c9..f094e96 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -20,9 +20,6 @@ #pragma once -struct gprs_rlcmac_tbf; -struct gprs_rlcmac_dl_tbf; -struct gprs_rlcmac_ul_tbf; struct gprs_codel; #include "cxx_linuxlist.h" diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp index 16870c3..06c5479 100644 --- a/src/gprs_rlcmac.cpp +++ b/src/gprs_rlcmac.cpp @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include #include diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index be1e686..aa773fc 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -41,7 +41,6 @@ struct gprs_rlcmac_tbf; struct gprs_rlcmac_bts; -struct BTS; struct GprsMs; #ifdef __cplusplus diff --git a/src/llc.cpp b/src/llc.cpp index 79afc37..b155063 100644 --- a/src/llc.cpp +++ b/src/llc.cpp @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include diff --git a/src/llc.h b/src/llc.h index 4883624..9d402c3 100644 --- a/src/llc.h +++ b/src/llc.h @@ -29,7 +29,6 @@ #define LLC_MAX_LEN 1543 struct BTS; -struct timeval; struct msgb; /** diff --git a/src/rlc.cpp b/src/rlc.cpp index c52417d..37e83cd 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "tbf.h" #include "bts.h" #include "gprs_debug.h" diff --git a/src/rlc.h b/src/rlc.h index 14d2082..b62e3ac 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -36,7 +36,6 @@ #define RLC_MAX_LEN 74 /* MCS-9 data unit */ struct BTS; -struct gprs_rlc_v_n; /* The state of a BSN in the send/receive window */ enum gprs_rlc_ul_bsn_state { diff --git a/src/sba.h b/src/sba.h index 9047f1a..d2d3106 100644 --- a/src/sba.h +++ b/src/sba.h @@ -28,7 +28,6 @@ struct BTS; class PollController; -struct gprs_rlcmac_sba; struct gprs_rlcmac_pdch; /* diff --git a/src/tbf.h b/src/tbf.h index 558bd21..bcfe8da 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -32,8 +32,6 @@ } struct bssgp_bvc_ctx; -struct rlc_ul_header; -struct msgb; struct pcu_l1_meas; class GprsMs; -- To view, visit https://gerrit.osmocom.org/5403 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:01:45 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 16:01:45 +0000 Subject: osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) Hi @dexter and Harald, > I have moved at least the bit offsets to libosmocore now. > See #5385 for that. Great. Thanks! > The probelm I see is that since it runs on the BTS it uses > the RTP bit ordering, but you probably need the GSM bit ordering. In OsmocomBB I do use the same gsm0503_tch_(fr|hr)_(en|de)code() like OsmoBTS scheduler does. They all have an undocumented parameter named 'net_order'. Probably, this is exactly what we are talking about. > Probably it makes sense if you just take the patch from osmo-bsc and > add a parameter for the table. If that works for you and the original > unit-test still passes I could re-test on osmo-bts-trx. I will try to find this change, thanks for a tip! Moreover, if you have limited time, I would take care about this change. > AFAIK OsmocomBB also does the re-ordering to RTP as it uses the MNCC > interface towards external MNCC handlers, and I think the > bit-ordering/format of the TCH messages there is identical to RTP. You probably talking about this? http://git.osmocom.org/osmocom-bb/tree/src/host/layer23/src/common/l1ctl.c#n802 http://git.osmocom.org/osmocom-bb/tree/src/host/layer23/src/common/l1ctl.c#n856 I think the L1CTL implementation is not the best place for doing bit reordering, so I've moved this to the firmware in my branch. https://gerrit.osmocom.org/#/c/5214/4/tests/meas/meas_test.c File tests/meas/meas_test.c: Line 10: #include Is this file related to the change anyhow? I think such clean up should be done separately. And do we really need the 'ecu_fr.h' here? -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:03:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#4). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/4 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:03:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5277 to look at the new patch set (#3). Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..eafc2f4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,11 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install + rm -rf ./build python3 ./setup.py install + +# TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:03:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#4). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/4 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:03:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add basic module import tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5390 to look at the new patch set (#2). Add basic module import tests Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/90/5390/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eafc2f4..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,8 +4,10 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install +python2 tests/test_py2.py rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py # TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:03:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:03:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5279 to look at the new patch set (#4). Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/4 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:07:00 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#5). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/5 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:07:00 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI test In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5277 to look at the new patch set (#4). Expand CI test * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..eafc2f4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,11 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install + rm -rf ./build python3 ./setup.py install + +# TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:07:00 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#5). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/5 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:07:00 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add basic module import tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5390 to look at the new patch set (#3). Add basic module import tests Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/90/5390/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eafc2f4..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,8 +4,10 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install +python2 tests/test_py2.py rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py # TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:07:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:07:00 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5279 to look at the new patch set (#5). Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/5 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:30:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 16:30:38 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: enum gsm48_chan_mode chan_mode; > When I send out an MGCP message using mgcp_client_tx() I expect that the cl The question asked comes down to: is the struct mgcp_ctx per call or per entire osmo-bsc instance. In other places we use the foo_ctx naming for global settings, so I too first thought this was one global struct for all, which of course it isn't: on current master, your comment already clarifies that this mgcp_ctx is the context for one subscriber conn, so even though the name might be tweaked to reflect that (struct conn_mgcp or something?), this implementation is perfectly fine for us, since you've confirmed that for each conn we go through the messages sequentially (send the next request only after having received a previous response). Overall it is of course possible and necessary and supported that the MGCP requests across different conns and endpoints get handled in any random order. The only limitation is that here we can store only a single pending transaction to be able to cancel it later if required. https://gerrit.osmocom.org/#/c/5157/1/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 825: mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); > It should not because we do this only when an MGW transaction timed out, so I'm also thinking, since this is an issue for all MGCP clients, it would make sense to incorporate an explicit endpoint context with a list of pending transactions in the API itself, which would alleviate all of these questions in a clear and universal way... obviously not for this patch. -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:39:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:39:31 +0000 Subject: [PATCH] osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5215 to look at the new patch set (#3). Introduce LOGTBF* for consistent logging When troubleshooting complex issues with TBF lifecycle, it's much easier to follow the logs which are consistently formatted. Add LOGTBF*() macro similar to struct-specific log routines we use in other Osmocom project and use it to log TBF-related messages in a unified way. Tweak test output accordingly. Related: OS#2407 Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 980 insertions(+), 1,015 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/5215/3 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 16:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 16:46:20 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: remove unused variable In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: TBF: remove unused variable ...................................................................... TBF: remove unused variable The num_T_exp is write-only so it can be safely dropped. Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 --- M src/tbf.cpp M src/tbf.h 2 files changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 98005dc..c139af7 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -162,7 +162,6 @@ poll_ts(0), n3105(0), T(0), - num_T_exp(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -541,7 +540,6 @@ LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); tbf->T = T; - tbf->num_T_exp = 0; /* Tunning timers can be safely re-scheduled. */ tbf->timer.data = tbf; @@ -1006,8 +1004,6 @@ { LOGP(DRLCMAC, LOGL_DEBUG, "%s timer %u expired.\n", tbf_name(this), T); - - num_T_exp++; switch (T) { case 0: /* assignment */ diff --git a/src/tbf.h b/src/tbf.h index 558bd21..518bd9b 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -246,7 +246,6 @@ struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ - unsigned int num_T_exp; /* number of consecutive T expirations */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ -- To view, visit https://gerrit.osmocom.org/5219 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 17:45:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 17:45:38 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#6). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/6 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 17:45:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 17:45:38 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5277 to look at the new patch set (#5). Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/5 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..eafc2f4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,11 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install + rm -rf ./build python3 ./setup.py install + +# TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 17:45:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 17:45:38 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#6). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/6 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 17:45:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 17:45:38 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add basic module import tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5390 to look at the new patch set (#4). Add basic module import tests Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/90/5390/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eafc2f4..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,8 +4,10 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install +python2 tests/test_py2.py rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py # TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 17:45:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 17:45:38 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5279 to look at the new patch set (#6). Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/79/5279/6 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:16:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:16:30 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5277 to look at the new patch set (#6). Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add basic module import tests * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/6 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,13 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install +python2 tests/test_py2.py + rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py + +# TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:21:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:21:25 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Add basic module import tests In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Add basic module import tests ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5390 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iac237ef661b93085092b9e61612df9b8f5c3c0f0 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:25:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:25:03 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI tests Message-ID: Review at https://gerrit.osmocom.org/5404 Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add basic module import tests * add comments Change-Id: Iaa5244ed42dcdb7dc73b90c80bb1e5998495772c --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/04/5404/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,13 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install +python2 tests/test_py2.py + rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py + +# TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5404 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa5244ed42dcdb7dc73b90c80bb1e5998495772c Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:25:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:25:04 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use setuptools for packaging Message-ID: Review at https://gerrit.osmocom.org/5405 Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: Id0e035ea0535ba529a75f5c8c5aad5279354d985 --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/05/5405/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5405 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0e035ea0535ba529a75f5c8c5aad5279354d985 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:25:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:25:04 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory Message-ID: Review at https://gerrit.osmocom.org/5406 Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. Change-Id: Ie105d573b88b4b07f17b401a5ed065a16dbc5536 --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/06/5406/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5406 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie105d573b88b4b07f17b401a5ed065a16dbc5536 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:25:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:25:04 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility Message-ID: Review at https://gerrit.osmocom.org/5407 Fix python3 compatibility Use print() function with appropriate import. Change-Id: I942b507f6f6a9975334fcf2469cc0a2c0575472f --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/07/5407/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5407 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I942b507f6f6a9975334fcf2469cc0a2c0575472f Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:48 +0000 Subject: [PATCH] osmo-ci[master]: jobs: add build2-deb8build to update-osmo-ci-on-slaves job Message-ID: Review at https://gerrit.osmocom.org/5408 jobs: add build2-deb8build to update-osmo-ci-on-slaves job Change-Id: I48246067f05227efc18b46cb1b29d1c50f4eab84 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/08/5408/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index e0f082f..8d63848 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -5,7 +5,7 @@ - axis: type: slave name: label - values: [ OsmocomBuild1 , build1-debian9-lxc ] + values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ] properties: - build-discarder: days-to-keep: 30 -- To view, visit https://gerrit.osmocom.org/5408 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48246067f05227efc18b46cb1b29d1c50f4eab84 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:48 +0000 Subject: [PATCH] osmo-ci[master]: jobs: fix poll-scm on update-osmo-ci-on-slaves Message-ID: Review at https://gerrit.osmocom.org/5409 jobs: fix poll-scm on update-osmo-ci-on-slaves poll-scm was missing by accident Change-Id: I027c5fa12c8be9434e3efec11976004c7924c472 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/09/5409/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 8d63848..be93c90 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -16,6 +16,12 @@ git-config-name: 'Jenkins Builder' git-config-email: 'jenkins at osmocom.org' skip-tag: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + builders: - shell: './contrib/jenkins.sh' description: | -- To view, visit https://gerrit.osmocom.org/5409 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I027c5fa12c8be9434e3efec11976004c7924c472 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:48 +0000 Subject: [PATCH] osmo-ci[master]: jobs: add update-osmo-python-on-slaves.yml Message-ID: Review at https://gerrit.osmocom.org/5410 jobs: add update-osmo-python-on-slaves.yml Change-Id: Ib3982e1f18286cc45d5c7b849abfb91cad9e1b27 --- A jobs/update-osmo-python-on-slaves.yml 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/10/5410/1 diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml new file mode 100644 index 0000000..e906a53 --- /dev/null +++ b/jobs/update-osmo-python-on-slaves.yml @@ -0,0 +1,37 @@ +- job: + name: update-osmo-python-on-slaves + project-type: matrix + axes: + - axis: + type: slave + name: label + values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ] + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + scm: + - git: + url: https://gerrit.osmocom.org/python/osmo-python-tests + branches: + - 'origin/master' + skip-tag: true + wipe-workspace: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + + builders: + - shell: './contrib/jenkins.sh' + description: | + Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + + # make sure to update the osmo-python in docker images, rebuilt from osmo-ci/contrib/jenkins.sh + publishers: + - trigger: + project: update-osmo-ci-on-slaves + threshold: FAILURE + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5410 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib3982e1f18286cc45d5c7b849abfb91cad9e1b27 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:49 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: adjust triggers to what was found on old jenki... Message-ID: Review at https://gerrit.osmocom.org/5411 jobs: master: adjust triggers to what was found on old jenkins jobs Change-Id: Ib59247978ed92b72949260a79628b28754a44484 --- M jobs/master-builds.yml 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/11/5411/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 2606177..05fcb00 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -35,7 +35,7 @@ - libasn1c - libgtpnl - libosmo-abis: - trigger: master-openbsc + trigger: master-openbsc, master-libosmo-netif - libosmo-dsp: cmd: > @@ -65,7 +65,8 @@ fi trigger: > master-libosmo-abis, master-libosmo-sccp, master-openbsc, master-osmo-pcap, master-osmo-tetra, - master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon + master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon, + master-osmo-sip-connector - libsmpp34: trigger: master-osmo-msc, master-openbsc -- To view, visit https://gerrit.osmocom.org/5411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib59247978ed92b72949260a79628b28754a44484 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:49 +0000 Subject: [PATCH] osmo-ci[master]: jobs: cosmetic: readability: docker one-arg-per-line Message-ID: Review at https://gerrit.osmocom.org/5412 jobs: cosmetic: readability: docker one-arg-per-line Change-Id: I8b18a5bc54a879002b40b0fc51cd295e82beba4f --- M jobs/master-builds.yml 1 file changed, 53 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/12/5412/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 05fcb00..16e2a7c 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -85,21 +85,36 @@ # keep first line with less indent to preserve newlines ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" mkdir -p "$ARTIFACT_STORE" - docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ - -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \ - -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \ - -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ + docker run --rm=true \ + -e HOME=/build \ + -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e SMPP="$SMPP" \ + -e MGCP="$MGCP" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" \ + -v "$HOME/bin:/build_bin" \ + -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - osmo-bsc: concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ - -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ - osmocom:amd64 /build/contrib/jenkins.sh + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh - osmo-bts: a1_name: FIRMWARE_VERSION @@ -152,9 +167,15 @@ concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ - -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e MGCP="$MGCP" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh trigger: master-osmo-msc, master-osmo-bsc @@ -166,10 +187,17 @@ # keep first line with less indent to preserve newlines ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" mkdir -p "$ARTIFACT_STORE" - docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ - -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ - -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true -i \ + -e HOME=/build \ + -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh @@ -201,9 +229,15 @@ concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ - -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh - osmo-sip-connector -- To view, visit https://gerrit.osmocom.org/5412 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b18a5bc54a879002b40b0fc51cd295e82beba4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:31:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:31:49 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: osmo-gsm-manuals: use new jenkins.sh, only on ... Message-ID: Review at https://gerrit.osmocom.org/5413 jobs: master: osmo-gsm-manuals: use new jenkins.sh, only on OsmoBuild1 Change-Id: Ida1301a3f83caff400e80c8b46504f98cb0894ab --- M jobs/master-builds.yml 1 file changed, 3 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/13/5413/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 16e2a7c..78d373b 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -141,19 +141,11 @@ - osmo-gmr - osmo-gsm-manuals: + # publishing once is plenty + slave_axis: !!python/tuple [OsmocomBuild1] cmd: > # keep first line with less indent to preserve newlines - git clean -dxf . - rm -rf libosmocore - git clone git://git.osmocom.org/libosmocore - make LIBOSMO_DIR=$PWD/libosmocore - mkdir out/ - cp */*.pdf out/ - rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ - publishers: - - archive: - artifacts: '*/*.pdf' - allow-empty: true + ./contrib/jenkins.sh --publish - osmo-hlr: slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] -- To view, visit https://gerrit.osmocom.org/5413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida1301a3f83caff400e80c8b46504f98cb0894ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:18 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: osmo-gsm-manuals: use new jenkins.sh, only on ... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: osmo-gsm-manuals: use new jenkins.sh, only on OsmoBuild1 ...................................................................... jobs: master: osmo-gsm-manuals: use new jenkins.sh, only on OsmoBuild1 Change-Id: Ida1301a3f83caff400e80c8b46504f98cb0894ab --- M jobs/master-builds.yml 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 16e2a7c..78d373b 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -141,19 +141,11 @@ - osmo-gmr - osmo-gsm-manuals: + # publishing once is plenty + slave_axis: !!python/tuple [OsmocomBuild1] cmd: > # keep first line with less indent to preserve newlines - git clean -dxf . - rm -rf libosmocore - git clone git://git.osmocom.org/libosmocore - make LIBOSMO_DIR=$PWD/libosmocore - mkdir out/ - cp */*.pdf out/ - rsync -avz --delete -e "ssh -p 48" ./out/ docs at osmocom.org:web-files/latest/ - publishers: - - archive: - artifacts: '*/*.pdf' - allow-empty: true + ./contrib/jenkins.sh --publish - osmo-hlr: slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9] -- To view, visit https://gerrit.osmocom.org/5413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida1301a3f83caff400e80c8b46504f98cb0894ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:19 +0000 Subject: [MERGED] osmo-ci[master]: jobs: cosmetic: readability: docker one-arg-per-line In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: cosmetic: readability: docker one-arg-per-line ...................................................................... jobs: cosmetic: readability: docker one-arg-per-line Change-Id: I8b18a5bc54a879002b40b0fc51cd295e82beba4f --- M jobs/master-builds.yml 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 05fcb00..16e2a7c 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -85,21 +85,36 @@ # keep first line with less indent to preserve newlines ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" mkdir -p "$ARTIFACT_STORE" - docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ - -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \ - -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \ - -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \ + docker run --rm=true \ + -e HOME=/build \ + -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e SMPP="$SMPP" \ + -e MGCP="$MGCP" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" \ + -v "$HOME/bin:/build_bin" \ + -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh - osmo-bsc: concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \ - -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ - osmocom:amd64 /build/contrib/jenkins.sh + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + osmocom:amd64 /build/contrib/jenkins.sh - osmo-bts: a1_name: FIRMWARE_VERSION @@ -152,9 +167,15 @@ concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ - -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e MGCP="$MGCP" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh trigger: master-osmo-msc, master-osmo-bsc @@ -166,10 +187,17 @@ # keep first line with less indent to preserve newlines ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" mkdir -p "$ARTIFACT_STORE" - docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \ - -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ - -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true -i \ + -e HOME=/build \ + -e ARTIFACT_STORE=/artifact_store \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ -v "$ARTIFACT_STORE:/artifact_store" \ osmocom:amd64 /build/contrib/jenkins.sh @@ -201,9 +229,15 @@ concurrent: true cmd: > # keep first line with less indent to preserve newlines - docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \ - -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ + docker run --rm=true \ + -e HOME=/build \ + -e MAKE=make \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e IU="$IU" \ + -e PATH="$PATH:/build_bin" \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ osmocom:amd64 /build/contrib/jenkins.sh - osmo-sip-connector -- To view, visit https://gerrit.osmocom.org/5412 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b18a5bc54a879002b40b0fc51cd295e82beba4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:19 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: adjust triggers to what was found on old jenki... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: adjust triggers to what was found on old jenkins jobs ...................................................................... jobs: master: adjust triggers to what was found on old jenkins jobs Change-Id: Ib59247978ed92b72949260a79628b28754a44484 --- M jobs/master-builds.yml 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 2606177..05fcb00 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -35,7 +35,7 @@ - libasn1c - libgtpnl - libosmo-abis: - trigger: master-openbsc + trigger: master-openbsc, master-libosmo-netif - libosmo-dsp: cmd: > @@ -65,7 +65,8 @@ fi trigger: > master-libosmo-abis, master-libosmo-sccp, master-openbsc, master-osmo-pcap, master-osmo-tetra, - master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon + master-osmo-pcu, master-osmo-gmr, master-osmo-bts, master-osmocom-bb, SIMtrace, xgoldmon, + master-osmo-sip-connector - libsmpp34: trigger: master-osmo-msc, master-openbsc -- To view, visit https://gerrit.osmocom.org/5411 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib59247978ed92b72949260a79628b28754a44484 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:19 +0000 Subject: [MERGED] osmo-ci[master]: jobs: add update-osmo-python-on-slaves.yml In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: add update-osmo-python-on-slaves.yml ...................................................................... jobs: add update-osmo-python-on-slaves.yml Change-Id: Ib3982e1f18286cc45d5c7b849abfb91cad9e1b27 --- A jobs/update-osmo-python-on-slaves.yml 1 file changed, 37 insertions(+), 0 deletions(-) diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml new file mode 100644 index 0000000..e906a53 --- /dev/null +++ b/jobs/update-osmo-python-on-slaves.yml @@ -0,0 +1,37 @@ +- job: + name: update-osmo-python-on-slaves + project-type: matrix + axes: + - axis: + type: slave + name: label + values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ] + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + scm: + - git: + url: https://gerrit.osmocom.org/python/osmo-python-tests + branches: + - 'origin/master' + skip-tag: true + wipe-workspace: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + + builders: + - shell: './contrib/jenkins.sh' + description: | + Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY! + + # make sure to update the osmo-python in docker images, rebuilt from osmo-ci/contrib/jenkins.sh + publishers: + - trigger: + project: update-osmo-ci-on-slaves + threshold: FAILURE + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/5410 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3982e1f18286cc45d5c7b849abfb91cad9e1b27 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:19 +0000 Subject: [MERGED] osmo-ci[master]: jobs: fix poll-scm on update-osmo-ci-on-slaves In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: fix poll-scm on update-osmo-ci-on-slaves ...................................................................... jobs: fix poll-scm on update-osmo-ci-on-slaves poll-scm was missing by accident Change-Id: I027c5fa12c8be9434e3efec11976004c7924c472 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 8d63848..be93c90 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -16,6 +16,12 @@ git-config-name: 'Jenkins Builder' git-config-email: 'jenkins at osmocom.org' skip-tag: true + + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + builders: - shell: './contrib/jenkins.sh' description: | -- To view, visit https://gerrit.osmocom.org/5409 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I027c5fa12c8be9434e3efec11976004c7924c472 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:32:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:32:20 +0000 Subject: [MERGED] osmo-ci[master]: jobs: add build2-deb8build to update-osmo-ci-on-slaves job In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: add build2-deb8build to update-osmo-ci-on-slaves job ...................................................................... jobs: add build2-deb8build to update-osmo-ci-on-slaves job Change-Id: I48246067f05227efc18b46cb1b29d1c50f4eab84 --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index e0f082f..8d63848 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -5,7 +5,7 @@ - axis: type: slave name: label - values: [ OsmocomBuild1 , build1-debian9-lxc ] + values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ] properties: - build-discarder: days-to-keep: 30 -- To view, visit https://gerrit.osmocom.org/5408 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48246067f05227efc18b46cb1b29d1c50f4eab84 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:41:13 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:41:13 +0000 Subject: [PATCH] osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5215 to look at the new patch set (#4). Introduce LOGTBF* for consistent logging When troubleshooting complex issues with TBF lifecycle, it's much easier to follow the logs which are consistently formatted. Add LOGTBF*() macro similar to struct-specific log routines we use in other Osmocom project and use it to log TBF-related messages in a unified way. Tweak test output accordingly. Related: OS#2407 Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 980 insertions(+), 1,015 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/5215/4 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:42:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:42:17 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Fix python3 compatibility ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5407 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I942b507f6f6a9975334fcf2469cc0a2c0575472f Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:42:27 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:42:27 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Move scripts to appropriate directory ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5406 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie105d573b88b4b07f17b401a5ed065a16dbc5536 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:42:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:42:33 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Use setuptools for packaging ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5405 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id0e035ea0535ba529a75f5c8c5aad5279354d985 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:42:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:42:38 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Expand CI tests ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5404 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iaa5244ed42dcdb7dc73b90c80bb1e5998495772c Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:47:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:47:57 +0000 Subject: osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5402/1/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 381: LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while lachan act\n", typo: lchan? -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:51:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 18:51:00 +0000 Subject: [PATCH] libosmocore[master]: codec: add GSM FR bit offset definition In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5385 to look at the new patch set (#2). codec: add GSM FR bit offset definition Add enum to define the GSM FR bit positions as described in RFC 3551 Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed --- M include/Makefile.am A include/osmocom/codec/gsm610_bits.h 2 files changed, 273 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/5385/2 diff --git a/include/Makefile.am b/include/Makefile.am index 4714003..09f5ca6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,7 @@ nobase_include_HEADERS = \ osmocom/codec/codec.h \ + osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ osmocom/core/backtrace.h \ osmocom/core/bit16gen.h \ diff --git a/include/osmocom/codec/gsm610_bits.h b/include/osmocom/codec/gsm610_bits.h new file mode 100644 index 0000000..cef4cf4 --- /dev/null +++ b/include/osmocom/codec/gsm610_bits.h @@ -0,0 +1,272 @@ +/*! \file gsm610_bits.h */ + +#pragma once + +/* This enumeration describs a GSM-FR (GSM 06.10) frame in ints RTP bit order + * representation. See also RFC 3551 Table 3: GSM payload format */ +enum gsm610_rtp_bit_offsets { + GSM610_RTP_SIGNATURE_0, + GSM610_RTP_SIGNATURE_1, + GSM610_RTP_SIGNATURE_2, + GSM610_RTP_SIGNATURE_3, + GSM610_RTP_LARC0_0, + GSM610_RTP_LARC0_1, + GSM610_RTP_LARC0_2, + GSM610_RTP_LARC0_3, + GSM610_RTP_LARC0_4, + GSM610_RTP_LARC0_5, + GSM610_RTP_LARC1_0, + GSM610_RTP_LARC1_1, + GSM610_RTP_LARC1_2, + GSM610_RTP_LARC1_3, + GSM610_RTP_LARC1_4, + GSM610_RTP_LARC1_5, + GSM610_RTP_LARC2_0, + GSM610_RTP_LARC2_1, + GSM610_RTP_LARC2_2, + GSM610_RTP_LARC2_3, + GSM610_RTP_LARC2_4, + GSM610_RTP_LARC3_0, + GSM610_RTP_LARC3_1, + GSM610_RTP_LARC3_2, + GSM610_RTP_LARC3_3, + GSM610_RTP_LARC3_4, + GSM610_RTP_LARC4_0, + GSM610_RTP_LARC4_1, + GSM610_RTP_LARC4_2, + GSM610_RTP_LARC4_3, + GSM610_RTP_LARC5_0, + GSM610_RTP_LARC5_1, + GSM610_RTP_LARC5_2, + GSM610_RTP_LARC5_3, + GSM610_RTP_LARC6_0, + GSM610_RTP_LARC6_1, + GSM610_RTP_LARC6_2, + GSM610_RTP_LARC7_0, + GSM610_RTP_LARC7_1, + GSM610_RTP_LARC7_2, + GSM610_RTP_NC0_0, + GSM610_RTP_NC0_1, + GSM610_RTP_NC0_2, + GSM610_RTP_NC0_3, + GSM610_RTP_NC0_4, + GSM610_RTP_NC0_5, + GSM610_RTP_NC0_6, + GSM610_RTP_BC0_0, + GSM610_RTP_BC0_1, + GSM610_RTP_MC0_0, + GSM610_RTP_MC0_1, + GSM610_RTP_XMAXC00, + GSM610_RTP_XMAXC01, + GSM610_RTP_XMAXC02, + GSM610_RTP_XMAXC03, + GSM610_RTP_XMAXC04, + GSM610_RTP_XMAXC05, + GSM610_RTP_XMC0_0, + GSM610_RTP_XMC0_1, + GSM610_RTP_XMC0_2, + GSM610_RTP_XMC1_0, + GSM610_RTP_XMC1_1, + GSM610_RTP_XMC1_2, + GSM610_RTP_XMC2_0, + GSM610_RTP_XMC2_1, + GSM610_RTP_XMC2_2, + GSM610_RTP_XMC3_0, + GSM610_RTP_XMC3_1, + GSM610_RTP_XMC3_2, + GSM610_RTP_XMC4_0, + GSM610_RTP_XMC4_1, + GSM610_RTP_XMC4_2, + GSM610_RTP_XMC5_0, + GSM610_RTP_XMC5_1, + GSM610_RTP_XMC5_2, + GSM610_RTP_XMC6_0, + GSM610_RTP_XMC6_1, + GSM610_RTP_XMC6_2, + GSM610_RTP_XMC7_0, + GSM610_RTP_XMC7_1, + GSM610_RTP_XMC7_2, + GSM610_RTP_XMC8_0, + GSM610_RTP_XMC8_1, + GSM610_RTP_XMC8_2, + GSM610_RTP_XMC9_0, + GSM610_RTP_XMC9_1, + GSM610_RTP_XMC9_2, + GSM610_RTP_XMC10_0, + GSM610_RTP_XMC10_1, + GSM610_RTP_XMC10_2, + GSM610_RTP_XMC11_0, + GSM610_RTP_XMC11_1, + GSM610_RTP_XMC11_2, + GSM610_RTP_XMC12_0, + GSM610_RTP_XMC12_1, + GSM610_RTP_XCM12_2, + GSM610_RTP_NC1_0, + GSM610_RTP_NC1_1, + GSM610_RTP_NC1_2, + GSM610_RTP_NC1_3, + GSM610_RTP_NC1_4, + GSM610_RTP_NC1_5, + GSM610_RTP_NC1_6, + GSM610_RTP_BC1_0, + GSM610_RTP_BC1_1, + GSM610_RTP_MC1_0, + GSM610_RTP_MC1_1, + GSM610_RTP_XMAXC10, + GSM610_RTP_XMAXC11, + GSM610_RTP_XMAXC12, + GSM610_RTP_XMAXC13, + GSM610_RTP_XMAXC14, + GSM610_RTP_XMAX15, + GSM610_RTP_XMC13_0, + GSM610_RTP_XMC13_1, + GSM610_RTP_XMC13_2, + GSM610_RTP_XMC14_0, + GSM610_RTP_XMC14_1, + GSM610_RTP_XMC14_2, + GSM610_RTP_XMC15_0, + GSM610_RTP_XMC15_1, + GSM610_RTP_XMC15_2, + GSM610_RTP_XMC16_0, + GSM610_RTP_XMC16_1, + GSM610_RTP_XMC16_2, + GSM610_RTP_XMC17_0, + GSM610_RTP_XMC17_1, + GSM610_RTP_XMC17_2, + GSM610_RTP_XMC18_0, + GSM610_RTP_XMC18_1, + GSM610_RTP_XMC18_2, + GSM610_RTP_XMC19_0, + GSM610_RTP_XMC19_1, + GSM610_RTP_XMC19_2, + GSM610_RTP_XMC20_0, + GSM610_RTP_XMC20_1, + GSM610_RTP_XMC20_2, + GSM610_RTP_XMC21_0, + GSM610_RTP_XMC21_1, + GSM610_RTP_XMC21_2, + GSM610_RTP_XMC22_0, + GSM610_RTP_XMC22_1, + GSM610_RTP_XMC22_2, + GSM610_RTP_XMC23_0, + GSM610_RTP_XMC23_1, + GSM610_RTP_XMC23_2, + GSM610_RTP_XMC24_0, + GSM610_RTP_XMC24_1, + GSM610_RTP_XMC24_2, + GSM610_RTP_XMC25_0, + GSM610_RTP_XMC25_1, + GSM610_RTP_XMC25_2, + GSM610_RTP_NC2_0, + GSM610_RTP_NC2_1, + GSM610_RTP_NC2_2, + GSM610_RTP_NC2_3, + GSM610_RTP_NC2_4, + GSM610_RTP_NC2_5, + GSM610_RTP_NC2_6, + GSM610_RTP_BC2_0, + GSM610_RTP_BC2_1, + GSM610_RTP_MC2_0, + GSM610_RTP_MC2_1, + GSM610_RTP_XMAXC20, + GSM610_RTP_XMAXC21, + GSM610_RTP_XMAXC22, + GSM610_RTP_XMAXC23, + GSM610_RTP_XMAXC24, + GSM610_RTP_XMAXC25, + GSM610_RTP_XMC26_0, + GSM610_RTP_XMC26_1, + GSM610_RTP_XMC26_2, + GSM610_RTP_XMC27_0, + GSM610_RTP_XMC27_1, + GSM610_RTP_XMC27_2, + GSM610_RTP_XMC28_0, + GSM610_RTP_XMC28_1, + GSM610_RTP_XMC28_2, + GSM610_RTP_XMC29_0, + GSM610_RTP_XMC29_1, + GSM610_RTP_XMC29_2, + GSM610_RTP_XMC30_0, + GSM610_RTP_XMC30_1, + GSM610_RTP_XMC30_2, + GSM610_RTP_XMC31_0, + GSM610_RTP_XMC31_1, + GSM610_RTP_XMC31_2, + GSM610_RTP_XMC32_0, + GSM610_RTP_XMC32_1, + GSM610_RTP_XMC32_2, + GSM610_RTP_XMC33_0, + GSM610_RTP_XMC33_1, + GSM610_RTP_XMC33_2, + GSM610_RTP_XMC34_0, + GSM610_RTP_XMC34_1, + GSM610_RTP_XMC34_2, + GSM610_RTP_XMC35_0, + GSM610_RTP_XMC35_1, + GSM610_RTP_XMC35_2, + GSM610_RTP_XMC36_0, + GSM610_RTP_XMC36_1, + GSM610_RTP_XMC36_2, + GSM610_RTP_XMC37_0, + GSM610_RTP_XMC37_1, + GSM610_RTP_XMC37_2, + GSM610_RTP_XMC38_0, + GSM610_RTP_XMC38_1, + GSM610_RTP_XMC38_2, + GSM610_RTP_NC3_0, + GSM610_RTP_NC3_1, + GSM610_RTP_NC3_2, + GSM610_RTP_NC3_3, + GSM610_RTP_NC3_4, + GSM610_RTP_NC3_5, + GSM610_RTP_NC3_6, + GSM610_RTP_BC3_0, + GSM610_RTP_BC3_1, + GSM610_RTP_MC3_0, + GSM610_RTP_MC3_1, + GSM610_RTP_XMAXC30, + GSM610_RTP_XMAXC31, + GSM610_RTP_XMAXC32, + GSM610_RTP_XMAXC33, + GSM610_RTP_XMAXC34, + GSM610_RTP_XMAXC35, + GSM610_RTP_XMC39_0, + GSM610_RTP_XMC39_1, + GSM610_RTP_XMC39_2, + GSM610_RTP_XMC40_0, + GSM610_RTP_XMC40_1, + GSM610_RTP_XMC40_2, + GSM610_RTP_XMC41_0, + GSM610_RTP_XMC41_1, + GSM610_RTP_XMC41_2, + GSM610_RTP_XMC42_0, + GSM610_RTP_XMC42_1, + GSM610_RTP_XMC42_2, + GSM610_RTP_XMC43_0, + GSM610_RTP_XMC43_1, + GSM610_RTP_XMC43_2, + GSM610_RTP_XMC44_0, + GSM610_RTP_XMC44_1, + GSM610_RTP_XMC44_2, + GSM610_RTP_XMC45_0, + GSM610_RTP_XMC45_1, + GSM610_RTP_XMC45_2, + GSM610_RTP_XMC46_0, + GSM610_RTP_XMC46_1, + GSM610_RTP_XMC46_2, + GSM610_RTP_XMC47_0, + GSM610_RTP_XMC47_1, + GSM610_RTP_XMC47_2, + GSM610_RTP_XMC48_0, + GSM610_RTP_XMC48_1, + GSM610_RTP_XMC48_2, + GSM610_RTP_XMC49_0, + GSM610_RTP_XMC49_1, + GSM610_RTP_XMC49_2, + GSM610_RTP_XMC50_0, + GSM610_RTP_XMC50_1, + GSM610_RTP_XMC50_2, + GSM610_RTP_XMC51_0, + GSM610_RTP_XMC51_1, + GSM610_RTP_XMC51_2 +}; -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:14 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit-verifications: make repos_url configurable Message-ID: Review at https://gerrit.osmocom.org/5414 jobs: gerrit-verifications: make repos_url configurable Change-Id: I24aadc2aeeeda762df61e7c56e4159a730010c97 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/14/5414/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index c372075..8ba5807 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -20,6 +20,7 @@ combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh + repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/{repos}' # in alphabetical order repos: @@ -237,7 +238,7 @@ scm: - git: - url: ssh://jenkins at gerrit.osmocom.org:29418/{repos} + url: '{obj:repos_url}' credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d branches: - $GERRIT_BRANCH -- To view, visit https://gerrit.osmocom.org/5414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24aadc2aeeeda762df61e7c56e4159a730010c97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:14 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit: fix URL for osmo-python-tests Message-ID: Review at https://gerrit.osmocom.org/5415 jobs: gerrit: fix URL for osmo-python-tests Change-Id: Icaa44207ebbdc03c3af1a32f7491d2b4c9fb982d --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/15/5415/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 8ba5807..5b70a45 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -158,7 +158,8 @@ (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") - - osmo-python-tests + - osmo-python-tests: + repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/python/{repos}' - osmo-sgsn: concurrent: true -- To view, visit https://gerrit.osmocom.org/5415 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaa44207ebbdc03c3af1a32f7491d2b4c9fb982d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:14 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit: fix osmo-ttcn3-hacks scm and slave Message-ID: Review at https://gerrit.osmocom.org/5416 jobs: gerrit: fix osmo-ttcn3-hacks scm and slave Change-Id: I252c103450ad0da59ab18c88d78f20c750b22c98 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/16/5416/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 5b70a45..e428551 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -182,10 +182,8 @@ - osmo-tetra - osmo-ttcn3-hacks: - scm: - - git: - url: https://gerrit.osmocom.org/{repos} - node: build2-deb9build + repos_url: 'https://gerrit.osmocom.org/{repos}' + slave_axis: !!python/tuple [build2-deb9build] cmd: > # keep first line with less indent to preserve newlines make clean; make compile -- To view, visit https://gerrit.osmocom.org/5416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I252c103450ad0da59ab18c88d78f20c750b22c98 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:28 +0000 Subject: [MERGED] osmo-ci[master]: jobs: gerrit: fix osmo-ttcn3-hacks scm and slave In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: gerrit: fix osmo-ttcn3-hacks scm and slave ...................................................................... jobs: gerrit: fix osmo-ttcn3-hacks scm and slave Change-Id: I252c103450ad0da59ab18c88d78f20c750b22c98 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 5b70a45..e428551 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -182,10 +182,8 @@ - osmo-tetra - osmo-ttcn3-hacks: - scm: - - git: - url: https://gerrit.osmocom.org/{repos} - node: build2-deb9build + repos_url: 'https://gerrit.osmocom.org/{repos}' + slave_axis: !!python/tuple [build2-deb9build] cmd: > # keep first line with less indent to preserve newlines make clean; make compile -- To view, visit https://gerrit.osmocom.org/5416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I252c103450ad0da59ab18c88d78f20c750b22c98 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:28 +0000 Subject: [MERGED] osmo-ci[master]: jobs: gerrit: fix URL for osmo-python-tests In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: gerrit: fix URL for osmo-python-tests ...................................................................... jobs: gerrit: fix URL for osmo-python-tests Change-Id: Icaa44207ebbdc03c3af1a32f7491d2b4c9fb982d --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 8ba5807..5b70a45 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -158,7 +158,8 @@ (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") || (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master") - - osmo-python-tests + - osmo-python-tests: + repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/python/{repos}' - osmo-sgsn: concurrent: true -- To view, visit https://gerrit.osmocom.org/5415 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icaa44207ebbdc03c3af1a32f7491d2b4c9fb982d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 18:57:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 18:57:28 +0000 Subject: [MERGED] osmo-ci[master]: jobs: gerrit-verifications: make repos_url configurable In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: gerrit-verifications: make repos_url configurable ...................................................................... jobs: gerrit-verifications: make repos_url configurable Change-Id: I24aadc2aeeeda762df61e7c56e4159a730010c97 --- M jobs/gerrit-verifications.yml 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index c372075..8ba5807 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -20,6 +20,7 @@ combination_filter: '' # most common build invocation cmd: ./contrib/jenkins.sh + repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/{repos}' # in alphabetical order repos: @@ -237,7 +238,7 @@ scm: - git: - url: ssh://jenkins at gerrit.osmocom.org:29418/{repos} + url: '{obj:repos_url}' credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d branches: - $GERRIT_BRANCH -- To view, visit https://gerrit.osmocom.org/5414 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24aadc2aeeeda762df61e7c56e4159a730010c97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:17:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 19:17:47 +0000 Subject: [PATCH] python/osmo-python-tests[master]: NOT FOR MERGE: testing gerrit trigger Message-ID: Review at https://gerrit.osmocom.org/5417 NOT FOR MERGE: testing gerrit trigger Change-Id: Ifd090b439ff0be29f4da61bce6c0dfb38a005174 --- M README 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/17/5417/1 diff --git a/README b/README index 25be782..72385d5 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +bla bl + Building/installation: sudo python setup.py install If you prefer to have it cleanly removable, install checkinstall and run -- To view, visit https://gerrit.osmocom.org/5417 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd090b439ff0be29f4da61bce6c0dfb38a005174 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:21:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 19:21:24 +0000 Subject: [PATCH] libosmocore[master]: Do not allocate already existing counter group Message-ID: Review at https://gerrit.osmocom.org/5418 Do not allocate already existing counter group Check that no group with the given name and index already exist before allocating it. Add corresponding test case. Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Related: OS#2757 --- M src/rate_ctr.c M tests/stats/stats_test.c 2 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/5418/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 477339f..c27ac68 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,6 +190,9 @@ unsigned int size; struct rate_ctr_group *group; + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) + return NULL; /* group already exist */ + size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index b302b37..35faf9a 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -311,7 +311,7 @@ { struct osmo_stats_reporter *srep1, *srep2, *srep; struct osmo_stat_item_group *statg1, *statg2; - struct rate_ctr_group *ctrg1, *ctrg2, *ctrg3; + struct rate_ctr_group *ctrg1, *ctrg2, *ctrg3, *ctrg_dup; void *stats_ctx = talloc_named_const(NULL, 1, "stats test context"); int rc; @@ -327,6 +327,11 @@ OSMO_ASSERT(ctrg1 != NULL); ctrg2 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); OSMO_ASSERT(ctrg2 != NULL); + + ctrg_dup = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); + if (ctrg_dup != NULL && ctrg2 != NULL) + printf("FAIL: successfully allocated already existing counter group!\n"); + ctrg3 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc_dot, 3); OSMO_ASSERT(ctrg3 != NULL); -- To view, visit https://gerrit.osmocom.org/5418 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:29:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 19:29:42 +0000 Subject: [PATCH] osmo-ci[master]: jobs: gerrit: fix osmo-python-tests: gerrit project name Message-ID: Review at https://gerrit.osmocom.org/5419 jobs: gerrit: fix osmo-python-tests: gerrit project name Change-Id: Idb4e93d88123f0a7e403af627345300dae86aca7 --- M jobs/gerrit-verifications.yml 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/19/5419/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index e428551..b421e34 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -21,6 +21,7 @@ # most common build invocation cmd: ./contrib/jenkins.sh repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/{repos}' + gerrit_project: '{repos}' # in alphabetical order repos: @@ -160,6 +161,7 @@ - osmo-python-tests: repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/python/{repos}' + gerrit_project: 'python/{repos}' - osmo-sgsn: concurrent: true @@ -255,7 +257,7 @@ exclude-no-code-change: true projects: - project-compare-type: 'PLAIN' - project-pattern: '{repos}' + project-pattern: '{obj:gerrit_project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**' -- To view, visit https://gerrit.osmocom.org/5419 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb4e93d88123f0a7e403af627345300dae86aca7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:30:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 15 Dec 2017 19:30:03 +0000 Subject: [MERGED] osmo-ci[master]: jobs: gerrit: fix osmo-python-tests: gerrit project name In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: gerrit: fix osmo-python-tests: gerrit project name ...................................................................... jobs: gerrit: fix osmo-python-tests: gerrit project name Change-Id: Idb4e93d88123f0a7e403af627345300dae86aca7 --- M jobs/gerrit-verifications.yml 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index e428551..b421e34 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -21,6 +21,7 @@ # most common build invocation cmd: ./contrib/jenkins.sh repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/{repos}' + gerrit_project: '{repos}' # in alphabetical order repos: @@ -160,6 +161,7 @@ - osmo-python-tests: repos_url: 'ssh://jenkins at gerrit.osmocom.org:29418/python/{repos}' + gerrit_project: 'python/{repos}' - osmo-sgsn: concurrent: true @@ -255,7 +257,7 @@ exclude-no-code-change: true projects: - project-compare-type: 'PLAIN' - project-pattern: '{repos}' + project-pattern: '{obj:gerrit_project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**' -- To view, visit https://gerrit.osmocom.org/5419 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb4e93d88123f0a7e403af627345300dae86aca7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:40:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 19:40:56 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#8). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/8 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:40:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 19:40:56 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#8). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/8 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 19:41:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 15 Dec 2017 19:41:42 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Use setuptools for packaging In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Use setuptools for packaging ...................................................................... Use setuptools for packaging According to https://docs.python.org/3/library/distutils.html the setuptools are used in place of distutils anyway. Using it directly allows us to make packaging more flexible: specify dependencies, automatically find package name etc. Change-Id: I39ee53f352001e47c6df055cbec52d638480253d --- M osmopy/__init__.py M setup.py 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmopy/__init__.py b/osmopy/__init__.py index b760111..3fd197f 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -__version__ = '0.0.2' +__version__ = '0.0.3' __all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', 'osmoutil', diff --git a/setup.py b/setup.py index 3e147c4..993c2b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from distutils.core import setup +from setuptools import setup, find_packages from osmopy import __version__ import sys @@ -35,7 +35,7 @@ setup( name = 'osmopython', version = __version__, - packages = ["osmopy"], + packages = find_packages(), scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", -- To view, visit https://gerrit.osmocom.org/5279 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 21:44:35 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 21:44:35 +0000 Subject: [PATCH] libosmocore[master]: libosmocodec: add FR bit offset definitions In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5385 to look at the new patch set (#3). libosmocodec: add FR bit offset definitions This change defines the GSM FR bit positions as described in RFC 3551, which will be used by further ECU (Error Correction Unit) implementation. Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed --- M include/Makefile.am A include/osmocom/codec/gsm610_bits.h 2 files changed, 273 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/5385/3 diff --git a/include/Makefile.am b/include/Makefile.am index 4714003..09f5ca6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,7 @@ nobase_include_HEADERS = \ osmocom/codec/codec.h \ + osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ osmocom/core/backtrace.h \ osmocom/core/bit16gen.h \ diff --git a/include/osmocom/codec/gsm610_bits.h b/include/osmocom/codec/gsm610_bits.h new file mode 100644 index 0000000..cef4cf4 --- /dev/null +++ b/include/osmocom/codec/gsm610_bits.h @@ -0,0 +1,272 @@ +/*! \file gsm610_bits.h */ + +#pragma once + +/* This enumeration describs a GSM-FR (GSM 06.10) frame in ints RTP bit order + * representation. See also RFC 3551 Table 3: GSM payload format */ +enum gsm610_rtp_bit_offsets { + GSM610_RTP_SIGNATURE_0, + GSM610_RTP_SIGNATURE_1, + GSM610_RTP_SIGNATURE_2, + GSM610_RTP_SIGNATURE_3, + GSM610_RTP_LARC0_0, + GSM610_RTP_LARC0_1, + GSM610_RTP_LARC0_2, + GSM610_RTP_LARC0_3, + GSM610_RTP_LARC0_4, + GSM610_RTP_LARC0_5, + GSM610_RTP_LARC1_0, + GSM610_RTP_LARC1_1, + GSM610_RTP_LARC1_2, + GSM610_RTP_LARC1_3, + GSM610_RTP_LARC1_4, + GSM610_RTP_LARC1_5, + GSM610_RTP_LARC2_0, + GSM610_RTP_LARC2_1, + GSM610_RTP_LARC2_2, + GSM610_RTP_LARC2_3, + GSM610_RTP_LARC2_4, + GSM610_RTP_LARC3_0, + GSM610_RTP_LARC3_1, + GSM610_RTP_LARC3_2, + GSM610_RTP_LARC3_3, + GSM610_RTP_LARC3_4, + GSM610_RTP_LARC4_0, + GSM610_RTP_LARC4_1, + GSM610_RTP_LARC4_2, + GSM610_RTP_LARC4_3, + GSM610_RTP_LARC5_0, + GSM610_RTP_LARC5_1, + GSM610_RTP_LARC5_2, + GSM610_RTP_LARC5_3, + GSM610_RTP_LARC6_0, + GSM610_RTP_LARC6_1, + GSM610_RTP_LARC6_2, + GSM610_RTP_LARC7_0, + GSM610_RTP_LARC7_1, + GSM610_RTP_LARC7_2, + GSM610_RTP_NC0_0, + GSM610_RTP_NC0_1, + GSM610_RTP_NC0_2, + GSM610_RTP_NC0_3, + GSM610_RTP_NC0_4, + GSM610_RTP_NC0_5, + GSM610_RTP_NC0_6, + GSM610_RTP_BC0_0, + GSM610_RTP_BC0_1, + GSM610_RTP_MC0_0, + GSM610_RTP_MC0_1, + GSM610_RTP_XMAXC00, + GSM610_RTP_XMAXC01, + GSM610_RTP_XMAXC02, + GSM610_RTP_XMAXC03, + GSM610_RTP_XMAXC04, + GSM610_RTP_XMAXC05, + GSM610_RTP_XMC0_0, + GSM610_RTP_XMC0_1, + GSM610_RTP_XMC0_2, + GSM610_RTP_XMC1_0, + GSM610_RTP_XMC1_1, + GSM610_RTP_XMC1_2, + GSM610_RTP_XMC2_0, + GSM610_RTP_XMC2_1, + GSM610_RTP_XMC2_2, + GSM610_RTP_XMC3_0, + GSM610_RTP_XMC3_1, + GSM610_RTP_XMC3_2, + GSM610_RTP_XMC4_0, + GSM610_RTP_XMC4_1, + GSM610_RTP_XMC4_2, + GSM610_RTP_XMC5_0, + GSM610_RTP_XMC5_1, + GSM610_RTP_XMC5_2, + GSM610_RTP_XMC6_0, + GSM610_RTP_XMC6_1, + GSM610_RTP_XMC6_2, + GSM610_RTP_XMC7_0, + GSM610_RTP_XMC7_1, + GSM610_RTP_XMC7_2, + GSM610_RTP_XMC8_0, + GSM610_RTP_XMC8_1, + GSM610_RTP_XMC8_2, + GSM610_RTP_XMC9_0, + GSM610_RTP_XMC9_1, + GSM610_RTP_XMC9_2, + GSM610_RTP_XMC10_0, + GSM610_RTP_XMC10_1, + GSM610_RTP_XMC10_2, + GSM610_RTP_XMC11_0, + GSM610_RTP_XMC11_1, + GSM610_RTP_XMC11_2, + GSM610_RTP_XMC12_0, + GSM610_RTP_XMC12_1, + GSM610_RTP_XCM12_2, + GSM610_RTP_NC1_0, + GSM610_RTP_NC1_1, + GSM610_RTP_NC1_2, + GSM610_RTP_NC1_3, + GSM610_RTP_NC1_4, + GSM610_RTP_NC1_5, + GSM610_RTP_NC1_6, + GSM610_RTP_BC1_0, + GSM610_RTP_BC1_1, + GSM610_RTP_MC1_0, + GSM610_RTP_MC1_1, + GSM610_RTP_XMAXC10, + GSM610_RTP_XMAXC11, + GSM610_RTP_XMAXC12, + GSM610_RTP_XMAXC13, + GSM610_RTP_XMAXC14, + GSM610_RTP_XMAX15, + GSM610_RTP_XMC13_0, + GSM610_RTP_XMC13_1, + GSM610_RTP_XMC13_2, + GSM610_RTP_XMC14_0, + GSM610_RTP_XMC14_1, + GSM610_RTP_XMC14_2, + GSM610_RTP_XMC15_0, + GSM610_RTP_XMC15_1, + GSM610_RTP_XMC15_2, + GSM610_RTP_XMC16_0, + GSM610_RTP_XMC16_1, + GSM610_RTP_XMC16_2, + GSM610_RTP_XMC17_0, + GSM610_RTP_XMC17_1, + GSM610_RTP_XMC17_2, + GSM610_RTP_XMC18_0, + GSM610_RTP_XMC18_1, + GSM610_RTP_XMC18_2, + GSM610_RTP_XMC19_0, + GSM610_RTP_XMC19_1, + GSM610_RTP_XMC19_2, + GSM610_RTP_XMC20_0, + GSM610_RTP_XMC20_1, + GSM610_RTP_XMC20_2, + GSM610_RTP_XMC21_0, + GSM610_RTP_XMC21_1, + GSM610_RTP_XMC21_2, + GSM610_RTP_XMC22_0, + GSM610_RTP_XMC22_1, + GSM610_RTP_XMC22_2, + GSM610_RTP_XMC23_0, + GSM610_RTP_XMC23_1, + GSM610_RTP_XMC23_2, + GSM610_RTP_XMC24_0, + GSM610_RTP_XMC24_1, + GSM610_RTP_XMC24_2, + GSM610_RTP_XMC25_0, + GSM610_RTP_XMC25_1, + GSM610_RTP_XMC25_2, + GSM610_RTP_NC2_0, + GSM610_RTP_NC2_1, + GSM610_RTP_NC2_2, + GSM610_RTP_NC2_3, + GSM610_RTP_NC2_4, + GSM610_RTP_NC2_5, + GSM610_RTP_NC2_6, + GSM610_RTP_BC2_0, + GSM610_RTP_BC2_1, + GSM610_RTP_MC2_0, + GSM610_RTP_MC2_1, + GSM610_RTP_XMAXC20, + GSM610_RTP_XMAXC21, + GSM610_RTP_XMAXC22, + GSM610_RTP_XMAXC23, + GSM610_RTP_XMAXC24, + GSM610_RTP_XMAXC25, + GSM610_RTP_XMC26_0, + GSM610_RTP_XMC26_1, + GSM610_RTP_XMC26_2, + GSM610_RTP_XMC27_0, + GSM610_RTP_XMC27_1, + GSM610_RTP_XMC27_2, + GSM610_RTP_XMC28_0, + GSM610_RTP_XMC28_1, + GSM610_RTP_XMC28_2, + GSM610_RTP_XMC29_0, + GSM610_RTP_XMC29_1, + GSM610_RTP_XMC29_2, + GSM610_RTP_XMC30_0, + GSM610_RTP_XMC30_1, + GSM610_RTP_XMC30_2, + GSM610_RTP_XMC31_0, + GSM610_RTP_XMC31_1, + GSM610_RTP_XMC31_2, + GSM610_RTP_XMC32_0, + GSM610_RTP_XMC32_1, + GSM610_RTP_XMC32_2, + GSM610_RTP_XMC33_0, + GSM610_RTP_XMC33_1, + GSM610_RTP_XMC33_2, + GSM610_RTP_XMC34_0, + GSM610_RTP_XMC34_1, + GSM610_RTP_XMC34_2, + GSM610_RTP_XMC35_0, + GSM610_RTP_XMC35_1, + GSM610_RTP_XMC35_2, + GSM610_RTP_XMC36_0, + GSM610_RTP_XMC36_1, + GSM610_RTP_XMC36_2, + GSM610_RTP_XMC37_0, + GSM610_RTP_XMC37_1, + GSM610_RTP_XMC37_2, + GSM610_RTP_XMC38_0, + GSM610_RTP_XMC38_1, + GSM610_RTP_XMC38_2, + GSM610_RTP_NC3_0, + GSM610_RTP_NC3_1, + GSM610_RTP_NC3_2, + GSM610_RTP_NC3_3, + GSM610_RTP_NC3_4, + GSM610_RTP_NC3_5, + GSM610_RTP_NC3_6, + GSM610_RTP_BC3_0, + GSM610_RTP_BC3_1, + GSM610_RTP_MC3_0, + GSM610_RTP_MC3_1, + GSM610_RTP_XMAXC30, + GSM610_RTP_XMAXC31, + GSM610_RTP_XMAXC32, + GSM610_RTP_XMAXC33, + GSM610_RTP_XMAXC34, + GSM610_RTP_XMAXC35, + GSM610_RTP_XMC39_0, + GSM610_RTP_XMC39_1, + GSM610_RTP_XMC39_2, + GSM610_RTP_XMC40_0, + GSM610_RTP_XMC40_1, + GSM610_RTP_XMC40_2, + GSM610_RTP_XMC41_0, + GSM610_RTP_XMC41_1, + GSM610_RTP_XMC41_2, + GSM610_RTP_XMC42_0, + GSM610_RTP_XMC42_1, + GSM610_RTP_XMC42_2, + GSM610_RTP_XMC43_0, + GSM610_RTP_XMC43_1, + GSM610_RTP_XMC43_2, + GSM610_RTP_XMC44_0, + GSM610_RTP_XMC44_1, + GSM610_RTP_XMC44_2, + GSM610_RTP_XMC45_0, + GSM610_RTP_XMC45_1, + GSM610_RTP_XMC45_2, + GSM610_RTP_XMC46_0, + GSM610_RTP_XMC46_1, + GSM610_RTP_XMC46_2, + GSM610_RTP_XMC47_0, + GSM610_RTP_XMC47_1, + GSM610_RTP_XMC47_2, + GSM610_RTP_XMC48_0, + GSM610_RTP_XMC48_1, + GSM610_RTP_XMC48_2, + GSM610_RTP_XMC49_0, + GSM610_RTP_XMC49_1, + GSM610_RTP_XMC49_2, + GSM610_RTP_XMC50_0, + GSM610_RTP_XMC50_1, + GSM610_RTP_XMC50_2, + GSM610_RTP_XMC51_0, + GSM610_RTP_XMC51_1, + GSM610_RTP_XMC51_2 +}; -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 15 21:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 21:44:39 +0000 Subject: [PATCH] libosmocore[master]: libosmocodec: add FR/HR/EFR frame length definitions Message-ID: Review at https://gerrit.osmocom.org/5420 libosmocodec: add FR/HR/EFR frame length definitions There are some projects, such as OsmoBTS and OsmocomBB, which are dealing with raw TCH payloads, so they need to have the FR/HR/EFR frame length defined. At the moment, each project defines them itself. Let's share these definitions. Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 --- M include/osmocom/codec/codec.h 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/5420/1 diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 3e62a01..6a1bf9f 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -7,6 +7,13 @@ #include +/* TS 101318 Chapter 5.1: 260 bits + 4bit sig */ +#define GSM_FR_BYTES 33 +/* TS 101318 Chapter 5.2: 112 bits, no sig */ +#define GSM_HR_BYTES 14 +/* TS 101318 Chapter 5.3: 244 bits + 4bit sig */ +#define GSM_EFR_BYTES 31 + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ -- To view, visit https://gerrit.osmocom.org/5420 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Dec 15 21:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 21:44:39 +0000 Subject: [PATCH] libosmocore[master]: libosmocodec: implement ECU (Error Correction Unit) for FR Message-ID: Review at https://gerrit.osmocom.org/5421 libosmocodec: implement ECU (Error Correction Unit) for FR When a bad GSM voice frame is received, the frame replaced ith a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame. Currently, only FR is supported, other codecs may be implemented latter. Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 --- M TODO-RELEASE M include/Makefile.am A include/osmocom/codec/ecu.h M src/codec/Makefile.am A src/codec/ecu.c M tests/Makefile.am A tests/codec/codec_ecu_test.c A tests/codec/codec_ecu_test.ok M tests/testsuite.at 9 files changed, 530 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/5421/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index a5def79..fe3c2c9 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h coding gsm0503_rach_ext-encode() add func to gsm0503_coding.h +codec ecu.c / ecu.h implement ECU (Error Cancelation Unit) diff --git a/include/Makefile.am b/include/Makefile.am index 09f5ca6..f95d90c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,6 +1,7 @@ BUILT_SOURCES = osmocom/gsm/gsm0503.h nobase_include_HEADERS = \ + osmocom/codec/ecu.h \ osmocom/codec/codec.h \ osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ diff --git a/include/osmocom/codec/ecu.h b/include/osmocom/codec/ecu.h new file mode 100644 index 0000000..6fc33b4 --- /dev/null +++ b/include/osmocom/codec/ecu.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +/* Codec independent ECU state */ +struct osmo_ecu_state { + bool subsequent_lost_frame; + uint8_t frame_backup[40]; +}; + +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame); +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4df5da..0787f59 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -13,6 +13,6 @@ lib_LTLIBRARIES = libosmocodec.la -libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c +libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c ecu.c libosmocodec_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libosmocodec_la_LIBADD = $(top_builddir)/src/libosmocore.la diff --git a/src/codec/ecu.c b/src/codec/ecu.c new file mode 100644 index 0000000..dde0cc3 --- /dev/null +++ b/src/codec/ecu.c @@ -0,0 +1,165 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Philipp Maier + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include + +/* See also GSM 06.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/** + * Reduce the XMAXC field. When the XMAXC field reaches + * zero the function will return true. + */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, + const unsigned int index) +{ + unsigned int field_index; + uint64_t field; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return field == 0; +} + +/** + * Reduce all XMAXC fields in the frame. When all XMAXC fields + * reach zero, then the function will return true. + */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30)) + silent = true; + + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static int conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + unsigned int len; + bool silent; + int rc = 0; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) + return 0; + + /* Attempt to allocate memory for bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) + return -ENOMEM; + + /* Convert a frame to bitvec */ + len = bitvec_unpack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0x00, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + len = bitvec_pack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + +leave: + bitvec_free(frame_bitvec); + return rc; +} + +/** + * To be called when a good frame is received. + * This function will then create a backup of the frame + * and reset the internal state. + */ +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame) +{ + state->subsequent_lost_frame = false; + memcpy(state->frame_backup, frame, GSM_FR_BYTES); +} + +/** + * To be called when a bad frame is received. + * This function will then generate a replacement frame + * that can be used to conceal the dropout. + */ +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame) +{ + int rc; + + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup */ + if (state->subsequent_lost_frame) { + rc = conceal_frame(state->frame_backup); + if (rc) + return rc; + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, state->frame_backup, GSM_FR_BYTES); + state->subsequent_lost_frame = true; + + return 0; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 78542b2..bd3a5ae 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,8 @@ write_queue/wqueue_test socket/socket_test \ coding/coding_test conv/conv_gsm0503_test \ abis/abis_test endian/endian_test sercomm/sercomm_test \ - stats/stats_test prbs/prbs_test gsm23003/gsm23003_test + stats/stats_test prbs/prbs_test gsm23003/gsm23003_test \ + codec/codec_ecu_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -136,6 +137,9 @@ codec_codec_test_SOURCES = codec/codec_test.c codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la +codec_codec_ecu_test_SOURCES = codec/codec_ecu_test.c +codec_codec_ecu_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(LDADD) diff --git a/tests/codec/codec_ecu_test.c b/tests/codec/codec_ecu_test.c new file mode 100644 index 0000000..423ebb9 --- /dev/null +++ b/tests/codec/codec_ecu_test.c @@ -0,0 +1,146 @@ +#include +#include +#include + +#include +#include + +#include +#include + +/* Set with sample full-rate voice frames and some intentional dropouts */ +static const char *fr_frames_hex[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Example of a good frame */ +static const char *sample_frame_hex = \ + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + +/** + * Start with a good voice frame and then simulate 20 consecutive bad frames, + * watching how the error concealment decreases the XMAXC parameters. + */ +void test_fr_concealment(void) +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + int i, rc; + + /* Parse frame from string to hex */ + osmo_hexparse(sample_frame_hex, frame, GSM_FR_BYTES); + + printf("Start with: %s\n", sample_frame_hex); + + /* Reset the ECU with the proposed known good frame */ + osmo_ecu_fr_reset(&state, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + + printf("conceal: %02i, result: %s\n", + i, osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } +} + +/* Simulate a real life situation: voice frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + unsigned int frame_len; + int rc, i = 0; + + while (fr_frames_hex[i] != NULL) { + /* Debug print */ + printf("Frame No. %03i:\n", i); + + /* Good or bad frame? */ + frame_len = strlen(fr_frames_hex[i]) / 2; + if (frame_len == GSM_FR_BYTES) { + printf(" * input: %s\n", fr_frames_hex[i]); + osmo_hexparse(fr_frames_hex[i], frame, GSM_FR_BYTES); + osmo_ecu_fr_reset(&state, frame); + } else { + printf(" * input: (bad)\n"); + memset(frame, 0x00, GSM_FR_BYTES); + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + } + + /* Print result */ + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Go to the next frame */ + i++; + } +} + +int main(int argc, char **argv) +{ + /* Perform actual tests */ + test_fr_concealment(); + test_fr_concealment_realistic(); + + return 0; +} diff --git a/tests/codec/codec_ecu_test.ok b/tests/codec/codec_ecu_test.ok new file mode 100644 index 0000000..6e20099 --- /dev/null +++ b/tests/codec/codec_ecu_test.ok @@ -0,0 +1,192 @@ +Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..a4b34df 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -157,6 +157,12 @@ AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) AT_CLEANUP +AT_SETUP([codec_ecu]) +AT_KEYWORDS([codec_ecu]) +cat $abs_srcdir/codec/codec_ecu_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_ecu_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout -- To view, visit https://gerrit.osmocom.org/5421 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:06:27 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 22:06:27 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5214 to look at the new patch set (#5). osmo-bts-trx: add error concealment unit for GSM-FR When a bad voice frame is received, it is replaced by a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame using ECU implementation from libosmocodec. At the moment, only FR is supported. Depends: libosmocore I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M include/osmo-bts/gsm_data_shared.h M src/osmo-bts-trx/scheduler_trx.c 2 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/5 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..32389e0 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -381,6 +382,9 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + /* ECU (Error Correction Unit) state */ + struct osmo_ecu_state ecu_fr_state; #endif }; diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..0e9f342 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -968,6 +969,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1060,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1083,14 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + + /* Perform error correction if possible */ + rc = osmo_ecu_fr_conceal(&lchan->ecu_fr_state, tch_data); + if (rc) { + memset(tch_data, 0, GSM_FR_BYTES); + tch_data[0] = 0xd0; + } + rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1118,10 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + /* Reset ECU with a good frame */ + if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) + osmo_ecu_fr_reset(&lchan->ecu_fr_state, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:07:18 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 22:07:18 +0000 Subject: [PATCH] osmo-bts[master]: osmo-bts-trx: perform error concealment for FR frames In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5214 to look at the new patch set (#6). osmo-bts-trx: perform error concealment for FR frames When a bad voice frame is received, it is replaced by a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame using ECU implementation from libosmocodec. At the moment, only FR is supported. Depends: libosmocore I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 --- M include/osmo-bts/gsm_data_shared.h M src/osmo-bts-trx/scheduler_trx.c 2 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/14/5214/6 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a05e4ca..32389e0 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -381,6 +382,9 @@ } ms_power_ctrl; struct msgb *pending_rel_ind_msg; + + /* ECU (Error Correction Unit) state */ + struct osmo_ecu_state ecu_fr_state; #endif }; diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index d3928f1..0e9f342 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -968,6 +969,7 @@ uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; int n_errors, n_bits_total; + bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | tn); @@ -1058,11 +1060,13 @@ if (rc < 0) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u)\n", fn % l1ts->mf_period, l1ts->mf_period); + bfi_flag = true; goto bfi; } if (rc < 4) { LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Received bad data (%u/%u) " "with invalid codec mode %d\n", fn % l1ts->mf_period, l1ts->mf_period, rc); + bfi_flag = true; goto bfi; } @@ -1079,8 +1083,14 @@ case GSM48_CMODE_SPEECH_V1: /* FR */ if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ - memset(tch_data, 0, GSM_FR_BYTES); - tch_data[0] = 0xd0; + + /* Perform error correction if possible */ + rc = osmo_ecu_fr_conceal(&lchan->ecu_fr_state, tch_data); + if (rc) { + memset(tch_data, 0, GSM_FR_BYTES); + tch_data[0] = 0xd0; + } + rc = GSM_FR_BYTES; break; case GSM48_CMODE_SPEECH_EFR: /* EFR */ @@ -1108,6 +1118,10 @@ if (rsl_cmode != RSL_CMOD_SPD_SPEECH) return 0; + /* Reset ECU with a good frame */ + if (!bfi_flag && tch_mode == GSM48_CMODE_SPEECH_V1) + osmo_ecu_fr_reset(&lchan->ecu_fr_state, tch_data); + /* TCH or BFI */ return _sched_compose_tch_ind(l1t, tn, (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME, chan, tch_data, rc); -- To view, visit https://gerrit.osmocom.org/5214 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:16:47 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 15 Dec 2017 22:16:47 +0000 Subject: [PATCH] libosmocore[master]: libosmocodec: implement ECU (Error Correction Unit) for FR In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5421 to look at the new patch set (#2). libosmocodec: implement ECU (Error Correction Unit) for FR When a bad GSM voice frame is received, the frame replaced ith a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame. Currently, only FR is supported, other codecs may be implemented latter. Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 --- M TODO-RELEASE M include/Makefile.am A include/osmocom/codec/ecu.h M src/codec/Makefile.am A src/codec/ecu.c M tests/Makefile.am A tests/codec/codec_ecu_test.c A tests/codec/codec_ecu_test.ok M tests/testsuite.at 9 files changed, 533 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/5421/2 diff --git a/TODO-RELEASE b/TODO-RELEASE index a5def79..fe3c2c9 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h coding gsm0503_rach_ext-encode() add func to gsm0503_coding.h +codec ecu.c / ecu.h implement ECU (Error Cancelation Unit) diff --git a/include/Makefile.am b/include/Makefile.am index 09f5ca6..f95d90c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,6 +1,7 @@ BUILT_SOURCES = osmocom/gsm/gsm0503.h nobase_include_HEADERS = \ + osmocom/codec/ecu.h \ osmocom/codec/codec.h \ osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ diff --git a/include/osmocom/codec/ecu.h b/include/osmocom/codec/ecu.h new file mode 100644 index 0000000..6fc33b4 --- /dev/null +++ b/include/osmocom/codec/ecu.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +/* Codec independent ECU state */ +struct osmo_ecu_state { + bool subsequent_lost_frame; + uint8_t frame_backup[40]; +}; + +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame); +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4df5da..0787f59 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -13,6 +13,6 @@ lib_LTLIBRARIES = libosmocodec.la -libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c +libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c ecu.c libosmocodec_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libosmocodec_la_LIBADD = $(top_builddir)/src/libosmocore.la diff --git a/src/codec/ecu.c b/src/codec/ecu.c new file mode 100644 index 0000000..dde0cc3 --- /dev/null +++ b/src/codec/ecu.c @@ -0,0 +1,165 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Philipp Maier + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include + +/* See also GSM 06.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/** + * Reduce the XMAXC field. When the XMAXC field reaches + * zero the function will return true. + */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, + const unsigned int index) +{ + unsigned int field_index; + uint64_t field; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return field == 0; +} + +/** + * Reduce all XMAXC fields in the frame. When all XMAXC fields + * reach zero, then the function will return true. + */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30)) + silent = true; + + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static int conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + unsigned int len; + bool silent; + int rc = 0; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) + return 0; + + /* Attempt to allocate memory for bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) + return -ENOMEM; + + /* Convert a frame to bitvec */ + len = bitvec_unpack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0x00, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + len = bitvec_pack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + +leave: + bitvec_free(frame_bitvec); + return rc; +} + +/** + * To be called when a good frame is received. + * This function will then create a backup of the frame + * and reset the internal state. + */ +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame) +{ + state->subsequent_lost_frame = false; + memcpy(state->frame_backup, frame, GSM_FR_BYTES); +} + +/** + * To be called when a bad frame is received. + * This function will then generate a replacement frame + * that can be used to conceal the dropout. + */ +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame) +{ + int rc; + + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup */ + if (state->subsequent_lost_frame) { + rc = conceal_frame(state->frame_backup); + if (rc) + return rc; + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, state->frame_backup, GSM_FR_BYTES); + state->subsequent_lost_frame = true; + + return 0; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 78542b2..e6b4bc6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,8 @@ write_queue/wqueue_test socket/socket_test \ coding/coding_test conv/conv_gsm0503_test \ abis/abis_test endian/endian_test sercomm/sercomm_test \ - stats/stats_test prbs/prbs_test gsm23003/gsm23003_test + stats/stats_test prbs/prbs_test gsm23003/gsm23003_test \ + codec/codec_ecu_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -136,6 +137,9 @@ codec_codec_test_SOURCES = codec/codec_test.c codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la +codec_codec_ecu_test_SOURCES = codec/codec_ecu_test.c +codec_codec_ecu_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(LDADD) @@ -205,11 +209,13 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok gea/gea_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ loggingrb/logging_test.err strrb/strrb_test.ok \ + codec/codec_test.ok \ + codec/codec_ecu_test.ok \ vty/vty_test.ok \ vty/fail_not_de-indented.cfg \ vty/fail_tabs_and_spaces.cfg \ diff --git a/tests/codec/codec_ecu_test.c b/tests/codec/codec_ecu_test.c new file mode 100644 index 0000000..423ebb9 --- /dev/null +++ b/tests/codec/codec_ecu_test.c @@ -0,0 +1,146 @@ +#include +#include +#include + +#include +#include + +#include +#include + +/* Set with sample full-rate voice frames and some intentional dropouts */ +static const char *fr_frames_hex[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Example of a good frame */ +static const char *sample_frame_hex = \ + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + +/** + * Start with a good voice frame and then simulate 20 consecutive bad frames, + * watching how the error concealment decreases the XMAXC parameters. + */ +void test_fr_concealment(void) +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + int i, rc; + + /* Parse frame from string to hex */ + osmo_hexparse(sample_frame_hex, frame, GSM_FR_BYTES); + + printf("Start with: %s\n", sample_frame_hex); + + /* Reset the ECU with the proposed known good frame */ + osmo_ecu_fr_reset(&state, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + + printf("conceal: %02i, result: %s\n", + i, osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } +} + +/* Simulate a real life situation: voice frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + unsigned int frame_len; + int rc, i = 0; + + while (fr_frames_hex[i] != NULL) { + /* Debug print */ + printf("Frame No. %03i:\n", i); + + /* Good or bad frame? */ + frame_len = strlen(fr_frames_hex[i]) / 2; + if (frame_len == GSM_FR_BYTES) { + printf(" * input: %s\n", fr_frames_hex[i]); + osmo_hexparse(fr_frames_hex[i], frame, GSM_FR_BYTES); + osmo_ecu_fr_reset(&state, frame); + } else { + printf(" * input: (bad)\n"); + memset(frame, 0x00, GSM_FR_BYTES); + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + } + + /* Print result */ + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Go to the next frame */ + i++; + } +} + +int main(int argc, char **argv) +{ + /* Perform actual tests */ + test_fr_concealment(); + test_fr_concealment_realistic(); + + return 0; +} diff --git a/tests/codec/codec_ecu_test.ok b/tests/codec/codec_ecu_test.ok new file mode 100644 index 0000000..6e20099 --- /dev/null +++ b/tests/codec/codec_ecu_test.ok @@ -0,0 +1,192 @@ +Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..a4b34df 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -157,6 +157,12 @@ AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) AT_CLEANUP +AT_SETUP([codec_ecu]) +AT_KEYWORDS([codec_ecu]) +cat $abs_srcdir/codec/codec_ecu_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_ecu_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout -- To view, visit https://gerrit.osmocom.org/5421 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:17:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:17:20 +0000 Subject: [PATCH] osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword Message-ID: Review at https://gerrit.osmocom.org/5422 libmsc: a_iface: Remove duplicated 'const' keyword Fixes following compilation warning: osmo-msc/src/libmsc/a_iface.c:34:0: osmo-msc/include/osmocom/msc/a_iface.h:60:25: warning: duplicate ?cons? declaration specifier [-Wduplicate-decl-specifier] int cipher, const const uint8_t *key, int len, int include_imeisv); ^~~~~ osmo-msc/src/libmsc/a_iface.c:167:25: warning: duplicate ?const? declaration specifier [-Wduplicate-decl-specifier] int cipher, const const uint8_t *key, int len, int include_imeisv) ^~~~~ Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316 --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/22/5422/1 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index 40ad9c8..f0da248 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv); + int cipher, const uint8_t *key, int len, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..83ec82f 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -164,7 +164,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv) + int cipher, const uint8_t *key, int len, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; -- To view, visit https://gerrit.osmocom.org/5422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:17:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:17:20 +0000 Subject: [PATCH] osmo-msc[master]: libmsc: db.c: Replace dbi APIs marked as deprecated Message-ID: Review at https://gerrit.osmocom.org/5423 libmsc: db.c: Replace dbi APIs marked as deprecated Several warning messages about those APIs being deprecated were printed at compile time. Change-Id: I6052159acf240cc7e8e2b3a3af10d8210708ddb6 --- M src/libmsc/db.c 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/23/5423/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 0104bce..0cb8ff3 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -47,6 +47,7 @@ static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; +static dbi_inst inst; #define SCHEMA_REVISION "5" @@ -611,9 +612,9 @@ int db_init(const char *name) { - dbi_initialize(NULL); + dbi_initialize_r(NULL, &inst); - conn = dbi_conn_new("sqlite3"); + conn = dbi_conn_new_r("sqlite3", inst); if (conn == NULL) { LOGP(DDB, LOGL_FATAL, "Failed to create connection.\n"); return 1; @@ -677,7 +678,7 @@ int db_fini(void) { dbi_conn_close(conn); - dbi_shutdown(); + dbi_shutdown_r(inst); free(db_dirname); free(db_basename); -- To view, visit https://gerrit.osmocom.org/5423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6052159acf240cc7e8e2b3a3af10d8210708ddb6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:17:20 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:17:20 +0000 Subject: [PATCH] osmo-msc[master]: libmsc: a_iface_bssap.c: Fix compilation warning Message-ID: Review at https://gerrit.osmocom.org/5424 libmsc: a_iface_bssap.c: Fix compilation warning Fixes following compilation warning: osmo-msc/src/libmsc/a_iface_bssap.c:328:11: warning: assignment discards ?const? qualifier from pointer target type [-Wdiscarded-qualifi ers] msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); ^ osmo-msc/src/libmsc/a_iface_bssap.c:424:12: warning: assignment discards ?const? qualifier from pointer target type [-Wdiscarded-qualifi ers] msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); ^ Change-Id: I28073efd5cff58cd212341bceee784caf08d5ad8 --- M src/libmsc/a_iface_bssap.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/24/5424/1 diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..15ec26e 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -324,9 +324,9 @@ } /* Parse Layer 3 Information element */ - /* FIXME: This is probably to hackish, compiler also complains "assignment discards ?const? qualifier..." */ - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); - msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_INFORMATION); + msgb_l3trim(msg, 0); + msg->l3h = msgb_put(msg, TLVP_LEN(&tp, GSM0808_IE_LAYER_3_INFORMATION)); + memcpy(msg->l3h, TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION), msgb_l3len(msg)); /* Create new subscriber context */ conn = subscr_conn_allocate_a(a_conn_info, network, lac, scu, a_conn_info->conn_id); @@ -421,8 +421,9 @@ } if (TLVP_PRESENT(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)) { - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); - msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); + msgb_l3trim(msg, 0); + msg->l3h = msgb_put(msg, TLVP_LEN(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)); + memcpy(msg->l3h, TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS), msgb_l3len(msg)); } else { msgb_free(msg); msg = NULL; -- To view, visit https://gerrit.osmocom.org/5424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28073efd5cff58cd212341bceee784caf08d5ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:18:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:18:49 +0000 Subject: osmo-msc[master]: libmsc: a_iface_bssap.c: Fix compilation warning In-Reply-To: References: Message-ID: Patch Set 1: I'm not 100% sure about this one, please have a close look when reviewing as I couldn't run test it (only build testing) as I did it while at the plane. -- To view, visit https://gerrit.osmocom.org/5424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28073efd5cff58cd212341bceee784caf08d5ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:21:46 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:21:46 +0000 Subject: [PATCH] osmo-hlr[master]: luop.c: Transform FIXME from warning to pragma message Message-ID: Review at https://gerrit.osmocom.org/5425 luop.c: Transform FIXME from warning to pragma message This way the issue is still visible but we can enable Werror to avoid introducing new warnings. Change-Id: I6c9b195bf0e3f853e202cdbdb72d35d83cd2a2ab --- M src/luop.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/25/5425/1 diff --git a/src/luop.c b/src/luop.c index 2966380..4ef4ea3 100644 --- a/src/luop.c +++ b/src/luop.c @@ -251,8 +251,7 @@ gsup.msisdn_enc = msisdn_enc; gsup.msisdn_enc_len = l; - /* FIXME: deal with encoding the following data */ - gsup.hlr_enc; + #pragma message "FIXME: deal with encoding the following data: gsup.hlr_enc" if (luop->is_ps) { /* FIXME: PDP infos - use more fine-grained access control -- To view, visit https://gerrit.osmocom.org/5425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c9b195bf0e3f853e202cdbdb72d35d83cd2a2ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 15 22:21:46 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 15 Dec 2017 22:21:46 +0000 Subject: [PATCH] osmo-hlr[master]: contrib:jenkins.sh: Enable Werror Message-ID: Review at https://gerrit.osmocom.org/5426 contrib:jenkins.sh: Enable Werror Change-Id: I61688a4c9b50f6f3705bd18c96c00f8703ef5042 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/26/5426/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 825d9ea..b273517 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ cd "$base" autoreconf --install --force -./configure --enable-external-tests +./configure --enable-external-tests CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh $MAKE distcheck || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61688a4c9b50f6f3705bd18c96c00f8703ef5042 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sat Dec 16 04:00:15 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 04:00:15 +0000 Subject: [PATCH] libosmocore[master]: fix osmo_identifier_valid(): only allow printable characters Message-ID: Review at https://gerrit.osmocom.org/5427 fix osmo_identifier_valid(): only allow printable characters In particular disallow ASCII 0..31 (control characters) and 127 (DEL). Change-Id: I04469988495af03c881fe81d7786ca7f71636299 --- M src/utils.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/5427/1 diff --git a/src/utils.c b/src/utils.c index bc5329d..6d9e9f1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -444,6 +444,8 @@ /* check for 7-bit ASCII */ if (str[i] & 0x80) return false; + if (!isprint(str[i])) + return false; /* check for some explicit reserved control characters */ if (strchr(illegal_chars, str[i])) return false; -- To view, visit https://gerrit.osmocom.org/5427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04469988495af03c881fe81d7786ca7f71636299 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:21 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_separated_identifiers_valid() Message-ID: Review at https://gerrit.osmocom.org/5428 utils: add osmo_separated_identifiers_valid() For validating CTRL input, we want to verify that an input variable is a series of valid osmo_identifier_valid() separated by dots. Allow validating any additional chars with identifiers, for CTRL vars will be just ".". Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/5428/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 5c660cd..0973b4c 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -118,5 +118,6 @@ bool require_even); bool osmo_identifier_valid(const char *str); +bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); /*! @} */ diff --git a/src/utils.c b/src/utils.c index 6d9e9f1..d64bb57 100644 --- a/src/utils.c +++ b/src/utils.c @@ -428,19 +428,23 @@ /*! Determine if a given identifier is valid, i.e. doesn't contain illegal chars * \param[in] str String to validate - * \returns true in case string contains valid identifier, false otherwise + * \param[in] sep_chars Permitted separation characters between identifiers. + * \returns true in case \a str contains only valid identifiers and sep_chars, false otherwise */ -bool osmo_identifier_valid(const char *str) +bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars) { /* characters that are illegal in names */ static const char illegal_chars[] = "., {}[]()<>|~\\^`'\"?=;/+*&%$#!"; unsigned int i; + size_t len; /* an empty string is not a valid identifier */ - if (!str || strlen(str) == 0) + if (!str || (len = strlen(str)) == 0) return false; - for (i = 0; i < strlen(str); i++) { + for (i = 0; i < len; i++) { + if (sep_chars && strchr(sep_chars, str[i])) + continue; /* check for 7-bit ASCII */ if (str[i] & 0x80) return false; @@ -454,4 +458,13 @@ return true; } +/*! Determine if a given identifier is valid, i.e. doesn't contain illegal chars + * \param[in] str String to validate + * \returns true in case \a str contains valid identifier, false otherwise + */ +bool osmo_identifier_valid(const char *str) +{ + return osmo_separated_identifiers_valid(str, NULL); +} + /*! @} */ -- To view, visit https://gerrit.osmocom.org/5428 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:24 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_escape_str() Message-ID: Review at https://gerrit.osmocom.org/5429 utils: add osmo_escape_str() To report invalid characters in identifiers, it is desirable to escape any weird characters. Otherwise we might print stray newlines or control characters in the log output. ctrl_test.c already uses a print_escaped() function, which will be replaced by osmo_escape_str() in a subsequent patch. control_cmd.c will use osmo_escape_str() to log invalid identifiers. Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 167 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/5429/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0973b4c..72266ae 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -120,4 +120,7 @@ bool osmo_identifier_valid(const char *str); bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); +const char *osmo_escape_str(const char *str, int len); +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); + /*! @} */ diff --git a/src/utils.c b/src/utils.c index d64bb57..0dd2142 100644 --- a/src/utils.c +++ b/src/utils.c @@ -467,4 +467,91 @@ return osmo_separated_identifiers_valid(str, NULL); } +/*! Return the string with all non-printable characters escaped. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \param[inout] buf string buffer to write escaped characters to. + * \param[in] bufsize size of \a buf. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize) +{ + int in_pos = 0; + int next_unprintable = 0; + int out_pos = 0; + char *out = buf; + /* -1 to leave space for a final \0 */ + int out_len = bufsize-1; + + if (!str) + return "(null)"; + + if (in_len < 0) + in_len = strlen(str); + + while (in_pos < in_len) { + for (next_unprintable = in_pos; + next_unprintable < in_len && isprint(str[next_unprintable]) + && str[next_unprintable] != '"' + && str[next_unprintable] != '\\'; + next_unprintable++); + + if (next_unprintable == in_len + && in_pos == 0) + return str; + + while (in_pos < next_unprintable && out_pos < out_len) + out[out_pos++] = str[in_pos++]; + + if (out_pos == out_len || in_pos == in_len) + goto done; + + switch (str[next_unprintable]) { +#define BACKSLASH_CASE(c, repr) \ + case c: \ + if (out_pos > out_len-2) \ + goto done; \ + out[out_pos++] = '\\'; \ + out[out_pos++] = repr; \ + break + + BACKSLASH_CASE('\n', 'n'); + BACKSLASH_CASE('\r', 'r'); + BACKSLASH_CASE('\t', 't'); + BACKSLASH_CASE('\0', '0'); + BACKSLASH_CASE('\a', 'a'); + BACKSLASH_CASE('\b', 'b'); + BACKSLASH_CASE('\v', 'v'); + BACKSLASH_CASE('\f', 'f'); + BACKSLASH_CASE('\\', '\\'); + BACKSLASH_CASE('"', '"'); +#undef BACKSLASH_CASE + + default: + out_pos += snprintf(&out[out_pos], out_len - out_pos, "\\%u", (unsigned char)str[in_pos]); + if (out_pos > out_len) { + out_pos = out_len; + goto done; + } + break; + } + in_pos ++; + } + +done: + out[out_pos] = '\0'; + return out; +} + +/*! Return the string with all non-printable characters escaped. + * Call osmo_escape_str_buf() with a static buffer. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str(const char *str, int in_len) +{ + return osmo_escape_str_buf(str, in_len, namebuf, sizeof(namebuf)); +} + /*! @} */ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index e6d7ae8..b4f7cd3 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -323,6 +323,53 @@ } } +static void str_escape_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + + printf("\nTesting string escaping\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("\"%s\"\n", osmo_escape_str((const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("\"%s\"\n", osmo_escape_str("termi\nated", -1)); + + printf("- passthru:\n"); + res = osmo_escape_str(printable, -1); + if (res != printable) + printf("NOT passed through! \"%s\"\n", res); + else + printf("passed through unchanged \"%s\"\n", res); + + printf("- zero length:\n"); + printf("\"%s\"\n", osmo_escape_str("omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[7] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, sizeof(in_buf), out_buf, 10)); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- passthrough without truncation when no escaping needed:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[19] = 'E'; + in_buf[20] = '\0'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, -1, out_buf, 10)); + OSMO_ASSERT(out_buf[0] == 0x7f); +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -333,5 +380,6 @@ test_idtag_parsing(); test_is_hexstr(); bcd_test(); + str_escape_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 33a185b..fb1d62e 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -75,3 +75,32 @@ val=0xd, expected=D, found=D val=0xe, expected=E, found=E val=0xf, expected=F, found=F + +Testing string escaping +- all chars from 0 to 255 in batches of 16: +"\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15" +"\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\127" +"\128\129\130\131\132\133\134\135\136\137\138\139\140\141\142\143" +"\144\145\146\147\148\149\150\151\152\153\154\155\156\157\158\159" +"\160\161\162\163\164\165\166\167\168\169\170\171\172\173\174\175" +"\176\177\178\179\180\181\182\183\184\185\186\187\188\189\190\191" +"\192\193\194\195\196\197\198\199\200\201\202\203\204\205\206\207" +"\208\209\210\211\212\213\214\215\216\217\218\219\220\221\222\223" +"\224\225\226\227\228\229\230\231\232\233\234\235\236\237\238\239" +"\240\241\242\243\244\245\246\247\248\249\250\251\252\253\254\255" +- nul terminated: +"termi\nated" +- passthru: +passed through unchanged "printable" +- zero length: +"" +- truncation when too long: +"\axxxxxxE" +- passthrough without truncation when no escaping needed: +"xxxxxxxxxxxxxxxxxxxE" -- To view, visit https://gerrit.osmocom.org/5429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:24 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test.c: replace print_escaped() with new osmo_escape_str() Message-ID: Review at https://gerrit.osmocom.org/5430 ctrl_test.c: replace print_escaped() with new osmo_escape_str() Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 28 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/5430/1 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b8425c7..2bc3128 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -37,45 +37,15 @@ static void *ctx = NULL; -void print_escaped(const char *str) -{ - if (!str) { - printf("NULL"); - return; - } - - printf("'"); - for (;*str; str++) { - switch (*str) { - case '\n': - printf("\\n"); - break; - case '\r': - printf("\\r"); - break; - case '\t': - printf("\\t"); - break; - default: - printf("%c", *str); - break; - } - } - printf("'"); -} - void assert_same_str(const char *label, const char *expect, const char *got) { if ((expect == got) || (expect && got && (strcmp(expect, got) == 0))) { - printf("%s = ", label); - print_escaped(got); - printf("\n"); + printf("%s = '%s'\n", label, osmo_escape_str(got, -1)); return; } - printf("MISMATCH for '%s':\ngot: ", label); print_escaped(got); - printf("\nexpected: "); print_escaped(expect); - printf("\n"); + printf("MISMATCH for '%s':\ngot: %s\n", label, osmo_escape_str(got, -1)); + printf("expected: %s\n", osmo_escape_str(expect, -1)); OSMO_ASSERT(expect == got); } @@ -84,9 +54,7 @@ struct ctrl_cmd *cmd; struct msgb *msg = msgb_from_string(str); - printf("test parsing: "); - print_escaped(str); - printf("\n"); + printf("test parsing: '%s'\n", osmo_escape_str(str, -1)); cmd = ctrl_cmd_parse(ctx, msg); OSMO_ASSERT(cmd); diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 9c8877b..5775eb2 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -10,102 +10,102 @@ test parsing: 'GET 1 variable' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable\n' id = '1' variable = 'variable\n' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 var\ni\nable' id = '1' variable = 'var\ni\nable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable value' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable value\n' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable multiple value tokens' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable multiple value tokens\n' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'SET 1 variable value' id = '1' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value\n' id = '1' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET weird_id variable value' id = 'weird_id' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET weird_id variable value\n' id = 'weird_id' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable multiple value tokens' id = '1' variable = 'variable' value = 'multiple value tokens' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable multiple value tokens\n' id = '1' variable = 'variable' value = 'multiple value tokens' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value_with_trailing_spaces ' id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value_with_trailing_spaces \n' id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' -reply = NULL +reply = '(null)' ok test parsing: 'SET \n special_char_id value' id = '\n' variable = 'special_char_id' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET \t special_char_id value' id = '\t' variable = 'special_char_id' value = 'value' -reply = NULL +reply = '(null)' ok -- To view, visit https://gerrit.osmocom.org/5430 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:24 +0000 Subject: [PATCH] libosmocore[master]: ctrl: prep test: separate new ctrl_handle_msg() from handle_... Message-ID: Review at https://gerrit.osmocom.org/5431 ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read() In order to allow unit testing the ctrl iface msgb handling, have a separate msgb entry point function from the actual fd read function. An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test that needs this separation. Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 28 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/5431/1 diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index d444328..5fa9588 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -43,3 +43,5 @@ struct ctrl_cmd *ctrl_cmd_exec_from_string(struct ctrl_handle *ch, const char *cmdstr); int ctrl_lookup_register(ctrl_cmd_lookup lookup); + +int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, struct msgb *msg); diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 015c55e..7c1d81a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -326,10 +326,7 @@ int ret = -1; struct osmo_wqueue *queue; struct ctrl_connection *ccon; - struct ipaccess_head *iph; - struct ipaccess_head_ext *iph_ext; struct msgb *msg = NULL; - struct ctrl_cmd *cmd; struct ctrl_handle *ctrl = bfd->data; queue = container_of(bfd, struct osmo_wqueue, bfd); @@ -338,30 +335,48 @@ ret = ipa_msg_recv_buffered(bfd->fd, &msg, &ccon->pending_msg); if (ret <= 0) { if (ret == -EAGAIN) + /* received part of a message, it is stored in ccon->pending_msg and there's + * nothing left to do now. */ return 0; - if (ret == 0) + /* msg was already discarded. */ + if (ret == 0) { LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); + ret = -EIO; + } else LOGP(DLCTRL, LOGL_ERROR, "Failed to parse ip access message: %d\n", ret); - goto err; + return ret; } + + ret = ctrl_handle_msg(ctrl, ccon, msg); + msgb_free(msg); + if (ret) + control_close_conn(ccon); + return ret; +} + +int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, struct msgb *msg) +{ + struct ctrl_cmd *cmd; + struct ipaccess_head *iph; + struct ipaccess_head_ext *iph_ext; if (msg->len < sizeof(*iph) + sizeof(*iph_ext)) { LOGP(DLCTRL, LOGL_ERROR, "The message is too short.\n"); - goto err; + return -EINVAL; } iph = (struct ipaccess_head *) msg->data; if (iph->proto != IPAC_PROTO_OSMO) { LOGP(DLCTRL, LOGL_ERROR, "Protocol mismatch. We got 0x%x\n", iph->proto); - goto err; + return -EINVAL; } iph_ext = (struct ipaccess_head_ext *) iph->data; if (iph_ext->proto != IPAC_PROTO_EXT_CTRL) { LOGP(DLCTRL, LOGL_ERROR, "Extended protocol mismatch. We got 0x%x\n", iph_ext->proto); - goto err; + return -EINVAL; } msg->l2h = iph_ext->data; @@ -371,28 +386,22 @@ if (cmd) { cmd->ccon = ccon; if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { - ctrl_cmd_send(queue, cmd); + ctrl_cmd_send(&ccon->write_queue, cmd); talloc_free(cmd); } } else { cmd = talloc_zero(ccon, struct ctrl_cmd); if (!cmd) - goto err; + return -ENOMEM; LOGP(DLCTRL, LOGL_ERROR, "Command parser error.\n"); cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Command parser error."; - ctrl_cmd_send(queue, cmd); + ctrl_cmd_send(&ccon->write_queue, cmd); talloc_free(cmd); } - msgb_free(msg); return 0; - -err: - control_close_conn(ccon); - msgb_free(msg); - return ret; } static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/5431 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:25 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks Message-ID: Review at https://gerrit.osmocom.org/5432 ctrl_test: expand to test message handling and detect mem leaks Subsequent patches that tighten CTRL input validation will make the results more interesting. Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 198 insertions(+), 57 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/5432/1 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 2bc3128..b0266fc 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include static void check_type(enum ctrl_type c) { @@ -24,18 +26,34 @@ struct msgb *msgb_from_string(const char *str) { - char *rc; + struct ipaccess_head *iph; + struct ipaccess_head_ext *ipx; + char *str_msg; size_t len = strlen(str) + 1; - /* ctrl_cmd_parse() appends a '\0' to the msgb, allow one more byte. */ - struct msgb *msg = msgb_alloc(len + 1, str); - msg->l2h = msg->head; - rc = (char*)msgb_put(msg, len); - OSMO_ASSERT(rc == (char*)msg->l2h); - strcpy(rc, str); + + struct msgb *msg = msgb_alloc(1024, str); + + iph = (void*)msgb_put(msg, sizeof(*iph)); + iph->proto = IPAC_PROTO_OSMO; + + ipx = (void*)msgb_put(msg, sizeof(*ipx)); + ipx->proto = IPAC_PROTO_EXT_CTRL; + + str_msg = (char*)msgb_put(msg, len); + msg->l2h = (void*)str_msg; + osmo_strlcpy(str_msg, str, len); + + iph->len = msgb_length(msg); return msg; } static void *ctx = NULL; + +struct one_test { + const char *cmd_str; + struct ctrl_cmd expect_parsed; + const char *reply_str; +}; void assert_same_str(const char *label, const char *expect, const char *got) { @@ -49,20 +67,22 @@ OSMO_ASSERT(expect == got); } -static void assert_parsing(const char *str, const struct ctrl_cmd *expect) +static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, const struct one_test *t) { struct ctrl_cmd *cmd; - struct msgb *msg = msgb_from_string(str); + struct msgb *msg = msgb_from_string(t->cmd_str); + int ctx_size_was; - printf("test parsing: '%s'\n", osmo_escape_str(str, -1)); + printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); + printf("parsing:\n"); cmd = ctrl_cmd_parse(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(expect->type == cmd->type); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); #define ASSERT_SAME_STR(field) \ - assert_same_str(#field, expect->field, cmd->field) + assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); ASSERT_SAME_STR(variable); @@ -72,35 +92,68 @@ talloc_free(cmd); msgb_free(msg); + + printf("handling:\n"); + + ctx_size_was = talloc_total_size(ctx); + + msg = msgb_from_string(t->cmd_str); + ctrl_handle_msg(ctrl, ccon, msg); + + if (llist_empty(&ccon->write_queue.msg_queue)) { + if (t->reply_str) { + printf("Got no reply, but expected \"%s\"\n", osmo_escape_str(t->reply_str, -1)); + OSMO_ASSERT(!t->reply_str); + } + } else { + struct msgb *sent_msg = msgb_dequeue(&ccon->write_queue.msg_queue); + OSMO_ASSERT(sent_msg); + msgb_put_u8(sent_msg, 0); + + printf("replied: '%s'\n", osmo_escape_str((char*)msgb_l2(sent_msg), -1)); + OSMO_ASSERT(t->reply_str); + OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg))) + msgb_free(sent_msg); + } + osmo_wqueue_clear(&ccon->write_queue); + + msgb_free(msg); + + if (talloc_total_size(ctx) != ctx_size_was) { + printf("mem leak!\n"); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); + } + printf("ok\n"); } -struct one_parsing_test { - const char *cmd_str; - struct ctrl_cmd expect; -}; - -static const struct one_parsing_test test_parsing_list[] = { +static const struct one_test test_messages_list[] = { { "GET 1 variable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable", - } + }, + "ERROR 1 Command not found", }, { "GET 1 variable\n", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable\n", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 var\ni\nable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "var\ni\nable", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { @@ -108,7 +161,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value\n", { @@ -116,7 +171,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens", { @@ -124,7 +181,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens\n", { @@ -132,7 +191,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value", { @@ -140,7 +201,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value\n", { @@ -148,7 +211,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET weird_id variable value", { @@ -156,7 +221,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET weird_id variable value\n", { @@ -164,7 +231,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET 1 variable multiple value tokens", { @@ -172,7 +241,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable multiple value tokens\n", { @@ -180,7 +251,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces ", { @@ -188,7 +261,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -196,7 +271,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET \n special_char_id value", { @@ -204,7 +281,9 @@ .id = "\n", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \n Command not found", + }, { "SET \t special_char_id value", { @@ -212,17 +291,28 @@ .id = "\t", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \t Command not found", + }, }; -static void test_parsing() +static void test_messages() { + struct ctrl_handle *ctrl; + struct ctrl_connection *ccon; int i; - for (i = 0; i < ARRAY_SIZE(test_parsing_list); i++) - assert_parsing(test_parsing_list[i].cmd_str, - &test_parsing_list[i].expect); + ctrl = ctrl_handle_alloc2(ctx, NULL, NULL, 0); + ccon = talloc_zero(ctx, struct ctrl_connection); + + osmo_wqueue_init(&ccon->write_queue, 1); + + for (i = 0; i < ARRAY_SIZE(test_messages_list); i++) + assert_test(ctrl, ccon, &test_messages_list[i]); + + talloc_free(ccon); + talloc_free(ctrl); } static struct log_info_cat test_categories[] = { @@ -249,7 +339,7 @@ check_type(CTRL_TYPE_ERROR); check_type(64); - test_parsing(); + test_messages(); return 0; } diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 5775eb2..edf97ea 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -7,105 +7,156 @@ ctrl type 5 is TRAP -> 5 OK ctrl type 6 is ERROR -> 6 OK ctrl type 64 is unknown 0x40 [PARSE FAILED] -test parsing: 'GET 1 variable' +test: 'GET 1 variable' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable\n' +test: 'GET 1 variable\n' +parsing: id = '1' variable = 'variable\n' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 var\ni\nable' +test: 'GET 1 var\ni\nable' +parsing: id = '1' variable = 'var\ni\nable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value' +test: 'GET 1 variable value' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value\n' +test: 'GET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens' +test: 'GET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens\n' +test: 'GET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value' +test: 'SET 1 variable value' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value\n' +test: 'SET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET weird_id variable value' +test: 'SET weird_id variable value' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET weird_id variable value\n' +test: 'SET weird_id variable value\n' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET 1 variable multiple value tokens' +test: 'SET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable multiple value tokens\n' +test: 'SET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces ' +test: 'SET 1 variable value_with_trailing_spaces ' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces \n' +test: 'SET 1 variable value_with_trailing_spaces \n' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET \n special_char_id value' +test: 'SET \n special_char_id value' +parsing: id = '\n' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \n Command not found' ok -test parsing: 'SET \t special_char_id value' +test: 'SET \t special_char_id value' +parsing: id = '\t' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \t Command not found' ok -- To view, visit https://gerrit.osmocom.org/5432 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:25 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP... Message-ID: Review at https://gerrit.osmocom.org/5433 ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands The "memleak!" output shows messages that lack a talloc_free() of the parsed ctrl command buffer. The leak shall be fixed in a subsequent patch. Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 --- M tests/ctrl/ctrl_test.c 1 file changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/5433/1 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b0266fc..1ef5ac3 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -121,8 +121,9 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - talloc_report_full(ctx, stdout); - OSMO_ASSERT(false); + // hide mem leak to be fixed in subsequent patch + //talloc_report_full(ctx, stdout); + //OSMO_ASSERT(false); } printf("ok\n"); @@ -295,6 +296,25 @@ "ERROR \t Command not found", }, + { "GET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_GET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + { "SET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_SET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + }; static void test_messages() -- To view, visit https://gerrit.osmocom.org/5433 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:25 +0000 Subject: [PATCH] libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY Message-ID: Review at https://gerrit.osmocom.org/5434 ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In ctrl_handle_msg() (code recently propagated from handle_control_read()), talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED. CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by ctrl_test.c. With the memleak fixed, adjust expected test output and make a detected mem leak abort the test immediately. Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/5434/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 7c1d81a..5c73b63 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -387,7 +387,6 @@ cmd->ccon = ccon; if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } } else { cmd = talloc_zero(ccon, struct ctrl_cmd); @@ -398,9 +397,9 @@ cmd->id = "err"; cmd->reply = "Command parser error."; ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } + talloc_free(cmd); return 0; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 1ef5ac3..be412ea 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -121,9 +121,8 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - // hide mem leak to be fixed in subsequent patch - //talloc_report_full(ctx, stdout); - //OSMO_ASSERT(false); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); } printf("ok\n"); -- To view, visit https://gerrit.osmocom.org/5434 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:26 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:26 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: add two more current parsing bugs to prep for fix Message-ID: Review at https://gerrit.osmocom.org/5435 ctrl_test: add two more current parsing bugs to prep for fix Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/5435/1 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index be412ea..86ede8b 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -155,6 +155,22 @@ "ERROR 1 Command not found", }, + { "GET 1 var\ti\table", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ti\table", /* current bug */ + }, + "ERROR 1 Command not found", + }, + { "GET 1 var\ri\rable", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ri\rable", /* current bug */ + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { .type = CTRL_TYPE_GET, diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index edf97ea..4a3a169 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -34,6 +34,24 @@ handling: replied: 'ERROR 1 Command not found' ok +test: 'GET 1 var\ti\table' +parsing: +id = '1' +variable = 'var\ti\table' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok +test: 'GET 1 var\ri\rable' +parsing: +id = '1' +variable = 'var\ri\rable' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok test: 'GET 1 variable value' parsing: id = '1' @@ -160,3 +178,19 @@ handling: replied: 'ERROR \t Command not found' ok +test: 'GET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +ok +test: 'SET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +ok -- To view, visit https://gerrit.osmocom.org/5435 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:27 +0000 Subject: [PATCH] libosmocore[master]: add ctrl_cmd_parse2() to return parsing errors Message-ID: Review at https://gerrit.osmocom.org/5436 add ctrl_cmd_parse2() to return parsing errors If a control command fails to parse, we so far discard specific error messages and instead send just "Command parser error". In ctrl_cmd_parse() we actually compose detailed error replies, but in the end simply talloc_free() them and return NULL. A first step to report these errors to the ctrl command issuer is to not return NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add ctrl_cmd_parse2() to return such instead of NULL. To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors. ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper around ctrl_cmd_parse2() which discards the cmd on error. No need really to deprecate ctrl_cmd_parse() yet; especially as long as compiler warnings might break jenkins builds. Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 --- M include/osmocom/ctrl/control_cmd.h M src/ctrl/control_cmd.c 2 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/5436/1 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 4372e25..865b006 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -103,6 +103,7 @@ int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd); int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd); +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg); struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg); struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd); struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd); diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f616479..c2ce2be 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -269,7 +269,22 @@ return NULL; } +/*! Parse CTRL command struct from msgb, return NULL on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg) +{ + struct ctrl_cmd *res = ctrl_cmd_parse2(ctx, msg); + if (res->type == CTRL_TYPE_ERROR) { + talloc_free(res); + return NULL; + } + return res; +} + +/*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in + * ctrl->reply on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) { char *str, *tmp, *saveptr = NULL; char *var, *val; @@ -382,8 +397,7 @@ cmd->id = "err"; cmd->reply = "OOM"; err: - talloc_free(cmd); - return NULL; + return cmd; } struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd) -- To view, visit https://gerrit.osmocom.org/5436 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:27 +0000 Subject: [PATCH] libosmocore[master]: ctrl: on parse errors, return a detailed message to sender Message-ID: Review at https://gerrit.osmocom.org/5437 ctrl: on parse errors, return a detailed message to sender The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send those back to the CTRL command sender as reply. Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2() should return NULL, which shouldn't actually happen at all. Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c 2 files changed, 25 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/5437/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 5c73b63..17a012a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -381,14 +381,10 @@ msg->l2h = iph_ext->data; - cmd = ctrl_cmd_parse(ccon, msg); + cmd = ctrl_cmd_parse2(ccon, msg); - if (cmd) { - cmd->ccon = ccon; - if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { - ctrl_cmd_send(&ccon->write_queue, cmd); - } - } else { + if (!cmd) { + /* should never happen */ cmd = talloc_zero(ccon, struct ctrl_cmd); if (!cmd) return -ENOMEM; @@ -396,10 +392,23 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Command parser error."; - ctrl_cmd_send(&ccon->write_queue, cmd); } - talloc_free(cmd); + if (cmd->type != CTRL_TYPE_ERROR) { + cmd->ccon = ccon; + if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) == CTRL_CMD_HANDLED) { + /* On CTRL_CMD_HANDLED, no reply needs to be sent back. */ + talloc_free(cmd); + cmd = NULL; + } + } + + if (cmd) { + /* There is a reply or error that should be reported back to the sender. */ + ctrl_cmd_send(&ccon->write_queue, cmd); + talloc_free(cmd); + } + return 0; } @@ -894,13 +903,16 @@ osmo_strlcpy((char *)msg->data, cmdstr, msgb_tailroom(msg)); msgb_put(msg, strlen(cmdstr)); - cmd = ctrl_cmd_parse(ch, msg); + cmd = ctrl_cmd_parse2(ch, msg); msgb_free(msg); if (!cmd) return NULL; - if (ctrl_cmd_handle(ch, cmd, NULL) < 0) { + if (cmd->type == CTRL_TYPE_ERROR) + return cmd; + if (ctrl_cmd_handle(ch, cmd, NULL) == CTRL_CMD_HANDLED) { + /* No reply should be sent back. */ talloc_free(cmd); - return NULL; + cmd = NULL; } return cmd; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 86ede8b..7181db3 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -76,7 +76,7 @@ printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); printf("parsing:\n"); - cmd = ctrl_cmd_parse(ctx, msg); + cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); OSMO_ASSERT(t->expect_parsed.type == cmd->type); -- To view, visit https://gerrit.osmocom.org/5437 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:27 +0000 Subject: [PATCH] libosmocore[master]: ctrl: tighten CTRL input parsing Message-ID: Review at https://gerrit.osmocom.org/5438 ctrl: tighten CTRL input parsing Validate that incoming CTRL commands... - have decimal IDs, - return error on trailing characters, - have invalid characters in variable identifiers, - send detailed error messages as reply to the requestor. Adjust ctrl_test.{c,ok}, which best show the change in behavior. Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 --- M src/ctrl/control_cmd.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok M tests/testsuite.at 4 files changed, 144 insertions(+), 121 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/5438/1 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index c2ce2be..f32a200 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -281,6 +281,15 @@ return res; } +static bool id_str_valid(const char *str) +{ + for (;*str;str++) { + if (!isdigit(*str)) + return false; + } + return true; +} + /*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in * ctrl->reply on any error. * The caller is responsible to talloc_free() the returned struct pointer. */ @@ -306,6 +315,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request malformed"; + LOGP(DLCTRL, LOGL_NOTICE, "Malformed request: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -314,6 +324,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request type unknown"; + LOGP(DLCTRL, LOGL_NOTICE, "Request type unknown: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -323,6 +334,15 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Missing ID"; + LOGP(DLCTRL, LOGL_NOTICE, "Missing ID: \"%s\"\n", osmo_escape_str(str, -1)); + goto err; + } + + if (!id_str_valid(tmp)) { + cmd->type = CTRL_TYPE_ERROR; + cmd->id = "err"; + cmd->reply = "Invalid message ID number"; + LOGP(DLCTRL, LOGL_NOTICE, "Invalid message ID number: \"%s\"\n", osmo_escape_str(tmp, -1)); goto err; } cmd->id = talloc_strdup(cmd, tmp); @@ -331,14 +351,30 @@ switch (cmd->type) { case CTRL_TYPE_GET: - var = strtok_r(NULL, " ", &saveptr); + var = strtok_r(NULL, " \n", &saveptr); if (!var) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "GET incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete\n"); + LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete: \"%s\"\n", + osmo_escape_str(str, -1)); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); goto err; } cmd->variable = talloc_strdup(cmd, var); + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } LOGP(DLCTRL, LOGL_DEBUG, "Command: GET %s\n", cmd->variable); break; case CTRL_TYPE_SET: @@ -350,31 +386,57 @@ LOGP(DLCTRL, LOGL_NOTICE, "SET Command incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->value = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->value) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = %s\n", cmd->variable, cmd->value); + + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: case CTRL_TYPE_SET_REPLY: case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); if (!var || !val) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "Trap/Reply incomplete"; LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "Trap/Reply variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: %s\n", cmd->variable, cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: - var = strtok_r(NULL, "\0", &saveptr); + var = strtok_r(NULL, "", &saveptr); if (!var) { cmd->reply = ""; goto err; @@ -382,7 +444,8 @@ cmd->reply = talloc_strdup(cmd, var); if (!cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR %s\n", cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR \"%s\"\n", + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_UNKNOWN: default: diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 7181db3..2a42a2e 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -79,14 +79,19 @@ cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(t->expect_parsed.type == cmd->type); + if (t->expect_parsed.type != cmd->type) { + printf("type mismatch: got %s\n", get_value_string(ctrl_type_vals, cmd->type)); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); + } #define ASSERT_SAME_STR(field) \ assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); - ASSERT_SAME_STR(variable); - ASSERT_SAME_STR(value); + if (t->expect_parsed.type != CTRL_TYPE_ERROR) { + ASSERT_SAME_STR(variable); + ASSERT_SAME_STR(value); + } ASSERT_SAME_STR(reply); talloc_free(cmd); @@ -141,75 +146,66 @@ { .type = CTRL_TYPE_GET, .id = "1", - .variable = "variable\n", /* current bug */ + .variable = "variable", }, "ERROR 1 Command not found", }, { "GET 1 var\ni\nable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ni\nable", /* current bug */ + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 var\ti\table", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ti\table", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 var\ri\rable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ri\rable", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 variable value", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable value\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "SET 1 variable value", { @@ -219,7 +215,6 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET 1 variable value\n", { @@ -229,27 +224,22 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET weird_id variable value", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET weird_id variable value\n", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET 1 variable multiple value tokens", { @@ -279,7 +269,6 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -289,27 +278,22 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET \n special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\n", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \n Command not found", - + "ERROR err Invalid message ID number", }, { "SET \t special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\t", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \t Command not found", - + "ERROR err Invalid message ID number", }, { "GET_REPLY 1 variable OK", { @@ -318,7 +302,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, { "SET_REPLY 1 variable OK", { @@ -327,7 +310,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, }; diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 4a3a169..087ebbc 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -19,7 +19,7 @@ test: 'GET 1 variable\n' parsing: id = '1' -variable = 'variable\n' +variable = 'variable' value = '(null)' reply = '(null)' handling: @@ -28,65 +28,51 @@ test: 'GET 1 var\ni\nable' parsing: id = '1' -variable = 'var\ni\nable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 var\ti\table' parsing: id = '1' -variable = 'var\ti\table' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 var\ri\rable' parsing: id = '1' -variable = 'var\ri\rable' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 variable value' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable value\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'SET 1 variable value' parsing: @@ -108,21 +94,17 @@ ok test: 'SET weird_id variable value' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET weird_id variable value\n' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET 1 variable multiple value tokens' parsing: @@ -162,21 +144,17 @@ ok test: 'SET \n special_char_id value' parsing: -id = '\n' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \n Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET \t special_char_id value' parsing: -id = '\t' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \t Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'GET_REPLY 1 variable OK' parsing: diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..81730ee 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -18,7 +18,7 @@ AT_SETUP([ctrl]) AT_KEYWORDS([ctrl]) cat $abs_srcdir/ctrl/ctrl_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([kasumi]) -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:24:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:24:27 +0000 Subject: [PATCH] libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP Message-ID: Review at https://gerrit.osmocom.org/5439 ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP So far, error reporting just says "Trap/Reply", more accurately report 'GET REPLY', 'SET REPLY' and 'TRAP' as appropriate. Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 --- M src/ctrl/control_cmd.c 1 file changed, 52 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/5439/1 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f32a200..31199bf 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -411,20 +411,18 @@ osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: - case CTRL_TYPE_SET_REPLY: - case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); val = strtok_r(NULL, "", &saveptr); - if (!var || !val) { + if (!var) { cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); + cmd->reply = "GET REPLY incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY incomplete\n"); goto err; } if (!osmo_separated_identifiers_valid(var, ".")) { cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply variable contains invalid characters"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + cmd->reply = "GET REPLY variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY variable contains invalid characters: \"%s\"\n", osmo_escape_str(var, -1)); goto err; } @@ -432,7 +430,53 @@ cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + LOGP(DLCTRL, LOGL_DEBUG, "Command: GET REPLY %s: %s\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); + break; + case CTRL_TYPE_SET_REPLY: + var = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); + if (!var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET REPLY incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY incomplete\n"); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET REPLY variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET REPLY variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + cmd->variable = talloc_strdup(cmd, var); + cmd->reply = talloc_strdup(cmd, val); + if (!cmd->variable || !cmd->reply) + goto oom; + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET REPLY %s: %s\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); + break; + case CTRL_TYPE_TRAP: + var = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); + if (!var || !val) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "TRAP incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "TRAP incomplete\n"); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "TRAP variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "TRAP variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + cmd->variable = talloc_strdup(cmd, var); + cmd->reply = talloc_strdup(cmd, val); + if (!cmd->variable || !cmd->reply) + goto oom; + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP %s: \"%s\"\n", cmd->variable, osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:25:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:25:33 +0000 Subject: [ABANDON] libosmocore[master]: CTRL: GET parsing: add '\n' as token delimiter In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: CTRL: GET parsing: add '\n' as token delimiter ...................................................................... Abandoned replaced by new patch series, topic ctrl_parsing -- To view, visit https://gerrit.osmocom.org/4068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I33efb56f76cb7a41e94454666e218617e9b713ae Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:29:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 16 Dec 2017 05:29:06 +0000 Subject: [PATCH] libosmocore[master]: fix osmo_identifier_valid(): only allow printable characters In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5427 to look at the new patch set (#2). fix osmo_identifier_valid(): only allow printable characters In particular disallow ASCII 0..31 (control characters) and 127 (DEL). Change-Id: I04469988495af03c881fe81d7786ca7f71636299 --- M src/utils.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/5427/2 diff --git a/src/utils.c b/src/utils.c index bc5329d..8f56227 100644 --- a/src/utils.c +++ b/src/utils.c @@ -444,6 +444,8 @@ /* check for 7-bit ASCII */ if (str[i] & 0x80) return false; + if (!isprint((int)str[i])) + return false; /* check for some explicit reserved control characters */ if (strchr(illegal_chars, str[i])) return false; -- To view, visit https://gerrit.osmocom.org/5427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I04469988495af03c881fe81d7786ca7f71636299 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:40:08 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 16 Dec 2017 05:40:08 +0000 Subject: [PATCH] libosmocore[master]: libosmocodec: implement ECU (Error Concealment Unit) for FR In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5421 to look at the new patch set (#3). libosmocodec: implement ECU (Error Concealment Unit) for FR When a bad GSM voice frame is received, it's being replaced by a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame. Currently, only FR is supported, support for other codecs may be added latter. Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 --- M TODO-RELEASE M include/Makefile.am A include/osmocom/codec/ecu.h M src/codec/Makefile.am A src/codec/ecu.c M tests/Makefile.am A tests/codec/codec_ecu_test.c A tests/codec/codec_ecu_test.ok M tests/testsuite.at 9 files changed, 533 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/5421/3 diff --git a/TODO-RELEASE b/TODO-RELEASE index a5def79..782ba19 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line core msgb_queue_free() add inline func to msgb.h coding gsm0503_rach_ext-encode() add func to gsm0503_coding.h +codec ecu.c / ecu.h implement ECU for FR (Error Concealment Unit) diff --git a/include/Makefile.am b/include/Makefile.am index 09f5ca6..f95d90c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,6 +1,7 @@ BUILT_SOURCES = osmocom/gsm/gsm0503.h nobase_include_HEADERS = \ + osmocom/codec/ecu.h \ osmocom/codec/codec.h \ osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ diff --git a/include/osmocom/codec/ecu.h b/include/osmocom/codec/ecu.h new file mode 100644 index 0000000..6fc33b4 --- /dev/null +++ b/include/osmocom/codec/ecu.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +/* Codec independent ECU state */ +struct osmo_ecu_state { + bool subsequent_lost_frame; + uint8_t frame_backup[40]; +}; + +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame); +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4df5da..0787f59 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -13,6 +13,6 @@ lib_LTLIBRARIES = libosmocodec.la -libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c +libosmocodec_la_SOURCES = gsm610.c gsm620.c gsm660.c gsm690.c ecu.c libosmocodec_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libosmocodec_la_LIBADD = $(top_builddir)/src/libosmocore.la diff --git a/src/codec/ecu.c b/src/codec/ecu.c new file mode 100644 index 0000000..dde0cc3 --- /dev/null +++ b/src/codec/ecu.c @@ -0,0 +1,165 @@ +/* + * (C) 2017 by sysmocom - s.f.m.c. GmbH + * (C) 2017 by Philipp Maier + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include + +/* See also GSM 06.11, chapter 6 Example solution */ +#define GSM610_XMAXC_REDUCE 4 +#define GSM610_XMAXC_LEN 6 + +/** + * Reduce the XMAXC field. When the XMAXC field reaches + * zero the function will return true. + */ +static bool reduce_xmaxcr(struct bitvec *frame_bitvec, + const unsigned int index) +{ + unsigned int field_index; + uint64_t field; + + field_index = index; + field = bitvec_read_field(frame_bitvec, &field_index, GSM610_XMAXC_LEN); + if (field > GSM610_XMAXC_REDUCE) + field -= GSM610_XMAXC_REDUCE; + else + field = 0; + + field_index = index; + bitvec_write_field(frame_bitvec, &field_index, field, GSM610_XMAXC_LEN); + + return field == 0; +} + +/** + * Reduce all XMAXC fields in the frame. When all XMAXC fields + * reach zero, then the function will return true. + */ +static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec) +{ + bool silent = false; + + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20)) + silent = true; + if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30)) + silent = true; + + return silent; +} + +/* Use certain modifications to conceal the errors in a full rate frame */ +static int conceal_frame(uint8_t *frame) +{ + struct bitvec *frame_bitvec; + unsigned int len; + bool silent; + int rc = 0; + + /* In case we already deal with a silent frame, + * there is nothing to, we just abort immediately */ + if (osmo_fr_check_sid(frame, GSM_FR_BYTES)) + return 0; + + /* Attempt to allocate memory for bitvec */ + frame_bitvec = bitvec_alloc(GSM_FR_BYTES, NULL); + if (!frame_bitvec) + return -ENOMEM; + + /* Convert a frame to bitvec */ + len = bitvec_unpack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + + /* Fudge frame parameters */ + silent = reduce_xmaxcr_all(frame_bitvec); + + /* If we reached silence level, mute the frame + * completely, this also means that we can + * save the bitvec_pack operation */ + if (silent) { + memset(frame, 0x00, GSM_FR_BYTES); + frame[0] = 0xd0; + goto leave; + } + + /* Convert back to packed byte form */ + len = bitvec_pack(frame_bitvec, frame); + if (len != GSM_FR_BYTES) { + rc = -EIO; + goto leave; + } + +leave: + bitvec_free(frame_bitvec); + return rc; +} + +/** + * To be called when a good frame is received. + * This function will then create a backup of the frame + * and reset the internal state. + */ +void osmo_ecu_fr_reset(struct osmo_ecu_state *state, uint8_t *frame) +{ + state->subsequent_lost_frame = false; + memcpy(state->frame_backup, frame, GSM_FR_BYTES); +} + +/** + * To be called when a bad frame is received. + * This function will then generate a replacement frame + * that can be used to conceal the dropout. + */ +int osmo_ecu_fr_conceal(struct osmo_ecu_state *state, uint8_t *frame) +{ + int rc; + + /* For subsequent frames we run the error concealment + * functions on the backed up frame before we restore + * the backup */ + if (state->subsequent_lost_frame) { + rc = conceal_frame(state->frame_backup); + if (rc) + return rc; + } + + /* Restore the backed up frame and set flag in case + * we receive even more bad frames */ + memcpy(frame, state->frame_backup, GSM_FR_BYTES); + state->subsequent_lost_frame = true; + + return 0; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 78542b2..e6b4bc6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,7 +17,8 @@ write_queue/wqueue_test socket/socket_test \ coding/coding_test conv/conv_gsm0503_test \ abis/abis_test endian/endian_test sercomm/sercomm_test \ - stats/stats_test prbs/prbs_test gsm23003/gsm23003_test + stats/stats_test prbs/prbs_test gsm23003/gsm23003_test \ + codec/codec_ecu_test if ENABLE_MSGFILE check_PROGRAMS += msgfile/msgfile_test @@ -136,6 +137,9 @@ codec_codec_test_SOURCES = codec/codec_test.c codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la +codec_codec_ecu_test_SOURCES = codec/codec_ecu_test.c +codec_codec_ecu_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(LDADD) @@ -205,11 +209,13 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok gea/gea_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ loggingrb/logging_test.err strrb/strrb_test.ok \ + codec/codec_test.ok \ + codec/codec_ecu_test.ok \ vty/vty_test.ok \ vty/fail_not_de-indented.cfg \ vty/fail_tabs_and_spaces.cfg \ diff --git a/tests/codec/codec_ecu_test.c b/tests/codec/codec_ecu_test.c new file mode 100644 index 0000000..423ebb9 --- /dev/null +++ b/tests/codec/codec_ecu_test.c @@ -0,0 +1,146 @@ +#include +#include +#include + +#include +#include + +#include +#include + +/* Set with sample full-rate voice frames and some intentional dropouts */ +static const char *fr_frames_hex[] = { + "d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723", + "d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da", + "d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924", + "d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b", + "da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3", + "d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b", + "d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923", + "d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db", + "d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3", + "d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd", + "BAD", + "d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23", + "d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c", + "d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4", + "d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc", + "d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2", + "d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4", + "d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b", + "BAD", + "BAD", + "d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab", + "d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3", + "d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3", + "d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da", + "d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5", + "d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4", + "d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5", + "d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db", + "d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3", + "d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15", + "d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "BAD", + "d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25", + "d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b", + "d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b", + "d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b", + "d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23", + "d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713", + "BAD", + "d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94", + "d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d", + "d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa", + "d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98", + "d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763", + "d2577a1cda50004924924924500049249249245000492492492450004923924924", + NULL +}; + +/* Example of a good frame */ +static const char *sample_frame_hex = \ + "d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da"; + +/** + * Start with a good voice frame and then simulate 20 consecutive bad frames, + * watching how the error concealment decreases the XMAXC parameters. + */ +void test_fr_concealment(void) +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + int i, rc; + + /* Parse frame from string to hex */ + osmo_hexparse(sample_frame_hex, frame, GSM_FR_BYTES); + + printf("Start with: %s\n", sample_frame_hex); + + /* Reset the ECU with the proposed known good frame */ + osmo_ecu_fr_reset(&state, frame); + + /* Now pretend that we do not receive any good frames anymore */ + for (i = 0; i < 20; i++) { + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + + printf("conceal: %02i, result: %s\n", + i, osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + } +} + +/* Simulate a real life situation: voice frames with a few dropouts */ +void test_fr_concealment_realistic() +{ + struct osmo_ecu_state state; + uint8_t frame[GSM_FR_BYTES]; + unsigned int frame_len; + int rc, i = 0; + + while (fr_frames_hex[i] != NULL) { + /* Debug print */ + printf("Frame No. %03i:\n", i); + + /* Good or bad frame? */ + frame_len = strlen(fr_frames_hex[i]) / 2; + if (frame_len == GSM_FR_BYTES) { + printf(" * input: %s\n", fr_frames_hex[i]); + osmo_hexparse(fr_frames_hex[i], frame, GSM_FR_BYTES); + osmo_ecu_fr_reset(&state, frame); + } else { + printf(" * input: (bad)\n"); + memset(frame, 0x00, GSM_FR_BYTES); + rc = osmo_ecu_fr_conceal(&state, frame); + OSMO_ASSERT(rc == 0); + } + + /* Print result */ + printf(" * output: %s\n", + osmo_hexdump_nospc(frame, GSM_FR_BYTES)); + + /* Go to the next frame */ + i++; + } +} + +int main(int argc, char **argv) +{ + /* Perform actual tests */ + test_fr_concealment(); + test_fr_concealment_realistic(); + + return 0; +} diff --git a/tests/codec/codec_ecu_test.ok b/tests/codec/codec_ecu_test.ok new file mode 100644 index 0000000..6e20099 --- /dev/null +++ b/tests/codec/codec_ecu_test.ok @@ -0,0 +1,192 @@ +Start with: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 00, result: d9ec9be212901f802335598c501f805bad3d4ba01f809b69df5a501f809cd1b4da +conceal: 01, result: d9ec9be212901d802335598c501d805bad3d4ba01d809b69df5a501d809cd1b4da +conceal: 02, result: d9ec9be212901b802335598c501b805bad3d4ba01b809b69df5a501b809cd1b4da +conceal: 03, result: d9ec9be2129019802335598c5019805bad3d4ba019809b69df5a5019809cd1b4da +conceal: 04, result: d9ec9be2129017802335598c5017805bad3d4ba017809b69df5a5017809cd1b4da +conceal: 05, result: d9ec9be2129015802335598c5015805bad3d4ba015809b69df5a5015809cd1b4da +conceal: 06, result: d9ec9be2129013802335598c5013805bad3d4ba013809b69df5a5013809cd1b4da +conceal: 07, result: d9ec9be2129011802335598c5011805bad3d4ba011809b69df5a5011809cd1b4da +conceal: 08, result: d9ec9be212900f802335598c500f805bad3d4ba00f809b69df5a500f809cd1b4da +conceal: 09, result: d9ec9be212900d802335598c500d805bad3d4ba00d809b69df5a500d809cd1b4da +conceal: 10, result: d9ec9be212900b802335598c500b805bad3d4ba00b809b69df5a500b809cd1b4da +conceal: 11, result: d9ec9be2129009802335598c5009805bad3d4ba009809b69df5a5009809cd1b4da +conceal: 12, result: d9ec9be2129007802335598c5007805bad3d4ba007809b69df5a5007809cd1b4da +conceal: 13, result: d9ec9be2129005802335598c5005805bad3d4ba005809b69df5a5005809cd1b4da +conceal: 14, result: d9ec9be2129003802335598c5003805bad3d4ba003809b69df5a5003809cd1b4da +conceal: 15, result: d9ec9be2129001802335598c5001805bad3d4ba001809b69df5a5001809cd1b4da +conceal: 16, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 17, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 18, result: d00000000000000000000000000000000000000000000000000000000000000000 +conceal: 19, result: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 000: + * input: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 + * output: d9aa93ae63de00471a91b95b8660471392b4a2daa037628f391c624039258dc723 +Frame No. 001: + * input: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da + * output: d8eb83699a66c036ec89b7246e6034dc8d48948620589b7256e3a6603b2371b8da +Frame No. 002: + * input: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 + * output: d967abaa1cbe4035238da6ace4c036d46ec69ba600391c4eb8a2b040591c6a3924 +Frame No. 003: + * input: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b + * output: d8e8a42662c240472469b91bd2e0452291b6dba600495b8e38dcb020491a71c91b +Frame No. 004: + * input: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 + * output: da2aac1ddbb00036e46e26dcec6039138db923822047137248e3560048e38dc8e3 +Frame No. 005: + * input: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b + * output: d929ab2a9b5240395b6dc72ba020469c8d551c5440349c9148e36a4036a372471b +Frame No. 006: + * input: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 + * output: d9eb93215bb8a0271c69c724682036db71c71a94a0372491b72bee4044eb71b923 +Frame No. 007: + * input: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db + * output: d9ab9aa19abc40391b6e5ae2ee40471b91c6dbe820492291b8e4b84036e47238db +Frame No. 008: + * input: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 + * output: d96b9be9db782044e371b55cb200389491c69b8ea034e271c8d3808038ec6db8e3 +Frame No. 009: + * input: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 010: + * input: (bad) + * output: d9aa9365e3f060375c6db6ebc4c02764b1c51b78a0571c91a723de6049248dc8dd +Frame No. 011: + * input: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 + * output: d9ea9c219ce60046e38d3724e0c034e56e36eb7e0038d471b8dcb260491b8dbb23 +Frame No. 012: + * input: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c + * output: d9e89be9d9e0a0391b6dd6a4624029247138e3a2a04713922524de0036db69d91c +Frame No. 013: + * input: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 + * output: d9699422a2b6a048dd90c91c6a802b6259395c8880575b4a58e4ac20269d7248d4 +Frame No. 014: + * input: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc + * output: d967ac5b1baae0371c71b8ab9c804a9e8e58a55a8038626ec8dcb640395c7244dc +Frame No. 015: + * input: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 + * output: d9e8a3e262e68027638db52b88a038634e471a7ec049136e3b1bc8402923adcad2 +Frame No. 016: + * input: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 + * output: d8eab36e1bbe0046e34d491b608035137658d3524044e48e375cdac0472b9238d4 +Frame No. 017: + * input: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 018: + * input: (bad) + * output: d9689ba5e3d260491b516adb5e4027256e27227ee0351c8e549a5c60492471971b +Frame No. 019: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 020: + * input: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab + * output: d8e6a2e1d3d2605b1376c8d35280392451391cbc80392a71b6db8aa049238dc8ab +Frame No. 021: + * input: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 + * output: d9a87ba1a3982048eb8a471cac00472b4e391bbc40292489b71cc200495b8d3ae3 +Frame No. 022: + * input: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 + * output: d9278b2a1ba4c0475b8dc722d6e0491b5228da70204ae36dc71d94a056a29236e3 +Frame No. 023: + * input: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da + * output: d9ec9be2129520392335598c50c04b5bad3d4ba680789b69df5a5aa0469cd1b4da +Frame No. 024: + * input: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 + * output: d8ea932623e660669b8e4a9dd8a03aa32a76e466e028d396cc9bbe4047256dc8e5 +Frame No. 025: + * input: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 + * output: d96a94215aa0403aab713f22e8e024e68db91ab6a027abd1a55b6e804aec9146e4 +Frame No. 026: + * input: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 + * output: d867ac21e270a0350d6ac91a724037247246d2a6c0396c89d6dc562049244e48d5 +Frame No. 027: + * input: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db + * output: d8a9b460d3b48026a4ad471b7c20452491b69bbc803ae48db722ee00292491a8db +Frame No. 028: + * input: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 + * output: d928a3e1d3b24036e37244abf02047634d371b74c047637148a29ac03b234e38e3 +Frame No. 029: + * input: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 + * output: d9ab9b21d2e0c0471c693aec54e044dbae46dc7c20391badb724ee8038e469bb15 +Frame No. 030: + * input: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 031: + * input: (bad) + * output: d9a99361a276403b1a6ad6dcd40026e489c8e3bc40371c4dc564e2c036e28eb963 +Frame No. 032: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 033: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 034: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 035: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 036: + * input: (bad) + * output: d00000000000000000000000000000000000000000000000000000000000000000 +Frame No. 037: + * input: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 + * output: d92c8b6d5aee4034ebb22724862047145634a5c0a038e371b8e4a880485c89dd25 +Frame No. 038: + * input: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b + * output: d8e78b29e3c6c038dba9d91beca04723ad491cda80471471b6ec7ae03b1396b91b +Frame No. 039: + * input: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b + * output: d8a78b25e37a0022dd8a46dc68a0351bad391bde2046e56dd8dc96c038e396d89b +Frame No. 040: + * input: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc + * output: d8a88c255ab6e038e38e48dbde8038ad8dc8db8ec0376372b564b44038e49234dc +Frame No. 041: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 042: + * input: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c + * output: d8ee9bea5ae4003ae371b713eae05adc91995a5ea064dcc9571e786026ed51c52c +Frame No. 043: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 044: + * input: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b + * output: d92aab696190c046e26e392cae0026a376a8dc662048d291b75b54c04ad3ae3b1b +Frame No. 045: + * input: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 + * output: d8e7a469627a6038e289cb1baca0569b8db6dddec026dc8e38e5dc803722722d23 +Frame No. 046: + * input: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 047: + * input: (bad) + * output: d8a88c299b64c03a548a58e37420272c6dd76b92c0471c9236dbc0e0551c71c713 +Frame No. 048: + * input: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 + * output: d7299c19a3be8024e58ea7a49f20a522963ad976e0a76ecd92b38500cb62aa4c94 +Frame No. 049: + * input: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d + * output: d7eb6c6262eee02b2c42e79a60a0aa55aed68a7f00ad358e10fad960e55a39396d +Frame No. 050: + * input: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa + * output: d970858dd2ab61d91355ebc15ca1a6a7ca48a05cc0dae66f2523c2a1bad3825daa +Frame No. 051: + * input: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 + * output: d8f0844a23ad20da50d6de025e81c37392b9039cc0c764c1bd1e94c1b699736a98 +Frame No. 052: + * input: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 + * output: d9708ce6a39ce049646646a2c1a0272496b29a66c037db562863ace0795b55b2e3 +Frame No. 053: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 054: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 055: + * input: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 + * output: d9299421d2944036ed69b8e572a048e36d551cd480571d4ec95be680356c69c763 +Frame No. 056: + * input: d2577a1cda50004924924924500049249249245000492492492450004923924924 + * output: d2577a1cda50004924924924500049249249245000492492492450004923924924 diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..a4b34df 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -157,6 +157,12 @@ AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) AT_CLEANUP +AT_SETUP([codec_ecu]) +AT_KEYWORDS([codec_ecu]) +cat $abs_srcdir/codec/codec_ecu_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_ecu_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout -- To view, visit https://gerrit.osmocom.org/5421 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Sat Dec 16 05:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 16 Dec 2017 05:44:39 +0000 Subject: libosmocore[master]: libosmocodec: implement ECU (Error Concealment Unit) for FR In-Reply-To: References: Message-ID: Patch Set 3: BTW: I've changed the license header from AGPL V3+ to GPL V2+ in order to avoid license mix in libosmocore. @dexter, @Harald, is it ok? -- To view, visit https://gerrit.osmocom.org/5421 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:12:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:12:41 +0000 Subject: libosmocore[master]: fix osmo_identifier_valid(): only allow printable characters In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04469988495af03c881fe81d7786ca7f71636299 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:13:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:13:16 +0000 Subject: libosmocore[master]: utils: add osmo_separated_identifiers_valid() In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5428 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:14:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:14:25 +0000 Subject: libosmocore[master]: utils: add osmo_escape_str() In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5429/2/src/utils.c File src/utils.c: Line 498: whitespace -- To view, visit https://gerrit.osmocom.org/5429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:15:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:15:45 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:16:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:16:03 +0000 Subject: libosmocore[master]: ctrl: on parse errors, return a detailed message to sender In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5437 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:16:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:16:26 +0000 Subject: libosmocore[master]: add ctrl_cmd_parse2() to return parsing errors In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5436 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:16:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:16:53 +0000 Subject: libosmocore[master]: ctrl_test: add two more current parsing bugs to prep for fix In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5435 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:18:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:18:32 +0000 Subject: osmo-msc[master]: libmsc: a_iface_bssap.c: Fix compilation warning In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/5424 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28073efd5cff58cd212341bceee784caf08d5ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:19:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:19:02 +0000 Subject: osmo-msc[master]: libmsc: db.c: Replace dbi APIs marked as deprecated In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6052159acf240cc7e8e2b3a3af10d8210708ddb6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:19:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:19:14 +0000 Subject: osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:19:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:19:48 +0000 Subject: osmo-hlr[master]: luop.c: Transform FIXME from warning to pragma message In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c9b195bf0e3f853e202cdbdb72d35d83cd2a2ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:20:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:20:00 +0000 Subject: osmo-hlr[master]: contrib:jenkins.sh: Enable Werror In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I61688a4c9b50f6f3705bd18c96c00f8703ef5042 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:20:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:20:04 +0000 Subject: [MERGED] osmo-hlr[master]: contrib:jenkins.sh: Enable Werror In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: contrib:jenkins.sh: Enable Werror ...................................................................... contrib:jenkins.sh: Enable Werror Change-Id: I61688a4c9b50f6f3705bd18c96c00f8703ef5042 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 825d9ea..b273517 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ cd "$base" autoreconf --install --force -./configure --enable-external-tests +./configure --enable-external-tests CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh $MAKE distcheck || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5426 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61688a4c9b50f6f3705bd18c96c00f8703ef5042 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 16 13:20:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 13:20:04 +0000 Subject: [MERGED] osmo-hlr[master]: luop.c: Transform FIXME from warning to pragma message In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: luop.c: Transform FIXME from warning to pragma message ...................................................................... luop.c: Transform FIXME from warning to pragma message This way the issue is still visible but we can enable Werror to avoid introducing new warnings. Change-Id: I6c9b195bf0e3f853e202cdbdb72d35d83cd2a2ab --- M src/luop.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/luop.c b/src/luop.c index 2966380..4ef4ea3 100644 --- a/src/luop.c +++ b/src/luop.c @@ -251,8 +251,7 @@ gsup.msisdn_enc = msisdn_enc; gsup.msisdn_enc_len = l; - /* FIXME: deal with encoding the following data */ - gsup.hlr_enc; + #pragma message "FIXME: deal with encoding the following data: gsup.hlr_enc" if (luop->is_ps) { /* FIXME: PDP infos - use more fine-grained access control -- To view, visit https://gerrit.osmocom.org/5425 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c9b195bf0e3f853e202cdbdb72d35d83cd2a2ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 16 19:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 16 Dec 2017 19:33:38 +0000 Subject: [PATCH] osmo-sgsn[master]: .gitignore: remove non-existent /src/utils exludes Message-ID: Review at https://gerrit.osmocom.org/5440 .gitignore: remove non-existent /src/utils exludes Change-Id: I674da025df4b5d6bcf585a0c764ff186c9281121 --- M .gitignore 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/40/5440/1 diff --git a/.gitignore b/.gitignore index b8c841f..5f6aee2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,6 @@ Makefile.in bscconfig.h bscconfig.h.in -src/utils/meas_vis -src/utils/meas_json -src/utils/osmo-meas-pcap2db -src/utils/osmo-meas-udp2db -src/utils/smpp_mirror *.*~ *.sw? .libs -- To view, visit https://gerrit.osmocom.org/5440 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I674da025df4b5d6bcf585a0c764ff186c9281121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat Dec 16 19:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 16 Dec 2017 19:33:38 +0000 Subject: [PATCH] osmo-sgsn[master]: configure.ac: remove pcap check Message-ID: Review at https://gerrit.osmocom.org/5441 configure.ac: remove pcap check libpcap isn't used in osmo-sgsn Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671 --- M configure.ac 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/41/5441/1 diff --git a/configure.ac b/configure.ac index a1dbce5..225a534 100644 --- a/configure.ac +++ b/configure.ac @@ -80,10 +80,6 @@ dnl checks for header files AC_HEADER_STDC -found_pcap=yes -AC_CHECK_HEADERS(pcap/pcap.h,,found_pcap=no) -AM_CONDITIONAL(HAVE_PCAP, test "$found_pcap" = yes) - found_cdk=yes AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no) AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes) -- To view, visit https://gerrit.osmocom.org/5441 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat Dec 16 19:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 16 Dec 2017 19:33:38 +0000 Subject: [PATCH] osmo-sgsn[master]: configure.ac: remove unused libcdk check Message-ID: Review at https://gerrit.osmocom.org/5442 configure.ac: remove unused libcdk check libcdk isn't used Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e --- M configure.ac 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/42/5442/1 diff --git a/configure.ac b/configure.ac index 225a534..8f279fd 100644 --- a/configure.ac +++ b/configure.ac @@ -80,11 +80,6 @@ dnl checks for header files AC_HEADER_STDC -found_cdk=yes -AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no) -AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes) - - dnl Checks for typedefs, structures and compiler characteristics AC_ARG_ENABLE(sanitize, -- To view, visit https://gerrit.osmocom.org/5442 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat Dec 16 19:33:39 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 16 Dec 2017 19:33:39 +0000 Subject: [PATCH] osmo-sgsn[master]: .service: remove OpenBSC from service desription Message-ID: Review at https://gerrit.osmocom.org/5443 .service: remove OpenBSC from service desription Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a --- M contrib/systemd/osmo-sgsn.service 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/43/5443/1 diff --git a/contrib/systemd/osmo-sgsn.service b/contrib/systemd/osmo-sgsn.service index bf6a8e0..468c078 100644 --- a/contrib/systemd/osmo-sgsn.service +++ b/contrib/systemd/osmo-sgsn.service @@ -1,5 +1,5 @@ [Unit] -Description=OpenBSC SGSN +Description=OsmoSGSN Wants=osmo-hlr.service After=osmo-hlr.service After=osmo-hnbgw.service -- To view, visit https://gerrit.osmocom.org/5443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:17 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: use BSSAP_CodecPort Message-ID: Review at https://gerrit.osmocom.org/5444 BSSMAP_Emulation: use BSSAP_CodecPort So far, BSSMAP_Emulation used the SCCPasp_SP_PORT directly, explicitly calling BSSAP encode/decode functions while processing the primitives. Let's clean this up and use the BSSAP_CodecPort which has meanwhile been developed as a dual-faced port that can be stacked between SCCPasp and the user to avoid any manual encode/decode function calls. Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 --- M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc-nat/MSC_Simulation.ttcn M bsc-nat/gen_links.sh M library/BSSMAP_Emulation.ttcn 6 files changed, 33 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/5444/1 diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index a385525..876d2ec 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -28,7 +29,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { log("Incoming SCCP Connection on BSC ?!?"); self.stop; diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index eab7fe9..b9414a3 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -8,6 +8,7 @@ import from SCCPasp_Types all; import from SCCP_Emulation all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSC_MS_ConnectionHandler all; @@ -53,7 +54,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSMAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ connect(vc_BSSMAP:MGCP, vc_IPA:IPA_MGCP_PORT); diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 3fc11e9..b038ce5 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -26,7 +27,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { var MSC_ConnHdlr vc_conn; /* Create a new BSSAP_ConnHdlr component */ diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn index f9fb0d4..7e39ca1 100755 --- a/bsc-nat/MSC_Simulation.ttcn +++ b/bsc-nat/MSC_Simulation.ttcn @@ -51,7 +51,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); if (mp_mgcp_uses_udp == false) { /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 9846d9a..9a45c89 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -55,5 +55,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 42f7739..14bf238 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -3,6 +3,7 @@ import from SCCP_Emulation all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Templates all; import from MGCP_Types all; import from MGCP_Templates all; @@ -48,7 +49,7 @@ type component BSSMAP_Emulation_CT { /* SCCP port on the bottom side, using ASP primitives */ - port SCCPasp_PT SCCP; + port BSSAP_CODEC_PT BSSAP; /* BSSAP port to the per-connection clients */ port BSSAP_Conn_PT CLIENT; /* MGCP port */ @@ -228,10 +229,9 @@ } /* handle (optional) userData portion of various primitives and dispatch it to the client */ -private function f_handle_userData(BSSAP_ConnHdlr client, octetstring userdata) +private function f_handle_userData(BSSAP_ConnHdlr client, PDU_BSSAP bssap) runs on BSSMAP_Emulation_CT { /* decode + send decoded BSSAP to client */ - var PDU_BSSAP bssap := dec_PDU_BSSAP(valueof(userdata)); /* BSC Side: If this is an assignment command, store CIC */ if (ischosen(bssap.pdu.bssmap.assignmentRequest) and @@ -247,7 +247,7 @@ /* call-back type, to be provided by specific implementation; called when new SCCP connection * arrives */ -type function BssmapCreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +type function BssmapCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr; type function BssmapUnitdataCallback(PDU_BSSAP bssap) @@ -264,11 +264,11 @@ f_conn_table_init(); while (true) { - var ASP_SCCP_N_UNITDATA_ind ud_ind; - var ASP_SCCP_N_CONNECT_ind conn_ind; - var ASP_SCCP_N_CONNECT_cfm conn_cfm; - var ASP_SCCP_N_DATA_ind data_ind; - var ASP_SCCP_N_DISCONNECT_ind disc_ind; + var BSSAP_N_UNITDATA_ind ud_ind; + var BSSAP_N_CONNECT_ind conn_ind; + var BSSAP_N_CONNECT_cfm conn_cfm; + var BSSAP_N_DATA_ind data_ind; + var BSSAP_N_DISCONNECT_ind disc_ind; var BSSAP_Conn_Req creq; var BSSAP_ConnHdlr vc_conn; var PDU_BSSAP bssap; @@ -277,32 +277,29 @@ alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ - [] SCCP.receive(ASP_SCCP_N_UNITDATA_ind:?) -> value ud_ind { + [] BSSAP.receive(BSSAP_N_UNITDATA_ind:?) -> value ud_ind { /* Connectionless Procedures like RESET */ var template PDU_BSSAP resp; - bssap := dec_PDU_BSSAP(ud_ind.userData); - resp := ops.unitdata_cb.apply(bssap); + resp := ops.unitdata_cb.apply(ud_ind.userData); if (isvalue(resp)) { - var octetstring resp_ud := enc_PDU_BSSAP(valueof(resp)); - SCCP.send(t_ASP_N_UNITDATA_req(ud_ind.callingAddress, - ud_ind.calledAddress, omit, - omit, resp_ud, omit)); + BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, + ud_ind.calledAddress, resp)); } } /* SCCP -> Client: new connection from BSC */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_ind:?) -> value conn_ind { + [] BSSAP.receive(BSSAP_N_CONNECT_ind:?) -> value conn_ind { vc_conn := ops.create_cb.apply(conn_ind, id); /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_ind.connectionId); /* handle user payload */ f_handle_userData(vc_conn, conn_ind.userData); /* confirm connection establishment */ - SCCP.send(t_ASP_N_CONNECT_res(omit, omit, omit, omit, conn_ind.connectionId, omit)); + BSSAP.send(ts_BSSAP_CONNECT_res(conn_ind.connectionId, omit)); } /* SCCP -> Client: connection-oriented data in existing connection */ - [] SCCP.receive(ASP_SCCP_N_DATA_ind:?) -> value data_ind { + [] BSSAP.receive(BSSAP_N_DATA_ind:?) -> value data_ind { vc_conn := f_comp_by_conn_id(data_ind.connectionId); if (ispresent(data_ind.userData)) { f_handle_userData(vc_conn, data_ind.userData); @@ -310,7 +307,7 @@ } /* SCCP -> Client: disconnect of an existing connection */ - [] SCCP.receive(ASP_SCCP_N_DISCONNECT_ind:?) -> value disc_ind { + [] BSSAP.receive(BSSAP_N_DISCONNECT_ind:?) -> value disc_ind { vc_conn := f_comp_by_conn_id(disc_ind.connectionId); if (ispresent(disc_ind.userData)) { f_handle_userData(vc_conn, disc_ind.userData); @@ -323,7 +320,7 @@ } /* SCCP -> Client: connection confirm for outbound connection */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_cfm:?) -> value conn_cfm { + [] BSSAP.receive(BSSAP_N_CONNECT_cfm:?) -> value conn_cfm { /* handle user payload */ if (ispresent(conn_cfm.userData)) { f_handle_userData(vc_conn, conn_cfm.userData); @@ -333,15 +330,14 @@ /* Disconnect request client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ) -> sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DISCONNECT_req(omit, 0, omit, conn_id, omit)); + BSSAP.send(ts_BSSAP_DISC_req(conn_id, 0)); f_conn_table_del(conn_id); } /* BSSAP from client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Req:?) -> value creq sender vc_conn { var integer conn_id; - /* encode + send to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(creq.bssap); + /* send to dispatcher */ if (f_comp_known(vc_conn) == false) { /* unknown client, create new connection */ @@ -350,21 +346,20 @@ /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_id); - SCCP.send(t_ASP_N_CONNECT_req(creq.addr_peer, creq.addr_own, omit, omit, - userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_CONNECT_req(creq.addr_peer, creq.addr_own, conn_id, + creq.bssap)); } else { /* known client, send via existing connection */ conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_DATA_req(conn_id, creq.bssap)); } } [] CLIENT.receive(PDU_BSSAP:?) -> value bssap sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - /* encode + send it to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(bssap); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + /* send it to dispatcher */ + BSSAP.send(ts_BSSAP_DATA_req(conn_id, bssap)); } /* Handling of MGCP in IPA SCCPLite case. This predates 3GPP AoIP -- To view, visit https://gerrit.osmocom.org/5444 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:22 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Prepare for tests based on {RSL, BSSMAP}_Emulation Message-ID: Review at https://gerrit.osmocom.org/5445 BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_Emulation The existing tests were implemented directly on top of the BSSMAP and RSL CodecPorts. If we loop in the RSL_Emulation and BSSMAP_Emulation components, we can properly multiplex/demultiplex multiple MS (radio channels) on both the RSL and the MSC (SCCP connection) side. In order to have a single component that handles both the RSL and the BSSAP side of a given channel/subscriber/call, we introduce the concept of BSSMAP "Expects", where the test csse can register the L3 INFO that it sends in the RLL ESTablish INDication on the RSL side, so the BSSMAP handler cna route the BSC-originated SCCP connection with that L3 INFO back to the same component. This is a bit inspired "in spirit" of the "expect" mechanism of netfilter connection tracking. Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e --- M bsc/BSC_Tests.ttcn M bsc/BSSAP_Adapter.ttcn M bsc/gen_links.sh M bsc/regen_makefile.sh M library/BSSMAP_Emulation.ttcn M library/RSL_Emulation.ttcn 6 files changed, 121 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/5445/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 42de6be..f910100 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -75,10 +75,13 @@ type record IPA_Client { IPA_Emulation_CT vc_IPA, IPA_CCM_Parameters ccm_pars, - charstring id + charstring id, + + RSL_Emulation_CT vc_RSL optional } -function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) +function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i, + boolean handler_mode := false) runs on test_CT { timer T := 10.0; @@ -87,11 +90,22 @@ clnt.ccm_pars := c_IPA_default_ccm_pars; clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; + if (handler_mode) { + clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL"); + } map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + if (handler_mode) { + connect(clnt.vc_IPA:IPA_RSL_PORT, clnt.vc_RSL:IPA_PT); + } else { + connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + } clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); + if (handler_mode) { + clnt.vc_RSL.start(RSL_Emulation.main()); + return; + } /* wait for IPA RSL link to connect and send ID ACK */ T.start; @@ -170,7 +184,7 @@ } } -function f_init() runs on test_CT { +function f_init(boolean handler_mode := false) runs on test_CT { var integer i; if (g_initialized) { @@ -180,14 +194,14 @@ /* Call a function of our 'parent component' BSSAP_Adapter_CT to start the * MSC-side BSSAP emulation */ - f_bssap_init("VirtMSC"); + f_bssap_init("VirtMSC", handler_mode); f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); for (i := 0; i < NUM_BTS; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ f_wait_oml(i, "degraded", 5.0); /* start RSL connection */ - f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i); + f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i, handler_mode); /* wait until BSC tells us "connected" */ f_wait_oml(i, "connected", 5.0); } diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn index 60c7103..f1ff5b6 100644 --- a/bsc/BSSAP_Adapter.ttcn +++ b/bsc/BSSAP_Adapter.ttcn @@ -22,6 +22,9 @@ import from BSSAP_CodecPort all; import from BSSMAP_Templates all; +import from BSSMAP_Emulation all; + +import from MSC_ConnectionHandler all; type component BSSAP_Adapter_CT { /* component references */ @@ -33,6 +36,9 @@ var octetstring g_sio; var MSC_SCCP_MTP3_parameters g_sccp_pars; var SCCP_PAR_Address g_sccp_addr_own, g_sccp_addr_peer; + + /* handler mode */ + var BSSMAP_Emulation_CT vc_BSSMAP; } modulepar { @@ -79,24 +85,33 @@ } -function f_bssap_init(charstring id) runs on BSSAP_Adapter_CT +function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSAP_Adapter_CT { init_pars(); /* create components */ vc_M3UA := M3UA_CT.create(id & "-M3UA"); vc_SCCP := SCCP_CT.create(id & "-SCCP"); + if (handler_mode) { + vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP"); + } map(vc_M3UA:SCTP_PORT, system:sctp); /* connect MTP3 service provider (M3UA) to lower side of SCCP */ connect(vc_M3UA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); - - /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + if (handler_mode) { + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); + } else { + /* connect BSSNAP dispatcher to upper side of SCCP */ + connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + } vc_M3UA.start(f_M3UA_Emulation(mp_sctp_addr)); vc_SCCP.start(SCCPStart(g_sccp_pars)); + if (handler_mode) { + vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_BssmapOps, "")); + } } private altstep as_reset_ack() runs on BSSAP_Adapter_CT { diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index e46bee1..5d8555a 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn" gen_links $DIR $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 8b8fa43..d937482 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" ../regen-makefile.sh $MAIN $FILES diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 14bf238..ba7e27c 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -58,6 +58,11 @@ /* use 16 as this is also the number of SCCP connections that SCCP_Emulation can handle */ var ConnectionData ConnectionTable[16]; + /* pending expected incoming connections */ + var ExpectData ExpectTable[8]; + /* procedure based port to register for incoming connections */ + port BSSMAPEM_PROC_PT PROC; + var charstring g_bssmap_id; var integer g_next_e1_ts := 1; }; @@ -274,6 +279,8 @@ var PDU_BSSAP bssap; var MgcpCommand mgcp_req; var MgcpResponse mgcp_resp; + var BSSAP_ConnHdlr vc_hdlr; + var octetstring l3_info; alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ @@ -401,6 +408,12 @@ CLIENT.send(mgcp_resp) to vc_conn; } + + [] PROC.getcall(BSSMAPEM_register:{?,?}) -> param(l3_info, vc_hdlr) { + f_create_expect(l3_info, vc_hdlr); + PROC.reply(BSSMAPEM_register:{l3_info, vc_hdlr}); + } + } } } @@ -411,4 +424,69 @@ } +/*********************************************************************** + * "Expect" Handling (mapping for expected incoming SCCP connections) + ***********************************************************************/ + +/* data about an expected future incoming connection */ +type record ExpectData { + /* L3 payload based on which we can match it */ + octetstring l3_payload optional, + /* component reference for this connection */ + BSSAP_ConnHdlr vc_conn +} + +/* procedure based port to register for incoming connections */ +signature BSSMAPEM_register(in octetstring l3, in BSSAP_ConnHdlr hdlr); + +type port BSSMAPEM_PROC_PT procedure { + inout BSSMAPEM_register; +} with { extension "internal" }; + +/* CreateCallback that can be used as create_cb and will use the expectation table */ +function ExpectedCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) +runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { + var BSSAP_ConnHdlr ret := null; + var octetstring l3_info; + var integer i; + + if (not ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) { + setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3"); + return ret; + } + l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info; + + for (i := 0; i < sizeof(ExpectTable); i:= i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + continue; + } + if (l3_info == ExpectTable[i].l3_payload) { + ret := ExpectTable[i].vc_conn; + /* release this entry to be used again */ + ExpectTable[i].l3_payload := omit; + ExpectTable[i].vc_conn := null; + log("Found Expect[", i, "] for ", l3_info, " handled at ", ret); + /* return the component reference */ + return ret; + } + } + setverdict(fail, "Couldn't find Expect for incoming connection ", conn_ind); + return ret; +} + +private function f_create_expect(octetstring l3, BSSAP_ConnHdlr hdlr) +runs on BSSMAP_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(ExpectTable); i := i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + ExpectTable[i].l3_payload := l3; + ExpectTable[i].vc_conn := hdlr; + log("Created Expect[", i, "] for ", l3, " to be handled at ", hdlr); + return; + } + } + setverdict(fail, "No space left in ExpectTable"); +} + + } diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn index d558412..a42ca1e 100644 --- a/library/RSL_Emulation.ttcn +++ b/library/RSL_Emulation.ttcn @@ -199,6 +199,8 @@ while (true) { alt { + [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { + } [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23))); } -- To view, visit https://gerrit.osmocom.org/5445 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:23 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RSL_Types: Fix RSL Message Type enumerated definition Message-ID: Review at https://gerrit.osmocom.org/5446 RSL_Types: Fix RSL Message Type enumerated definition Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8 --- M library/RSL_Types.ttcn 1 file changed, 20 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/5446/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index a807ce2..7aef17a 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -111,27 +111,27 @@ RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), RSL_MT_IPAC_CONNECT_MUX ('01010000'B), - RSL_MT_IPAC_CONNECT_MUX_ACK, - RSL_MT_IPAC_CONNECT_MUX_NACK, - RSL_MT_IPAC_BIND_MUX, - RSL_MT_IPAC_BIND_MUX_ACK, - RSL_MT_IPAC_BIND_MUX_NACK, - RSL_MT_IPAC_DISC_MUX, - RSL_MT_IPAC_DISC_MUX_ACK, - RSL_MT_IPAC_DISC_MUX_NACK, + RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), + RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), + RSL_MT_IPAC_BIND_MUX ('01010011'B), + RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), + RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), + RSL_MT_IPAC_DISC_MUX ('01010110'B), + RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), + RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), - RSL_MT_IPAC_HO_CAN_ENQ, - RSL_MT_IPAC_HO_CAN_RES, - RSL_MT_IPAC_CRCX, - RSL_MT_IPAC_CRCX_ACK, - RSL_MT_IPAC_CRCX_NACK, - RSL_MT_IPAC_MDCX, - RSL_MT_IPAC_MDCX_ACK, - RSL_MT_IPAC_MDCX_NACK, - RSL_MT_IPAC_DLCX_IND, - RSL_MT_IPAC_DLCX, - RSL_MT_IPAC_DLCX_ACK, - RSL_MT_IPAC_DLCX_NACK + RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), + RSL_MT_IPAC_HO_CAN_RES ('01100010'B), + RSL_MT_IPAC_CRCX ('01110000'B), + RSL_MT_IPAC_CRCX_ACK ('01110001'B), + RSL_MT_IPAC_CRCX_NACK ('01110010'B), + RSL_MT_IPAC_MDCX ('01110011'B), + RSL_MT_IPAC_MDCX_ACK ('01110100'B), + RSL_MT_IPAC_MDCX_NACK ('01110101'B), + RSL_MT_IPAC_DLCX_IND ('01110110'B), + RSL_MT_IPAC_DLCX ('01110111'B), + RSL_MT_IPAC_DLCX_ACK ('01111000'B), + RSL_MT_IPAC_DLCX_NACK ('01111001'B) } with { variant "FIELDLENGTH(8)" }; /*! RSL Information Element Identifiers (Chapter 9.3) */ -- To view, visit https://gerrit.osmocom.org/5446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:23 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() Message-ID: Review at https://gerrit.osmocom.org/5447 RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() They all are related to a dedicated channel and carry a channel number as first information element. Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637 --- M library/RSL_Types.ttcn 1 file changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/5447/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 7aef17a..46fa669 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -244,6 +244,11 @@ payload := pl } + template RSL_L16V tr_RSL_L16V(template octetstring pl) := { + len := ?, + payload := pl + } + type record RSL_IE_V { uint8_t val } @@ -680,7 +685,7 @@ /* dedicated channel or RLL */ template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { - msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,true}) + msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,true}, {RSL_MDISC_IPACCESS,false}) } @@ -694,6 +699,19 @@ t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) } } + + template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, + template RslLinkId link_id := ?, + template octetstring l3_info := ?) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), + msg_type := RSL_MT_DATA_REQ, + ies :={ + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), + tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) + } + } + /* 8.3.2 BTS -> BSC */ template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { @@ -834,6 +852,15 @@ } } + /* 8.4.10 BTS -> BSC */ + template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) + } + } + /* 8.4.11 BTS -> BSC */ template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) modifies ts_RSL_CHAN_ACT_NACK := { -- To view, visit https://gerrit.osmocom.org/5447 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:23 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() Message-ID: Review at https://gerrit.osmocom.org/5448 RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d --- M library/RSL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/5448/1 diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 46fa669..67e4dc9 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -996,7 +996,7 @@ uint32_t remote_ip, uint16_t remote_port, uint7_t rtp_pt2) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), - msg_type := RSL_MT_IPAC_CRCX_NACK, + msg_type := RSL_MT_IPAC_MDCX_ACK, ies := { t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), /* optional */ -- To view, visit https://gerrit.osmocom.org/5448 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:23 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: L3_Templates: Add ts_RRM_ModeModifyAck template Message-ID: Review at https://gerrit.osmocom.org/5449 L3_Templates: Add ts_RRM_ModeModifyAck template Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892 --- M library/L3_Templates.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/5449/1 diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4c182f8..4755989 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -109,4 +109,22 @@ } } +template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + channelModeModifyAck := { + messageType := '00010111'B, + channelDescription := desc, + channelMode := mode, + extendedTSCSet := omit + } + } + } +} + + } -- To view, visit https://gerrit.osmocom.org/5449 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 22:04:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 22:04:24 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and... Message-ID: Review at https://gerrit.osmocom.org/5450 BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and RSL Using the MSC_ConnHdlr component, we can now handle the BSSAP (MSC) and RSL (BTS) side of a single radio channel. Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 160 insertions(+), 104 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/5450/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index f910100..67f3eb2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1253,6 +1253,55 @@ /* TODO: Test OML link drop causes counter increment */ +/*********************************************************************** + * "New world" test cases using RSL_Emulation + BSSMAP_Emulation + ***********************************************************************/ + +import from BSSMAP_Emulation all; +import from RSL_Emulation all; +import from MSC_ConnectionHandler all; + +type function void_fn(charstring id) runs on MSC_ConnHdlr; + +/* helper function to create, connect and start a MSC_ConnHdlr component */ +function f_start_handler(void_fn fn, charstring id) runs on test_CT return MSC_ConnHdlr { + var MSC_ConnHdlr vc_conn; + + vc_conn := MSC_ConnHdlr.create(id); + connect(vc_conn:BSSMAPEM, vc_BSSMAP:PROC); + connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT); + connect(vc_conn:BSSAP, vc_BSSMAP:CLIENT); + vc_conn.start(derefers(fn)(id)); + return vc_conn; +} + + +private function f_ass(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_hdlr() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn.done; +} + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8fa71fb..1bc4350 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -2,6 +2,7 @@ import from General_Types all; import from Osmocom_Types all; +import from GSM_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; import from BSSMAP_Emulation all; @@ -11,33 +12,26 @@ import from MGCP_Templates all; import from SDP_Types all; +import from RSL_Emulation all; +import from RSL_Types all; + +import from MobileL3_Types all; +import from MobileL3_CommonIE_Types all; +//import from MobileL3_RRM_Types all; +import from L3_Templates all; + + /* this component represents a single subscriber connection at the MSC. * There is a 1:1 mapping between SCCP connections and BSSAP_ConnHdlr components. * We inherit all component variables, ports, functions, ... from BSSAP_ConnHdlr */ -type component MSC_ConnHdlr extends BSSAP_ConnHdlr { +type component MSC_ConnHdlr extends BSSAP_ConnHdlr, RSL_DchanHdlr { /* SCCP Connecction Identifier for the underlying SCCP connection */ var integer g_sccp_conn_id; - var MSC_State g_state := MSC_STATE_NONE; - var MgcpEndpoint g_ep_name; - var MgcpCallId g_call_id; - var MgcpConnectionId g_mgcp_conn_id; -} + /* procedure port back to our parent (BSSMAP_Emulation_CT) for control */ + port BSSMAPEM_PROC_PT BSSMAPEM; -/* Callback function from general BSSMAP_Emulation whenever a new incoming - * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) -runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { - var MSC_ConnHdlr vc_conn; - /* Create a new BSSAP_ConnHdlr component */ - vc_conn := MSC_ConnHdlr.create(g_bssmap_id & "-Conn-" & int2str(conn_ind.connectionId)); - /* connect it to the port */ - connect(vc_conn:BSSAP, self:CLIENT); - /* start it */ - vc_conn.start(MSC_ConnectionHandler.main(conn_ind.connectionId, g_next_e1_ts)); - /* increment next E1 timeslot */ - g_next_e1_ts := g_next_e1_ts + 1; - return vc_conn; + var MSC_State g_state := MSC_STATE_NONE; } /* Callback function from general BSSMAP_Emulation whenever a connectionless @@ -46,6 +40,7 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP { var template PDU_BSSAP resp := omit; + /* answer all RESET with a RESET ACK */ if (match(bssap, tr_BSSMAP_Reset)) { resp := ts_BSSMAP_ResetAck; } @@ -54,7 +49,7 @@ } const BssmapOps MSC_BssmapOps := { - create_cb := refers(CreateCallback), + create_cb := refers(BSSMAP_Emulation.ExpectedCreateCallback), unitdata_cb := refers(UnitdataCallback) } @@ -67,90 +62,102 @@ MSC_STATE_WAIT_DLCX_ACK } -/* main function processing various incoming events */ -function main(integer connection_id, integer e1_timeslot) runs on MSC_ConnHdlr { - var MgcpResponse mgcp_rsp; - timer T := 5.0; - - g_sccp_conn_id := connection_id; - g_call_id := f_mgcp_alloc_call_id(); - g_ep_name := hex2str(int2hex(e1_timeslot, 1)) & "@mgw"; - - /* we just accepted an incoming SCCP connection, start guard timer */ - T.start; - - while (true) { - var PDU_BSSAP bssap; - alt { - /* new SCCP-level connection indication from BSC */ - [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { - /* respond with ASSIGNMENT CMD */ - g_state := MSC_STATE_WAIT_ASS_COMPL; - var BSSMAP_IE_AoIP_TransportLayerAddress tla; - tla := valueof(ts_BSSMAP_IE_AoIP_TLA({ipv4:='01020304'O}, 12345)); - BSSAP.send(ts_BSSMAP_AssignmentReq(omit, tla)); - } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(*,?)) { - /* FIXME: Send MGCP CRCX */ - g_state := MSC_STATE_WAIT_CRCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - //template SDP_Message sdp := omit; - BSSAP.send(ts_CRCX(trans_id, g_ep_name, "recvonly", g_call_id)); //, sdp)); - } - /* - [] BSSAP.receive(tr_BSSMAP_AssignmentFail) { - } - */ - - /* receive CRCX ACK: transmit MDCX */ - [g_state == MSC_STATE_WAIT_CRCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - /* extract connection ID */ - g_mgcp_conn_id := f_MgcpResp_extract_conn_id(mgcp_rsp); - g_state := MSC_STATE_WAIT_MDCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_MDCX(trans_id, g_ep_name, "sendrecv", g_call_id, g_mgcp_conn_id)); - } - - /* receive MDCX ACK: wait + transmit CLEAR COMMAND */ - [g_state == MSC_STATE_WAIT_MDCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - g_state := MSC_STATE_WAIT_CLEAR_COMPL - BSSAP.send(ts_BSSMAP_ClearCommand(9)); /* Cause: call control */ - } - - /* CLEAR COMPLETE from BSS (response to CLEAR COMMAND) */ - [g_state == MSC_STATE_WAIT_CLEAR_COMPL] BSSAP.receive(tr_BSSMAP_ClearComplete) { - /* send DLCX */ - g_state := MSC_STATE_WAIT_DLCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_DLCX(trans_id, g_ep_name, g_call_id)); - } - - [g_state == MSC_STATE_WAIT_DLCX_ACK] BSSAP.receive(tr_DLCX_ACK) { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(pass); - self.stop; - } - - /* TODO: CLEAR REQUEST from BSS */ - - [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(fail); - self.stop; - } - - [] BSSAP.receive(PDU_BSSAP:?) -> value bssap { - log("Received unhandled SCCP-CO: ", bssap); - } - - /* Guard timer has expired, close connection */ - [] T.timeout { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(inconc); - self.stop; - } - - } +/* register an expect with the BSSMAP core */ +private function f_create_exp(octetstring l3_enc) runs on MSC_ConnHdlr { + BSSMAPEM.call(BSSMAPEM_register:{l3_enc, self}) { + [] BSSMAPEM.getreply(BSSMAPEM_register:{?, ?}) {}; } } +type record TestHdlrParams { + OCT1 ra, + GsmFrameNumber fn, + hexstring imsi, + RslLinkId link_id +}; + +template (value) TestHdlrParams t_def_TestHdlrPars := { + ra := '23'O, + fn := 23, + imsi := '001019876543210'H, + link_id := valueof(ts_RslLinkID_DCCH(0)) +} + +function f_create_chan_and_exp(TestHdlrParams pars) runs on MSC_ConnHdlr { + var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(pars.imsi)); + var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); + var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info); + + /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */ + RSL_Emulation.f_chan_est(pars.ra, l3_enc, pars.link_id, pars.fn); + f_create_exp(l3_enc); +} + +function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { + var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; + var RslLinkId link_id := orig.ies[1].body.link_id; + RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); +} + +/* establish a channel fully, expecting an assignment matching 'exp' */ +function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) +runs on MSC_ConnHdlr return PDU_BSSAP { + var PDU_BSSAP bssap; + var RSL_Message rsl; + timer T := 10.0; + var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + + f_create_chan_and_exp(pars); + /* we should now have a COMPL_L3 at the MSC */ + + BSSAP.receive(tr_BSSMAP_ComplL3); + BSSAP.send(ass_cmd); + alt { + /* if we receive exactly what we expected, always return + pass */ + [] BSSAP.receive(exp_ass_cpl) -> value bssap { + setverdict(pass); + return bssap; + } + [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.channelModeModify)) { + f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, + l3.msgs.rrm.channelModeModify.channelMode), rsl); + } + repeat; + } + [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received non-matching ASSIGNMENT COMPLETE"); + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received unexpected ASSIGNMENT FAIL"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received unexpected ASSIGNMENT COMPLETE"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received non-matching ASSIGNMENT FAIL"); + } + [] T.timeout { + setverdict(inconc, "Timeout waiting for ASSIGNMENT COMPLETE"); + } + } + + self.stop; +} + + } -- To view, visit https://gerrit.osmocom.org/5450 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 23:46:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 23:46:09 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_Conn... Message-ID: Review at https://gerrit.osmocom.org/5451 BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_ConnHdlr This way we benefit from the ability to handle the RR MODE MODIFY, RSL MODE MODIFY, IPA CRCX and IPA MDCX capabilities of the MSC_ConnHdlr component. While each test case now needs a separate function in addition to the actual testcase, this allows for more flexibility and a more complete emulation of BTS behaviour. Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 --- M bsc/BSC_Tests.ttcn 1 file changed, 108 insertions(+), 76 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/5451/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 67f3eb2..ce61984 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -491,79 +491,6 @@ f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); } -testcase TC_assignment_fr_a5_0() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); -} - -testcase TC_assignment_fr_a5_1() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); -} - -/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */ -testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE"); -} - - - -testcase TC_assignment_fr_a5_3() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); -} - -testcase TC_assignment_fr_a5_4() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - const OCT16 kc128 := kc & kc; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); - /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ - f_assignment_exp(ass_cmd, exp_fail, "BSC accepted TCH/F FR A5/4 assignment"); -} - - - - type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -1275,8 +1202,33 @@ return vc_conn; } +private function f_tc_assignment_fr_a5_0(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; -private function f_ass(charstring id) runs on MSC_ConnHdlr { + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_0() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_0), testcasename()); + vc_conn.done; +} + + + +private function f_tc_assignment_fr_a5_1(charstring id) runs on MSC_ConnHdlr { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); @@ -1292,16 +1244,96 @@ f_establish_fully(pars, ass_cmd, exp_compl); } -testcase TC_hdlr() runs on test_CT { +testcase TC_assignment_fr_a5_1() runs on test_CT { var MSC_ConnHdlr vc_conn; f_init(true); f_sleep(1.0); - vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1), testcasename()); vc_conn.done; } +/* Expect ASSIGNMENT FAIL if mandatory IE is missing */ +private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1_codec_missing), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_3(charstring id ) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_3() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_3), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + const OCT16 kc128 := kc & kc; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); + ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); + /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_4() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4), testcasename()); + vc_conn.done; +} + + + + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); -- To view, visit https://gerrit.osmocom.org/5451 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 23:46:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 23:46:10 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Tighten permitted messages Message-ID: Review at https://gerrit.osmocom.org/5452 MSC_ConnHdlr: Tighten permitted messages Accept CRCX only once; Accept MDCX only after CRCX; Accept RSL MODIFY only after RR MODIFY. Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/5452/1 diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 1bc4350..d615497 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -106,6 +106,8 @@ var RSL_Message rsl; timer T := 10.0; var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + var boolean crcx_seen := false; + var boolean rr_modify_seen := false; f_create_chan_and_exp(pars); /* we should now have a COMPL_L3 at the MSC */ @@ -118,24 +120,26 @@ setverdict(pass); return bssap; } - [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + [rr_modify_seen == false] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); log("Rx L3 from net: ", l3); if (ischosen(l3.msgs.rrm.channelModeModify)) { f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, l3.msgs.rrm.channelModeModify.channelMode), rsl); + rr_modify_seen := true; } repeat; } - [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + [rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); repeat; } - [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + [crcx_seen == false] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + crcx_seen := true; repeat; } - [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + [crcx_seen] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); repeat; } -- To view, visit https://gerrit.osmocom.org/5452 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 16 23:46:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 16 Dec 2017 23:46:10 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Implement ecnryption related procedures Message-ID: Review at https://gerrit.osmocom.org/5453 BSC_Tests: Implement ecnryption related procedures Let's verify the operation of the CIPHERING MODE COMMAND as issued by MSC, performed by BSC and implemented by simulated BTS/MS. Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Templates.ttcn M library/L3_Templates.ttcn M library/RSL_Types.ttcn 5 files changed, 138 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/5453/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index ce61984..2d65e57 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1211,9 +1211,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('01'O, kc); } testcase TC_assignment_fr_a5_0() runs on test_CT { @@ -1238,10 +1238,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('02'O, kc); } testcase TC_assignment_fr_a5_1() runs on test_CT { @@ -1263,8 +1262,6 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_fail); } @@ -1288,9 +1285,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('08'O, kc); } testcase TC_assignment_fr_a5_3() runs on test_CT { @@ -1314,11 +1311,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ f_establish_fully(pars, ass_cmd, exp_fail); + f_cipher_mode('10'O, kc, kc128); } testcase TC_assignment_fr_a5_4() runs on test_CT { diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index d615497..a76d1d6 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -99,6 +99,35 @@ RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } +function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr { + var PDU_BSSAP bssap; + var RSL_Message rsl; + + if (isvalue(kc128)) { + BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(alg, key, valueof(kc128))); + } else { + BSSAP.send(ts_BSSMAP_CipherModeCmd(alg, key)); + } + alt { + /* RSL/UE Side */ + [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg, key)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.cipheringModeCommand)) { + f_rsl_reply(ts_RRM_CiphModeCompl, rsl); + } + repeat; + } + [] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap { + // bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier + setverdict(pass); + } + [] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap { + setverdict(fail, "Ciphering Mode Reject"); + } + } +} + /* establish a channel fully, expecting an assignment matching 'exp' */ function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) runs on MSC_ConnHdlr return PDU_BSSAP { diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 24a888c..bb1b537 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -703,5 +703,62 @@ } } +template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := omit + } + } + } +} + +template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := { '83'O, kc128 } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeComplete := { + messageType := '55'O, + layer3MessageContents := *, + chosenEncryptionAlgorithm := { + elementIdentifier := '2C'O, + algorithmIdentifier := alg + } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeReject := { + messageType := '59'O, + cause := ? + } + } + } +} + + } with { encode "RAW" }; diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4755989..f0f3d38 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -126,5 +126,20 @@ } } +template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + cipheringModeComplete := { + messageType := '00110010'B, + mobileEquipmentIdentity := omit + } + } + } +} + } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 67e4dc9..0604440 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -330,6 +330,19 @@ uint5_t power_level } + /* 9.3.7 */ + type record RSL_IE_EncryptionInfo { + uint8_t len, + OCT1 alg_id, + octetstring key + } with { variant (len) "LENGTHTO(alg_id,key)" }; + + template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template OCT1 alg, template octetstring key) := { + len := ?, + alg_id := alg, + key := key + } + /* 9.3.8 */ type record RSL_IE_FrameNumber { uint5_t t1_p, @@ -550,6 +563,7 @@ uint8_t paging_group, RSL_IE_ChanNeeded chan_needed, RSL_IE_StartingTime starting_time, + RSL_IE_EncryptionInfo encr_info, RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, @@ -595,6 +609,7 @@ paging_group, iei = RSL_IE_PAGING_GROUP; chan_needed, iei = RSL_IE_CHAN_NEEDED; starting_time, iei = RSL_IE_STARTNG_TIME; + encr_info, iei = RSL_IE_ENCR_INFO; req_ref, iei = RSL_IE_REQ_REFERENCE; full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; @@ -852,6 +867,22 @@ } } + /* 8.4.6 BSC ->BTS */ + template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, + template RslLinkId link_id := ?, + template OCT1 alg := ?, + template octetstring key := ?, + template octetstring l3_info := ?) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_ENCR_CMD, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), + tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), + tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) + } + } + /* 8.4.10 BTS -> BSC */ template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), -- To view, visit https://gerrit.osmocom.org/5453 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 08:43:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 08:43:52 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5450 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 08:44:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 08:44:03 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_Conn... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5451 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 08:44:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 08:44:06 +0000 Subject: osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Tighten permitted messages In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5452 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 08:44:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 08:44:09 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Implement ecnryption related procedures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5453 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:06:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:06:42 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: use BSSAP_CodecPort In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5444 to look at the new patch set (#2). BSSMAP_Emulation: use BSSAP_CodecPort So far, BSSMAP_Emulation used the SCCPasp_SP_PORT directly, explicitly calling BSSAP encode/decode functions while processing the primitives. Let's clean this up and use the BSSAP_CodecPort which has meanwhile been developed as a dual-faced port that can be stacked between SCCPasp and the user to avoid any manual encode/decode function calls. Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 --- M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc-nat/MSC_Simulation.ttcn M bsc-nat/gen_links.sh M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Emulation.ttcn 7 files changed, 35 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/5444/2 diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index a385525..876d2ec 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -28,7 +29,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { log("Incoming SCCP Connection on BSC ?!?"); self.stop; diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index eab7fe9..b9414a3 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -8,6 +8,7 @@ import from SCCPasp_Types all; import from SCCP_Emulation all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSC_MS_ConnectionHandler all; @@ -53,7 +54,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSMAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ connect(vc_BSSMAP:MGCP, vc_IPA:IPA_MGCP_PORT); diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 3fc11e9..b038ce5 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -26,7 +27,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { var MSC_ConnHdlr vc_conn; /* Create a new BSSAP_ConnHdlr component */ diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn index f9fb0d4..7e39ca1 100755 --- a/bsc-nat/MSC_Simulation.ttcn +++ b/bsc-nat/MSC_Simulation.ttcn @@ -51,7 +51,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); if (mp_mgcp_uses_udp == false) { /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 9846d9a..9a45c89 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -55,5 +55,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8fa71fb..f47417f 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -26,7 +27,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { var MSC_ConnHdlr vc_conn; /* Create a new BSSAP_ConnHdlr component */ diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 42f7739..14bf238 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -3,6 +3,7 @@ import from SCCP_Emulation all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Templates all; import from MGCP_Types all; import from MGCP_Templates all; @@ -48,7 +49,7 @@ type component BSSMAP_Emulation_CT { /* SCCP port on the bottom side, using ASP primitives */ - port SCCPasp_PT SCCP; + port BSSAP_CODEC_PT BSSAP; /* BSSAP port to the per-connection clients */ port BSSAP_Conn_PT CLIENT; /* MGCP port */ @@ -228,10 +229,9 @@ } /* handle (optional) userData portion of various primitives and dispatch it to the client */ -private function f_handle_userData(BSSAP_ConnHdlr client, octetstring userdata) +private function f_handle_userData(BSSAP_ConnHdlr client, PDU_BSSAP bssap) runs on BSSMAP_Emulation_CT { /* decode + send decoded BSSAP to client */ - var PDU_BSSAP bssap := dec_PDU_BSSAP(valueof(userdata)); /* BSC Side: If this is an assignment command, store CIC */ if (ischosen(bssap.pdu.bssmap.assignmentRequest) and @@ -247,7 +247,7 @@ /* call-back type, to be provided by specific implementation; called when new SCCP connection * arrives */ -type function BssmapCreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +type function BssmapCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr; type function BssmapUnitdataCallback(PDU_BSSAP bssap) @@ -264,11 +264,11 @@ f_conn_table_init(); while (true) { - var ASP_SCCP_N_UNITDATA_ind ud_ind; - var ASP_SCCP_N_CONNECT_ind conn_ind; - var ASP_SCCP_N_CONNECT_cfm conn_cfm; - var ASP_SCCP_N_DATA_ind data_ind; - var ASP_SCCP_N_DISCONNECT_ind disc_ind; + var BSSAP_N_UNITDATA_ind ud_ind; + var BSSAP_N_CONNECT_ind conn_ind; + var BSSAP_N_CONNECT_cfm conn_cfm; + var BSSAP_N_DATA_ind data_ind; + var BSSAP_N_DISCONNECT_ind disc_ind; var BSSAP_Conn_Req creq; var BSSAP_ConnHdlr vc_conn; var PDU_BSSAP bssap; @@ -277,32 +277,29 @@ alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ - [] SCCP.receive(ASP_SCCP_N_UNITDATA_ind:?) -> value ud_ind { + [] BSSAP.receive(BSSAP_N_UNITDATA_ind:?) -> value ud_ind { /* Connectionless Procedures like RESET */ var template PDU_BSSAP resp; - bssap := dec_PDU_BSSAP(ud_ind.userData); - resp := ops.unitdata_cb.apply(bssap); + resp := ops.unitdata_cb.apply(ud_ind.userData); if (isvalue(resp)) { - var octetstring resp_ud := enc_PDU_BSSAP(valueof(resp)); - SCCP.send(t_ASP_N_UNITDATA_req(ud_ind.callingAddress, - ud_ind.calledAddress, omit, - omit, resp_ud, omit)); + BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, + ud_ind.calledAddress, resp)); } } /* SCCP -> Client: new connection from BSC */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_ind:?) -> value conn_ind { + [] BSSAP.receive(BSSAP_N_CONNECT_ind:?) -> value conn_ind { vc_conn := ops.create_cb.apply(conn_ind, id); /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_ind.connectionId); /* handle user payload */ f_handle_userData(vc_conn, conn_ind.userData); /* confirm connection establishment */ - SCCP.send(t_ASP_N_CONNECT_res(omit, omit, omit, omit, conn_ind.connectionId, omit)); + BSSAP.send(ts_BSSAP_CONNECT_res(conn_ind.connectionId, omit)); } /* SCCP -> Client: connection-oriented data in existing connection */ - [] SCCP.receive(ASP_SCCP_N_DATA_ind:?) -> value data_ind { + [] BSSAP.receive(BSSAP_N_DATA_ind:?) -> value data_ind { vc_conn := f_comp_by_conn_id(data_ind.connectionId); if (ispresent(data_ind.userData)) { f_handle_userData(vc_conn, data_ind.userData); @@ -310,7 +307,7 @@ } /* SCCP -> Client: disconnect of an existing connection */ - [] SCCP.receive(ASP_SCCP_N_DISCONNECT_ind:?) -> value disc_ind { + [] BSSAP.receive(BSSAP_N_DISCONNECT_ind:?) -> value disc_ind { vc_conn := f_comp_by_conn_id(disc_ind.connectionId); if (ispresent(disc_ind.userData)) { f_handle_userData(vc_conn, disc_ind.userData); @@ -323,7 +320,7 @@ } /* SCCP -> Client: connection confirm for outbound connection */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_cfm:?) -> value conn_cfm { + [] BSSAP.receive(BSSAP_N_CONNECT_cfm:?) -> value conn_cfm { /* handle user payload */ if (ispresent(conn_cfm.userData)) { f_handle_userData(vc_conn, conn_cfm.userData); @@ -333,15 +330,14 @@ /* Disconnect request client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ) -> sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DISCONNECT_req(omit, 0, omit, conn_id, omit)); + BSSAP.send(ts_BSSAP_DISC_req(conn_id, 0)); f_conn_table_del(conn_id); } /* BSSAP from client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Req:?) -> value creq sender vc_conn { var integer conn_id; - /* encode + send to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(creq.bssap); + /* send to dispatcher */ if (f_comp_known(vc_conn) == false) { /* unknown client, create new connection */ @@ -350,21 +346,20 @@ /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_id); - SCCP.send(t_ASP_N_CONNECT_req(creq.addr_peer, creq.addr_own, omit, omit, - userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_CONNECT_req(creq.addr_peer, creq.addr_own, conn_id, + creq.bssap)); } else { /* known client, send via existing connection */ conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_DATA_req(conn_id, creq.bssap)); } } [] CLIENT.receive(PDU_BSSAP:?) -> value bssap sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - /* encode + send it to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(bssap); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + /* send it to dispatcher */ + BSSAP.send(ts_BSSAP_DATA_req(conn_id, bssap)); } /* Handling of MGCP in IPA SCCPLite case. This predates 3GPP AoIP -- To view, visit https://gerrit.osmocom.org/5444 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:06:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:06:42 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5450 to look at the new patch set (#2). BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and RSL Using the MSC_ConnHdlr component, we can now handle the BSSAP (MSC) and RSL (BTS) side of a single radio channel. Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 160 insertions(+), 105 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/5450/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index f910100..67f3eb2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1253,6 +1253,55 @@ /* TODO: Test OML link drop causes counter increment */ +/*********************************************************************** + * "New world" test cases using RSL_Emulation + BSSMAP_Emulation + ***********************************************************************/ + +import from BSSMAP_Emulation all; +import from RSL_Emulation all; +import from MSC_ConnectionHandler all; + +type function void_fn(charstring id) runs on MSC_ConnHdlr; + +/* helper function to create, connect and start a MSC_ConnHdlr component */ +function f_start_handler(void_fn fn, charstring id) runs on test_CT return MSC_ConnHdlr { + var MSC_ConnHdlr vc_conn; + + vc_conn := MSC_ConnHdlr.create(id); + connect(vc_conn:BSSMAPEM, vc_BSSMAP:PROC); + connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT); + connect(vc_conn:BSSAP, vc_BSSMAP:CLIENT); + vc_conn.start(derefers(fn)(id)); + return vc_conn; +} + + +private function f_ass(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_hdlr() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn.done; +} + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index f47417f..1bc4350 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -2,9 +2,9 @@ import from General_Types all; import from Osmocom_Types all; +import from GSM_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; -import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -12,33 +12,26 @@ import from MGCP_Templates all; import from SDP_Types all; +import from RSL_Emulation all; +import from RSL_Types all; + +import from MobileL3_Types all; +import from MobileL3_CommonIE_Types all; +//import from MobileL3_RRM_Types all; +import from L3_Templates all; + + /* this component represents a single subscriber connection at the MSC. * There is a 1:1 mapping between SCCP connections and BSSAP_ConnHdlr components. * We inherit all component variables, ports, functions, ... from BSSAP_ConnHdlr */ -type component MSC_ConnHdlr extends BSSAP_ConnHdlr { +type component MSC_ConnHdlr extends BSSAP_ConnHdlr, RSL_DchanHdlr { /* SCCP Connecction Identifier for the underlying SCCP connection */ var integer g_sccp_conn_id; - var MSC_State g_state := MSC_STATE_NONE; - var MgcpEndpoint g_ep_name; - var MgcpCallId g_call_id; - var MgcpConnectionId g_mgcp_conn_id; -} + /* procedure port back to our parent (BSSMAP_Emulation_CT) for control */ + port BSSMAPEM_PROC_PT BSSMAPEM; -/* Callback function from general BSSMAP_Emulation whenever a new incoming - * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) -runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { - var MSC_ConnHdlr vc_conn; - /* Create a new BSSAP_ConnHdlr component */ - vc_conn := MSC_ConnHdlr.create(g_bssmap_id & "-Conn-" & int2str(conn_ind.connectionId)); - /* connect it to the port */ - connect(vc_conn:BSSAP, self:CLIENT); - /* start it */ - vc_conn.start(MSC_ConnectionHandler.main(conn_ind.connectionId, g_next_e1_ts)); - /* increment next E1 timeslot */ - g_next_e1_ts := g_next_e1_ts + 1; - return vc_conn; + var MSC_State g_state := MSC_STATE_NONE; } /* Callback function from general BSSMAP_Emulation whenever a connectionless @@ -47,6 +40,7 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP { var template PDU_BSSAP resp := omit; + /* answer all RESET with a RESET ACK */ if (match(bssap, tr_BSSMAP_Reset)) { resp := ts_BSSMAP_ResetAck; } @@ -55,7 +49,7 @@ } const BssmapOps MSC_BssmapOps := { - create_cb := refers(CreateCallback), + create_cb := refers(BSSMAP_Emulation.ExpectedCreateCallback), unitdata_cb := refers(UnitdataCallback) } @@ -68,90 +62,102 @@ MSC_STATE_WAIT_DLCX_ACK } -/* main function processing various incoming events */ -function main(integer connection_id, integer e1_timeslot) runs on MSC_ConnHdlr { - var MgcpResponse mgcp_rsp; - timer T := 5.0; - - g_sccp_conn_id := connection_id; - g_call_id := f_mgcp_alloc_call_id(); - g_ep_name := hex2str(int2hex(e1_timeslot, 1)) & "@mgw"; - - /* we just accepted an incoming SCCP connection, start guard timer */ - T.start; - - while (true) { - var PDU_BSSAP bssap; - alt { - /* new SCCP-level connection indication from BSC */ - [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { - /* respond with ASSIGNMENT CMD */ - g_state := MSC_STATE_WAIT_ASS_COMPL; - var BSSMAP_IE_AoIP_TransportLayerAddress tla; - tla := valueof(ts_BSSMAP_IE_AoIP_TLA({ipv4:='01020304'O}, 12345)); - BSSAP.send(ts_BSSMAP_AssignmentReq(omit, tla)); - } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(*,?)) { - /* FIXME: Send MGCP CRCX */ - g_state := MSC_STATE_WAIT_CRCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - //template SDP_Message sdp := omit; - BSSAP.send(ts_CRCX(trans_id, g_ep_name, "recvonly", g_call_id)); //, sdp)); - } - /* - [] BSSAP.receive(tr_BSSMAP_AssignmentFail) { - } - */ - - /* receive CRCX ACK: transmit MDCX */ - [g_state == MSC_STATE_WAIT_CRCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - /* extract connection ID */ - g_mgcp_conn_id := f_MgcpResp_extract_conn_id(mgcp_rsp); - g_state := MSC_STATE_WAIT_MDCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_MDCX(trans_id, g_ep_name, "sendrecv", g_call_id, g_mgcp_conn_id)); - } - - /* receive MDCX ACK: wait + transmit CLEAR COMMAND */ - [g_state == MSC_STATE_WAIT_MDCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - g_state := MSC_STATE_WAIT_CLEAR_COMPL - BSSAP.send(ts_BSSMAP_ClearCommand(9)); /* Cause: call control */ - } - - /* CLEAR COMPLETE from BSS (response to CLEAR COMMAND) */ - [g_state == MSC_STATE_WAIT_CLEAR_COMPL] BSSAP.receive(tr_BSSMAP_ClearComplete) { - /* send DLCX */ - g_state := MSC_STATE_WAIT_DLCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_DLCX(trans_id, g_ep_name, g_call_id)); - } - - [g_state == MSC_STATE_WAIT_DLCX_ACK] BSSAP.receive(tr_DLCX_ACK) { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(pass); - self.stop; - } - - /* TODO: CLEAR REQUEST from BSS */ - - [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(fail); - self.stop; - } - - [] BSSAP.receive(PDU_BSSAP:?) -> value bssap { - log("Received unhandled SCCP-CO: ", bssap); - } - - /* Guard timer has expired, close connection */ - [] T.timeout { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(inconc); - self.stop; - } - - } +/* register an expect with the BSSMAP core */ +private function f_create_exp(octetstring l3_enc) runs on MSC_ConnHdlr { + BSSMAPEM.call(BSSMAPEM_register:{l3_enc, self}) { + [] BSSMAPEM.getreply(BSSMAPEM_register:{?, ?}) {}; } } +type record TestHdlrParams { + OCT1 ra, + GsmFrameNumber fn, + hexstring imsi, + RslLinkId link_id +}; + +template (value) TestHdlrParams t_def_TestHdlrPars := { + ra := '23'O, + fn := 23, + imsi := '001019876543210'H, + link_id := valueof(ts_RslLinkID_DCCH(0)) +} + +function f_create_chan_and_exp(TestHdlrParams pars) runs on MSC_ConnHdlr { + var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(pars.imsi)); + var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); + var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info); + + /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */ + RSL_Emulation.f_chan_est(pars.ra, l3_enc, pars.link_id, pars.fn); + f_create_exp(l3_enc); +} + +function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { + var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; + var RslLinkId link_id := orig.ies[1].body.link_id; + RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); +} + +/* establish a channel fully, expecting an assignment matching 'exp' */ +function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) +runs on MSC_ConnHdlr return PDU_BSSAP { + var PDU_BSSAP bssap; + var RSL_Message rsl; + timer T := 10.0; + var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + + f_create_chan_and_exp(pars); + /* we should now have a COMPL_L3 at the MSC */ + + BSSAP.receive(tr_BSSMAP_ComplL3); + BSSAP.send(ass_cmd); + alt { + /* if we receive exactly what we expected, always return + pass */ + [] BSSAP.receive(exp_ass_cpl) -> value bssap { + setverdict(pass); + return bssap; + } + [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.channelModeModify)) { + f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, + l3.msgs.rrm.channelModeModify.channelMode), rsl); + } + repeat; + } + [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received non-matching ASSIGNMENT COMPLETE"); + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received unexpected ASSIGNMENT FAIL"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received unexpected ASSIGNMENT COMPLETE"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received non-matching ASSIGNMENT FAIL"); + } + [] T.timeout { + setverdict(inconc, "Timeout waiting for ASSIGNMENT COMPLETE"); + } + } + + self.stop; +} + + } -- To view, visit https://gerrit.osmocom.org/5450 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:06:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:06:42 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_Conn... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5451 to look at the new patch set (#2). BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_ConnHdlr This way we benefit from the ability to handle the RR MODE MODIFY, RSL MODE MODIFY, IPA CRCX and IPA MDCX capabilities of the MSC_ConnHdlr component. While each test case now needs a separate function in addition to the actual testcase, this allows for more flexibility and a more complete emulation of BTS behaviour. Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 --- M bsc/BSC_Tests.ttcn 1 file changed, 108 insertions(+), 76 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/5451/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 67f3eb2..ce61984 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -491,79 +491,6 @@ f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); } -testcase TC_assignment_fr_a5_0() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); -} - -testcase TC_assignment_fr_a5_1() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); -} - -/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */ -testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE"); -} - - - -testcase TC_assignment_fr_a5_3() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); -} - -testcase TC_assignment_fr_a5_4() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - const OCT16 kc128 := kc & kc; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); - /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ - f_assignment_exp(ass_cmd, exp_fail, "BSC accepted TCH/F FR A5/4 assignment"); -} - - - - type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -1275,8 +1202,33 @@ return vc_conn; } +private function f_tc_assignment_fr_a5_0(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; -private function f_ass(charstring id) runs on MSC_ConnHdlr { + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_0() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_0), testcasename()); + vc_conn.done; +} + + + +private function f_tc_assignment_fr_a5_1(charstring id) runs on MSC_ConnHdlr { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); @@ -1292,16 +1244,96 @@ f_establish_fully(pars, ass_cmd, exp_compl); } -testcase TC_hdlr() runs on test_CT { +testcase TC_assignment_fr_a5_1() runs on test_CT { var MSC_ConnHdlr vc_conn; f_init(true); f_sleep(1.0); - vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1), testcasename()); vc_conn.done; } +/* Expect ASSIGNMENT FAIL if mandatory IE is missing */ +private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1_codec_missing), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_3(charstring id ) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_3() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_3), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + const OCT16 kc128 := kc & kc; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); + ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); + /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_4() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4), testcasename()); + vc_conn.done; +} + + + + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); -- To view, visit https://gerrit.osmocom.org/5451 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:06:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:06:42 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Tighten permitted messages In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5452 to look at the new patch set (#2). MSC_ConnHdlr: Tighten permitted messages Accept CRCX only once; Accept MDCX only after CRCX; Accept RSL MODIFY only after RR MODIFY. Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/5452/2 diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 1bc4350..d615497 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -106,6 +106,8 @@ var RSL_Message rsl; timer T := 10.0; var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + var boolean crcx_seen := false; + var boolean rr_modify_seen := false; f_create_chan_and_exp(pars); /* we should now have a COMPL_L3 at the MSC */ @@ -118,24 +120,26 @@ setverdict(pass); return bssap; } - [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + [rr_modify_seen == false] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); log("Rx L3 from net: ", l3); if (ischosen(l3.msgs.rrm.channelModeModify)) { f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, l3.msgs.rrm.channelModeModify.channelMode), rsl); + rr_modify_seen := true; } repeat; } - [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + [rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); repeat; } - [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + [crcx_seen == false] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + crcx_seen := true; repeat; } - [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + [crcx_seen] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); repeat; } -- To view, visit https://gerrit.osmocom.org/5452 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:06:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:06:42 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Implement ecnryption related procedures In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5453 to look at the new patch set (#2). BSC_Tests: Implement ecnryption related procedures Let's verify the operation of the CIPHERING MODE COMMAND as issued by MSC, performed by BSC and implemented by simulated BTS/MS. Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Templates.ttcn M library/L3_Templates.ttcn M library/RSL_Types.ttcn 5 files changed, 138 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/5453/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index ce61984..2d65e57 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1211,9 +1211,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('01'O, kc); } testcase TC_assignment_fr_a5_0() runs on test_CT { @@ -1238,10 +1238,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('02'O, kc); } testcase TC_assignment_fr_a5_1() runs on test_CT { @@ -1263,8 +1262,6 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_fail); } @@ -1288,9 +1285,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('08'O, kc); } testcase TC_assignment_fr_a5_3() runs on test_CT { @@ -1314,11 +1311,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ f_establish_fully(pars, ass_cmd, exp_fail); + f_cipher_mode('10'O, kc, kc128); } testcase TC_assignment_fr_a5_4() runs on test_CT { diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index d615497..a76d1d6 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -99,6 +99,35 @@ RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } +function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr { + var PDU_BSSAP bssap; + var RSL_Message rsl; + + if (isvalue(kc128)) { + BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(alg, key, valueof(kc128))); + } else { + BSSAP.send(ts_BSSMAP_CipherModeCmd(alg, key)); + } + alt { + /* RSL/UE Side */ + [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg, key)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.cipheringModeCommand)) { + f_rsl_reply(ts_RRM_CiphModeCompl, rsl); + } + repeat; + } + [] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap { + // bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier + setverdict(pass); + } + [] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap { + setverdict(fail, "Ciphering Mode Reject"); + } + } +} + /* establish a channel fully, expecting an assignment matching 'exp' */ function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) runs on MSC_ConnHdlr return PDU_BSSAP { diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 24a888c..bb1b537 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -703,5 +703,62 @@ } } +template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := omit + } + } + } +} + +template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := { '83'O, kc128 } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeComplete := { + messageType := '55'O, + layer3MessageContents := *, + chosenEncryptionAlgorithm := { + elementIdentifier := '2C'O, + algorithmIdentifier := alg + } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeReject := { + messageType := '59'O, + cause := ? + } + } + } +} + + } with { encode "RAW" }; diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4755989..f0f3d38 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -126,5 +126,20 @@ } } +template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + cipheringModeComplete := { + messageType := '00110010'B, + mobileEquipmentIdentity := omit + } + } + } +} + } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 67e4dc9..0604440 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -330,6 +330,19 @@ uint5_t power_level } + /* 9.3.7 */ + type record RSL_IE_EncryptionInfo { + uint8_t len, + OCT1 alg_id, + octetstring key + } with { variant (len) "LENGTHTO(alg_id,key)" }; + + template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template OCT1 alg, template octetstring key) := { + len := ?, + alg_id := alg, + key := key + } + /* 9.3.8 */ type record RSL_IE_FrameNumber { uint5_t t1_p, @@ -550,6 +563,7 @@ uint8_t paging_group, RSL_IE_ChanNeeded chan_needed, RSL_IE_StartingTime starting_time, + RSL_IE_EncryptionInfo encr_info, RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, @@ -595,6 +609,7 @@ paging_group, iei = RSL_IE_PAGING_GROUP; chan_needed, iei = RSL_IE_CHAN_NEEDED; starting_time, iei = RSL_IE_STARTNG_TIME; + encr_info, iei = RSL_IE_ENCR_INFO; req_ref, iei = RSL_IE_REQ_REFERENCE; full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; @@ -852,6 +867,22 @@ } } + /* 8.4.6 BSC ->BTS */ + template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, + template RslLinkId link_id := ?, + template OCT1 alg := ?, + template octetstring key := ?, + template octetstring l3_info := ?) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_ENCR_CMD, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), + tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), + tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) + } + } + /* 8.4.10 BTS -> BSC */ template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), -- To view, visit https://gerrit.osmocom.org/5453 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 10:56:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 10:56:32 +0000 Subject: osmo-ttcn3-hacks[master]: BSSMAP_Emulation: use BSSAP_CodecPort In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5444 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 11:21:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 11:21:46 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: use BSSAP_CodecPort In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSSMAP_Emulation: use BSSAP_CodecPort ...................................................................... BSSMAP_Emulation: use BSSAP_CodecPort So far, BSSMAP_Emulation used the SCCPasp_SP_PORT directly, explicitly calling BSSAP encode/decode functions while processing the primitives. Let's clean this up and use the BSSAP_CodecPort which has meanwhile been developed as a dual-faced port that can be stacked between SCCPasp and the user to avoid any manual encode/decode function calls. Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 --- M bsc-nat/BSC_MS_ConnectionHandler.ttcn M bsc-nat/BSC_MS_Simulation.ttcn M bsc-nat/MSC_ConnectionHandler.ttcn M bsc-nat/MSC_Simulation.ttcn M bsc-nat/gen_links.sh M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Emulation.ttcn 7 files changed, 35 insertions(+), 36 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn b/bsc-nat/BSC_MS_ConnectionHandler.ttcn index a385525..876d2ec 100644 --- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn +++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -28,7 +29,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { log("Incoming SCCP Connection on BSC ?!?"); self.stop; diff --git a/bsc-nat/BSC_MS_Simulation.ttcn b/bsc-nat/BSC_MS_Simulation.ttcn index eab7fe9..b9414a3 100644 --- a/bsc-nat/BSC_MS_Simulation.ttcn +++ b/bsc-nat/BSC_MS_Simulation.ttcn @@ -8,6 +8,7 @@ import from SCCPasp_Types all; import from SCCP_Emulation all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSC_MS_ConnectionHandler all; @@ -53,7 +54,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSMAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ connect(vc_BSSMAP:MGCP, vc_IPA:IPA_MGCP_PORT); diff --git a/bsc-nat/MSC_ConnectionHandler.ttcn b/bsc-nat/MSC_ConnectionHandler.ttcn index 3fc11e9..b038ce5 100644 --- a/bsc-nat/MSC_ConnectionHandler.ttcn +++ b/bsc-nat/MSC_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -26,7 +27,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { var MSC_ConnHdlr vc_conn; /* Create a new BSSAP_ConnHdlr component */ diff --git a/bsc-nat/MSC_Simulation.ttcn b/bsc-nat/MSC_Simulation.ttcn index f9fb0d4..7e39ca1 100755 --- a/bsc-nat/MSC_Simulation.ttcn +++ b/bsc-nat/MSC_Simulation.ttcn @@ -51,7 +51,7 @@ connect(vc_IPA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(vc_BSSMAP:SCCP, vc_SCCP:SCCP_SP_PORT); + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); if (mp_mgcp_uses_udp == false) { /* connect BSSMAP dispatcher to IPA_Emulation MGCP */ diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 9846d9a..9a45c89 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -55,5 +55,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8fa71fb..f47417f 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -26,7 +27,7 @@ /* Callback function from general BSSMAP_Emulation whenever a new incoming * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { var MSC_ConnHdlr vc_conn; /* Create a new BSSAP_ConnHdlr component */ diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 42f7739..14bf238 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -3,6 +3,7 @@ import from SCCP_Emulation all; import from SCCPasp_Types all; import from BSSAP_Types all; +import from BSSAP_CodecPort all; import from BSSMAP_Templates all; import from MGCP_Types all; import from MGCP_Templates all; @@ -48,7 +49,7 @@ type component BSSMAP_Emulation_CT { /* SCCP port on the bottom side, using ASP primitives */ - port SCCPasp_PT SCCP; + port BSSAP_CODEC_PT BSSAP; /* BSSAP port to the per-connection clients */ port BSSAP_Conn_PT CLIENT; /* MGCP port */ @@ -228,10 +229,9 @@ } /* handle (optional) userData portion of various primitives and dispatch it to the client */ -private function f_handle_userData(BSSAP_ConnHdlr client, octetstring userdata) +private function f_handle_userData(BSSAP_ConnHdlr client, PDU_BSSAP bssap) runs on BSSMAP_Emulation_CT { /* decode + send decoded BSSAP to client */ - var PDU_BSSAP bssap := dec_PDU_BSSAP(valueof(userdata)); /* BSC Side: If this is an assignment command, store CIC */ if (ischosen(bssap.pdu.bssmap.assignmentRequest) and @@ -247,7 +247,7 @@ /* call-back type, to be provided by specific implementation; called when new SCCP connection * arrives */ -type function BssmapCreateCallback(ASP_SCCP_N_CONNECT_ind conn_ind, charstring id) +type function BssmapCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr; type function BssmapUnitdataCallback(PDU_BSSAP bssap) @@ -264,11 +264,11 @@ f_conn_table_init(); while (true) { - var ASP_SCCP_N_UNITDATA_ind ud_ind; - var ASP_SCCP_N_CONNECT_ind conn_ind; - var ASP_SCCP_N_CONNECT_cfm conn_cfm; - var ASP_SCCP_N_DATA_ind data_ind; - var ASP_SCCP_N_DISCONNECT_ind disc_ind; + var BSSAP_N_UNITDATA_ind ud_ind; + var BSSAP_N_CONNECT_ind conn_ind; + var BSSAP_N_CONNECT_cfm conn_cfm; + var BSSAP_N_DATA_ind data_ind; + var BSSAP_N_DISCONNECT_ind disc_ind; var BSSAP_Conn_Req creq; var BSSAP_ConnHdlr vc_conn; var PDU_BSSAP bssap; @@ -277,32 +277,29 @@ alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ - [] SCCP.receive(ASP_SCCP_N_UNITDATA_ind:?) -> value ud_ind { + [] BSSAP.receive(BSSAP_N_UNITDATA_ind:?) -> value ud_ind { /* Connectionless Procedures like RESET */ var template PDU_BSSAP resp; - bssap := dec_PDU_BSSAP(ud_ind.userData); - resp := ops.unitdata_cb.apply(bssap); + resp := ops.unitdata_cb.apply(ud_ind.userData); if (isvalue(resp)) { - var octetstring resp_ud := enc_PDU_BSSAP(valueof(resp)); - SCCP.send(t_ASP_N_UNITDATA_req(ud_ind.callingAddress, - ud_ind.calledAddress, omit, - omit, resp_ud, omit)); + BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, + ud_ind.calledAddress, resp)); } } /* SCCP -> Client: new connection from BSC */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_ind:?) -> value conn_ind { + [] BSSAP.receive(BSSAP_N_CONNECT_ind:?) -> value conn_ind { vc_conn := ops.create_cb.apply(conn_ind, id); /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_ind.connectionId); /* handle user payload */ f_handle_userData(vc_conn, conn_ind.userData); /* confirm connection establishment */ - SCCP.send(t_ASP_N_CONNECT_res(omit, omit, omit, omit, conn_ind.connectionId, omit)); + BSSAP.send(ts_BSSAP_CONNECT_res(conn_ind.connectionId, omit)); } /* SCCP -> Client: connection-oriented data in existing connection */ - [] SCCP.receive(ASP_SCCP_N_DATA_ind:?) -> value data_ind { + [] BSSAP.receive(BSSAP_N_DATA_ind:?) -> value data_ind { vc_conn := f_comp_by_conn_id(data_ind.connectionId); if (ispresent(data_ind.userData)) { f_handle_userData(vc_conn, data_ind.userData); @@ -310,7 +307,7 @@ } /* SCCP -> Client: disconnect of an existing connection */ - [] SCCP.receive(ASP_SCCP_N_DISCONNECT_ind:?) -> value disc_ind { + [] BSSAP.receive(BSSAP_N_DISCONNECT_ind:?) -> value disc_ind { vc_conn := f_comp_by_conn_id(disc_ind.connectionId); if (ispresent(disc_ind.userData)) { f_handle_userData(vc_conn, disc_ind.userData); @@ -323,7 +320,7 @@ } /* SCCP -> Client: connection confirm for outbound connection */ - [] SCCP.receive(ASP_SCCP_N_CONNECT_cfm:?) -> value conn_cfm { + [] BSSAP.receive(BSSAP_N_CONNECT_cfm:?) -> value conn_cfm { /* handle user payload */ if (ispresent(conn_cfm.userData)) { f_handle_userData(vc_conn, conn_cfm.userData); @@ -333,15 +330,14 @@ /* Disconnect request client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ) -> sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DISCONNECT_req(omit, 0, omit, conn_id, omit)); + BSSAP.send(ts_BSSAP_DISC_req(conn_id, 0)); f_conn_table_del(conn_id); } /* BSSAP from client -> SCCP */ [] CLIENT.receive(BSSAP_Conn_Req:?) -> value creq sender vc_conn { var integer conn_id; - /* encode + send to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(creq.bssap); + /* send to dispatcher */ if (f_comp_known(vc_conn) == false) { /* unknown client, create new connection */ @@ -350,21 +346,20 @@ /* store mapping between client components and SCCP connectionId */ f_conn_table_add(vc_conn, conn_id); - SCCP.send(t_ASP_N_CONNECT_req(creq.addr_peer, creq.addr_own, omit, omit, - userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_CONNECT_req(creq.addr_peer, creq.addr_own, conn_id, + creq.bssap)); } else { /* known client, send via existing connection */ conn_id := f_conn_id_by_comp(vc_conn); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + BSSAP.send(ts_BSSAP_DATA_req(conn_id, creq.bssap)); } } [] CLIENT.receive(PDU_BSSAP:?) -> value bssap sender vc_conn { var integer conn_id := f_conn_id_by_comp(vc_conn); - /* encode + send it to dispatcher */ - var octetstring userdata := enc_PDU_BSSAP(bssap); - SCCP.send(t_ASP_N_DATA_req(userdata, conn_id, omit)); + /* send it to dispatcher */ + BSSAP.send(ts_BSSAP_DATA_req(conn_id, bssap)); } /* Handling of MGCP in IPA SCCPLite case. This predates 3GPP AoIP -- To view, visit https://gerrit.osmocom.org/5444 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icded789d18f3469f74e16f552df2c7ac44ac4294 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:25:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:25:20 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Prepare for tests based on {RSL, BSSMAP}_Emulation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5445 to look at the new patch set (#3). BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_Emulation The existing tests were implemented directly on top of the BSSMAP and RSL CodecPorts. If we loop in the RSL_Emulation and BSSMAP_Emulation components, we can properly multiplex/demultiplex multiple MS (radio channels) on both the RSL and the MSC (SCCP connection) side. In order to have a single component that handles both the RSL and the BSSAP side of a given channel/subscriber/call, we introduce the concept of BSSMAP "Expects", where the test csse can register the L3 INFO that it sends in the RLL ESTablish INDication on the RSL side, so the BSSMAP handler cna route the BSC-originated SCCP connection with that L3 INFO back to the same component. This is a bit inspired "in spirit" of the "expect" mechanism of netfilter connection tracking. Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e --- M bsc/BSC_Tests.ttcn M bsc/BSSAP_Adapter.ttcn M bsc/gen_links.sh M bsc/regen_makefile.sh M library/BSSMAP_Emulation.ttcn M library/RSL_Emulation.ttcn 6 files changed, 122 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/5445/3 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 42de6be..c824415 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -12,6 +12,7 @@ import from IPA_Emulation all; import from IPA_Types all; import from RSL_Types all; +import from RSL_Emulation all; import from Osmocom_CTRL_Functions all; import from Osmocom_CTRL_Types all; @@ -75,10 +76,13 @@ type record IPA_Client { IPA_Emulation_CT vc_IPA, IPA_CCM_Parameters ccm_pars, - charstring id + charstring id, + + RSL_Emulation_CT vc_RSL optional } -function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) +function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i, + boolean handler_mode := false) runs on test_CT { timer T := 10.0; @@ -87,11 +91,22 @@ clnt.ccm_pars := c_IPA_default_ccm_pars; clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; + if (handler_mode) { + clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL"); + } map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + if (handler_mode) { + connect(clnt.vc_IPA:IPA_RSL_PORT, clnt.vc_RSL:IPA_PT); + } else { + connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + } clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); + if (handler_mode) { + clnt.vc_RSL.start(RSL_Emulation.main()); + return; + } /* wait for IPA RSL link to connect and send ID ACK */ T.start; @@ -170,7 +185,7 @@ } } -function f_init() runs on test_CT { +function f_init(boolean handler_mode := false) runs on test_CT { var integer i; if (g_initialized) { @@ -180,14 +195,14 @@ /* Call a function of our 'parent component' BSSAP_Adapter_CT to start the * MSC-side BSSAP emulation */ - f_bssap_init("VirtMSC"); + f_bssap_init("VirtMSC", handler_mode); f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); for (i := 0; i < NUM_BTS; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ f_wait_oml(i, "degraded", 5.0); /* start RSL connection */ - f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i); + f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i, handler_mode); /* wait until BSC tells us "connected" */ f_wait_oml(i, "connected", 5.0); } diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn index 60c7103..f1ff5b6 100644 --- a/bsc/BSSAP_Adapter.ttcn +++ b/bsc/BSSAP_Adapter.ttcn @@ -22,6 +22,9 @@ import from BSSAP_CodecPort all; import from BSSMAP_Templates all; +import from BSSMAP_Emulation all; + +import from MSC_ConnectionHandler all; type component BSSAP_Adapter_CT { /* component references */ @@ -33,6 +36,9 @@ var octetstring g_sio; var MSC_SCCP_MTP3_parameters g_sccp_pars; var SCCP_PAR_Address g_sccp_addr_own, g_sccp_addr_peer; + + /* handler mode */ + var BSSMAP_Emulation_CT vc_BSSMAP; } modulepar { @@ -79,24 +85,33 @@ } -function f_bssap_init(charstring id) runs on BSSAP_Adapter_CT +function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSAP_Adapter_CT { init_pars(); /* create components */ vc_M3UA := M3UA_CT.create(id & "-M3UA"); vc_SCCP := SCCP_CT.create(id & "-SCCP"); + if (handler_mode) { + vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP"); + } map(vc_M3UA:SCTP_PORT, system:sctp); /* connect MTP3 service provider (M3UA) to lower side of SCCP */ connect(vc_M3UA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); - - /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + if (handler_mode) { + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); + } else { + /* connect BSSNAP dispatcher to upper side of SCCP */ + connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + } vc_M3UA.start(f_M3UA_Emulation(mp_sctp_addr)); vc_SCCP.start(SCCPStart(g_sccp_pars)); + if (handler_mode) { + vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_BssmapOps, "")); + } } private altstep as_reset_ack() runs on BSSAP_Adapter_CT { diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index e46bee1..5d8555a 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn" gen_links $DIR $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 8b8fa43..d937482 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" ../regen-makefile.sh $MAIN $FILES diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 14bf238..ba7e27c 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -58,6 +58,11 @@ /* use 16 as this is also the number of SCCP connections that SCCP_Emulation can handle */ var ConnectionData ConnectionTable[16]; + /* pending expected incoming connections */ + var ExpectData ExpectTable[8]; + /* procedure based port to register for incoming connections */ + port BSSMAPEM_PROC_PT PROC; + var charstring g_bssmap_id; var integer g_next_e1_ts := 1; }; @@ -274,6 +279,8 @@ var PDU_BSSAP bssap; var MgcpCommand mgcp_req; var MgcpResponse mgcp_resp; + var BSSAP_ConnHdlr vc_hdlr; + var octetstring l3_info; alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ @@ -401,6 +408,12 @@ CLIENT.send(mgcp_resp) to vc_conn; } + + [] PROC.getcall(BSSMAPEM_register:{?,?}) -> param(l3_info, vc_hdlr) { + f_create_expect(l3_info, vc_hdlr); + PROC.reply(BSSMAPEM_register:{l3_info, vc_hdlr}); + } + } } } @@ -411,4 +424,69 @@ } +/*********************************************************************** + * "Expect" Handling (mapping for expected incoming SCCP connections) + ***********************************************************************/ + +/* data about an expected future incoming connection */ +type record ExpectData { + /* L3 payload based on which we can match it */ + octetstring l3_payload optional, + /* component reference for this connection */ + BSSAP_ConnHdlr vc_conn +} + +/* procedure based port to register for incoming connections */ +signature BSSMAPEM_register(in octetstring l3, in BSSAP_ConnHdlr hdlr); + +type port BSSMAPEM_PROC_PT procedure { + inout BSSMAPEM_register; +} with { extension "internal" }; + +/* CreateCallback that can be used as create_cb and will use the expectation table */ +function ExpectedCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) +runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { + var BSSAP_ConnHdlr ret := null; + var octetstring l3_info; + var integer i; + + if (not ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) { + setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3"); + return ret; + } + l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info; + + for (i := 0; i < sizeof(ExpectTable); i:= i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + continue; + } + if (l3_info == ExpectTable[i].l3_payload) { + ret := ExpectTable[i].vc_conn; + /* release this entry to be used again */ + ExpectTable[i].l3_payload := omit; + ExpectTable[i].vc_conn := null; + log("Found Expect[", i, "] for ", l3_info, " handled at ", ret); + /* return the component reference */ + return ret; + } + } + setverdict(fail, "Couldn't find Expect for incoming connection ", conn_ind); + return ret; +} + +private function f_create_expect(octetstring l3, BSSAP_ConnHdlr hdlr) +runs on BSSMAP_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(ExpectTable); i := i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + ExpectTable[i].l3_payload := l3; + ExpectTable[i].vc_conn := hdlr; + log("Created Expect[", i, "] for ", l3, " to be handled at ", hdlr); + return; + } + } + setverdict(fail, "No space left in ExpectTable"); +} + + } diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn index d558412..a42ca1e 100644 --- a/library/RSL_Emulation.ttcn +++ b/library/RSL_Emulation.ttcn @@ -199,6 +199,8 @@ while (true) { alt { + [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { + } [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23))); } -- To view, visit https://gerrit.osmocom.org/5445 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:25:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:25:49 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Prepare for tests based on {RSL, BSSMAP}_Emulation In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5445 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:25:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:25:57 +0000 Subject: osmo-ttcn3-hacks[master]: RSL_Types: Fix RSL Message Type enumerated definition In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:01 +0000 Subject: osmo-ttcn3-hacks[master]: RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5447 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:05 +0000 Subject: osmo-ttcn3-hacks[master]: RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5448 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:08 +0000 Subject: osmo-ttcn3-hacks[master]: L3_Templates: Add ts_RRM_ModeModifyAck template In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5449 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: L3_Templates: Add ts_RRM_ModeModifyAck template In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: L3_Templates: Add ts_RRM_ModeModifyAck template ...................................................................... L3_Templates: Add ts_RRM_ModeModifyAck template Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892 --- M library/L3_Templates.ttcn 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4c182f8..4755989 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -109,4 +109,22 @@ } } +template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + channelModeModifyAck := { + messageType := '00010111'B, + channelDescription := desc, + channelMode := mode, + extendedTSCSet := omit + } + } + } +} + + } -- To view, visit https://gerrit.osmocom.org/5449 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec607577aff1c65cb208c20a4c4169b5b4569892 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Implement ecnryption related procedures In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Implement ecnryption related procedures ...................................................................... BSC_Tests: Implement ecnryption related procedures Let's verify the operation of the CIPHERING MODE COMMAND as issued by MSC, performed by BSC and implemented by simulated BTS/MS. Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/BSSMAP_Templates.ttcn M library/L3_Templates.ttcn M library/RSL_Types.ttcn 5 files changed, 138 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index d1f5c3d..160d662 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1212,9 +1212,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('01'O, kc); } testcase TC_assignment_fr_a5_0() runs on test_CT { @@ -1239,10 +1239,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('02'O, kc); } testcase TC_assignment_fr_a5_1() runs on test_CT { @@ -1264,8 +1263,6 @@ const OCT8 kc := '0001020304050607'O; ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); f_establish_fully(pars, ass_cmd, exp_fail); } @@ -1289,9 +1286,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('08'O, kc); } testcase TC_assignment_fr_a5_3() runs on test_CT { @@ -1315,11 +1312,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ f_establish_fully(pars, ass_cmd, exp_fail); + f_cipher_mode('10'O, kc, kc128); } testcase TC_assignment_fr_a5_4() runs on test_CT { diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index d615497..a76d1d6 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -99,6 +99,35 @@ RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } +function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr { + var PDU_BSSAP bssap; + var RSL_Message rsl; + + if (isvalue(kc128)) { + BSSAP.send(ts_BSSMAP_CipherModeCmdKc128(alg, key, valueof(kc128))); + } else { + BSSAP.send(ts_BSSMAP_CipherModeCmd(alg, key)); + } + alt { + /* RSL/UE Side */ + [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg, key)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.cipheringModeCommand)) { + f_rsl_reply(ts_RRM_CiphModeCompl, rsl); + } + repeat; + } + [] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap { + // bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier + setverdict(pass); + } + [] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap { + setverdict(fail, "Ciphering Mode Reject"); + } + } +} + /* establish a channel fully, expecting an assignment matching 'exp' */ function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) runs on MSC_ConnHdlr return PDU_BSSAP { diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 24a888c..bb1b537 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -703,5 +703,62 @@ } } +template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := omit + } + } + } +} + +template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128) +modifies ts_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeCommand := { + messageType := '53'O, + layer3HeaderInfo := omit, + encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), + cipherResponseMode := omit, + kC128 := { '83'O, kc128 } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeComplete := { + messageType := '55'O, + layer3MessageContents := *, + chosenEncryptionAlgorithm := { + elementIdentifier := '2C'O, + algorithmIdentifier := alg + } + } + } + } +} + +template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := { + pdu := { + bssmap := { + cipherModeReject := { + messageType := '59'O, + cause := ? + } + } + } +} + + } with { encode "RAW" }; diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 4755989..f0f3d38 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -126,5 +126,20 @@ } } +template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := { + discriminator := '0000'B, /* overwritten */ + tiOrSkip := { + skipIndicator := '0000'B + }, + msgs := { + rrm := { + cipheringModeComplete := { + messageType := '00110010'B, + mobileEquipmentIdentity := omit + } + } + } +} + } diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 67e4dc9..0604440 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -330,6 +330,19 @@ uint5_t power_level } + /* 9.3.7 */ + type record RSL_IE_EncryptionInfo { + uint8_t len, + OCT1 alg_id, + octetstring key + } with { variant (len) "LENGTHTO(alg_id,key)" }; + + template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template OCT1 alg, template octetstring key) := { + len := ?, + alg_id := alg, + key := key + } + /* 9.3.8 */ type record RSL_IE_FrameNumber { uint5_t t1_p, @@ -550,6 +563,7 @@ uint8_t paging_group, RSL_IE_ChanNeeded chan_needed, RSL_IE_StartingTime starting_time, + RSL_IE_EncryptionInfo encr_info, RSL_IE_RequestRef req_ref, RSL_LV full_imm_ass_info, RSL_LV ms_identity, @@ -595,6 +609,7 @@ paging_group, iei = RSL_IE_PAGING_GROUP; chan_needed, iei = RSL_IE_CHAN_NEEDED; starting_time, iei = RSL_IE_STARTNG_TIME; + encr_info, iei = RSL_IE_ENCR_INFO; req_ref, iei = RSL_IE_REQ_REFERENCE; full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; @@ -852,6 +867,22 @@ } } + /* 8.4.6 BSC ->BTS */ + template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, + template RslLinkId link_id := ?, + template OCT1 alg := ?, + template octetstring key := ?, + template octetstring l3_info := ?) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_ENCR_CMD, + ies := { + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), + tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), + tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) + } + } + /* 8.4.10 BTS -> BSC */ template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), -- To view, visit https://gerrit.osmocom.org/5453 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() ...................................................................... RSL_Types: Fix message type of ts_RSL_IPA_MDCX_ACK() Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d --- M library/RSL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 46fa669..67e4dc9 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -996,7 +996,7 @@ uint32_t remote_ip, uint16_t remote_port, uint7_t rtp_pt2) := { msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), - msg_type := RSL_MT_IPAC_CRCX_NACK, + msg_type := RSL_MT_IPAC_MDCX_ACK, ies := { t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), /* optional */ -- To view, visit https://gerrit.osmocom.org/5448 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ce0c96d66c3027d68542b3f58d9a732fb42517d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Tighten permitted messages In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MSC_ConnHdlr: Tighten permitted messages ...................................................................... MSC_ConnHdlr: Tighten permitted messages Accept CRCX only once; Accept MDCX only after CRCX; Accept RSL MODIFY only after RR MODIFY. Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 1bc4350..d615497 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -106,6 +106,8 @@ var RSL_Message rsl; timer T := 10.0; var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + var boolean crcx_seen := false; + var boolean rr_modify_seen := false; f_create_chan_and_exp(pars); /* we should now have a COMPL_L3 at the MSC */ @@ -118,24 +120,26 @@ setverdict(pass); return bssap; } - [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + [rr_modify_seen == false] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); log("Rx L3 from net: ", l3); if (ischosen(l3.msgs.rrm.channelModeModify)) { f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, l3.msgs.rrm.channelModeModify.channelMode), rsl); + rr_modify_seen := true; } repeat; } - [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + [rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); repeat; } - [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + [crcx_seen == false] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + crcx_seen := true; repeat; } - [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + [crcx_seen] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); repeat; } -- To view, visit https://gerrit.osmocom.org/5452 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44abdc3d000c76243f9885f0e30e15c2dc9aadaa Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() ...................................................................... RSL_Types: Handle IPA specific messages in tr_RSL_MsgTypeDR() They all are related to a dedicated channel and carry a channel number as first information element. Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637 --- M library/RSL_Types.ttcn 1 file changed, 28 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 7aef17a..46fa669 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -244,6 +244,11 @@ payload := pl } + template RSL_L16V tr_RSL_L16V(template octetstring pl) := { + len := ?, + payload := pl + } + type record RSL_IE_V { uint8_t val } @@ -680,7 +685,7 @@ /* dedicated channel or RLL */ template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { - msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,true}) + msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,true}, {RSL_MDISC_IPACCESS,false}) } @@ -694,6 +699,19 @@ t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) } } + + template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, + template RslLinkId link_id := ?, + template octetstring l3_info := ?) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), + msg_type := RSL_MT_DATA_REQ, + ies :={ + tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), + tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), + tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) + } + } + /* 8.3.2 BTS -> BSC */ template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { @@ -834,6 +852,15 @@ } } + /* 8.4.10 BTS -> BSC */ + template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_ACK, + ies := { + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) + } + } + /* 8.4.11 BTS -> BSC */ template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) modifies ts_RSL_CHAN_ACT_NACK := { -- To view, visit https://gerrit.osmocom.org/5447 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3fdc029a96c34a9d2d9ec669b789526c8325637 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Fix RSL Message Type enumerated definition In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RSL_Types: Fix RSL Message Type enumerated definition ...................................................................... RSL_Types: Fix RSL Message Type enumerated definition Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8 --- M library/RSL_Types.ttcn 1 file changed, 20 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index a807ce2..7aef17a 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -111,27 +111,27 @@ RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), RSL_MT_IPAC_CONNECT_MUX ('01010000'B), - RSL_MT_IPAC_CONNECT_MUX_ACK, - RSL_MT_IPAC_CONNECT_MUX_NACK, - RSL_MT_IPAC_BIND_MUX, - RSL_MT_IPAC_BIND_MUX_ACK, - RSL_MT_IPAC_BIND_MUX_NACK, - RSL_MT_IPAC_DISC_MUX, - RSL_MT_IPAC_DISC_MUX_ACK, - RSL_MT_IPAC_DISC_MUX_NACK, + RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), + RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), + RSL_MT_IPAC_BIND_MUX ('01010011'B), + RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), + RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), + RSL_MT_IPAC_DISC_MUX ('01010110'B), + RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), + RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), - RSL_MT_IPAC_HO_CAN_ENQ, - RSL_MT_IPAC_HO_CAN_RES, - RSL_MT_IPAC_CRCX, - RSL_MT_IPAC_CRCX_ACK, - RSL_MT_IPAC_CRCX_NACK, - RSL_MT_IPAC_MDCX, - RSL_MT_IPAC_MDCX_ACK, - RSL_MT_IPAC_MDCX_NACK, - RSL_MT_IPAC_DLCX_IND, - RSL_MT_IPAC_DLCX, - RSL_MT_IPAC_DLCX_ACK, - RSL_MT_IPAC_DLCX_NACK + RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), + RSL_MT_IPAC_HO_CAN_RES ('01100010'B), + RSL_MT_IPAC_CRCX ('01110000'B), + RSL_MT_IPAC_CRCX_ACK ('01110001'B), + RSL_MT_IPAC_CRCX_NACK ('01110010'B), + RSL_MT_IPAC_MDCX ('01110011'B), + RSL_MT_IPAC_MDCX_ACK ('01110100'B), + RSL_MT_IPAC_MDCX_NACK ('01110101'B), + RSL_MT_IPAC_DLCX_IND ('01110110'B), + RSL_MT_IPAC_DLCX ('01110111'B), + RSL_MT_IPAC_DLCX_ACK ('01111000'B), + RSL_MT_IPAC_DLCX_NACK ('01111001'B) } with { variant "FIELDLENGTH(8)" }; /*! RSL Information Element Identifiers (Chapter 9.3) */ -- To view, visit https://gerrit.osmocom.org/5446 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9096f8a579ee245fb193e0fd53144056bc4a23a8 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:21 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and RSL ...................................................................... BSC_Tests: Re-wire MSC_ConnectionHandler to handle BSSAP and RSL Using the MSC_ConnHdlr component, we can now handle the BSSAP (MSC) and RSL (BTS) side of a single radio channel. Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 160 insertions(+), 105 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c824415..2e43375 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1254,6 +1254,55 @@ /* TODO: Test OML link drop causes counter increment */ +/*********************************************************************** + * "New world" test cases using RSL_Emulation + BSSMAP_Emulation + ***********************************************************************/ + +import from BSSMAP_Emulation all; +import from RSL_Emulation all; +import from MSC_ConnectionHandler all; + +type function void_fn(charstring id) runs on MSC_ConnHdlr; + +/* helper function to create, connect and start a MSC_ConnHdlr component */ +function f_start_handler(void_fn fn, charstring id) runs on test_CT return MSC_ConnHdlr { + var MSC_ConnHdlr vc_conn; + + vc_conn := MSC_ConnHdlr.create(id); + connect(vc_conn:BSSMAPEM, vc_BSSMAP:PROC); + connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT); + connect(vc_conn:BSSAP, vc_BSSMAP:CLIENT); + vc_conn.start(derefers(fn)(id)); + return vc_conn; +} + + +private function f_ass(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_hdlr() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn.done; +} + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index f47417f..1bc4350 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -2,9 +2,9 @@ import from General_Types all; import from Osmocom_Types all; +import from GSM_Types all; import from SCCPasp_Types all; import from BSSAP_Types all; -import from BSSAP_CodecPort all; import from BSSMAP_Emulation all; import from BSSMAP_Templates all; @@ -12,33 +12,26 @@ import from MGCP_Templates all; import from SDP_Types all; +import from RSL_Emulation all; +import from RSL_Types all; + +import from MobileL3_Types all; +import from MobileL3_CommonIE_Types all; +//import from MobileL3_RRM_Types all; +import from L3_Templates all; + + /* this component represents a single subscriber connection at the MSC. * There is a 1:1 mapping between SCCP connections and BSSAP_ConnHdlr components. * We inherit all component variables, ports, functions, ... from BSSAP_ConnHdlr */ -type component MSC_ConnHdlr extends BSSAP_ConnHdlr { +type component MSC_ConnHdlr extends BSSAP_ConnHdlr, RSL_DchanHdlr { /* SCCP Connecction Identifier for the underlying SCCP connection */ var integer g_sccp_conn_id; - var MSC_State g_state := MSC_STATE_NONE; - var MgcpEndpoint g_ep_name; - var MgcpCallId g_call_id; - var MgcpConnectionId g_mgcp_conn_id; -} + /* procedure port back to our parent (BSSMAP_Emulation_CT) for control */ + port BSSMAPEM_PROC_PT BSSMAPEM; -/* Callback function from general BSSMAP_Emulation whenever a new incoming - * SCCP connection arrivces. Must create + start a new component */ -private function CreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) -runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { - var MSC_ConnHdlr vc_conn; - /* Create a new BSSAP_ConnHdlr component */ - vc_conn := MSC_ConnHdlr.create(g_bssmap_id & "-Conn-" & int2str(conn_ind.connectionId)); - /* connect it to the port */ - connect(vc_conn:BSSAP, self:CLIENT); - /* start it */ - vc_conn.start(MSC_ConnectionHandler.main(conn_ind.connectionId, g_next_e1_ts)); - /* increment next E1 timeslot */ - g_next_e1_ts := g_next_e1_ts + 1; - return vc_conn; + var MSC_State g_state := MSC_STATE_NONE; } /* Callback function from general BSSMAP_Emulation whenever a connectionless @@ -47,6 +40,7 @@ runs on BSSMAP_Emulation_CT return template PDU_BSSAP { var template PDU_BSSAP resp := omit; + /* answer all RESET with a RESET ACK */ if (match(bssap, tr_BSSMAP_Reset)) { resp := ts_BSSMAP_ResetAck; } @@ -55,7 +49,7 @@ } const BssmapOps MSC_BssmapOps := { - create_cb := refers(CreateCallback), + create_cb := refers(BSSMAP_Emulation.ExpectedCreateCallback), unitdata_cb := refers(UnitdataCallback) } @@ -68,90 +62,102 @@ MSC_STATE_WAIT_DLCX_ACK } -/* main function processing various incoming events */ -function main(integer connection_id, integer e1_timeslot) runs on MSC_ConnHdlr { - var MgcpResponse mgcp_rsp; - timer T := 5.0; - - g_sccp_conn_id := connection_id; - g_call_id := f_mgcp_alloc_call_id(); - g_ep_name := hex2str(int2hex(e1_timeslot, 1)) & "@mgw"; - - /* we just accepted an incoming SCCP connection, start guard timer */ - T.start; - - while (true) { - var PDU_BSSAP bssap; - alt { - /* new SCCP-level connection indication from BSC */ - [g_state == MSC_STATE_NONE] BSSAP.receive(tr_BSSMAP_ComplL3) -> value bssap { - /* respond with ASSIGNMENT CMD */ - g_state := MSC_STATE_WAIT_ASS_COMPL; - var BSSMAP_IE_AoIP_TransportLayerAddress tla; - tla := valueof(ts_BSSMAP_IE_AoIP_TLA({ipv4:='01020304'O}, 12345)); - BSSAP.send(ts_BSSMAP_AssignmentReq(omit, tla)); - } - [g_state == MSC_STATE_WAIT_ASS_COMPL] BSSAP.receive(tr_BSSMAP_AssignmentComplete(*,?)) { - /* FIXME: Send MGCP CRCX */ - g_state := MSC_STATE_WAIT_CRCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - //template SDP_Message sdp := omit; - BSSAP.send(ts_CRCX(trans_id, g_ep_name, "recvonly", g_call_id)); //, sdp)); - } - /* - [] BSSAP.receive(tr_BSSMAP_AssignmentFail) { - } - */ - - /* receive CRCX ACK: transmit MDCX */ - [g_state == MSC_STATE_WAIT_CRCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - /* extract connection ID */ - g_mgcp_conn_id := f_MgcpResp_extract_conn_id(mgcp_rsp); - g_state := MSC_STATE_WAIT_MDCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_MDCX(trans_id, g_ep_name, "sendrecv", g_call_id, g_mgcp_conn_id)); - } - - /* receive MDCX ACK: wait + transmit CLEAR COMMAND */ - [g_state == MSC_STATE_WAIT_MDCX_ACK] BSSAP.receive(tr_CRCX_ACK) -> value mgcp_rsp { - g_state := MSC_STATE_WAIT_CLEAR_COMPL - BSSAP.send(ts_BSSMAP_ClearCommand(9)); /* Cause: call control */ - } - - /* CLEAR COMPLETE from BSS (response to CLEAR COMMAND) */ - [g_state == MSC_STATE_WAIT_CLEAR_COMPL] BSSAP.receive(tr_BSSMAP_ClearComplete) { - /* send DLCX */ - g_state := MSC_STATE_WAIT_DLCX_ACK; - var MgcpTransId trans_id := f_mgcp_alloc_tid(); - BSSAP.send(ts_DLCX(trans_id, g_ep_name, g_call_id)); - } - - [g_state == MSC_STATE_WAIT_DLCX_ACK] BSSAP.receive(tr_DLCX_ACK) { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(pass); - self.stop; - } - - /* TODO: CLEAR REQUEST from BSS */ - - [] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { - setverdict(fail); - self.stop; - } - - [] BSSAP.receive(PDU_BSSAP:?) -> value bssap { - log("Received unhandled SCCP-CO: ", bssap); - } - - /* Guard timer has expired, close connection */ - [] T.timeout { - BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ); - setverdict(inconc); - self.stop; - } - - } +/* register an expect with the BSSMAP core */ +private function f_create_exp(octetstring l3_enc) runs on MSC_ConnHdlr { + BSSMAPEM.call(BSSMAPEM_register:{l3_enc, self}) { + [] BSSMAPEM.getreply(BSSMAPEM_register:{?, ?}) {}; } } +type record TestHdlrParams { + OCT1 ra, + GsmFrameNumber fn, + hexstring imsi, + RslLinkId link_id +}; + +template (value) TestHdlrParams t_def_TestHdlrPars := { + ra := '23'O, + fn := 23, + imsi := '001019876543210'H, + link_id := valueof(ts_RslLinkID_DCCH(0)) +} + +function f_create_chan_and_exp(TestHdlrParams pars) runs on MSC_ConnHdlr { + var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(pars.imsi)); + var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); + var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info); + + /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */ + RSL_Emulation.f_chan_est(pars.ra, l3_enc, pars.link_id, pars.fn); + f_create_exp(l3_enc); +} + +function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { + var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; + var RslLinkId link_id := orig.ies[1].body.link_id; + RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); +} + +/* establish a channel fully, expecting an assignment matching 'exp' */ +function f_establish_fully(TestHdlrParams pars, PDU_BSSAP ass_cmd, template PDU_BSSAP exp_ass_cpl) +runs on MSC_ConnHdlr return PDU_BSSAP { + var PDU_BSSAP bssap; + var RSL_Message rsl; + timer T := 10.0; + var boolean exp_compl := ischosen(exp_ass_cpl.pdu.bssmap.assignmentComplete); + + f_create_chan_and_exp(pars); + /* we should now have a COMPL_L3 at the MSC */ + + BSSAP.receive(tr_BSSMAP_ComplL3); + BSSAP.send(ass_cmd); + alt { + /* if we receive exactly what we expected, always return + pass */ + [] BSSAP.receive(exp_ass_cpl) -> value bssap { + setverdict(pass); + return bssap; + } + [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl { + var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); + log("Rx L3 from net: ", l3); + if (ischosen(l3.msgs.rrm.channelModeModify)) { + f_rsl_reply(ts_RRM_ModeModifyAck(l3.msgs.rrm.channelModeModify.channelDescription, + l3.msgs.rrm.channelModeModify.channelMode), rsl); + } + repeat; + } + [] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl { + RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_CRCX(g_chan_nr)) -> value rsl { + RSL.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [] RSL.receive(tr_RSL_IPA_MDCX(g_chan_nr, ?)) -> value rsl{ + RSL.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, 1, 1, 1, 1)); + repeat; + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received non-matching ASSIGNMENT COMPLETE"); + } + [exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received unexpected ASSIGNMENT FAIL"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentComplete) { + setverdict(fail, "Received unexpected ASSIGNMENT COMPLETE"); + } + [not exp_compl] BSSAP.receive(tr_BSSMAP_AssignmentFail) { + setverdict(fail, "Received non-matching ASSIGNMENT FAIL"); + } + [] T.timeout { + setverdict(inconc, "Timeout waiting for ASSIGNMENT COMPLETE"); + } + } + + self.stop; +} + + } -- To view, visit https://gerrit.osmocom.org/5450 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:22 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_Conn... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_ConnHdlr ...................................................................... BSC_Tests: Migrate various ASSIGNMENT tests over to MSC_ConnHdlr This way we benefit from the ability to handle the RR MODE MODIFY, RSL MODE MODIFY, IPA CRCX and IPA MDCX capabilities of the MSC_ConnHdlr component. While each test case now needs a separate function in addition to the actual testcase, this allows for more flexibility and a more complete emulation of BTS behaviour. Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 --- M bsc/BSC_Tests.ttcn 1 file changed, 108 insertions(+), 76 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 2e43375..d1f5c3d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -492,79 +492,6 @@ f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); } -testcase TC_assignment_fr_a5_0() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment"); -} - -testcase TC_assignment_fr_a5_1() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment"); -} - -/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */ -testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); - f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE"); -} - - - -testcase TC_assignment_fr_a5_3() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment"); -} - -testcase TC_assignment_fr_a5_4() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - const OCT8 kc := '0001020304050607'O; - const OCT16 kc128 := kc & kc; - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); - ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); - ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := - valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); - ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); - /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ - f_assignment_exp(ass_cmd, exp_fail, "BSC accepted TCH/F FR A5/4 assignment"); -} - - - - type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -1276,8 +1203,33 @@ return vc_conn; } +private function f_tc_assignment_fr_a5_0(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; -private function f_ass(charstring id) runs on MSC_ConnHdlr { + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_0() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_0), testcasename()); + vc_conn.done; +} + + + +private function f_tc_assignment_fr_a5_1(charstring id) runs on MSC_ConnHdlr { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); @@ -1293,16 +1245,96 @@ f_establish_fully(pars, ass_cmd, exp_compl); } -testcase TC_hdlr() runs on test_CT { +testcase TC_assignment_fr_a5_1() runs on test_CT { var MSC_ConnHdlr vc_conn; f_init(true); f_sleep(1.0); - vc_conn := f_start_handler(refers(f_ass), "foo"); + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1), testcasename()); vc_conn.done; } +/* Expect ASSIGNMENT FAIL if mandatory IE is missing */ +private function f_tc_assignment_fr_a5_1_codec_missing(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O)); + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1_codec_missing), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_3(charstring id ) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O)); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_fr_a5_3() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_3), testcasename()); + vc_conn.done; +} + + +private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); + const OCT8 kc := '0001020304050607'O; + const OCT16 kc128 := kc & kc; + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation := + valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O)); + ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128)); + /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ + f_establish_fully(pars, ass_cmd, exp_fail); +} + +testcase TC_assignment_fr_a5_4() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4), testcasename()); + vc_conn.done; +} + + + + control { execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl() ); -- To view, visit https://gerrit.osmocom.org/5451 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 12:26:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 12:26:22 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Prepare for tests based on {RSL, BSSMAP}_Emulation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_Emulation ...................................................................... BSC_Tests: Prepare for tests based on {RSL,BSSMAP}_Emulation The existing tests were implemented directly on top of the BSSMAP and RSL CodecPorts. If we loop in the RSL_Emulation and BSSMAP_Emulation components, we can properly multiplex/demultiplex multiple MS (radio channels) on both the RSL and the MSC (SCCP connection) side. In order to have a single component that handles both the RSL and the BSSAP side of a given channel/subscriber/call, we introduce the concept of BSSMAP "Expects", where the test csse can register the L3 INFO that it sends in the RLL ESTablish INDication on the RSL side, so the BSSMAP handler cna route the BSC-originated SCCP connection with that L3 INFO back to the same component. This is a bit inspired "in spirit" of the "expect" mechanism of netfilter connection tracking. Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e --- M bsc/BSC_Tests.ttcn M bsc/BSSAP_Adapter.ttcn M bsc/gen_links.sh M bsc/regen_makefile.sh M library/BSSMAP_Emulation.ttcn M library/RSL_Emulation.ttcn 6 files changed, 122 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 42de6be..c824415 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -12,6 +12,7 @@ import from IPA_Emulation all; import from IPA_Types all; import from RSL_Types all; +import from RSL_Emulation all; import from Osmocom_CTRL_Functions all; import from Osmocom_CTRL_Types all; @@ -75,10 +76,13 @@ type record IPA_Client { IPA_Emulation_CT vc_IPA, IPA_CCM_Parameters ccm_pars, - charstring id + charstring id, + + RSL_Emulation_CT vc_RSL optional } -function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) +function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i, + boolean handler_mode := false) runs on test_CT { timer T := 10.0; @@ -87,11 +91,22 @@ clnt.ccm_pars := c_IPA_default_ccm_pars; clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; + if (handler_mode) { + clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL"); + } map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + if (handler_mode) { + connect(clnt.vc_IPA:IPA_RSL_PORT, clnt.vc_RSL:IPA_PT); + } else { + connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]); + } clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 10000+i, clnt.ccm_pars)); + if (handler_mode) { + clnt.vc_RSL.start(RSL_Emulation.main()); + return; + } /* wait for IPA RSL link to connect and send ID ACK */ T.start; @@ -170,7 +185,7 @@ } } -function f_init() runs on test_CT { +function f_init(boolean handler_mode := false) runs on test_CT { var integer i; if (g_initialized) { @@ -180,14 +195,14 @@ /* Call a function of our 'parent component' BSSAP_Adapter_CT to start the * MSC-side BSSAP emulation */ - f_bssap_init("VirtMSC"); + f_bssap_init("VirtMSC", handler_mode); f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); for (i := 0; i < NUM_BTS; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ f_wait_oml(i, "degraded", 5.0); /* start RSL connection */ - f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i); + f_ipa_rsl_start(bts[i].rsl, mp_bsc_ip, mp_bsc_rsl_port, i, handler_mode); /* wait until BSC tells us "connected" */ f_wait_oml(i, "connected", 5.0); } diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn index 60c7103..f1ff5b6 100644 --- a/bsc/BSSAP_Adapter.ttcn +++ b/bsc/BSSAP_Adapter.ttcn @@ -22,6 +22,9 @@ import from BSSAP_CodecPort all; import from BSSMAP_Templates all; +import from BSSMAP_Emulation all; + +import from MSC_ConnectionHandler all; type component BSSAP_Adapter_CT { /* component references */ @@ -33,6 +36,9 @@ var octetstring g_sio; var MSC_SCCP_MTP3_parameters g_sccp_pars; var SCCP_PAR_Address g_sccp_addr_own, g_sccp_addr_peer; + + /* handler mode */ + var BSSMAP_Emulation_CT vc_BSSMAP; } modulepar { @@ -79,24 +85,33 @@ } -function f_bssap_init(charstring id) runs on BSSAP_Adapter_CT +function f_bssap_init(charstring id, boolean handler_mode := false) runs on BSSAP_Adapter_CT { init_pars(); /* create components */ vc_M3UA := M3UA_CT.create(id & "-M3UA"); vc_SCCP := SCCP_CT.create(id & "-SCCP"); + if (handler_mode) { + vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP"); + } map(vc_M3UA:SCTP_PORT, system:sctp); /* connect MTP3 service provider (M3UA) to lower side of SCCP */ connect(vc_M3UA:MTP3_SP_PORT, vc_SCCP:MTP3_SCCP_PORT); - - /* connect BSSNAP dispatcher to upper side of SCCP */ - connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + if (handler_mode) { + connect(vc_BSSMAP:BSSAP, vc_SCCP:SCCP_SP_PORT); + } else { + /* connect BSSNAP dispatcher to upper side of SCCP */ + connect(self:BSSAP, vc_SCCP:SCCP_SP_PORT); + } vc_M3UA.start(f_M3UA_Emulation(mp_sctp_addr)); vc_SCCP.start(SCCPStart(g_sccp_pars)); + if (handler_mode) { + vc_BSSMAP.start(BSSMAP_Emulation.main(MSC_BssmapOps, "")); + } } private altstep as_reset_ack() runs on BSSAP_Adapter_CT { diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index e46bee1..5d8555a 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn" gen_links $DIR $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 8b8fa43..d937482 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" ../regen-makefile.sh $MAIN $FILES diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 14bf238..ba7e27c 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -58,6 +58,11 @@ /* use 16 as this is also the number of SCCP connections that SCCP_Emulation can handle */ var ConnectionData ConnectionTable[16]; + /* pending expected incoming connections */ + var ExpectData ExpectTable[8]; + /* procedure based port to register for incoming connections */ + port BSSMAPEM_PROC_PT PROC; + var charstring g_bssmap_id; var integer g_next_e1_ts := 1; }; @@ -274,6 +279,8 @@ var PDU_BSSAP bssap; var MgcpCommand mgcp_req; var MgcpResponse mgcp_resp; + var BSSAP_ConnHdlr vc_hdlr; + var octetstring l3_info; alt { /* SCCP -> Client: UNIT-DATA (connectionless SCCP) from a BSC */ @@ -401,6 +408,12 @@ CLIENT.send(mgcp_resp) to vc_conn; } + + [] PROC.getcall(BSSMAPEM_register:{?,?}) -> param(l3_info, vc_hdlr) { + f_create_expect(l3_info, vc_hdlr); + PROC.reply(BSSMAPEM_register:{l3_info, vc_hdlr}); + } + } } } @@ -411,4 +424,69 @@ } +/*********************************************************************** + * "Expect" Handling (mapping for expected incoming SCCP connections) + ***********************************************************************/ + +/* data about an expected future incoming connection */ +type record ExpectData { + /* L3 payload based on which we can match it */ + octetstring l3_payload optional, + /* component reference for this connection */ + BSSAP_ConnHdlr vc_conn +} + +/* procedure based port to register for incoming connections */ +signature BSSMAPEM_register(in octetstring l3, in BSSAP_ConnHdlr hdlr); + +type port BSSMAPEM_PROC_PT procedure { + inout BSSMAPEM_register; +} with { extension "internal" }; + +/* CreateCallback that can be used as create_cb and will use the expectation table */ +function ExpectedCreateCallback(BSSAP_N_CONNECT_ind conn_ind, charstring id) +runs on BSSMAP_Emulation_CT return BSSAP_ConnHdlr { + var BSSAP_ConnHdlr ret := null; + var octetstring l3_info; + var integer i; + + if (not ischosen(conn_ind.userData.pdu.bssmap.completeLayer3Information)) { + setverdict(fail, "N-CONNECT.ind with L3 != COMPLETE L3"); + return ret; + } + l3_info := conn_ind.userData.pdu.bssmap.completeLayer3Information.layer3Information.layer3info; + + for (i := 0; i < sizeof(ExpectTable); i:= i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + continue; + } + if (l3_info == ExpectTable[i].l3_payload) { + ret := ExpectTable[i].vc_conn; + /* release this entry to be used again */ + ExpectTable[i].l3_payload := omit; + ExpectTable[i].vc_conn := null; + log("Found Expect[", i, "] for ", l3_info, " handled at ", ret); + /* return the component reference */ + return ret; + } + } + setverdict(fail, "Couldn't find Expect for incoming connection ", conn_ind); + return ret; +} + +private function f_create_expect(octetstring l3, BSSAP_ConnHdlr hdlr) +runs on BSSMAP_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(ExpectTable); i := i+1) { + if (not ispresent(ExpectTable[i].l3_payload)) { + ExpectTable[i].l3_payload := l3; + ExpectTable[i].vc_conn := hdlr; + log("Created Expect[", i, "] for ", l3, " to be handled at ", hdlr); + return; + } + } + setverdict(fail, "No space left in ExpectTable"); +} + + } diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn index d558412..a42ca1e 100644 --- a/library/RSL_Emulation.ttcn +++ b/library/RSL_Emulation.ttcn @@ -199,6 +199,8 @@ while (true) { alt { + [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) { + } [] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23))); } -- To view, visit https://gerrit.osmocom.org/5445 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:04:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:04:52 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Only start the number of BTSs required for a given Message-ID: Review at https://gerrit.osmocom.org/5454 BSC_Tests: Only start the number of BTSs required for a given Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86 --- M bsc/BSC_Tests.ttcn 1 file changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/5454/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 160d662..a2c2a90 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -185,7 +185,7 @@ } } -function f_init(boolean handler_mode := false) runs on test_CT { +function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { var integer i; if (g_initialized) { @@ -198,7 +198,7 @@ f_bssap_init("VirtMSC", handler_mode); f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); - for (i := 0; i < NUM_BTS; i := i+1) { + for (i := 0; i < nr_bts; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ f_wait_oml(i, "degraded", 5.0); /* start RSL connection */ @@ -241,7 +241,7 @@ testcase TC_chan_act_noreply() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; - f_init(); + f_init(1); f_bssap_reset(); IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23))); @@ -254,7 +254,7 @@ var BSSAP_N_UNITDATA_ind ud_ind; var integer chreq_total; - f_init(); + f_init(1); f_bssap_reset(); chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); @@ -269,7 +269,7 @@ testcase TC_chan_act_ack_noest() runs on test_CT { var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -285,7 +285,7 @@ testcase TC_chan_act_ack_est_ind_noreply() runs on test_CT { var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -307,7 +307,7 @@ var BSSAP_N_CONNECT_ind rx_c_ind; var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -330,7 +330,7 @@ var RSL_Message rx_rsl; var integer chact_nack; - f_init(); + f_init(1); f_bssap_reset(); chact_nack := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack"); @@ -355,7 +355,7 @@ var integer i; var integer chreq_total, chreq_nochan; - f_init(); + f_init(1); f_bssap_reset(); chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); @@ -402,7 +402,7 @@ /* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction) */ testcase TC_outbound_connect() runs on test_CT { - f_init(); + f_init(1); f_bssap_reset(); BSSAP.send(ts_BSSAP_CONNECT_req(g_sccp_addr_peer, g_sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq)); @@ -416,7 +416,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00000000'O); @@ -441,7 +441,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00000000'O); @@ -531,7 +531,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -556,7 +556,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -595,7 +595,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -641,7 +641,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -680,7 +680,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -727,7 +727,7 @@ testcase TC_rll_est_ind_inact_lchan() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var octetstring l3 := '00010203040506'O; @@ -751,7 +751,7 @@ testcase TC_rll_est_ind_inval_sapi1() runs on test_CT { var RslChannelNr chan_nr; - f_init(); + f_init(1); f_bssap_reset(); chan_nr := f_chreq_act_ack() @@ -777,7 +777,7 @@ testcase TC_rll_est_ind_inval_sapi3() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var RslChannelNr chan_nr := f_chreq_act_ack(); @@ -802,7 +802,7 @@ testcase TC_rll_est_ind_inval_sacch() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var RslChannelNr chan_nr := f_chreq_act_ack(); @@ -829,7 +829,7 @@ testcase TC_ctrl_msc_connection_status() runs on test_CT { var charstring ctrl_resp; - f_init(); + f_init(1); f_bssap_reset(); /* See https://osmocom.org/issues/2729 */ @@ -840,7 +840,7 @@ testcase TC_ctrl() runs on test_CT { var charstring ctrl_resp; - f_init(); + f_init(1); f_bssap_reset(); /* all below values must match the osmo-bsc.cfg config file used */ @@ -1167,7 +1167,7 @@ testcase TC_rsl_drop_counter() runs on test_CT { var integer rsl_fail; - f_init(); + f_init(1); f_bssap_reset(); rsl_fail := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail"); @@ -1220,7 +1220,7 @@ testcase TC_assignment_fr_a5_0() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_0), testcasename()); @@ -1247,7 +1247,7 @@ testcase TC_assignment_fr_a5_1() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1), testcasename()); @@ -1269,7 +1269,7 @@ testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1_codec_missing), testcasename()); @@ -1294,7 +1294,7 @@ testcase TC_assignment_fr_a5_3() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_3), testcasename()); @@ -1320,7 +1320,7 @@ testcase TC_assignment_fr_a5_4() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4), testcasename()); -- To view, visit https://gerrit.osmocom.org/5454 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:04:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:04:52 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: fix TC_ctrl expectation: We expect 3 BTSs Message-ID: Review at https://gerrit.osmocom.org/5455 fix TC_ctrl expectation: We expect 3 BTSs Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/5455/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a2c2a90..7d6dbf9 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -849,7 +849,7 @@ f_ctrl_get_exp(IPA_CTRL, "mnc", "1"); f_ctrl_get_exp(IPA_CTRL, "short-name", "OsmoBSC"); f_ctrl_get_exp(IPA_CTRL, "long-name", "OsmoBSC"); - f_ctrl_get_exp(IPA_CTRL, "number-of-bts", "1"); + f_ctrl_get_exp(IPA_CTRL, "number-of-bts", "3"); var integer bts_nr := 0; f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "location-area-code", "1"); -- To view, visit https://gerrit.osmocom.org/5455 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:04:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:04:52 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: reduce amount of sleeping to speed up test suite Message-ID: Review at https://gerrit.osmocom.org/5456 BSC_Tests: reduce amount of sleeping to speed up test suite Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418 --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/5456/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7d6dbf9..c66dda7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -160,7 +160,7 @@ T.timeout; return; } - f_sleep(0.5); + f_sleep(0.1); if (not T.running) { setverdict(fail, "Timeout waiting for oml-connection-state ", status); self.stop; @@ -206,7 +206,6 @@ /* wait until BSC tells us "connected" */ f_wait_oml(i, "connected", 5.0); } - f_sleep(0.5); T_guard.start; activate(as_Tguard()); -- To view, visit https://gerrit.osmocom.org/5456 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:20 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Only start the number of BTSs required for a given In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5454 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:24 +0000 Subject: osmo-ttcn3-hacks[master]: fix TC_ctrl expectation: We expect 3 BTSs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5455 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:27 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: reduce amount of sleeping to speed up test suite In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5456 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:35 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: reduce amount of sleeping to speed up test suite In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: reduce amount of sleeping to speed up test suite ...................................................................... BSC_Tests: reduce amount of sleeping to speed up test suite Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418 --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7d6dbf9..c66dda7 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -160,7 +160,7 @@ T.timeout; return; } - f_sleep(0.5); + f_sleep(0.1); if (not T.running) { setverdict(fail, "Timeout waiting for oml-connection-state ", status); self.stop; @@ -206,7 +206,6 @@ /* wait until BSC tells us "connected" */ f_wait_oml(i, "connected", 5.0); } - f_sleep(0.5); T_guard.start; activate(as_Tguard()); -- To view, visit https://gerrit.osmocom.org/5456 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd956556969467d4f059d2c8e58a924eb7ec0418 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:35 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: fix TC_ctrl expectation: We expect 3 BTSs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix TC_ctrl expectation: We expect 3 BTSs ...................................................................... fix TC_ctrl expectation: We expect 3 BTSs Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a2c2a90..7d6dbf9 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -849,7 +849,7 @@ f_ctrl_get_exp(IPA_CTRL, "mnc", "1"); f_ctrl_get_exp(IPA_CTRL, "short-name", "OsmoBSC"); f_ctrl_get_exp(IPA_CTRL, "long-name", "OsmoBSC"); - f_ctrl_get_exp(IPA_CTRL, "number-of-bts", "1"); + f_ctrl_get_exp(IPA_CTRL, "number-of-bts", "3"); var integer bts_nr := 0; f_ctrl_get_exp_bts(IPA_CTRL, bts_nr, "location-area-code", "1"); -- To view, visit https://gerrit.osmocom.org/5455 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ba5d357474d43c3065858bfa18bf73f1c4eba5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 16:05:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 16:05:36 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Only start the number of BTSs required for a given In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Only start the number of BTSs required for a given ...................................................................... BSC_Tests: Only start the number of BTSs required for a given Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86 --- M bsc/BSC_Tests.ttcn 1 file changed, 29 insertions(+), 29 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 160d662..a2c2a90 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -185,7 +185,7 @@ } } -function f_init(boolean handler_mode := false) runs on test_CT { +function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { var integer i; if (g_initialized) { @@ -198,7 +198,7 @@ f_bssap_init("VirtMSC", handler_mode); f_ipa_ctrl_start(ctrl, mp_bsc_ip, mp_bsc_ctrl_port, 0); - for (i := 0; i < NUM_BTS; i := i+1) { + for (i := 0; i < nr_bts; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ f_wait_oml(i, "degraded", 5.0); /* start RSL connection */ @@ -241,7 +241,7 @@ testcase TC_chan_act_noreply() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; - f_init(); + f_init(1); f_bssap_reset(); IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23))); @@ -254,7 +254,7 @@ var BSSAP_N_UNITDATA_ind ud_ind; var integer chreq_total; - f_init(); + f_init(1); f_bssap_reset(); chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); @@ -269,7 +269,7 @@ testcase TC_chan_act_ack_noest() runs on test_CT { var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -285,7 +285,7 @@ testcase TC_chan_act_ack_est_ind_noreply() runs on test_CT { var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -307,7 +307,7 @@ var BSSAP_N_CONNECT_ind rx_c_ind; var RSL_Message rx_rsl; - f_init(); + f_init(1); f_bssap_reset(); /* Send CHAN RQD and wait for allocation; acknowledge it */ @@ -330,7 +330,7 @@ var RSL_Message rx_rsl; var integer chact_nack; - f_init(); + f_init(1); f_bssap_reset(); chact_nack := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chan_act:nack"); @@ -355,7 +355,7 @@ var integer i; var integer chreq_total, chreq_nochan; - f_init(); + f_init(1); f_bssap_reset(); chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total"); @@ -402,7 +402,7 @@ /* Verify that the BSC refuses any BSSAP connection from the MSC (They are all BSC->MSC direction) */ testcase TC_outbound_connect() runs on test_CT { - f_init(); + f_init(1); f_bssap_reset(); BSSAP.send(ts_BSSAP_CONNECT_req(g_sccp_addr_peer, g_sccp_addr_own, 2342, ts_BSSMAP_AssignmentReq)); @@ -416,7 +416,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00000000'O); @@ -441,7 +441,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00000000'O); @@ -531,7 +531,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -556,7 +556,7 @@ var RSL_Message rx_rsl; var DchanTuple dt; - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -595,7 +595,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -641,7 +641,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -680,7 +680,7 @@ var DchanTuple dt; var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0)); - f_init(); + f_init(1); f_bssap_reset(); dt := f_est_dchan('23'O, 23, '00010203040506'O); @@ -727,7 +727,7 @@ testcase TC_rll_est_ind_inact_lchan() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var octetstring l3 := '00010203040506'O; @@ -751,7 +751,7 @@ testcase TC_rll_est_ind_inval_sapi1() runs on test_CT { var RslChannelNr chan_nr; - f_init(); + f_init(1); f_bssap_reset(); chan_nr := f_chreq_act_ack() @@ -777,7 +777,7 @@ testcase TC_rll_est_ind_inval_sapi3() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var RslChannelNr chan_nr := f_chreq_act_ack(); @@ -802,7 +802,7 @@ testcase TC_rll_est_ind_inval_sacch() runs on test_CT { timer T := 2.0; - f_init(); + f_init(1); f_bssap_reset(); var RslChannelNr chan_nr := f_chreq_act_ack(); @@ -829,7 +829,7 @@ testcase TC_ctrl_msc_connection_status() runs on test_CT { var charstring ctrl_resp; - f_init(); + f_init(1); f_bssap_reset(); /* See https://osmocom.org/issues/2729 */ @@ -840,7 +840,7 @@ testcase TC_ctrl() runs on test_CT { var charstring ctrl_resp; - f_init(); + f_init(1); f_bssap_reset(); /* all below values must match the osmo-bsc.cfg config file used */ @@ -1167,7 +1167,7 @@ testcase TC_rsl_drop_counter() runs on test_CT { var integer rsl_fail; - f_init(); + f_init(1); f_bssap_reset(); rsl_fail := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "rsl_fail"); @@ -1220,7 +1220,7 @@ testcase TC_assignment_fr_a5_0() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_0), testcasename()); @@ -1247,7 +1247,7 @@ testcase TC_assignment_fr_a5_1() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1), testcasename()); @@ -1269,7 +1269,7 @@ testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_1_codec_missing), testcasename()); @@ -1294,7 +1294,7 @@ testcase TC_assignment_fr_a5_3() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_3), testcasename()); @@ -1320,7 +1320,7 @@ testcase TC_assignment_fr_a5_4() runs on test_CT { var MSC_ConnHdlr vc_conn; - f_init(true); + f_init(1, true); f_sleep(1.0); vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5_4), testcasename()); -- To view, visit https://gerrit.osmocom.org/5454 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife3ec4900a73a29c2ef258a5a9d38b95ced8dc86 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:00:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:00:56 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD Message-ID: Review at https://gerrit.osmocom.org/5457 MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD In all RSL messages the link identifier is usually the second IE. However, as the only known exception, the RSL Encryption Command has it as third IE. Fixes the following error message: Dynamic test case error: Using non-selected field link_id in a value of union type @RSL_Types.RSL_IE_Body Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/57/5457/1 diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index a76d1d6..028f1b4 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -96,6 +96,11 @@ function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; var RslLinkId link_id := orig.ies[1].body.link_id; + if (orig.msg_type == RSL_MT_ENCR_CMD) { + link_id := orig.ies[2].body.link_id; + } else { + link_id := orig.ies[1].body.link_id; + } RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } -- To view, visit https://gerrit.osmocom.org/5457 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:02:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:02:53 +0000 Subject: osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5457 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:02:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:02:56 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD ...................................................................... MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD In all RSL messages the link identifier is usually the second IE. However, as the only known exception, the RSL Encryption Command has it as third IE. Fixes the following error message: Dynamic test case error: Using non-selected field link_id in a value of union type @RSL_Types.RSL_IE_Body Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index a76d1d6..028f1b4 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -96,6 +96,11 @@ function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; var RslLinkId link_id := orig.ies[1].body.link_id; + if (orig.msg_type == RSL_MT_ENCR_CMD) { + link_id := orig.ies[2].body.link_id; + } else { + link_id := orig.ies[1].body.link_id; + } RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } -- To view, visit https://gerrit.osmocom.org/5457 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:03:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:03:48 +0000 Subject: osmo-sgsn[master]: configure.ac: remove pcap check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5441 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:04:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:04:14 +0000 Subject: osmo-sgsn[master]: .gitignore: remove non-existent /src/utils exludes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5440 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I674da025df4b5d6bcf585a0c764ff186c9281121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:04:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:04:23 +0000 Subject: osmo-sgsn[master]: configure.ac: remove unused libcdk check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5442 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:05:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:05:02 +0000 Subject: [PATCH] osmo-sgsn[master]: .service: remove OpenBSC from service desription In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5443 to look at the new patch set (#2). .service: remove OpenBSC from service desription Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a --- M contrib/systemd/osmo-sgsn.service 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/43/5443/2 diff --git a/contrib/systemd/osmo-sgsn.service b/contrib/systemd/osmo-sgsn.service index bf6a8e0..0991c70 100644 --- a/contrib/systemd/osmo-sgsn.service +++ b/contrib/systemd/osmo-sgsn.service @@ -1,5 +1,5 @@ [Unit] -Description=OpenBSC SGSN +Description=Osmocom SGSN (Serving GPRS Support Node) Wants=osmo-hlr.service After=osmo-hlr.service After=osmo-hnbgw.service -- To view, visit https://gerrit.osmocom.org/5443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:05:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:05:07 +0000 Subject: [MERGED] osmo-sgsn[master]: configure.ac: remove unused libcdk check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure.ac: remove unused libcdk check ...................................................................... configure.ac: remove unused libcdk check libcdk isn't used Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e --- M configure.ac 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 225a534..8f279fd 100644 --- a/configure.ac +++ b/configure.ac @@ -80,11 +80,6 @@ dnl checks for header files AC_HEADER_STDC -found_cdk=yes -AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no) -AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes) - - dnl Checks for typedefs, structures and compiler characteristics AC_ARG_ENABLE(sanitize, -- To view, visit https://gerrit.osmocom.org/5442 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea2d61b34e9242bf59a1eb242c5cf1d82f625f2e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:05:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:05:07 +0000 Subject: [MERGED] osmo-sgsn[master]: .gitignore: remove non-existent /src/utils exludes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: .gitignore: remove non-existent /src/utils exludes ...................................................................... .gitignore: remove non-existent /src/utils exludes Change-Id: I674da025df4b5d6bcf585a0c764ff186c9281121 --- M .gitignore 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index b8c841f..5f6aee2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,6 @@ Makefile.in bscconfig.h bscconfig.h.in -src/utils/meas_vis -src/utils/meas_json -src/utils/osmo-meas-pcap2db -src/utils/osmo-meas-udp2db -src/utils/smpp_mirror *.*~ *.sw? .libs -- To view, visit https://gerrit.osmocom.org/5440 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I674da025df4b5d6bcf585a0c764ff186c9281121 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:05:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:05:07 +0000 Subject: [MERGED] osmo-sgsn[master]: configure.ac: remove pcap check In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure.ac: remove pcap check ...................................................................... configure.ac: remove pcap check libpcap isn't used in osmo-sgsn Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671 --- M configure.ac 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index a1dbce5..225a534 100644 --- a/configure.ac +++ b/configure.ac @@ -80,10 +80,6 @@ dnl checks for header files AC_HEADER_STDC -found_pcap=yes -AC_CHECK_HEADERS(pcap/pcap.h,,found_pcap=no) -AM_CONDITIONAL(HAVE_PCAP, test "$found_pcap" = yes) - found_cdk=yes AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no) AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes) -- To view, visit https://gerrit.osmocom.org/5441 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47880dba1f6855f31b5b6481eeb1027abc2a2671 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:48:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:48:15 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Update readme + source code comments Message-ID: Review at https://gerrit.osmocom.org/5458 BSC_Tests: Update readme + source code comments Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922 --- M bsc/BSC_Tests.ttcn M bsc/README.txt 2 files changed, 75 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/58/5458/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c66dda7..0fec42b 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1,5 +1,23 @@ module BSC_Tests { +/* Integration Tests for OsmoBSC + * (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests OsmoBSC while emulating both multiple BTS + MS as + * well as the MSC. See README for more details. + * + * There are test cases that run in so-called 'handler mode' and test cases + * that run directly on top of the BSSAP and RSL CodecPorts. The "handler mode" + * tests abstract the multiplexing/demultiplexing of multiple SCCP connections + * and/or RSL channels and are hence suitable for higher-level test cases, while + * the "raw" tests directly on top of the CodecPorts are more suitable for lower- + * level testing. + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; @@ -50,37 +68,57 @@ } - +/* per-BTS state which we keep */ type record BTS_State { + /* component reference to the IPA_Client component used for RSL */ IPA_Client rsl } type component test_CT extends BSSAP_Adapter_CT { + /* Array of per-BTS state */ var BTS_State bts[NUM_BTS]; + /* array of per-BTS RSL test ports */ port IPA_RSL_PT IPA_RSL[NUM_BTS]; + /* component reference to the IPA_Client component used for CTRL to BSC */ var IPA_Client ctrl; + /* test port for the CTRL interface of the BSC */ port IPA_CTRL_PT IPA_CTRL; + /* are we initialized yet */ var boolean g_initialized := false; + + /* global test case guard timer */ timer T_guard := 30.0; } modulepar { + /* IP address at which the BSC can be reached */ charstring mp_bsc_ip := "127.0.0.1"; + /* port number to which to establish the IPA RSL connections */ integer mp_bsc_rsl_port := 3003; + /* port number to which to establish the IPA CTRL connection */ integer mp_bsc_ctrl_port := 4249; } type record IPA_Client { + /* IPA Emulation component reference */ IPA_Emulation_CT vc_IPA, + /* Unit-ID and other CCM parameters to use for IPA client emulation */ IPA_CCM_Parameters ccm_pars, + /* String identifier for this IPA Client */ charstring id, - + /* Associated RSL Emulation Component (if any). Only used in "Handler mode" */ RSL_Emulation_CT vc_RSL optional } +/*! Start the IPA/RSL related bits for one IPA_Client. + * \param clnt IPA_Client for which to establish + * \param bsc_host IP address / hostname of the BSC + * \param bsc_port TCP port number of the BSC + * \param i number identifying this BTS + * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i, boolean handler_mode := false) runs on test_CT { @@ -124,6 +162,7 @@ } } +/*! Start the CTRL connection to the specified BSC IP+Port */ function f_ipa_ctrl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) runs on test_CT { timer T := 10.0; @@ -147,7 +186,7 @@ } } - +/* Wait for the OML connection to be brought up by the external osmo-bts-omldummy */ function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on test_CT { timer T := secs_max; T.start; @@ -168,12 +207,14 @@ } } +/* sleep for given number of (fractional) seconds */ function f_sleep(float seconds) { timer T := seconds; T.start; T.timeout; } +/* global altstep for global guard timer; also takes care of responding RESET witH RESET-ACK */ altstep as_Tguard() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; [] T_guard.timeout { setverdict(fail, "Timeout of T_guard"); } @@ -185,6 +226,9 @@ } } +/* global initialization function + * \param nr_bts Number of BTSs we should start/bring up + * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { var integer i; @@ -211,6 +255,7 @@ activate(as_Tguard()); } +/* expect to receive a RSL message matching a specified templaten on a given BTS / stream */ function f_exp_ipa_rx(integer bts_nr, template RSL_Message t_rx, float t_secs := 2.0, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) runs on test_CT return RSL_Message { var ASP_RSL_Unitdata rx_rsl_ud; @@ -230,6 +275,7 @@ return rx_rsl_ud.rsl; } +/* helper function to transmit RSL on a given BTS/stream */ function f_ipa_tx(integer bts_nr, template RSL_Message t_tx, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) runs on test_CT { IPA_RSL[bts_nr].send(ts_ASP_RSL_UD(sid, t_tx)); diff --git a/bsc/README.txt b/bsc/README.txt index 52e212b..aa785ad 100644 --- a/bsc/README.txt +++ b/bsc/README.txt @@ -1,4 +1,24 @@ -Integration Tests for OsmoBSC which we can perform from TTCN-3 +Integration Tests for OsmoBSC +----------------------------- + +This test suite tests OsmoBSC while emulating both multiple BTS + MS as +well as the MSC. + +In terms of external entities, you will need to run +* osmo-mgw in order to properly terminate the MGCP commands by the BSC +* osmo-stp as STP between the simulated MSC and osmo-bsc +* 3x osmo-bts-omldummy as this test suite only implements RSL and no OML + +The included jenkins.sh script, together with the Dockerfiles from +http://git.osmocom.org/docker-playground/ can be used to run both the +osmo-bsc-under-test as well as the extenal entities and the tester. + + +Further Test Ideas +------------------ + +This is a random list of things about things possible to test. +Asterisks '*' are TODO, while 'x' means already implemented. = exhaustion of resources @@ -28,7 +48,7 @@ * with no CIC and no AoIP * with IPv6 Address in AoIP * with LCLS information -* supported/unsupported/invalid ciphers +x supported/unsupported/invalid ciphers * supported/unsupported/invalid codecs * inconsistent channel type + codec + codec-list * on full BTS -> fail @@ -85,3 +105,7 @@ * changes in BCCH FILLING * changes in SACCH FILLING += dynamic TS switching + +* TBD + -- To view, visit https://gerrit.osmocom.org/5458 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:48:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:48:15 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Delete unused/dead code Message-ID: Review at https://gerrit.osmocom.org/5459 BSC_Tests: Delete unused/dead code Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda --- D bsc/BTS_Simulation.ttcn D bsc/RSL_Tests.ttcn 2 files changed, 0 insertions(+), 84 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/5459/1 diff --git a/bsc/BTS_Simulation.ttcn b/bsc/BTS_Simulation.ttcn deleted file mode 100644 index de78231..0000000 --- a/bsc/BTS_Simulation.ttcn +++ /dev/null @@ -1,44 +0,0 @@ -module BTS_Simulation { - -/* Start an IPA client and bind the RSL Emulation on top; we assume that OML - * is handled elsewhere! */ - -import from IPL4asp_Types all; -import from IPA_Emulation all; -import from RSL_Emulation all; -import from RSL_Tests all; - -type component BTS_CT { - var IPA_Emulation_CT vc_IPA; - var RSL_Emulation_CT vc_RSL; - var IPA_CCM_Parameters ccm_pars; -} - -function main(charstring bsc_host, PortNumber bsc_port, charstring id) runs on BTS_CT -{ - vc_IPA := IPA_Emulation_CT.create(id & "-IPA"); - vc_RSL := RSL_Emulation_CT.create(id & "-RSL"); - ccm_pars := c_IPA_default_ccm_pars; - ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; - ccm_pars.unit_id := "1234/0/0"; - - map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(vc_IPA:IPA_RSL_PORT, vc_RSL:IPA_PT); - - vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, ccm_pars)); - vc_RSL.start(RSL_Emulation.main()); - - var RSL_Tests_CT vc_DCHAN; - vc_DCHAN := RSL_Tests_CT.create(id & "-DCHAN"); - connect(vc_DCHAN:RSL, vc_RSL:CLIENT_PT); - vc_DCHAN.start(RSL_Tests.test_mahlzeit('901700123456789'H)); - - - /* wait until termination of respective component */ - vc_RSL.done; - vc_IPA.done; -} - - - -} diff --git a/bsc/RSL_Tests.ttcn b/bsc/RSL_Tests.ttcn deleted file mode 100644 index 7c0cf7d..0000000 --- a/bsc/RSL_Tests.ttcn +++ /dev/null @@ -1,40 +0,0 @@ -module RSL_Tests { - -import from GSM_Types all; -import from RSL_Types all; -import from MobileL3_Types all; -import from MobileL3_CommonIE_Types all; -import from L3_Templates all; -import from RSL_Emulation all; - -type component RSL_Tests_CT extends RSL_DchanHdlr { -} - -private function f_rx_l3(PDU_ML3_NW_MS l3) runs on RSL_Tests_CT { - log("L3 received ", l3); - if (ischosen(l3.msgs.rrm.channelRelease)) { - } -} - -function test_mahlzeit(hexstring imsi) runs on RSL_Tests_CT { - - var RSL_Message rsl; - var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); - var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi)); - var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); - timer T := 1.0; - - f_chan_est('23'O, enc_PDU_ML3_MS_NW(l3_info), link_id, 23); - /* if we reach here, we have established a dedicated channel */ - - alt { - [] RSL.receive(tr_RSL_MsgTypeR(RSL_MT_DATA_REQ)) -> value rsl { - var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); - f_rx_l3(l3); - } - } -} - - - -} -- To view, visit https://gerrit.osmocom.org/5459 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:49:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:49:24 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Update readme + source code comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5458 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 18:49:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 18:49:26 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Update readme + source code comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Update readme + source code comments ...................................................................... BSC_Tests: Update readme + source code comments Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922 --- M bsc/BSC_Tests.ttcn M bsc/README.txt 2 files changed, 75 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c66dda7..0fec42b 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1,5 +1,23 @@ module BSC_Tests { +/* Integration Tests for OsmoBSC + * (C) 2017 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * This test suite tests OsmoBSC while emulating both multiple BTS + MS as + * well as the MSC. See README for more details. + * + * There are test cases that run in so-called 'handler mode' and test cases + * that run directly on top of the BSSAP and RSL CodecPorts. The "handler mode" + * tests abstract the multiplexing/demultiplexing of multiple SCCP connections + * and/or RSL channels and are hence suitable for higher-level test cases, while + * the "raw" tests directly on top of the CodecPorts are more suitable for lower- + * level testing. + */ + import from General_Types all; import from Osmocom_Types all; import from GSM_Types all; @@ -50,37 +68,57 @@ } - +/* per-BTS state which we keep */ type record BTS_State { + /* component reference to the IPA_Client component used for RSL */ IPA_Client rsl } type component test_CT extends BSSAP_Adapter_CT { + /* Array of per-BTS state */ var BTS_State bts[NUM_BTS]; + /* array of per-BTS RSL test ports */ port IPA_RSL_PT IPA_RSL[NUM_BTS]; + /* component reference to the IPA_Client component used for CTRL to BSC */ var IPA_Client ctrl; + /* test port for the CTRL interface of the BSC */ port IPA_CTRL_PT IPA_CTRL; + /* are we initialized yet */ var boolean g_initialized := false; + + /* global test case guard timer */ timer T_guard := 30.0; } modulepar { + /* IP address at which the BSC can be reached */ charstring mp_bsc_ip := "127.0.0.1"; + /* port number to which to establish the IPA RSL connections */ integer mp_bsc_rsl_port := 3003; + /* port number to which to establish the IPA CTRL connection */ integer mp_bsc_ctrl_port := 4249; } type record IPA_Client { + /* IPA Emulation component reference */ IPA_Emulation_CT vc_IPA, + /* Unit-ID and other CCM parameters to use for IPA client emulation */ IPA_CCM_Parameters ccm_pars, + /* String identifier for this IPA Client */ charstring id, - + /* Associated RSL Emulation Component (if any). Only used in "Handler mode" */ RSL_Emulation_CT vc_RSL optional } +/*! Start the IPA/RSL related bits for one IPA_Client. + * \param clnt IPA_Client for which to establish + * \param bsc_host IP address / hostname of the BSC + * \param bsc_port TCP port number of the BSC + * \param i number identifying this BTS + * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ function f_ipa_rsl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i, boolean handler_mode := false) runs on test_CT { @@ -124,6 +162,7 @@ } } +/*! Start the CTRL connection to the specified BSC IP+Port */ function f_ipa_ctrl_start(inout IPA_Client clnt, charstring bsc_host, PortNumber bsc_port, integer i) runs on test_CT { timer T := 10.0; @@ -147,7 +186,7 @@ } } - +/* Wait for the OML connection to be brought up by the external osmo-bts-omldummy */ function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on test_CT { timer T := secs_max; T.start; @@ -168,12 +207,14 @@ } } +/* sleep for given number of (fractional) seconds */ function f_sleep(float seconds) { timer T := seconds; T.start; T.timeout; } +/* global altstep for global guard timer; also takes care of responding RESET witH RESET-ACK */ altstep as_Tguard() runs on test_CT { var BSSAP_N_UNITDATA_ind ud_ind; [] T_guard.timeout { setverdict(fail, "Timeout of T_guard"); } @@ -185,6 +226,9 @@ } } +/* global initialization function + * \param nr_bts Number of BTSs we should start/bring up + * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs on test_CT { var integer i; @@ -211,6 +255,7 @@ activate(as_Tguard()); } +/* expect to receive a RSL message matching a specified templaten on a given BTS / stream */ function f_exp_ipa_rx(integer bts_nr, template RSL_Message t_rx, float t_secs := 2.0, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) runs on test_CT return RSL_Message { var ASP_RSL_Unitdata rx_rsl_ud; @@ -230,6 +275,7 @@ return rx_rsl_ud.rsl; } +/* helper function to transmit RSL on a given BTS/stream */ function f_ipa_tx(integer bts_nr, template RSL_Message t_tx, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) runs on test_CT { IPA_RSL[bts_nr].send(ts_ASP_RSL_UD(sid, t_tx)); diff --git a/bsc/README.txt b/bsc/README.txt index 52e212b..aa785ad 100644 --- a/bsc/README.txt +++ b/bsc/README.txt @@ -1,4 +1,24 @@ -Integration Tests for OsmoBSC which we can perform from TTCN-3 +Integration Tests for OsmoBSC +----------------------------- + +This test suite tests OsmoBSC while emulating both multiple BTS + MS as +well as the MSC. + +In terms of external entities, you will need to run +* osmo-mgw in order to properly terminate the MGCP commands by the BSC +* osmo-stp as STP between the simulated MSC and osmo-bsc +* 3x osmo-bts-omldummy as this test suite only implements RSL and no OML + +The included jenkins.sh script, together with the Dockerfiles from +http://git.osmocom.org/docker-playground/ can be used to run both the +osmo-bsc-under-test as well as the extenal entities and the tester. + + +Further Test Ideas +------------------ + +This is a random list of things about things possible to test. +Asterisks '*' are TODO, while 'x' means already implemented. = exhaustion of resources @@ -28,7 +48,7 @@ * with no CIC and no AoIP * with IPv6 Address in AoIP * with LCLS information -* supported/unsupported/invalid ciphers +x supported/unsupported/invalid ciphers * supported/unsupported/invalid codecs * inconsistent channel type + codec + codec-list * on full BTS -> fail @@ -85,3 +105,7 @@ * changes in BCCH FILLING * changes in SACCH FILLING += dynamic TS switching + +* TBD + -- To view, visit https://gerrit.osmocom.org/5458 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b7d0e504e3e94077d674b464f39bd8851941922 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:26:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:26:09 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Delete unused/dead code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5459 to look at the new patch set (#2). BSC_Tests: Delete unused/dead code Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda --- M bsc/BSC_Tests.ttcn D bsc/BTS_Simulation.ttcn D bsc/RSL_Tests.ttcn 3 files changed, 0 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/5459/2 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 0fec42b..b530db2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -39,8 +39,6 @@ import from L3_Templates all; import from GSM_RR_Types all; -import from RSL_Tests all; - const integer NUM_BTS := 3; const float T3101_MAX := 12.0; diff --git a/bsc/BTS_Simulation.ttcn b/bsc/BTS_Simulation.ttcn deleted file mode 100644 index de78231..0000000 --- a/bsc/BTS_Simulation.ttcn +++ /dev/null @@ -1,44 +0,0 @@ -module BTS_Simulation { - -/* Start an IPA client and bind the RSL Emulation on top; we assume that OML - * is handled elsewhere! */ - -import from IPL4asp_Types all; -import from IPA_Emulation all; -import from RSL_Emulation all; -import from RSL_Tests all; - -type component BTS_CT { - var IPA_Emulation_CT vc_IPA; - var RSL_Emulation_CT vc_RSL; - var IPA_CCM_Parameters ccm_pars; -} - -function main(charstring bsc_host, PortNumber bsc_port, charstring id) runs on BTS_CT -{ - vc_IPA := IPA_Emulation_CT.create(id & "-IPA"); - vc_RSL := RSL_Emulation_CT.create(id & "-RSL"); - ccm_pars := c_IPA_default_ccm_pars; - ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; - ccm_pars.unit_id := "1234/0/0"; - - map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(vc_IPA:IPA_RSL_PORT, vc_RSL:IPA_PT); - - vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, ccm_pars)); - vc_RSL.start(RSL_Emulation.main()); - - var RSL_Tests_CT vc_DCHAN; - vc_DCHAN := RSL_Tests_CT.create(id & "-DCHAN"); - connect(vc_DCHAN:RSL, vc_RSL:CLIENT_PT); - vc_DCHAN.start(RSL_Tests.test_mahlzeit('901700123456789'H)); - - - /* wait until termination of respective component */ - vc_RSL.done; - vc_IPA.done; -} - - - -} diff --git a/bsc/RSL_Tests.ttcn b/bsc/RSL_Tests.ttcn deleted file mode 100644 index 7c0cf7d..0000000 --- a/bsc/RSL_Tests.ttcn +++ /dev/null @@ -1,40 +0,0 @@ -module RSL_Tests { - -import from GSM_Types all; -import from RSL_Types all; -import from MobileL3_Types all; -import from MobileL3_CommonIE_Types all; -import from L3_Templates all; -import from RSL_Emulation all; - -type component RSL_Tests_CT extends RSL_DchanHdlr { -} - -private function f_rx_l3(PDU_ML3_NW_MS l3) runs on RSL_Tests_CT { - log("L3 received ", l3); - if (ischosen(l3.msgs.rrm.channelRelease)) { - } -} - -function test_mahlzeit(hexstring imsi) runs on RSL_Tests_CT { - - var RSL_Message rsl; - var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); - var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi)); - var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); - timer T := 1.0; - - f_chan_est('23'O, enc_PDU_ML3_MS_NW(l3_info), link_id, 23); - /* if we reach here, we have established a dedicated channel */ - - alt { - [] RSL.receive(tr_RSL_MsgTypeR(RSL_MT_DATA_REQ)) -> value rsl { - var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); - f_rx_l3(l3); - } - } -} - - - -} -- To view, visit https://gerrit.osmocom.org/5459 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:26:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:26:40 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Delete unused/dead code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5459 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:26:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:26:43 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Delete unused/dead code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Delete unused/dead code ...................................................................... BSC_Tests: Delete unused/dead code Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda --- M bsc/BSC_Tests.ttcn D bsc/BTS_Simulation.ttcn D bsc/RSL_Tests.ttcn 3 files changed, 0 insertions(+), 86 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 0fec42b..b530db2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -39,8 +39,6 @@ import from L3_Templates all; import from GSM_RR_Types all; -import from RSL_Tests all; - const integer NUM_BTS := 3; const float T3101_MAX := 12.0; diff --git a/bsc/BTS_Simulation.ttcn b/bsc/BTS_Simulation.ttcn deleted file mode 100644 index de78231..0000000 --- a/bsc/BTS_Simulation.ttcn +++ /dev/null @@ -1,44 +0,0 @@ -module BTS_Simulation { - -/* Start an IPA client and bind the RSL Emulation on top; we assume that OML - * is handled elsewhere! */ - -import from IPL4asp_Types all; -import from IPA_Emulation all; -import from RSL_Emulation all; -import from RSL_Tests all; - -type component BTS_CT { - var IPA_Emulation_CT vc_IPA; - var RSL_Emulation_CT vc_RSL; - var IPA_CCM_Parameters ccm_pars; -} - -function main(charstring bsc_host, PortNumber bsc_port, charstring id) runs on BTS_CT -{ - vc_IPA := IPA_Emulation_CT.create(id & "-IPA"); - vc_RSL := RSL_Emulation_CT.create(id & "-RSL"); - ccm_pars := c_IPA_default_ccm_pars; - ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; - ccm_pars.unit_id := "1234/0/0"; - - map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); - connect(vc_IPA:IPA_RSL_PORT, vc_RSL:IPA_PT); - - vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, ccm_pars)); - vc_RSL.start(RSL_Emulation.main()); - - var RSL_Tests_CT vc_DCHAN; - vc_DCHAN := RSL_Tests_CT.create(id & "-DCHAN"); - connect(vc_DCHAN:RSL, vc_RSL:CLIENT_PT); - vc_DCHAN.start(RSL_Tests.test_mahlzeit('901700123456789'H)); - - - /* wait until termination of respective component */ - vc_RSL.done; - vc_IPA.done; -} - - - -} diff --git a/bsc/RSL_Tests.ttcn b/bsc/RSL_Tests.ttcn deleted file mode 100644 index 7c0cf7d..0000000 --- a/bsc/RSL_Tests.ttcn +++ /dev/null @@ -1,40 +0,0 @@ -module RSL_Tests { - -import from GSM_Types all; -import from RSL_Types all; -import from MobileL3_Types all; -import from MobileL3_CommonIE_Types all; -import from L3_Templates all; -import from RSL_Emulation all; - -type component RSL_Tests_CT extends RSL_DchanHdlr { -} - -private function f_rx_l3(PDU_ML3_NW_MS l3) runs on RSL_Tests_CT { - log("L3 received ", l3); - if (ischosen(l3.msgs.rrm.channelRelease)) { - } -} - -function test_mahlzeit(hexstring imsi) runs on RSL_Tests_CT { - - var RSL_Message rsl; - var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); - var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi)); - var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi)); - timer T := 1.0; - - f_chan_est('23'O, enc_PDU_ML3_MS_NW(l3_info), link_id, 23); - /* if we reach here, we have established a dedicated channel */ - - alt { - [] RSL.receive(tr_RSL_MsgTypeR(RSL_MT_DATA_REQ)) -> value rsl { - var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload); - f_rx_l3(l3); - } - } -} - - - -} -- To view, visit https://gerrit.osmocom.org/5459 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife089a2c292f4eae7a7c76dd2f112e7821f02cda Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:52:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:52:04 +0000 Subject: [PATCH] libosmocore[master]: gsm0808_create_cipher_reject: Fix encoding of Cause IE Message-ID: Review at https://gerrit.osmocom.org/5460 gsm0808_create_cipher_reject: Fix encoding of Cause IE The Cause IE in the 08.08 CIPHER MODE REJECT is a normal TLV IE, and not just a value. Let's make sure we encode the cause value properly. Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Closes: OS#2766 --- M src/gsm/gsm0808.c M tests/gsm0808/gsm0808_test.c 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/5460/1 diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 2396a10..abf3d25 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -240,7 +240,8 @@ if (!msg) return NULL; - msgb_tv_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT, cause); + msgb_v_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT); + msgb_tlv_put(msg, GSM0808_IE_CAUSE, 1, &cause); msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 28bd7f7..189d548 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -233,7 +233,7 @@ static void test_create_cipher_reject() { - static const uint8_t res[] = { 0x00, 0x02, 0x59, 0x23 }; + static const uint8_t res[] = { 0x00, 0x04, 0x59, 0x04, 0x01, 0x23 }; struct msgb *msg; printf("Testing creating Cipher Reject\n"); -- To view, visit https://gerrit.osmocom.org/5460 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:58:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:58:50 +0000 Subject: libosmocore[master]: gsm0808_create_cipher_reject: Fix encoding of Cause IE In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5460 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 19:58:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 19:58:52 +0000 Subject: [MERGED] libosmocore[master]: gsm0808_create_cipher_reject: Fix encoding of Cause IE In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0808_create_cipher_reject: Fix encoding of Cause IE ...................................................................... gsm0808_create_cipher_reject: Fix encoding of Cause IE The Cause IE in the 08.08 CIPHER MODE REJECT is a normal TLV IE, and not just a value. Let's make sure we encode the cause value properly. Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Closes: OS#2766 --- M src/gsm/gsm0808.c M tests/gsm0808/gsm0808_test.c 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 2396a10..abf3d25 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -240,7 +240,8 @@ if (!msg) return NULL; - msgb_tv_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT, cause); + msgb_v_put(msg, BSS_MAP_MSG_CIPHER_MODE_REJECT); + msgb_tlv_put(msg, GSM0808_IE_CAUSE, 1, &cause); msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg)); diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 28bd7f7..189d548 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -233,7 +233,7 @@ static void test_create_cipher_reject() { - static const uint8_t res[] = { 0x00, 0x02, 0x59, 0x23 }; + static const uint8_t res[] = { 0x00, 0x04, 0x59, 0x04, 0x01, 0x23 }; struct msgb *msg; printf("Testing creating Cipher Reject\n"); -- To view, visit https://gerrit.osmocom.org/5460 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 20:12:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 20:12:16 +0000 Subject: libosmocore[master]: Do not allocate already existing counter group In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5418 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 17 20:12:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 17 Dec 2017 20:12:34 +0000 Subject: [MERGED] libosmocore[master]: Do not allocate already existing counter group In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Do not allocate already existing counter group ...................................................................... Do not allocate already existing counter group Check that no group with the given name and index already exist before allocating it. Add corresponding test case. Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Related: OS#2757 --- M src/rate_ctr.c M tests/stats/stats_test.c 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 477339f..c27ac68 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,6 +190,9 @@ unsigned int size; struct rate_ctr_group *group; + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) + return NULL; /* group already exist */ + size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index b302b37..35faf9a 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -311,7 +311,7 @@ { struct osmo_stats_reporter *srep1, *srep2, *srep; struct osmo_stat_item_group *statg1, *statg2; - struct rate_ctr_group *ctrg1, *ctrg2, *ctrg3; + struct rate_ctr_group *ctrg1, *ctrg2, *ctrg3, *ctrg_dup; void *stats_ctx = talloc_named_const(NULL, 1, "stats test context"); int rc; @@ -327,6 +327,11 @@ OSMO_ASSERT(ctrg1 != NULL); ctrg2 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); OSMO_ASSERT(ctrg2 != NULL); + + ctrg_dup = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); + if (ctrg_dup != NULL && ctrg2 != NULL) + printf("FAIL: successfully allocated already existing counter group!\n"); + ctrg3 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc_dot, 3); OSMO_ASSERT(ctrg3 != NULL); -- To view, visit https://gerrit.osmocom.org/5418 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 21:54:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 21:54:27 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: NOT FOR MERGE: testing gerrit trigger In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: testing gerrit trigger ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5417 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ifd090b439ff0be29f4da61bce6c0dfb38a005174 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 21:55:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 21:55:14 +0000 Subject: [ABANDON] osmo-iuh[master]: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: fix osmo-hnbgw HNBAP: different RNC Id for each hNodeB ...................................................................... Abandoned proper fix by https://gerrit.osmocom.org/5381 -- To view, visit https://gerrit.osmocom.org/5264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I5ea89ebe60b2afc31d87fc1e2145e46f83c34f07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 17 21:57:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 21:57:55 +0000 Subject: [MERGED] libosmocore[master]: utils: add osmo_separated_identifiers_valid() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: utils: add osmo_separated_identifiers_valid() ...................................................................... utils: add osmo_separated_identifiers_valid() For validating CTRL input, we want to verify that an input variable is a series of valid osmo_identifier_valid() separated by dots. Allow validating any additional chars with identifiers, for CTRL vars will be just ".". Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 18 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 5c660cd..0973b4c 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -118,5 +118,6 @@ bool require_even); bool osmo_identifier_valid(const char *str); +bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); /*! @} */ diff --git a/src/utils.c b/src/utils.c index 8f56227..6cc823e 100644 --- a/src/utils.c +++ b/src/utils.c @@ -428,19 +428,23 @@ /*! Determine if a given identifier is valid, i.e. doesn't contain illegal chars * \param[in] str String to validate - * \returns true in case string contains valid identifier, false otherwise + * \param[in] sep_chars Permitted separation characters between identifiers. + * \returns true in case \a str contains only valid identifiers and sep_chars, false otherwise */ -bool osmo_identifier_valid(const char *str) +bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars) { /* characters that are illegal in names */ static const char illegal_chars[] = "., {}[]()<>|~\\^`'\"?=;/+*&%$#!"; unsigned int i; + size_t len; /* an empty string is not a valid identifier */ - if (!str || strlen(str) == 0) + if (!str || (len = strlen(str)) == 0) return false; - for (i = 0; i < strlen(str); i++) { + for (i = 0; i < len; i++) { + if (sep_chars && strchr(sep_chars, str[i])) + continue; /* check for 7-bit ASCII */ if (str[i] & 0x80) return false; @@ -454,4 +458,13 @@ return true; } +/*! Determine if a given identifier is valid, i.e. doesn't contain illegal chars + * \param[in] str String to validate + * \returns true in case \a str contains valid identifier, false otherwise + */ +bool osmo_identifier_valid(const char *str) +{ + return osmo_separated_identifiers_valid(str, NULL); +} + /*! @} */ -- To view, visit https://gerrit.osmocom.org/5428 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 17 21:57:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 21:57:58 +0000 Subject: [MERGED] libosmocore[master]: fix osmo_identifier_valid(): only allow printable characters In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix osmo_identifier_valid(): only allow printable characters ...................................................................... fix osmo_identifier_valid(): only allow printable characters In particular disallow ASCII 0..31 (control characters) and 127 (DEL). Change-Id: I04469988495af03c881fe81d7786ca7f71636299 --- M src/utils.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index bc5329d..8f56227 100644 --- a/src/utils.c +++ b/src/utils.c @@ -444,6 +444,8 @@ /* check for 7-bit ASCII */ if (str[i] & 0x80) return false; + if (!isprint((int)str[i])) + return false; /* check for some explicit reserved control characters */ if (strchr(illegal_chars, str[i])) return false; -- To view, visit https://gerrit.osmocom.org/5427 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04469988495af03c881fe81d7786ca7f71636299 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 17 22:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 22:22:35 +0000 Subject: [PATCH] libosmocore[master]: utils: add osmo_escape_str() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5429 to look at the new patch set (#3). utils: add osmo_escape_str() To report invalid characters in identifiers, it is desirable to escape any weird characters. Otherwise we might print stray newlines or control characters in the log output. ctrl_test.c already uses a print_escaped() function, which will be replaced by osmo_escape_str() in a subsequent patch. control_cmd.c will use osmo_escape_str() to log invalid identifiers. Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 167 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/5429/3 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0973b4c..72266ae 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -120,4 +120,7 @@ bool osmo_identifier_valid(const char *str); bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); +const char *osmo_escape_str(const char *str, int len); +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); + /*! @} */ diff --git a/src/utils.c b/src/utils.c index 6cc823e..109aac0 100644 --- a/src/utils.c +++ b/src/utils.c @@ -467,4 +467,91 @@ return osmo_separated_identifiers_valid(str, NULL); } +/*! Return the string with all non-printable characters escaped. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \param[inout] buf string buffer to write escaped characters to. + * \param[in] bufsize size of \a buf. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize) +{ + int in_pos = 0; + int next_unprintable = 0; + int out_pos = 0; + char *out = buf; + /* -1 to leave space for a final \0 */ + int out_len = bufsize-1; + + if (!str) + return "(null)"; + + if (in_len < 0) + in_len = strlen(str); + + while (in_pos < in_len) { + for (next_unprintable = in_pos; + next_unprintable < in_len && isprint((int)str[next_unprintable]) + && str[next_unprintable] != '"' + && str[next_unprintable] != '\\'; + next_unprintable++); + + if (next_unprintable == in_len + && in_pos == 0) + return str; + + while (in_pos < next_unprintable && out_pos < out_len) + out[out_pos++] = str[in_pos++]; + + if (out_pos == out_len || in_pos == in_len) + goto done; + + switch (str[next_unprintable]) { +#define BACKSLASH_CASE(c, repr) \ + case c: \ + if (out_pos > out_len-2) \ + goto done; \ + out[out_pos++] = '\\'; \ + out[out_pos++] = repr; \ + break + + BACKSLASH_CASE('\n', 'n'); + BACKSLASH_CASE('\r', 'r'); + BACKSLASH_CASE('\t', 't'); + BACKSLASH_CASE('\0', '0'); + BACKSLASH_CASE('\a', 'a'); + BACKSLASH_CASE('\b', 'b'); + BACKSLASH_CASE('\v', 'v'); + BACKSLASH_CASE('\f', 'f'); + BACKSLASH_CASE('\\', '\\'); + BACKSLASH_CASE('"', '"'); +#undef BACKSLASH_CASE + + default: + out_pos += snprintf(&out[out_pos], out_len - out_pos, "\\%u", (unsigned char)str[in_pos]); + if (out_pos > out_len) { + out_pos = out_len; + goto done; + } + break; + } + in_pos ++; + } + +done: + out[out_pos] = '\0'; + return out; +} + +/*! Return the string with all non-printable characters escaped. + * Call osmo_escape_str_buf() with a static buffer. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str(const char *str, int in_len) +{ + return osmo_escape_str_buf(str, in_len, namebuf, sizeof(namebuf)); +} + /*! @} */ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index e6d7ae8..b4f7cd3 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -323,6 +323,53 @@ } } +static void str_escape_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + + printf("\nTesting string escaping\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("\"%s\"\n", osmo_escape_str((const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("\"%s\"\n", osmo_escape_str("termi\nated", -1)); + + printf("- passthru:\n"); + res = osmo_escape_str(printable, -1); + if (res != printable) + printf("NOT passed through! \"%s\"\n", res); + else + printf("passed through unchanged \"%s\"\n", res); + + printf("- zero length:\n"); + printf("\"%s\"\n", osmo_escape_str("omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[7] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, sizeof(in_buf), out_buf, 10)); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- passthrough without truncation when no escaping needed:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[19] = 'E'; + in_buf[20] = '\0'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, -1, out_buf, 10)); + OSMO_ASSERT(out_buf[0] == 0x7f); +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -333,5 +380,6 @@ test_idtag_parsing(); test_is_hexstr(); bcd_test(); + str_escape_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 33a185b..fb1d62e 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -75,3 +75,32 @@ val=0xd, expected=D, found=D val=0xe, expected=E, found=E val=0xf, expected=F, found=F + +Testing string escaping +- all chars from 0 to 255 in batches of 16: +"\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15" +"\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\127" +"\128\129\130\131\132\133\134\135\136\137\138\139\140\141\142\143" +"\144\145\146\147\148\149\150\151\152\153\154\155\156\157\158\159" +"\160\161\162\163\164\165\166\167\168\169\170\171\172\173\174\175" +"\176\177\178\179\180\181\182\183\184\185\186\187\188\189\190\191" +"\192\193\194\195\196\197\198\199\200\201\202\203\204\205\206\207" +"\208\209\210\211\212\213\214\215\216\217\218\219\220\221\222\223" +"\224\225\226\227\228\229\230\231\232\233\234\235\236\237\238\239" +"\240\241\242\243\244\245\246\247\248\249\250\251\252\253\254\255" +- nul terminated: +"termi\nated" +- passthru: +passed through unchanged "printable" +- zero length: +"" +- truncation when too long: +"\axxxxxxE" +- passthrough without truncation when no escaping needed: +"xxxxxxxxxxxxxxxxxxxE" -- To view, visit https://gerrit.osmocom.org/5429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 22:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 22:22:35 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5432 to look at the new patch set (#3). ctrl_test: expand to test message handling and detect mem leaks Subsequent patches that tighten CTRL input validation will make the results more interesting. Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 197 insertions(+), 57 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/5432/3 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 2bc3128..b3fa05e 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include static void check_type(enum ctrl_type c) { @@ -24,18 +26,34 @@ struct msgb *msgb_from_string(const char *str) { - char *rc; + struct ipaccess_head *iph; + struct ipaccess_head_ext *ipx; + char *str_msg; size_t len = strlen(str) + 1; - /* ctrl_cmd_parse() appends a '\0' to the msgb, allow one more byte. */ - struct msgb *msg = msgb_alloc(len + 1, str); - msg->l2h = msg->head; - rc = (char*)msgb_put(msg, len); - OSMO_ASSERT(rc == (char*)msg->l2h); - strcpy(rc, str); + + struct msgb *msg = msgb_alloc(1024, str); + + iph = (void*)msgb_put(msg, sizeof(*iph)); + iph->proto = IPAC_PROTO_OSMO; + + ipx = (void*)msgb_put(msg, sizeof(*ipx)); + ipx->proto = IPAC_PROTO_EXT_CTRL; + + str_msg = (char*)msgb_put(msg, len); + msg->l2h = (void*)str_msg; + osmo_strlcpy(str_msg, str, len); + + iph->len = msgb_length(msg); return msg; } static void *ctx = NULL; + +struct one_test { + const char *cmd_str; + struct ctrl_cmd expect_parsed; + const char *reply_str; +}; void assert_same_str(const char *label, const char *expect, const char *got) { @@ -49,20 +67,22 @@ OSMO_ASSERT(expect == got); } -static void assert_parsing(const char *str, const struct ctrl_cmd *expect) +static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, const struct one_test *t) { struct ctrl_cmd *cmd; - struct msgb *msg = msgb_from_string(str); + struct msgb *msg = msgb_from_string(t->cmd_str); + int ctx_size_was; - printf("test parsing: '%s'\n", osmo_escape_str(str, -1)); + printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); + printf("parsing:\n"); cmd = ctrl_cmd_parse(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(expect->type == cmd->type); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); #define ASSERT_SAME_STR(field) \ - assert_same_str(#field, expect->field, cmd->field) + assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); ASSERT_SAME_STR(variable); @@ -72,35 +92,67 @@ talloc_free(cmd); msgb_free(msg); + printf("handling:\n"); + + ctx_size_was = talloc_total_size(ctx); + + msg = msgb_from_string(t->cmd_str); + ctrl_handle_msg(ctrl, ccon, msg); + + if (llist_empty(&ccon->write_queue.msg_queue)) { + if (t->reply_str) { + printf("Got no reply, but expected \"%s\"\n", osmo_escape_str(t->reply_str, -1)); + OSMO_ASSERT(!t->reply_str); + } + } else { + struct msgb *sent_msg = msgb_dequeue(&ccon->write_queue.msg_queue); + OSMO_ASSERT(sent_msg); + msgb_put_u8(sent_msg, 0); + + printf("replied: '%s'\n", osmo_escape_str((char*)msgb_l2(sent_msg), -1)); + OSMO_ASSERT(t->reply_str); + OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg))) + msgb_free(sent_msg); + } + osmo_wqueue_clear(&ccon->write_queue); + + msgb_free(msg); + + if (talloc_total_size(ctx) != ctx_size_was) { + printf("mem leak!\n"); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); + } + printf("ok\n"); } -struct one_parsing_test { - const char *cmd_str; - struct ctrl_cmd expect; -}; - -static const struct one_parsing_test test_parsing_list[] = { +static const struct one_test test_messages_list[] = { { "GET 1 variable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable", - } + }, + "ERROR 1 Command not found", }, { "GET 1 variable\n", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable\n", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 var\ni\nable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "var\ni\nable", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { @@ -108,7 +160,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value\n", { @@ -116,7 +170,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens", { @@ -124,7 +180,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens\n", { @@ -132,7 +190,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value", { @@ -140,7 +200,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value\n", { @@ -148,7 +210,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET weird_id variable value", { @@ -156,7 +220,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET weird_id variable value\n", { @@ -164,7 +230,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET 1 variable multiple value tokens", { @@ -172,7 +240,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable multiple value tokens\n", { @@ -180,7 +250,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces ", { @@ -188,7 +260,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -196,7 +270,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET \n special_char_id value", { @@ -204,7 +280,9 @@ .id = "\n", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \n Command not found", + }, { "SET \t special_char_id value", { @@ -212,17 +290,28 @@ .id = "\t", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \t Command not found", + }, }; -static void test_parsing() +static void test_messages() { + struct ctrl_handle *ctrl; + struct ctrl_connection *ccon; int i; - for (i = 0; i < ARRAY_SIZE(test_parsing_list); i++) - assert_parsing(test_parsing_list[i].cmd_str, - &test_parsing_list[i].expect); + ctrl = ctrl_handle_alloc2(ctx, NULL, NULL, 0); + ccon = talloc_zero(ctx, struct ctrl_connection); + + osmo_wqueue_init(&ccon->write_queue, 1); + + for (i = 0; i < ARRAY_SIZE(test_messages_list); i++) + assert_test(ctrl, ccon, &test_messages_list[i]); + + talloc_free(ccon); + talloc_free(ctrl); } static struct log_info_cat test_categories[] = { @@ -249,7 +338,7 @@ check_type(CTRL_TYPE_ERROR); check_type(64); - test_parsing(); + test_messages(); return 0; } diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 5775eb2..edf97ea 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -7,105 +7,156 @@ ctrl type 5 is TRAP -> 5 OK ctrl type 6 is ERROR -> 6 OK ctrl type 64 is unknown 0x40 [PARSE FAILED] -test parsing: 'GET 1 variable' +test: 'GET 1 variable' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable\n' +test: 'GET 1 variable\n' +parsing: id = '1' variable = 'variable\n' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 var\ni\nable' +test: 'GET 1 var\ni\nable' +parsing: id = '1' variable = 'var\ni\nable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value' +test: 'GET 1 variable value' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value\n' +test: 'GET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens' +test: 'GET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens\n' +test: 'GET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value' +test: 'SET 1 variable value' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value\n' +test: 'SET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET weird_id variable value' +test: 'SET weird_id variable value' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET weird_id variable value\n' +test: 'SET weird_id variable value\n' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET 1 variable multiple value tokens' +test: 'SET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable multiple value tokens\n' +test: 'SET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces ' +test: 'SET 1 variable value_with_trailing_spaces ' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces \n' +test: 'SET 1 variable value_with_trailing_spaces \n' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET \n special_char_id value' +test: 'SET \n special_char_id value' +parsing: id = '\n' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \n Command not found' ok -test parsing: 'SET \t special_char_id value' +test: 'SET \t special_char_id value' +parsing: id = '\t' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \t Command not found' ok -- To view, visit https://gerrit.osmocom.org/5432 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 17 22:22:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 17 Dec 2017 22:22:35 +0000 Subject: [PATCH] libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5438 to look at the new patch set (#3). ctrl: tighten CTRL input parsing Validate that incoming CTRL commands... - have decimal IDs, - return error on trailing characters, - have invalid characters in variable identifiers, - send detailed error messages as reply to the requestor. Adjust ctrl_test.{c,ok}, which best show the change in behavior. Message handling causes log messages on stderr; previously, stderr was empty. Add '[ignore]' in testsuite.at so that the nonempty stderr doesn't cause test failures. Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 --- M src/ctrl/control_cmd.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok M tests/testsuite.at 4 files changed, 144 insertions(+), 121 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/5438/3 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index c2ce2be..f32a200 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -281,6 +281,15 @@ return res; } +static bool id_str_valid(const char *str) +{ + for (;*str;str++) { + if (!isdigit(*str)) + return false; + } + return true; +} + /*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in * ctrl->reply on any error. * The caller is responsible to talloc_free() the returned struct pointer. */ @@ -306,6 +315,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request malformed"; + LOGP(DLCTRL, LOGL_NOTICE, "Malformed request: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -314,6 +324,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request type unknown"; + LOGP(DLCTRL, LOGL_NOTICE, "Request type unknown: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -323,6 +334,15 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Missing ID"; + LOGP(DLCTRL, LOGL_NOTICE, "Missing ID: \"%s\"\n", osmo_escape_str(str, -1)); + goto err; + } + + if (!id_str_valid(tmp)) { + cmd->type = CTRL_TYPE_ERROR; + cmd->id = "err"; + cmd->reply = "Invalid message ID number"; + LOGP(DLCTRL, LOGL_NOTICE, "Invalid message ID number: \"%s\"\n", osmo_escape_str(tmp, -1)); goto err; } cmd->id = talloc_strdup(cmd, tmp); @@ -331,14 +351,30 @@ switch (cmd->type) { case CTRL_TYPE_GET: - var = strtok_r(NULL, " ", &saveptr); + var = strtok_r(NULL, " \n", &saveptr); if (!var) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "GET incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete\n"); + LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete: \"%s\"\n", + osmo_escape_str(str, -1)); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); goto err; } cmd->variable = talloc_strdup(cmd, var); + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } LOGP(DLCTRL, LOGL_DEBUG, "Command: GET %s\n", cmd->variable); break; case CTRL_TYPE_SET: @@ -350,31 +386,57 @@ LOGP(DLCTRL, LOGL_NOTICE, "SET Command incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->value = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->value) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = %s\n", cmd->variable, cmd->value); + + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: case CTRL_TYPE_SET_REPLY: case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); if (!var || !val) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "Trap/Reply incomplete"; LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "Trap/Reply variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: %s\n", cmd->variable, cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: - var = strtok_r(NULL, "\0", &saveptr); + var = strtok_r(NULL, "", &saveptr); if (!var) { cmd->reply = ""; goto err; @@ -382,7 +444,8 @@ cmd->reply = talloc_strdup(cmd, var); if (!cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR %s\n", cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR \"%s\"\n", + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_UNKNOWN: default: diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 39ec61a..a38591f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -79,14 +79,19 @@ cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(t->expect_parsed.type == cmd->type); + if (t->expect_parsed.type != cmd->type) { + printf("type mismatch: got %s\n", get_value_string(ctrl_type_vals, cmd->type)); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); + } #define ASSERT_SAME_STR(field) \ assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); - ASSERT_SAME_STR(variable); - ASSERT_SAME_STR(value); + if (t->expect_parsed.type != CTRL_TYPE_ERROR) { + ASSERT_SAME_STR(variable); + ASSERT_SAME_STR(value); + } ASSERT_SAME_STR(reply); talloc_free(cmd); @@ -140,75 +145,66 @@ { .type = CTRL_TYPE_GET, .id = "1", - .variable = "variable\n", /* current bug */ + .variable = "variable", }, "ERROR 1 Command not found", }, { "GET 1 var\ni\nable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ni\nable", /* current bug */ + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 var\ti\table", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ti\table", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 var\ri\rable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ri\rable", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 variable value", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable value\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "SET 1 variable value", { @@ -218,7 +214,6 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET 1 variable value\n", { @@ -228,27 +223,22 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET weird_id variable value", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET weird_id variable value\n", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET 1 variable multiple value tokens", { @@ -278,7 +268,6 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -288,27 +277,22 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET \n special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\n", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \n Command not found", - + "ERROR err Invalid message ID number", }, { "SET \t special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\t", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \t Command not found", - + "ERROR err Invalid message ID number", }, { "GET_REPLY 1 variable OK", { @@ -317,7 +301,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, { "SET_REPLY 1 variable OK", { @@ -326,7 +309,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, }; diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 4a3a169..087ebbc 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -19,7 +19,7 @@ test: 'GET 1 variable\n' parsing: id = '1' -variable = 'variable\n' +variable = 'variable' value = '(null)' reply = '(null)' handling: @@ -28,65 +28,51 @@ test: 'GET 1 var\ni\nable' parsing: id = '1' -variable = 'var\ni\nable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 var\ti\table' parsing: id = '1' -variable = 'var\ti\table' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 var\ri\rable' parsing: id = '1' -variable = 'var\ri\rable' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 variable value' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable value\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'SET 1 variable value' parsing: @@ -108,21 +94,17 @@ ok test: 'SET weird_id variable value' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET weird_id variable value\n' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET 1 variable multiple value tokens' parsing: @@ -162,21 +144,17 @@ ok test: 'SET \n special_char_id value' parsing: -id = '\n' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \n Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET \t special_char_id value' parsing: -id = '\t' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \t Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'GET_REPLY 1 variable OK' parsing: diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..81730ee 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -18,7 +18,7 @@ AT_SETUP([ctrl]) AT_KEYWORDS([ctrl]) cat $abs_srcdir/ctrl/ctrl_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([kasumi]) -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 01:57:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 01:57:03 +0000 Subject: [PATCH] osmo-msc[master]: drop unused T* timers (BSC land, not MSC) Message-ID: Review at https://gerrit.osmocom.org/5461 drop unused T* timers (BSC land, not MSC) Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744 --- M include/osmocom/msc/gsm_data.h 1 file changed, 0 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/61/5461/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..6349fe0 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,18 +344,6 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; -#define GSM_T3101_DEFAULT 10 /* s */ -#define GSM_T3103_DEFAULT 5 /* s */ -#define GSM_T3105_DEFAULT 100 /* ms */ -#define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ -#define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 -#define GSM_T3115_DEFAULT 10 -#define GSM_T3117_DEFAULT 10 -#define GSM_T3119_DEFAULT 10 -#define GSM_T3122_DEFAULT 10 -#define GSM_T3141_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -420,19 +408,6 @@ unsigned int num_bts; struct llist_head bts_list; - /* timer values */ - int T3101; - int T3103; - int T3105; - int T3107; - int T3109; - int T3111; - int T3113; - int T3115; - int T3117; - int T3119; - int T3122; - int T3141; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; -- To view, visit https://gerrit.osmocom.org/5461 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 01:57:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 01:57:03 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: msc_paging_request: drop obsolete comment Message-ID: Review at https://gerrit.osmocom.org/5462 cosmetic: msc_paging_request: drop obsolete comment Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e --- M src/libmsc/gsm_subscriber.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/62/5462/1 diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index 8bc060f..a013e0e 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -109,8 +109,6 @@ /* The subscriber was last seen in subscr->lac. Find out which * BSCs/RNCs are responsible and send them a paging request via open * SCCP connections (if any). */ - /* TODO Implementing only RNC paging, since this is code on the iu branch. - * Need to add BSC paging at some point. */ switch (vsub->cs.attached_via_ran) { case RAN_GERAN_A: return a_iface_tx_paging(vsub->imsi, vsub->tmsi, vsub->lac); -- To view, visit https://gerrit.osmocom.org/5462 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 01:57:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 01:57:03 +0000 Subject: [PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging Message-ID: Review at https://gerrit.osmocom.org/5463 fix paging: add timeout to discard unsuccessful paging Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/vlr.h M src/libcommon-cs/common_cs.c M src/libmsc/gsm_subscriber.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 7 files changed, 298 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/5463/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 6349fe0..8a49d9b 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,6 +344,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; +#define MSC_PAGING_TIMEOUT_DEFAULT 60 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -408,6 +409,7 @@ unsigned int num_bts; struct llist_head bts_list; + unsigned int paging_timeout; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 9e6b12c..cd1ef94 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -156,6 +156,7 @@ struct { /* pending requests */ bool is_paging; + struct osmo_timer_list paging_timeout; /* list of struct subscr_request */ struct llist_head requests; uint8_t lac; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index bad8262..ef30aba 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -60,6 +60,8 @@ /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; + net->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index a013e0e..b534b3f 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -76,7 +76,10 @@ return -EINVAL; } - if (event == GSM_PAGING_SUCCEEDED) + osmo_timer_del(&vsub->cs.paging_timeout); + + if (event == GSM_PAGING_SUCCEEDED + || event == GSM_PAGING_EXPIRED) msc_stop_paging(vsub); /* Inform parts of the system we don't know */ @@ -126,6 +129,12 @@ return -EINVAL; } +static void paging_timeout_cb(void *data) +{ + struct vlr_subscr *vsub = data; + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); +} + /*! \brief Start a paging request for vsub, call cbfn(param) when done. * \param vsub subscriber to page. * \param cbfn function to call when the conn is established. @@ -138,6 +147,7 @@ { int rc; struct subscr_request *request; + struct gsm_network *net = vsub->vlr->user_ctx; /* Start paging.. we know it is async so we can do it before */ if (!vsub->cs.is_paging) { @@ -152,6 +162,8 @@ /* reduced on the first paging callback */ vlr_subscr_get(vsub); vsub->cs.is_paging = true; + osmo_timer_setup(&vsub->cs.paging_timeout, paging_timeout_cb, vsub); + osmo_timer_schedule(&vsub->cs.paging_timeout, net->paging_timeout, 0); } else { LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n", vlr_subscr_name(vsub)); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 14ad19e..a4d4a39 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -109,6 +109,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_paging_timeout, cfg_msc_paging_timeout_cmd, + "paging timeout (default|<1-65535>)", + "Configure Paging\n" + "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards" + " BSS or RNC\n" + "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_TIMEOUT_DEFAULT) " seconds)\n" + "Set paging timeout in seconds\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (!strcmp(argv[0], "default")) + gsmnet->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + else + gsmnet->paging_timeout = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -129,6 +145,9 @@ if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error) vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); + + if (gsmnet->paging_timeout != MSC_PAGING_TIMEOUT_DEFAULT) + vty_out(vty, " paging timeout %u%s", gsmnet->paging_timeout, VTY_NEWLINE); mgcp_client_config_write(vty, " "); #ifdef BUILD_IU @@ -186,6 +205,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); + install_element(MSC_NODE, &cfg_msc_paging_timeout_cmd); mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); #ifdef BUILD_IU diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index d8a3a31..be11456 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,8 +182,101 @@ comment_end(); } +void test_ms_timeout_paging() +{ + struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; + + rx_from_ran = RAN_GERAN_A; + + comment_start(); + + fake_time_start(); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0"); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1", + "12010809710000004026f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0", NULL); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + EXPECT_CONN_COUNT(0); + + BTW("an SMS is sent, MS is paged"); + paging_expect_imsi(imsi); + paging_sent = false; + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("time passes and no paging result is received"); + + fake_time_passes(MSC_PAGING_TIMEOUT_DEFAULT - 1, 0); + + btw("the paging timeout has not yet expired"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == true, "%d"); + btw("another request is added to the list but does not cause another paging"); + paging_sent = false; + paging_expect_imsi(NULL); + send_sms(vsub, vsub, + "One paging ought to be enough for anyone."); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 2, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == false, "%d"); + + btw("the paging timeout expires, the paging as well as the requests are canceled"); + fake_time_passes(2, 0); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + + BTW("subscriber detaches"); + expect_bssap_clear(); + ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(!vsub); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_ms_timeout_lu_auth_resp, test_ms_timeout_cm_auth_resp, + test_ms_timeout_paging, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 50f60fd..2426e7d 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -337,6 +337,173 @@ full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 +===== test_ms_timeout_paging +- Total time passed: 0.000000 s +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH +DMM LU/new-LAC: 1/23 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0 +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000004620: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 +DVLR GSUP rx 17: 10010809710000004026f00804036470f1 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR GSUP tx: 12010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 +DVLR GSUP rx 11: 06010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:46071, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:46071: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:46071: Freeing subscriber connection +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +--- +- an SMS is sent, MS is paged +DREF VLR subscr MSISDN:46071 usage increases to: 2 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- time passes and no paging result is received +- Total time passed: 59.000000 s +- the paging timeout has not yet expired + paging_stopped == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + vsub->cs.is_paging == 1 +- another request is added to the list but does not cause another paging +DREF VLR subscr MSISDN:46071 usage increases to: 5 +DMM Subscriber MSISDN:46071 already paged. + llist_count(&vsub->cs.requests) == 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 4 + paging_sent == 0 +- the paging timeout expires, the paging as well as the requests are canceled +- Total time passed: 61.000000 s +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 + paging_stopped == 1 +DREF VLR subscr MSISDN:46071 usage increases to: 2 + vsub->cs.is_paging == 0 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +--- +- subscriber detaches + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) +DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DMM IMSI DETACH for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 +DMM msc_subscr_conn_close(vsub=unknown, cause=0): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF unknown: MSC conn use - compl_l3 == 0 (0x0) +DRLL Freeing subscriber connection with NULL subscriber + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +===== test_ms_timeout_paging: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 01:57:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 01:57:04 +0000 Subject: [PATCH] osmo-msc[master]: fix: properly cancel all Paging on IMSI Detach Message-ID: Review at https://gerrit.osmocom.org/5464 fix: properly cancel all Paging on IMSI Detach It's not clear cut which code is responsible for canceling pending requests, since the requests list is kept in vlr_subscr, but sending out Paging does certainly not belong in the VLR. Place the requests cleanup in gsm_04_08.c. Add to test_ms_timeout_paging() in msc_vlr_test_ms_timeout.c to verify that a pending paging is canceled on IMSI Detach. Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd --- M include/osmocom/msc/gsm_subscriber.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_subscriber.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 5 files changed, 43 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/64/5464/1 diff --git a/include/osmocom/msc/gsm_subscriber.h b/include/osmocom/msc/gsm_subscriber.h index 6b0e3da..4adfd41 100644 --- a/include/osmocom/msc/gsm_subscriber.h +++ b/include/osmocom/msc/gsm_subscriber.h @@ -62,6 +62,7 @@ int subscr_rx_paging_response(struct msgb *msg, struct gsm_subscriber_connection *conn); +void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event event); int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..14e7146 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -770,6 +770,10 @@ gsm48_mi_type_name(mi_type), mi_string); } else { LOGP(DMM, LOGL_INFO, "IMSI DETACH for %s\n", vlr_subscr_name(vsub)); + + if (vsub->cs.is_paging) + subscr_paging_cancel(vsub, GSM_PAGING_EXPIRED); + vlr_subscr_rx_imsi_detach(vsub); osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_DETACHED, vsub); vlr_subscr_put(vsub); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index b534b3f..4eaf164 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -52,6 +52,11 @@ #include #include +void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event event) +{ + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, event, NULL, NULL, vsub); +} + int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param) { @@ -132,7 +137,7 @@ static void paging_timeout_cb(void *data) { struct vlr_subscr *vsub = data; - subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); + subscr_paging_cancel(vsub, GSM_PAGING_EXPIRED); } /*! \brief Start a paging request for vsub, call cbfn(param) when done. diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index be11456..6aaf329 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -258,13 +258,26 @@ OSMO_ASSERT(vsub); VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + BTW("Now that the timeout has expired, another Paging is sent on request"); + paging_expect_imsi(imsi); + paging_sent = false; + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); vlr_subscr_put(vsub); vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); - BTW("subscriber detaches"); + BTW("subscriber detaches, pagings are canceled"); expect_bssap_clear(); ms_sends_msg("050130089910070000006402"); VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); OSMO_ASSERT(!vsub); diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 2426e7d..f272b24 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -480,16 +480,30 @@ DREF VLR subscr MSISDN:46071 usage increases to: 2 vsub->cs.is_paging == 0 llist_count(&vsub->cs.requests) == 0 -DREF VLR subscr MSISDN:46071 usage decreases to: 1 --- -- subscriber detaches +- Now that the timeout has expired, another Paging is sent on request +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +--- +- subscriber detaches, pagings are canceled MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND new conn DREF unknown: MSC conn use + compl_l3 == 1 (0x1) DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 -DREF VLR subscr MSISDN:46071 usage increases to: 2 +DREF VLR subscr MSISDN:46071 usage increases to: 4 DMM IMSI DETACH for MSISDN:46071 +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DREF VLR subscr MSISDN:46071 usage decreases to: 2 DREF VLR subscr MSISDN:46071 usage decreases to: 1 DREF VLR subscr MSISDN:46071 usage decreases to: 0 DREF freeing VLR subscr MSISDN:46071 @@ -498,6 +512,7 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0) DRLL Freeing subscriber connection with NULL subscriber bssap_clear_sent == 1 + paging_stopped == 1 llist_count(&net->subscr_conns) == 0 ===== test_ms_timeout_paging: SUCCESS -- To view, visit https://gerrit.osmocom.org/5464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 01:58:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 01:58:36 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: msc_vlr_tests: log SMS details when invoked with -v Message-ID: Review at https://gerrit.osmocom.org/5465 cosmetic: msc_vlr_tests: log SMS details when invoked with -v DLSMS logs SMS pointers, so is not suitable for logging them always. Allow logging for manual invocation, though. Change-Id: I1b7d2fd3fb38bf50eeabd6f7ef736d70a17de7a6 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/65/5465/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..f0a112b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -824,6 +824,9 @@ log_set_print_filename(osmo_stderr_target, _log_lines? 1 : 0); log_set_print_category(osmo_stderr_target, 1); + if (cmdline_opts.verbose) + log_set_category_filter(osmo_stderr_target, DLSMS, 1, LOGL_DEBUG); + net = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server"); net->gsup_server_port = 0; -- To view, visit https://gerrit.osmocom.org/5465 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b7d2fd3fb38bf50eeabd6f7ef736d70a17de7a6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:16:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:16:24 +0000 Subject: [PATCH] libosmocore[master]: add osmo_auth_c3(): separate from gsm_milenage() Message-ID: Review at https://gerrit.osmocom.org/5466 add osmo_auth_c3(): separate from gsm_milenage() To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map M src/gsm/milenage/milenage.c 4 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/5466/1 diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4dbc6a4..e544126 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -105,4 +105,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); + /* @} */ diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 400708f..f171ed4 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -236,4 +236,17 @@ { 0, NULL } }; +/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 from 3GPP TS 33.103 ? + * 4.6.1). + * \param[out] kc GSM AKA Kc, 8 byte target buffer. + * \param[in] ck UMTS AKA CK, 16 byte input buffer. + * \param[in] ik UMTS AKA IK, 16 byte input buffer. + */ +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]) +{ + int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 6e6638a..d915234 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -340,6 +340,7 @@ osmo_auth_load; osmo_auth_register; osmo_auth_supported; +osmo_auth_c3; osmo_sub_auth_type_names; osmo_rsl2sitype; diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 7cf3312..2050d25 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -249,8 +249,7 @@ if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; - for (i = 0; i < 8; i++) - kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; + osmo_auth_c3(kc, ck, ik); #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:27:16 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:27:16 +0000 Subject: [PATCH] osmo-msc[master]: compiler warning: extend #if 0 to include unused array Message-ID: Review at https://gerrit.osmocom.org/5467 compiler warning: extend #if 0 to include unused array Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085 --- M src/libmsc/silent_call.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/67/5467/1 diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c index b9a8ed9..a99f218 100644 --- a/src/libmsc/silent_call.c +++ b/src/libmsc/silent_call.c @@ -85,7 +85,6 @@ LOGP(DLSMS, LOGL_NOTICE, "Discarding L3 message from a silent call.\n"); return 0; } -#endif struct msg_match { uint8_t pdisc; @@ -98,7 +97,6 @@ { GSM48_PDISC_MM, GSM48_MT_MM_CM_SERV_REQ }, }; -#if 0 /* decide if we need to reroute a message as part of a silent call */ int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg) { -- To view, visit https://gerrit.osmocom.org/5467 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:27:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:27:27 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5377 to look at the new patch set (#3). cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 21 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/3 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..30a10af 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index e264aee..9083f0e 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -165,38 +165,20 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," - " cipher=%d key=%s\n", - vlr_subscr_name(conn->vsub), conn->a.conn_id, cipher, osmo_hexdump_nospc(key, len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; + LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC, %u ciphers (%s)", + vlr_subscr_name(conn->vsub), conn->a.conn_id, ei->perm_algo_len, + osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..f9dffac 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3410,8 +3410,19 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + OSMO_ASSERT(sizeof(ei.key) >= sizeof(tuple->vec.kc)); + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } + case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:27:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:27:28 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic prep: publish vlr_use_umts_aka() decision Message-ID: Review at https://gerrit.osmocom.org/5468 cosmetic prep: publish vlr_use_umts_aka() decision During Set Ciphering Mode on GERAN, it is required to know whether UMTS AKA is used to decide which Kc to pick. Change static function is_umts_auth() into public vlr_use_umts_aka(), so future patches can re-use it. Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c 3 files changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/68/5468/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 640d35b..df7d354 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -435,5 +435,7 @@ enum vlr_ciph ciph_mode, bool retrieve_imeisv); +bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99); + void log_set_filter_vlr_subscr(struct log_target *target, struct vlr_subscr *vlr_subscr); diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 16f365e..55b8de0 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1122,6 +1122,23 @@ } } +/* Decide whether UMTS AKA should be used. + * UTRAN networks are by definition R99 capable, and the auth vector is required to contain UMTS AKA + * tokens. This is expected to be verified by the caller. On GERAN, UMTS AKA must be used iff MS and + * GERAN are R99 capable and UMTS AKA tokens are available. + * \param[in] vec Auth tokens (received from the HLR). + * \param[in] is_r99 True when BTS and GERAN are R99 capable. + * \returns true to use UMTS AKA, false to use pre-R99 GSM AKA. + */ +bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99) +{ + if (!is_r99) + return false; + if (!(vec->auth_types & OSMO_AUTH_TYPE_UMTS)) + return false; + return true; +} + void log_set_filter_vlr_subscr(struct log_target *target, struct vlr_subscr *vlr_subscr) { diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 1376c82..d14ae8e 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -211,16 +211,6 @@ vlr_subscr_tx_auth_fail_rep(vsub); } -static bool is_umts_auth(struct auth_fsm_priv *afp, - uint32_t auth_types) -{ - if (!afp->is_r99) - return false; - if (!(auth_types & OSMO_AUTH_TYPE_UMTS)) - return false; - return true; -} - /* Terminate the Auth FSM Instance and notify parent */ static void auth_fsm_term(struct osmo_fsm_inst *fi, enum vlr_auth_fsm_result res) { @@ -268,7 +258,7 @@ afp->auth_requested = true; vsub->last_tuple = at; vsub->vlr->ops.tx_auth_req(vsub->msc_conn_ref, at, - is_umts_auth(afp, at->vec.auth_types)); + vlr_use_umts_aka(&at->vec, afp->is_r99)); return 0; } -- To view, visit https://gerrit.osmocom.org/5468 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:27:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:27:28 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA... Message-ID: Review at https://gerrit.osmocom.org/5469 cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA is used In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. To decide (in an upcoming patch) whether to use UMTS AKA derived Kc or the Kc from the auth vector, the set_ciph_mode() from vlr_ops needs to know whether UMTS AKA is being used. This could possibly derived from the msc_conn_ref, but all flags are already available in the vlr_lu_fsm and vlr_access_req_fsm. Hence add a umts_aka flag to the set_ciph_mode() callback invocation. The VLR FSMs thus decide whether UMTS AKA or GSM AKA is to be used during Ciphering Mode Command, which makes more sense than re-implementing the same decision process in the MSC. I considered placing the Kc derivation in vlr_set_ciph_mode() and only tell the MSC's set_ciph_mode() implementation the precise keys it should use, but the RAN particulars, and whether a Kc is used at all, rather belong with the MSC. Related: OS#2745 Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/69/5469/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index df7d354..b625608 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -207,7 +207,7 @@ int (*tx_cm_serv_rej)(void *msc_conn_ref, enum vlr_proc_arq_result result); int (*set_ciph_mode)(void *msc_conn_ref, enum vlr_ciph ciph_mode, - bool retrieve_imeisv); + bool umts_aka, bool retrieve_imeisv); /* UTRAN: send Common Id (when auth+ciph are complete) */ int (*tx_common_id)(void *msc_conn_ref); @@ -433,6 +433,7 @@ struct osmo_fsm_inst *fi, void *msc_conn_ref, enum vlr_ciph ciph_mode, + bool umts_aka, bool retrieve_imeisv); bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index f9dffac..a4fdfa2 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3384,6 +3384,7 @@ /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, enum vlr_ciph ciph, + bool umts_aka, bool retrieve_imeisv) { struct gsm_subscriber_connection *conn = msc_conn_ref; diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 55b8de0..670ff83 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1096,6 +1096,7 @@ struct osmo_fsm_inst *fi, void *msc_conn_ref, enum vlr_ciph ciph_mode, + bool umts_aka, bool retrieve_imeisv) { switch (ciph_mode) { @@ -1108,6 +1109,7 @@ ciph_mode, vlr_ciph_name(ciph_mode)); return vlr->ops.set_ciph_mode(msc_conn_ref, ciph_mode, + umts_aka, retrieve_imeisv); case VLR_CIPH_A5_2: diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index e90d8de..41e629e 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -294,6 +294,7 @@ if (vlr_set_ciph_mode(vsub->vlr, fi, par->msc_conn_ref, par->ciphering_required, + vlr_use_umts_aka(&vsub->last_tuple->vec, par->is_r99), vsub->vlr->cfg.retrieve_imeisv_ciphered)) { LOGPFSML(fi, LOGL_ERROR, "Failed to send Ciphering Mode Command\n"); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index a3a68ed..e540e2a 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -826,8 +826,15 @@ return; } + if (!vsub->last_tuple) { + LOGPFSML(fi, LOGL_ERROR, "No auth tuple available\n"); + vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE); + return; + } + if (vlr_set_ciph_mode(vsub->vlr, fi, lfp->msc_conn_ref, lfp->ciphering_required, + vlr_use_umts_aka(&vsub->last_tuple->vec, lfp->is_r99), vsub->vlr->cfg.retrieve_imeisv_ciphered)) { LOGPFSML(fi, LOGL_ERROR, "Failed to send Ciphering Mode Command\n"); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index f0a112b..9cc61b1 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -665,7 +665,7 @@ } static int fake_vlr_tx_ciph_mode_cmd(void *msc_conn_ref, enum vlr_ciph ciph, - bool retrieve_imeisv) + bool umts_aka, bool retrieve_imeisv) { /* FIXME: we actually would like to see the message bytes checked here, * not possible while msc_vlr_set_ciph_mode() calls -- To view, visit https://gerrit.osmocom.org/5469 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:27:28 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:27:28 +0000 Subject: [PATCH] osmo-msc[master]: fix GSM-Milenage in presence of 2G keys Message-ID: Review at https://gerrit.osmocom.org/5470 fix GSM-Milenage in presence of 2G keys In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. So far we were always sending the Kc retrieved from osmo-hlr. If the 2G auth algo is set to milenage, the 2G Kc coincides with the one derived from 3G tokens, but if 2G is set to a different algorithm, the Kc received from the osmo-hlr is not usable for ciphering when UMTS AKA was used for authentication (on R99 capable GERAN and MS). Implementation: To decide whether to use UMTS AKA derived Kc or the Kc from the auth vector, use the umts_aka flag added to set_ciph_mode() in a previous patch. Use osmo_auth_c3() to derive the GSM AKA Kc from the UMTS AKA CK and KI. Related: OS#2745 Requires: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa (libosmocore) Change-Id: If04e405426c55a81341747a9b450a69188525d5c --- M src/libmsc/gsm_04_08.c 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/70/5470/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index a4fdfa2..a917ebd 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3390,6 +3390,8 @@ struct gsm_subscriber_connection *conn = msc_conn_ref; struct vlr_subscr *vsub; struct gsm_auth_tuple *tuple; + uint8_t umts_kc[sizeof(tuple->vec.kc)]; + uint8_t *use_kc; if (!conn || !conn->vsub) { LOGP(DMM, LOGL_ERROR, "Cannot send Ciphering Mode Command to" @@ -3411,6 +3413,16 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); + + /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. + * tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for + * the UMTS AKA tokens. */ + if (umts_aka) { + osmo_auth_c3(umts_kc, tuple->vec.ck, tuple->vec.ik); + use_kc = umts_kc; + } else + use_kc = tuple->vec.kc; + { struct gsm0808_encrypt_info ei; @@ -3418,7 +3430,7 @@ ei.perm_algo_len = 1; OSMO_ASSERT(sizeof(ei.key) >= sizeof(tuple->vec.kc)); - memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + memcpy(ei.key, use_kc, sizeof(tuple->vec.kc)); ei.key_len = sizeof(tuple->vec.kc); return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); -- To view, visit https://gerrit.osmocom.org/5470 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If04e405426c55a81341747a9b450a69188525d5c Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:28:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:28:59 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 ...................................................................... osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1 So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1, which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which osmo-hlr uses to interpret the numbers from the hlr.db). This explains why our "xor" tests are succeeding even though libosmocore doesn't support XOR at all: we were using comp128v1 all the while. Fix the auth algo mapping: - define correct mappings, copying enum osmo_auth_algo, in util.py - add a function to get the enum value from name, in util.py - use this in osmo_hlr.py Change subscriber_add() API to take the algorithm string instead of a number. The number is libosmocore internal and we should not expose it within our API beyond above dict. There are no callers using this parameter yet anyway. Adjust resources.conf to indicate COMP128v1 which we are actually using and which means we're still using algorithm number 1 after this change. BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured similar CTRL, which it doesn't yet, this code could be more robust.) Related: OS#2758 Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 --- M example/resources.conf M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/util.py 4 files changed, 26 insertions(+), 24 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Verified diff --git a/example/resources.conf b/example/resources.conf index 35e3a2d..bec17b4 100644 --- a/example/resources.conf +++ b/example/resources.conf @@ -71,7 +71,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -79,7 +79,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs'] @@ -87,7 +87,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['sms', 'ussd', 'gprs'] @@ -95,6 +95,6 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: [a5_0, a5_1] features: ['gprs'] diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index f7dd80a..20eaf02 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -32,10 +32,6 @@ process = None next_subscriber_id = 1 - AUTH_ALGO_NONE = 0 - AUTH_ALGO_XOR = 1 - AUTH_ALGO_COMP128v1 = 2 - def __init__(self, suite_run, ip_address): super().__init__(log.C_RUN, 'osmo-hlr_%s' % ip_address.get('addr')) self.suite_run = suite_run @@ -107,25 +103,23 @@ log.ctx(proc) raise log.Error('Exited in error') - def subscriber_add(self, modem, msisdn=None, algo=None): + def subscriber_add(self, modem, msisdn=None, algo_str=None): if msisdn is None: msisdn = self.suite_run.resources_pool.next_msisdn(modem) modem.set_msisdn(msisdn) subscriber_id = self.next_subscriber_id self.next_subscriber_id += 1 - if not algo: - alg_str = modem.auth_algo() - if alg_str is None or alg_str == 'none': - algo = self.AUTH_ALGO_NONE - elif alg_str == 'comp128v1': - algo = self.AUTH_ALGO_COMP128v1 - elif alg_str == 'xor': - algo = self.AUTH_ALGO_XOR - if algo != self.AUTH_ALGO_NONE and not modem.ki(): - raise log.Error("Auth algo %r selected and no KI specified" % algo) + if algo_str is None: + algo_str = modem.auth_algo() or util.OSMO_AUTH_ALGO_NONE - self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, algo=algo) + if algo_str != util.OSMO_AUTH_ALGO_NONE and not modem.ki(): + raise log.Error("Auth algo %r selected but no KI specified" % algo_str) + + algo = util.osmo_auth_algo_by_name(algo_str) + + self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, + algo_str=algo_str, algo=algo) conn = sqlite3.connect(self.db_file) try: c = conn.cursor() diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index f92d1db..6c0b2b7 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -20,7 +20,7 @@ import re from . import log -from .util import is_dict, is_list, str2bool +from .util import is_dict, is_list, str2bool, ENUM_OSMO_AUTH_ALGO KEY_RE = re.compile('[a-zA-Z][a-zA-Z0-9_]*') IPV4_RE = re.compile('([0-9]{1,3}.){3}[0-9]{1,3}') @@ -62,9 +62,8 @@ match_re('MSISDN', MSISDN_RE, val) def auth_algo(val): - if val in ('none', 'xor', 'comp128v1'): - return - raise ValueError('Unknown Authentication Algorithm: %r' % val) + if val not in ENUM_OSMO_AUTH_ALGO: + raise ValueError('Unknown Authentication Algorithm: %r' % val) def uint(val): n = int(val) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index ed1a258..edf7599 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -32,6 +32,15 @@ import readline import subprocess +# This mirrors enum osmo_auth_algo in libosmocore/include/osmocom/crypt/auth.h +# so that the index within the tuple matches the enum value. +OSMO_AUTH_ALGO_NONE = 'none' +ENUM_OSMO_AUTH_ALGO = (OSMO_AUTH_ALGO_NONE, 'comp128v1', 'comp128v2', 'comp128v3', 'xor', 'milenage') + +def osmo_auth_algo_by_name(algo_str): + 'Return enum osmo_auth_algo numeric value as from libosmocore, raise ValueError if not defined.' + return ENUM_OSMO_AUTH_ALGO.index(algo_str.lower()) + def prepend_library_path(path): lp = os.getenv('LD_LIBRARY_PATH') if not lp: -- To view, visit https://gerrit.osmocom.org/5358 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:28:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:28:59 +0000 Subject: [MERGED] osmo-gsm-tester[master]: cosmetic: adjust resource_test to comp128v1 In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: adjust resource_test to comp128v1 ...................................................................... cosmetic: adjust resource_test to comp128v1 Since libosmocore doesn't support XOR at all, it seems weird to use it in the test, even though it's just a selftest without libosmocore involved... Change-Id: I51edec255e7ef277907817b3187c2f492465467f --- M selftest/conf/resources.conf M selftest/resource_test.ok 2 files changed, 20 insertions(+), 20 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/selftest/conf/resources.conf b/selftest/conf/resources.conf index 9e4e015..51f4abc 100644 --- a/selftest/conf/resources.conf +++ b/selftest/conf/resources.conf @@ -65,7 +65,7 @@ path: '/sierra_1' imsi: '901700000009031' ki: '80A37E6FDEA931EAC92FFA5F671EFEAD' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -74,7 +74,7 @@ path: '/sierra_2' imsi: '901700000009029' ki: '00969E283349D354A8239E877F2E0866' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -83,7 +83,7 @@ path: '/gobi_0' imsi: '901700000009030' ki: 'BB70807226393CDBAC8DD3439FF54252' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' @@ -92,7 +92,7 @@ path: '/gobi_3' imsi: '901700000009032' ki: '2F70DCA43C45ACB97E947FDD0C7CA30A' - auth_algo: 'xor' + auth_algo: 'comp128v1' ciphers: - 'a5_0' - 'a5_1' diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 650a8bc..884c6b3 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -80,29 +80,29 @@ 'addr': '10.42.42.5'}, {'_hash': 'e780ac7581ad29f8f46e637b61d0c38898c4c52c', 'addr': '10.42.42.6'}], - 'modem': [{'_hash': 'f392ed391f9d39abb6ae01431b26b4f44079a447', - 'auth_algo': 'xor', + 'modem': [{'_hash': '0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009031', 'ki': '80A37E6FDEA931EAC92FFA5F671EFEAD', 'label': 'sierra_1', 'path': '/sierra_1'}, - {'_hash': '1b3cf2a04bde791a84fcc462c29f73391b1f7313', - 'auth_algo': 'xor', + {'_hash': '3a6e7747dfe7dfdf817bd3351031bd08051605c3', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009029', 'ki': '00969E283349D354A8239E877F2E0866', 'label': 'sierra_2', 'path': '/sierra_2'}, - {'_hash': '83f7b4a07c355487d31db6f068146e48bb1ed118', - 'auth_algo': 'xor', + {'_hash': 'f6ba17db2ad13da5ba5c54b5385a774f5351bb5a', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009030', 'ki': 'BB70807226393CDBAC8DD3439FF54252', 'label': 'gobi_0', 'path': '/gobi_0'}, - {'_hash': 'a5f8f08a24df0eca067c5b51d55c3c4fd8721908', - 'auth_algo': 'xor', + {'_hash': 'fbff2e4f06b727fc8a70da23e1d134f9cd763919', + 'auth_algo': 'comp128v1', 'ciphers': ['a5_0', 'a5_1'], 'imsi': '901700000009032', 'ki': '2F70DCA43C45ACB97E947FDD0C7CA30A', @@ -143,8 +143,8 @@ --- testowner: DBG: Picked - _hash: fd103b22c7cf2480d609150e06f4bbd92ac78d8c addr: 10.42.42.2 --- testowner: Reserving 2 x modem (candidates: 4) ---- testowner: DBG: Picked - _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 - auth_algo: xor +--- testowner: DBG: Picked - _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -152,8 +152,8 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 - auth_algo: xor +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -199,9 +199,9 @@ _reserved_by: testowner-123-1490837279 addr: 10.42.42.2 modem: -- _hash: f392ed391f9d39abb6ae01431b26b4f44079a447 +- _hash: 0b538cb6ad799fbd7c2953fd3b4463a76c7cc9c0 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 @@ -209,9 +209,9 @@ ki: 80A37E6FDEA931EAC92FFA5F671EFEAD label: sierra_1 path: /sierra_1 -- _hash: 1b3cf2a04bde791a84fcc462c29f73391b1f7313 +- _hash: 3a6e7747dfe7dfdf817bd3351031bd08051605c3 _reserved_by: testowner-123-1490837279 - auth_algo: xor + auth_algo: comp128v1 ciphers: - a5_0 - a5_1 -- To view, visit https://gerrit.osmocom.org/5359 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51edec255e7ef277907817b3187c2f492465467f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 02:33:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 02:33:45 +0000 Subject: osmo-msc[master]: debug log: enrich Cipher Mode Cmd log in a_iface_tx_cipher_m... In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5374/2/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 176: LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," > please introduce a helper macro like we have in many other places so we can I actually considered exactly that, but thought that it would only be used this once. Taking another look, I see that the logging in this file could use an overhaul and such a function would indeed be useful to cover numerous other places that so far lack proper log context. -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:18:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:18:53 +0000 Subject: [PATCH] osmo-msc[master]: smpp_smsc: fix truncated string copy into bind_r.system_id Message-ID: Review at https://gerrit.osmocom.org/5471 smpp_smsc: fix truncated string copy into bind_r.system_id The target buffer in libsmpp is 16 bytes long, and snprintf() may omit the terminating zero. There seems to be no handling for unterminated strings, so osmo_strlcpy() is the safer (and presumably more optimal) choice. Change-Id: I5845666201f945ea9f83da62f2dd4bec52eb74cf --- M src/libmsc/smpp_smsc.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/71/5471/1 diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c index 88cecfc..34b93f8 100644 --- a/src/libmsc/smpp_smsc.c +++ b/src/libmsc/smpp_smsc.c @@ -509,8 +509,7 @@ bind_r.command_status = rc; /* build response */ - snprintf((char *)bind_r.system_id, sizeof(bind_r.system_id), "%s", - esme->smsc->system_id); + osmo_strlcpy((char*)bind_r.system_id, esme->smsc->system_id, sizeof(bind_r.system_id)); /* add interface version TLV */ tlv.tag = TLVID_sc_interface_version; -- To view, visit https://gerrit.osmocom.org/5471 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5845666201f945ea9f83da62f2dd4bec52eb74cf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:19:04 +0000 Subject: [PATCH] osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va... Message-ID: Review at https://gerrit.osmocom.org/5472 a_iface_bssap: compiler warning: cast const away from TLV val for l2h Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a --- M src/libmsc/a_iface_bssap.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/5472/1 diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..8a1e39b 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -325,7 +325,7 @@ /* Parse Layer 3 Information element */ /* FIXME: This is probably to hackish, compiler also complains "assignment discards ?const? qualifier..." */ - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); + msg->l3h = (uint8_t*)TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_INFORMATION); /* Create new subscriber context */ @@ -421,7 +421,7 @@ } if (TLVP_PRESENT(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)) { - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); + msg->l3h = (uint8_t*)TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); } else { msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5472 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:19:05 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:19:05 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* Message-ID: Review at https://gerrit.osmocom.org/5473 cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* These rx functions are only used for the A interface, hence the names should not suggest general SCCP rx (which Iu also has). Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351 --- M include/osmocom/msc/a_iface_bssap.h M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/73/5473/1 diff --git a/include/osmocom/msc/a_iface_bssap.h b/include/osmocom/msc/a_iface_bssap.h index 237c618..79b8390 100644 --- a/include/osmocom/msc/a_iface_bssap.h +++ b/include/osmocom/msc/a_iface_bssap.h @@ -34,8 +34,8 @@ }; /* Receive incoming connection less data messages via sccp */ -void sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); +void a_sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); /* Receive incoming connection oriented data messages via sccp */ -int sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); +int a_sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 6f9bdd0..52987ba 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -520,7 +520,7 @@ if (msgb_l2len(oph->msg) > 0) { LOGP(DMSC, LOGL_DEBUG, "N-CONNECT.ind(%u, %s)\n", scu_prim->u.connect.conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - rc = sccp_rx_dt(scu, &a_conn_info, oph->msg); + rc = a_sccp_rx_dt(scu, &a_conn_info, oph->msg); } else LOGP(DMSC, LOGL_DEBUG, "N-CONNECT.ind(%u)\n", scu_prim->u.connect.conn_id); @@ -532,7 +532,7 @@ a_conn_info.conn_id = scu_prim->u.data.conn_id; LOGP(DMSC, LOGL_DEBUG, "N-DATA.ind(%u, %s)\n", scu_prim->u.data.conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - sccp_rx_dt(scu, &a_conn_info, oph->msg); + a_sccp_rx_dt(scu, &a_conn_info, oph->msg); break; case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION): @@ -542,7 +542,7 @@ a_conn_info.bsc_addr = &scu_prim->u.unitdata.calling_addr; a_conn_info.reset = get_reset_ctx_by_sccp_addr(&scu_prim->u.unitdata.calling_addr); DEBUGP(DMSC, "N-UNITDATA.ind(%s)\n", osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - sccp_rx_udt(scu, &a_conn_info, oph->msg); + a_sccp_rx_udt(scu, &a_conn_info, oph->msg); break; default: diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 8a1e39b..909a9f9 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -175,7 +175,7 @@ } /* Receive incoming connection less data messages via sccp */ -void sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) +void a_sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) { /* Note: The only valid message type that can be received * via UNITDATA are BSS Management messages */ @@ -690,7 +690,7 @@ } /* Handle incoming connection oriented messages */ -int sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) +int a_sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) { OSMO_ASSERT(scu); OSMO_ASSERT(a_conn_info); -- To view, visit https://gerrit.osmocom.org/5473 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:19:40 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5377 to look at the new patch set (#4). cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 21 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/4 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..7417298 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -22,6 +22,7 @@ #include #include +#include /* A struct to keep a context information about the BSCs we are associated with */ struct bsc_context { @@ -57,7 +58,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 69b4c09..cdd8d89 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -170,38 +170,18 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, %u ciphers (%s)", + ei->perm_algo_len, osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; - - LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", - cipher, osmo_hexdump_nospc(key, len)); - - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..f9dffac 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3410,8 +3410,19 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + OSMO_ASSERT(sizeof(ei.key) >= sizeof(tuple->vec.kc)); + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } + case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:19:40 +0000 Subject: [PATCH] osmo-msc[master]: debug log: a_iface_tx_cipher_mode(): log cipher and key In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5374 to look at the new patch set (#3). debug log: a_iface_tx_cipher_mode(): log cipher and key Introduce LOGPCONN() which would also be useful in numerous other places in this file. Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 --- M src/libmsc/a_iface.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/5374/3 diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 83ec82f..f863517 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,8 +39,14 @@ #include #include #include +#include #include + +#define LOGPCONN(conn, level, fmt, args...) \ + LOGP(DMSC, level, "(subscr %s, conn_id %d) " fmt, \ + vlr_subscr_name(conn ? conn->vsub : NULL), conn ? conn->a.conn_id : -1, \ + ## args) /* A pointer to the GSM network we work with. By the current paradigm, * there can only be one gsm_network per MSC. The pointer is set once @@ -172,10 +178,12 @@ OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "Passing Cipher mode command message from MSC to BSC (conn_id=%i)\n", conn->a.conn_id); uint8_t crm = 0x01; uint8_t *crm_ptr = NULL; + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", + cipher, osmo_hexdump_nospc(key, len)); + /* Setup encryption information */ if (len > ENCRY_INFO_KEY_MAXLEN || !key) { LOGP(DMSC, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:22:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:22:48 +0000 Subject: [PATCH] libosmocore[master]: add osmo_auth_c3(): separate from gsm_milenage() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5466 to look at the new patch set (#2). add osmo_auth_c3(): separate from gsm_milenage() To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map M src/gsm/milenage/milenage.c 4 files changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/5466/2 diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4dbc6a4..e544126 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -105,4 +105,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); + /* @} */ diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 400708f..f171ed4 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -236,4 +236,17 @@ { 0, NULL } }; +/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 from 3GPP TS 33.103 ? + * 4.6.1). + * \param[out] kc GSM AKA Kc, 8 byte target buffer. + * \param[in] ck UMTS AKA CK, 16 byte input buffer. + * \param[in] ik UMTS AKA IK, 16 byte input buffer. + */ +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]) +{ + int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 6e6638a..d915234 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -340,6 +340,7 @@ osmo_auth_load; osmo_auth_register; osmo_auth_supported; +osmo_auth_c3; osmo_sub_auth_type_names; osmo_rsl2sitype; diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 7cf3312..3c14ab9 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -29,7 +29,7 @@ #include "common.h" #include "aes_wrap.h" #include "milenage.h" - +#include /** * milenage_f1 - Milenage f1 and f1* algorithms @@ -249,8 +249,7 @@ if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; - for (i = 0; i < 8; i++) - kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; + osmo_auth_c3(kc, ck, ik); #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5433 to look at the new patch set (#4). ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands The "memleak!" output shows messages that lack a talloc_free() of the parsed ctrl command buffer. The leak shall be fixed in a subsequent patch. Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 40 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/5433/4 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b3fa05e..9c7316f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -120,8 +120,9 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - talloc_report_full(ctx, stdout); - OSMO_ASSERT(false); + // hide mem leak to be fixed in subsequent patch + //talloc_report_full(ctx, stdout); + //OSMO_ASSERT(false); } printf("ok\n"); @@ -294,6 +295,25 @@ "ERROR \t Command not found", }, + { "GET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_GET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + { "SET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_SET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + }; static void test_messages() diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index edf97ea..9ddcfdb 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -160,3 +160,21 @@ handling: replied: 'ERROR \t Command not found' ok +test: 'GET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +mem leak! +ok +test: 'SET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +mem leak! +ok -- To view, visit https://gerrit.osmocom.org/5433 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5434 to look at the new patch set (#4). ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In ctrl_handle_msg() (code recently propagated from handle_control_read()), talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED. CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by ctrl_test.c. With the memleak fixed, adjust expected test output and make a detected mem leak abort the test immediately. Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 3 files changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/5434/4 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 7c1d81a..5c73b63 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -387,7 +387,6 @@ cmd->ccon = ccon; if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } } else { cmd = talloc_zero(ccon, struct ctrl_cmd); @@ -398,9 +397,9 @@ cmd->id = "err"; cmd->reply = "Command parser error."; ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } + talloc_free(cmd); return 0; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 9c7316f..e25929c 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -120,9 +120,8 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - // hide mem leak to be fixed in subsequent patch - //talloc_report_full(ctx, stdout); - //OSMO_ASSERT(false); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); } printf("ok\n"); diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 9ddcfdb..210c599 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -167,7 +167,6 @@ value = '(null)' reply = 'OK' handling: -mem leak! ok test: 'SET_REPLY 1 variable OK' parsing: @@ -176,5 +175,4 @@ value = '(null)' reply = 'OK' handling: -mem leak! ok -- To view, visit https://gerrit.osmocom.org/5434 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: add osmo_auth_c3(): separate from gsm_milenage() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5466 to look at the new patch set (#3). add osmo_auth_c3(): separate from gsm_milenage() To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map M src/gsm/milenage/milenage.c 4 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/5466/3 diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4dbc6a4..e544126 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -105,4 +105,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); + /* @} */ diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 400708f..f171ed4 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -236,4 +236,17 @@ { 0, NULL } }; +/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 from 3GPP TS 33.103 ? + * 4.6.1). + * \param[out] kc GSM AKA Kc, 8 byte target buffer. + * \param[in] ck UMTS AKA CK, 16 byte input buffer. + * \param[in] ik UMTS AKA IK, 16 byte input buffer. + */ +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]) +{ + int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 6e6638a..d915234 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -340,6 +340,7 @@ osmo_auth_load; osmo_auth_register; osmo_auth_supported; +osmo_auth_c3; osmo_sub_auth_type_names; osmo_rsl2sitype; diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 7cf3312..2050d25 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -249,8 +249,7 @@ if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; - for (i = 0; i < 8; i++) - kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; + osmo_auth_c3(kc, ck, ik); #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl_test: add two more current parsing bugs to prep for fix In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5435 to look at the new patch set (#4). ctrl_test: add two more current parsing bugs to prep for fix Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/5435/4 diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index e25929c..b1d4f23 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -154,6 +154,22 @@ "ERROR 1 Command not found", }, + { "GET 1 var\ti\table", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ti\table", /* current bug */ + }, + "ERROR 1 Command not found", + }, + { "GET 1 var\ri\rable", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ri\rable", /* current bug */ + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { .type = CTRL_TYPE_GET, diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 210c599..4a3a169 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -34,6 +34,24 @@ handling: replied: 'ERROR 1 Command not found' ok +test: 'GET 1 var\ti\table' +parsing: +id = '1' +variable = 'var\ti\table' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok +test: 'GET 1 var\ri\rable' +parsing: +id = '1' +variable = 'var\ri\rable' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok test: 'GET 1 variable value' parsing: id = '1' -- To view, visit https://gerrit.osmocom.org/5435 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: add ctrl_cmd_parse2() to return parsing errors In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5436 to look at the new patch set (#4). add ctrl_cmd_parse2() to return parsing errors If a control command fails to parse, we so far discard specific error messages and instead send just "Command parser error". In ctrl_cmd_parse() we actually compose detailed error replies, but in the end simply talloc_free() them and return NULL. A first step to report these errors to the ctrl command issuer is to not return NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add ctrl_cmd_parse2() to return such instead of NULL. To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors. ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper around ctrl_cmd_parse2() which discards the cmd on error. No need really to deprecate ctrl_cmd_parse() yet; especially as long as compiler warnings might break jenkins builds. Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 --- M include/osmocom/ctrl/control_cmd.h M src/ctrl/control_cmd.c 2 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/5436/4 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 4372e25..865b006 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -103,6 +103,7 @@ int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd); int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd); +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg); struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg); struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd); struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd); diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f616479..c2ce2be 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -269,7 +269,22 @@ return NULL; } +/*! Parse CTRL command struct from msgb, return NULL on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg) +{ + struct ctrl_cmd *res = ctrl_cmd_parse2(ctx, msg); + if (res->type == CTRL_TYPE_ERROR) { + talloc_free(res); + return NULL; + } + return res; +} + +/*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in + * ctrl->reply on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) { char *str, *tmp, *saveptr = NULL; char *var, *val; @@ -382,8 +397,7 @@ cmd->id = "err"; cmd->reply = "OOM"; err: - talloc_free(cmd); - return NULL; + return cmd; } struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd) -- To view, visit https://gerrit.osmocom.org/5436 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl: on parse errors, return a detailed message to sender In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5437 to look at the new patch set (#4). ctrl: on parse errors, return a detailed message to sender The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send those back to the CTRL command sender as reply. Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2() should return NULL, which shouldn't actually happen at all. Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c 2 files changed, 25 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/5437/4 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 5c73b63..17a012a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -381,14 +381,10 @@ msg->l2h = iph_ext->data; - cmd = ctrl_cmd_parse(ccon, msg); + cmd = ctrl_cmd_parse2(ccon, msg); - if (cmd) { - cmd->ccon = ccon; - if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { - ctrl_cmd_send(&ccon->write_queue, cmd); - } - } else { + if (!cmd) { + /* should never happen */ cmd = talloc_zero(ccon, struct ctrl_cmd); if (!cmd) return -ENOMEM; @@ -396,10 +392,23 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Command parser error."; - ctrl_cmd_send(&ccon->write_queue, cmd); } - talloc_free(cmd); + if (cmd->type != CTRL_TYPE_ERROR) { + cmd->ccon = ccon; + if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) == CTRL_CMD_HANDLED) { + /* On CTRL_CMD_HANDLED, no reply needs to be sent back. */ + talloc_free(cmd); + cmd = NULL; + } + } + + if (cmd) { + /* There is a reply or error that should be reported back to the sender. */ + ctrl_cmd_send(&ccon->write_queue, cmd); + talloc_free(cmd); + } + return 0; } @@ -894,13 +903,16 @@ osmo_strlcpy((char *)msg->data, cmdstr, msgb_tailroom(msg)); msgb_put(msg, strlen(cmdstr)); - cmd = ctrl_cmd_parse(ch, msg); + cmd = ctrl_cmd_parse2(ch, msg); msgb_free(msg); if (!cmd) return NULL; - if (ctrl_cmd_handle(ch, cmd, NULL) < 0) { + if (cmd->type == CTRL_TYPE_ERROR) + return cmd; + if (ctrl_cmd_handle(ch, cmd, NULL) == CTRL_CMD_HANDLED) { + /* No reply should be sent back. */ talloc_free(cmd); - return NULL; + cmd = NULL; } return cmd; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b1d4f23..39ec61a 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -76,7 +76,7 @@ printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); printf("parsing:\n"); - cmd = ctrl_cmd_parse(ctx, msg); + cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); OSMO_ASSERT(t->expect_parsed.type == cmd->type); -- To view, visit https://gerrit.osmocom.org/5437 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5438 to look at the new patch set (#4). ctrl: tighten CTRL input parsing Validate that incoming CTRL commands... - have decimal IDs, - return error on trailing characters, - have invalid characters in variable identifiers, - send detailed error messages as reply to the requestor. Adjust ctrl_test.{c,ok}, which best show the change in behavior. Message handling causes log messages on stderr; previously, stderr was empty. Add '[ignore]' in testsuite.at so that the nonempty stderr doesn't cause test failures. Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 --- M src/ctrl/control_cmd.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok M tests/testsuite.at 4 files changed, 144 insertions(+), 121 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/5438/4 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index c2ce2be..f32a200 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -281,6 +281,15 @@ return res; } +static bool id_str_valid(const char *str) +{ + for (;*str;str++) { + if (!isdigit(*str)) + return false; + } + return true; +} + /*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in * ctrl->reply on any error. * The caller is responsible to talloc_free() the returned struct pointer. */ @@ -306,6 +315,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request malformed"; + LOGP(DLCTRL, LOGL_NOTICE, "Malformed request: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -314,6 +324,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request type unknown"; + LOGP(DLCTRL, LOGL_NOTICE, "Request type unknown: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -323,6 +334,15 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Missing ID"; + LOGP(DLCTRL, LOGL_NOTICE, "Missing ID: \"%s\"\n", osmo_escape_str(str, -1)); + goto err; + } + + if (!id_str_valid(tmp)) { + cmd->type = CTRL_TYPE_ERROR; + cmd->id = "err"; + cmd->reply = "Invalid message ID number"; + LOGP(DLCTRL, LOGL_NOTICE, "Invalid message ID number: \"%s\"\n", osmo_escape_str(tmp, -1)); goto err; } cmd->id = talloc_strdup(cmd, tmp); @@ -331,14 +351,30 @@ switch (cmd->type) { case CTRL_TYPE_GET: - var = strtok_r(NULL, " ", &saveptr); + var = strtok_r(NULL, " \n", &saveptr); if (!var) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "GET incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete\n"); + LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete: \"%s\"\n", + osmo_escape_str(str, -1)); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); goto err; } cmd->variable = talloc_strdup(cmd, var); + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } LOGP(DLCTRL, LOGL_DEBUG, "Command: GET %s\n", cmd->variable); break; case CTRL_TYPE_SET: @@ -350,31 +386,57 @@ LOGP(DLCTRL, LOGL_NOTICE, "SET Command incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->value = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->value) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = %s\n", cmd->variable, cmd->value); + + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: case CTRL_TYPE_SET_REPLY: case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); if (!var || !val) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "Trap/Reply incomplete"; LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "Trap/Reply variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: %s\n", cmd->variable, cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: - var = strtok_r(NULL, "\0", &saveptr); + var = strtok_r(NULL, "", &saveptr); if (!var) { cmd->reply = ""; goto err; @@ -382,7 +444,8 @@ cmd->reply = talloc_strdup(cmd, var); if (!cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR %s\n", cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR \"%s\"\n", + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_UNKNOWN: default: diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 39ec61a..a38591f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -79,14 +79,19 @@ cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(t->expect_parsed.type == cmd->type); + if (t->expect_parsed.type != cmd->type) { + printf("type mismatch: got %s\n", get_value_string(ctrl_type_vals, cmd->type)); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); + } #define ASSERT_SAME_STR(field) \ assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); - ASSERT_SAME_STR(variable); - ASSERT_SAME_STR(value); + if (t->expect_parsed.type != CTRL_TYPE_ERROR) { + ASSERT_SAME_STR(variable); + ASSERT_SAME_STR(value); + } ASSERT_SAME_STR(reply); talloc_free(cmd); @@ -140,75 +145,66 @@ { .type = CTRL_TYPE_GET, .id = "1", - .variable = "variable\n", /* current bug */ + .variable = "variable", }, "ERROR 1 Command not found", }, { "GET 1 var\ni\nable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ni\nable", /* current bug */ + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 var\ti\table", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ti\table", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 var\ri\rable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ri\rable", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 variable value", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable value\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "SET 1 variable value", { @@ -218,7 +214,6 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET 1 variable value\n", { @@ -228,27 +223,22 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET weird_id variable value", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET weird_id variable value\n", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET 1 variable multiple value tokens", { @@ -278,7 +268,6 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -288,27 +277,22 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET \n special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\n", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \n Command not found", - + "ERROR err Invalid message ID number", }, { "SET \t special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\t", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \t Command not found", - + "ERROR err Invalid message ID number", }, { "GET_REPLY 1 variable OK", { @@ -317,7 +301,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, { "SET_REPLY 1 variable OK", { @@ -326,7 +309,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, }; diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 4a3a169..087ebbc 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -19,7 +19,7 @@ test: 'GET 1 variable\n' parsing: id = '1' -variable = 'variable\n' +variable = 'variable' value = '(null)' reply = '(null)' handling: @@ -28,65 +28,51 @@ test: 'GET 1 var\ni\nable' parsing: id = '1' -variable = 'var\ni\nable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 var\ti\table' parsing: id = '1' -variable = 'var\ti\table' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 var\ri\rable' parsing: id = '1' -variable = 'var\ri\rable' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 variable value' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable value\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'SET 1 variable value' parsing: @@ -108,21 +94,17 @@ ok test: 'SET weird_id variable value' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET weird_id variable value\n' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET 1 variable multiple value tokens' parsing: @@ -162,21 +144,17 @@ ok test: 'SET \n special_char_id value' parsing: -id = '\n' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \n Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET \t special_char_id value' parsing: -id = '\t' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \t Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'GET_REPLY 1 variable OK' parsing: diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..81730ee 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -18,7 +18,7 @@ AT_SETUP([ctrl]) AT_KEYWORDS([ctrl]) cat $abs_srcdir/ctrl/ctrl_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([kasumi]) -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:39:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:39:22 +0000 Subject: [PATCH] libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5439 to look at the new patch set (#4). ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP So far, error reporting just says "Trap/Reply", more accurately report 'GET REPLY', 'SET REPLY' and 'TRAP' as appropriate. Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 --- M src/ctrl/control_cmd.c 1 file changed, 52 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/5439/4 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f32a200..31199bf 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -411,20 +411,18 @@ osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: - case CTRL_TYPE_SET_REPLY: - case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); val = strtok_r(NULL, "", &saveptr); - if (!var || !val) { + if (!var) { cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); + cmd->reply = "GET REPLY incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY incomplete\n"); goto err; } if (!osmo_separated_identifiers_valid(var, ".")) { cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply variable contains invalid characters"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + cmd->reply = "GET REPLY variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY variable contains invalid characters: \"%s\"\n", osmo_escape_str(var, -1)); goto err; } @@ -432,7 +430,53 @@ cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + LOGP(DLCTRL, LOGL_DEBUG, "Command: GET REPLY %s: %s\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); + break; + case CTRL_TYPE_SET_REPLY: + var = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); + if (!var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET REPLY incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "GET REPLY incomplete\n"); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET REPLY variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET REPLY variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + cmd->variable = talloc_strdup(cmd, var); + cmd->reply = talloc_strdup(cmd, val); + if (!cmd->variable || !cmd->reply) + goto oom; + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET REPLY %s: %s\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); + break; + case CTRL_TYPE_TRAP: + var = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); + if (!var || !val) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "TRAP incomplete"; + LOGP(DLCTRL, LOGL_NOTICE, "TRAP incomplete\n"); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "TRAP variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "TRAP variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + cmd->variable = talloc_strdup(cmd, var); + cmd->reply = talloc_strdup(cmd, val); + if (!cmd->variable || !cmd->reply) + goto oom; + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP %s: \"%s\"\n", cmd->variable, osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:51:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:51:50 +0000 Subject: [PATCH] osmo-msc[master]: fix GSM-Milenage in presence of 2G keys In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5470 to look at the new patch set (#3). fix GSM-Milenage in presence of 2G keys In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. So far we were always sending the Kc retrieved from osmo-hlr. If the 2G auth algo is set to milenage, the 2G Kc coincides with the one derived from 3G tokens, but if 2G is set to a different algorithm, the Kc received from the osmo-hlr is not usable for ciphering when UMTS AKA was used for authentication (on R99 capable GERAN and MS). Implementation: To decide whether to use UMTS AKA derived Kc or the Kc from the auth vector, use the umts_aka flag added to set_ciph_mode() in a previous patch. Use osmo_auth_c3() to derive the GSM AKA Kc from the UMTS AKA CK and KI. Related: OS#2745 Requires: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa (libosmocore) Change-Id: If04e405426c55a81341747a9b450a69188525d5c --- M src/libmsc/gsm_04_08.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/70/5470/3 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index cdf1647..e30c30a 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3421,7 +3421,13 @@ ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); ei.perm_algo_len = 1; - memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth + * tokens. tuple->vec.kc was calculated from the GSM algorithm and is not + * necessarily a match for the UMTS AKA tokens. */ + if (umts_aka) + osmo_auth_c3(ei.key, tuple->vec.ck, tuple->vec.ik); + else + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); ei.key_len = sizeof(tuple->vec.kc); return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); -- To view, visit https://gerrit.osmocom.org/5470 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If04e405426c55a81341747a9b450a69188525d5c Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 03:51:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 03:51:50 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5377 to look at the new patch set (#5). cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 24 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/5 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..7417298 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -22,6 +22,7 @@ #include #include +#include /* A struct to keep a context information about the BSCs we are associated with */ struct bsc_context { @@ -57,7 +58,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 69b4c09..cdd8d89 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -170,38 +170,18 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, %u ciphers (%s)", + ei->perm_algo_len, osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; - - LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", - cipher, osmo_hexdump_nospc(key, len)); - - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..c1947fd 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3381,6 +3381,10 @@ return msc_gsm48_tx_mm_serv_rej(conn, cause); } +/* For msc_vlr_set_ciph_mode() */ +osmo_static_assert(sizeof(ei.key) >= sizeof(tuple->vec.kc), + gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc); + /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, enum vlr_ciph ciph, @@ -3410,8 +3414,18 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } + case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 04:20:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 04:20:54 +0000 Subject: [PATCH] osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5377 to look at the new patch set (#6). cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 24 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/5377/6 diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..7417298 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -22,6 +22,7 @@ #include #include +#include /* A struct to keep a context information about the BSCs we are associated with */ struct bsc_context { @@ -57,7 +58,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 69b4c09..cdd8d89 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -170,38 +170,18 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, %u ciphers (%s)", + ei->perm_algo_len, osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; - - LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", - cipher, osmo_hexdump_nospc(key, len)); - - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..d2c56c5 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3381,6 +3381,10 @@ return msc_gsm48_tx_mm_serv_rej(conn, cause); } +/* For msc_vlr_set_ciph_mode() */ +osmo_static_assert(sizeof(((struct gsm0808_encrypt_info*)0)->key) >= sizeof(((struct osmo_auth_vector*)0)->kc), + gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc); + /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, enum vlr_ciph ciph, @@ -3410,8 +3414,18 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } + case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 6 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 04:21:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 04:21:19 +0000 Subject: [PATCH] osmo-msc[master]: log: a_iface.c: revisit logging, use LOGPCONN Message-ID: Review at https://gerrit.osmocom.org/5474 log: a_iface.c: revisit logging, use LOGPCONN Add LOGPBSCCONN for struct bsc_conn. Use LOGPCONN or LOGPBSCCONN whereever possible. Tweak a few log messages and remove one redundant log. Change-Id: If9cb0e7a5cef2ec37a1a7c548aecf11a11c22eec --- M src/libmsc/a_iface.c 1 file changed, 18 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/5474/1 diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index cdd8d89..29084d6 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -48,6 +48,9 @@ vlr_subscr_name(conn ? conn->vsub : NULL), conn ? conn->a.conn_id : -1, \ ## args) +#define LOGPBSCCONN(conn, level, fmt, args...) \ + LOGP(DMSC, level, "(conn_id %u) " fmt, conn ? conn->conn_id : (uint32_t)(-1), ## args) + /* A pointer to the GSM network we work with. By the current paradigm, * there can only be one gsm_network per MSC. The pointer is set once * when calling a_init() */ @@ -87,12 +90,9 @@ struct bsc_conn *conn; struct bsc_conn *conn_temp; - LOGP(DMSC, LOGL_DEBUG, - "Removing connection from active sccp-connection list (conn_id=%i)\n", - conn_id); - llist_for_each_entry_safe(conn, conn_temp, &active_connections, list) { if (conn->conn_id == conn_id) { + LOGPBSCCONN(conn, LOGL_DEBUG, "Removing A-interface conn\n"); llist_del(&conn->list); talloc_free(conn); } @@ -148,7 +148,7 @@ OSMO_ASSERT(conn); OSMO_ASSERT(conn->a.scu); - LOGP(DMSC, LOGL_DEBUG, "Passing DTAP message from MSC to BSC (conn_id=%i)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_DEBUG, "Passing DTAP message from MSC to BSC\n"); msg->l3h = msg->data; msg_resp = gsm0808_create_dtap(msg, link_id); @@ -158,12 +158,11 @@ msgb_free(msg); if (!msg_resp) { - LOGP(DMSC, LOGL_ERROR, "Unable to generate BSSMAP DTAP message!\n"); + LOGPCONN(conn, LOGL_ERROR, "Unable to generate BSSMAP DTAP message!\n"); return -EINVAL; - } else - LOGP(DMSC, LOGL_DEBUG, "Message will be sent as BSSMAP DTAP message!\n"); + } - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg_resp->data, msg_resp->len)); /* osmo_sccp_tx_data_msg() takes ownership of msg_resp */ return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); } @@ -182,7 +181,7 @@ LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); } @@ -271,7 +270,7 @@ } /* If nothing matches, tag the result as invalid */ - LOGP(DMSC, LOGL_ERROR, "Invalid permitted speech version / rate detected, discarding.\n"); + LOGP(DMSC, LOGL_ERROR, "Invalid permitted speech version: %d\n", speech_ver); return 0xFF; } @@ -294,7 +293,8 @@ return GSM0808_SPEECH_HALF_PREF; } - LOGP(DMSC, LOGL_ERROR, "Invalid speech version / rate combination preference, defaulting to full rate.\n"); + LOGP(DMSC, LOGL_ERROR, "Invalid radio channel preference: %d; defaulting to full rate.\n", + radio); return GSM0808_SPEECH_FULL_BM; } @@ -377,19 +377,19 @@ conn = trans->conn; OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_ERROR, "Sending assignment command to BSC (conn_id %u)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_ERROR, "Sending Assignment Command to BSC\n"); /* Channel type */ rc = enc_channel_type(&ct, &trans->bearer_cap); if (rc < 0) { - LOGP(DMSC, LOGL_ERROR, "Faild to generate channel type -- assignment not sent!\n"); + LOGPCONN(conn, LOGL_ERROR, "Not sending Assignment to BSC: failed to generate channel type\n"); return -EINVAL; } /* Speech codec list */ rc = enc_speech_codec_list(&scl, &ct); if (rc < 0) { - LOGP(DMSC, LOGL_ERROR, "Faild to generate Speech codec list -- assignment not sent!\n"); + LOGPCONN(conn, LOGL_ERROR, "Not sending Assignment to BSC: failed to generate speech codec list\n"); return -EINVAL; } @@ -404,7 +404,7 @@ msg = gsm0808_create_ass(&ct, NULL, &rtp_addr, &scl, ci_ptr); - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg->data, msg->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg->data, msg->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); } @@ -413,7 +413,7 @@ { struct msgb *msg; - LOGP(DMSC, LOGL_NOTICE, "Sending clear command to BSC (conn_id=%u)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_NOTICE, "Sending Clear command to BSC\n"); msg = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); @@ -552,8 +552,7 @@ /* Clear only A connections and connections that actually * belong to the specified BSC */ if (conn->via_ran == RAN_GERAN_A && memcmp(bsc_addr, &conn->a.bsc_addr, sizeof(conn->a.bsc_addr)) == 0) { - LOGP(DMSC, LOGL_NOTICE, "Dropping orphaned subscriber connection (conn_id %i)\n", - conn->a.conn_id); + LOGPCONN(conn, LOGL_NOTICE, "Dropping orphaned subscriber connection\n"); msc_clear_request(conn, GSM48_CC_CAUSE_SWITCH_CONG); /* If there is still an SCCP connection active, remove it now */ -- To view, visit https://gerrit.osmocom.org/5474 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9cb0e7a5cef2ec37a1a7c548aecf11a11c22eec Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 04:22:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 04:22:19 +0000 Subject: osmo-msc[master]: debug log: a_iface_tx_cipher_mode(): log cipher and key In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5374/2/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 176: LOGP(DMSC, LOGL_DEBUG, "(subscr %s, conn_id %d) Cipher Mode Command to BSC," > I actually considered exactly that, but thought that it would only be used see https://gerrit.osmocom.org/5474 -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 04:32:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 04:32:18 +0000 Subject: [PATCH] libosmocore[master]: add osmo_auth_c3() (separate from gsm_milenage()) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5466 to look at the new patch set (#4). add osmo_auth_c3() (separate from gsm_milenage()) To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map M src/gsm/milenage/milenage.c 4 files changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/5466/4 diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4dbc6a4..e544126 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -105,4 +105,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); + /* @} */ diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 400708f..f171ed4 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -236,4 +236,17 @@ { 0, NULL } }; +/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 from 3GPP TS 33.103 ? + * 4.6.1). + * \param[out] kc GSM AKA Kc, 8 byte target buffer. + * \param[in] ck UMTS AKA CK, 16 byte input buffer. + * \param[in] ik UMTS AKA IK, 16 byte input buffer. + */ +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]) +{ + int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 6e6638a..d915234 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -340,6 +340,7 @@ osmo_auth_load; osmo_auth_register; osmo_auth_supported; +osmo_auth_c3; osmo_sub_auth_type_names; osmo_rsl2sitype; diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 7cf3312..3c14ab9 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -29,7 +29,7 @@ #include "common.h" #include "aes_wrap.h" #include "milenage.h" - +#include /** * milenage_f1 - Milenage f1 and f1* algorithms @@ -249,8 +249,7 @@ if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; - for (i = 0; i < 8; i++) - kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; + osmo_auth_c3(kc, ck, ik); #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:33:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:33:58 +0000 Subject: [PATCH] osmo-bsc[master]: Remove dead code Message-ID: Review at https://gerrit.osmocom.org/5475 Remove dead code There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 --- M configure.ac M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/auth.h M include/osmocom/bsc/bss.h M include/osmocom/bsc/chan_alloc.h M include/osmocom/bsc/common_bsc.h M include/osmocom/bsc/common_cs.h D include/osmocom/bsc/crc24.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/gsm_subscriber.h M include/osmocom/bsc/ipaccess.h D include/osmocom/bsc/mncc.h D include/osmocom/bsc/mncc_int.h D include/osmocom/bsc/msc_ifaces.h D include/osmocom/bsc/rtp_proxy.h M include/osmocom/bsc/signal.h D include/osmocom/bsc/silent_call.h D include/osmocom/bsc/smpp.h D include/osmocom/bsc/sms_queue.h D include/osmocom/bsc/transaction.h D include/osmocom/bsc/trau_mux.h D include/osmocom/bsc/trau_upqueue.h M src/Makefile.am M src/ipaccess/Makefile.am M src/ipaccess/ipaccess-config.c M src/libbsc/abis_rsl.c M src/libbsc/bsc_api.c M src/libbsc/bsc_init.c M src/libbsc/chan_alloc.c M src/libbsc/e1_config.c M src/libbsc/gsm_04_08_utils.c M src/libbsc/handover_logic.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/Makefile.am M src/libcommon/common_vty.c D src/libcommon/gsm_subscriber_base.c M src/libcommon/talloc_ctx.c D src/libtrau/Makefile.am D src/libtrau/rtp_proxy.c D src/libtrau/trau_mux.c D src/libtrau/trau_upqueue.c M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_filter.c M src/utils/Makefile.am M src/utils/bs11_config.c M tests/Makefile.am M tests/abis/Makefile.am M tests/bsc-nat-trie/Makefile.am M tests/bsc-nat/Makefile.am M tests/bsc/Makefile.am M tests/bsc/bsc_test.c M tests/bssap/Makefile.am M tests/bssap/bssap_test.c M tests/channel/channel_test.c M tests/gsm0408/Makefile.am M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/Makefile.am M tests/subscr/Makefile.am M tests/testsuite.at D tests/trau/Makefile.am D tests/trau/trau_test.c D tests/trau/trau_test.ok 68 files changed, 30 insertions(+), 2,490 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/1 diff --git a/configure.ac b/configure.ac index b7dd016..540d2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ include/osmocom/Makefile include/osmocom/bsc/Makefile src/Makefile - src/libtrau/Makefile src/libbsc/Makefile src/libcommon/Makefile src/libfilter/Makefile @@ -161,7 +160,6 @@ tests/bsc-nat/Makefile tests/bsc-nat-trie/Makefile tests/abis/Makefile - tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile tests/bssap/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..4dc6639 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,21 +4,18 @@ abis_om2000.h \ abis_rsl.h \ arfcn_range_encode.h \ - auth.h \ bsc_msc.h \ bsc_msg_filter.h \ bsc_nat.h \ bsc_nat_callstats.h \ bsc_nat_sccp.h \ bsc_rll.h \ - bsc_subscriber.h \ bss.h \ bts_ipaccess_nanobts_omlattr.h \ chan_alloc.h \ common.h \ common_bsc.h \ common_cs.h \ - crc24.h \ ctrl.h \ debug.h \ e1_config.h \ @@ -26,16 +23,12 @@ gsm_04_80.h \ gsm_data.h \ gsm_data_shared.h \ - gsm_subscriber.h \ handover.h \ handover_decision.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ misdn.h \ - mncc.h \ - mncc_int.h \ - msc_ifaces.h \ nat_rewrite_trie.h \ network_listen.h \ openbscdefines.h \ @@ -52,15 +45,9 @@ rest_octets.h \ rrlp.h \ rs232.h \ - rtp_proxy.h \ signal.h \ - silent_call.h \ - sms_queue.h \ socket.h \ system_information.h \ - transaction.h \ - trau_mux.h \ - trau_upqueue.h \ ussd.h \ vty.h \ bsc_api.h \ diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h deleted file mode 100644 index b314bbf..0000000 --- a/include/osmocom/bsc/auth.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _AUTH_H -#define _AUTH_H - -#include - -struct gsm_auth_tuple; - -enum auth_action { - AUTH_ERROR = -1, /* Internal error */ - AUTH_NOT_AVAIL = 0, /* No auth tuple available */ - AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ - AUTH_DO_CIPH = 2, /* Only ciphering */ - AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ -}; - -extern const struct value_string auth_action_names[]; -static inline const char *auth_action_str(enum auth_action a) -{ - return get_value_string(auth_action_names, a); -} - -#endif /* _AUTH_H */ diff --git a/include/osmocom/bsc/bss.h b/include/osmocom/bsc/bss.h index b12487d..9891f5f 100644 --- a/include/osmocom/bsc/bss.h +++ b/include/osmocom/bsc/bss.h @@ -6,7 +6,7 @@ struct msgb; /* start and stop network */ -extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_alloc(void); extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 320fa94..62d0286 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -24,9 +24,6 @@ struct gsm_subscriber_connection; -/* Find an allocated channel for a specified subscriber */ -struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub); - /* Allocate a logical channel (SDCCH, TCH, ...) */ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger); diff --git a/include/osmocom/bsc/common_bsc.h b/include/osmocom/bsc/common_bsc.h index 08394e9..32e5097 100644 --- a/include/osmocom/bsc/common_bsc.h +++ b/include/osmocom/bsc/common_bsc.h @@ -5,5 +5,4 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); diff --git a/include/osmocom/bsc/common_cs.h b/include/osmocom/bsc/common_cs.h index 09a4b02..c2e8515 100644 --- a/include/osmocom/bsc/common_cs.h +++ b/include/osmocom/bsc/common_cs.h @@ -6,8 +6,6 @@ struct msgb; struct gsm_network; -typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); - struct vty; #define MAX_A5_KEY_LEN (128/8) @@ -20,8 +18,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); int common_cs_vty_init(struct gsm_network *network, int (* config_write_net )(struct vty *)); diff --git a/include/osmocom/bsc/crc24.h b/include/osmocom/bsc/crc24.h deleted file mode 100644 index 756638c..0000000 --- a/include/osmocom/bsc/crc24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CRC24_H -#define _CRC24_H - -#include - -#define INIT_CRC24 0xffffff - -uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); - -#endif diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cbb809b..3268426 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,11 +24,9 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; struct vlr_instance; -struct vlr_subscr; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -107,34 +105,8 @@ /* global linked list of subscriber_connections */ struct llist_head entry; - /* usage count. If this drops to zero, we start the release - * towards A/Iu */ - uint32_t use_count; - - /* The MS has opened the conn with a CM Service Request, and we shall - * keep it open for an actual request (or until timeout). */ - bool received_cm_service_request; - /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - - /* libmsc/libvlr subscriber information (if available) */ - struct vlr_subscr *vsub; - - /* LU expiration handling */ - uint8_t expire_timer_stopped; - /* SMS helpers for libmsc */ - uint8_t next_rp_ref; - - struct osmo_fsm_inst *conn_fsm; - - /* Are we part of a special "silent" call */ - int silent_call; - - /* MNCC rtp bridge markers */ - int mncc_rtp_bridge; - int mncc_rtp_create_pending; - int mncc_rtp_connect_pending; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; /* BSC */ @@ -142,7 +114,6 @@ /* back pointers */ struct gsm_network *network; - bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -150,9 +121,6 @@ /* for assignment handling */ struct osmo_timer_list T10; /* BSC */ struct gsm_lchan *secondary_lchan; /* BSC */ - - /* connected via 2G or 3G? */ - enum ran_type via_ran; struct gsm_classmark classmark; @@ -336,10 +304,6 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_counter *active_calls; - /* layer 4 */ - struct mncc_sock_state *mncc_state; - mncc_recv_cb_t mncc_recv; - struct llist_head upqueue; /* * TODO: Move the trans_list into the subscriber connection and * create a pending list for MT transactions. These exist before @@ -380,8 +344,6 @@ /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - - struct gsm_sms_queue *sms_queue; /* control interface */ struct ctrl_handle *ctrl; @@ -451,7 +413,6 @@ struct gsm_sms { unsigned long long id; - struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index e762c24..9bbcabd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -33,7 +33,6 @@ struct osmo_bsc_data; struct osmo_bsc_sccp_con; -struct gsm_sms_queue; /* RRLP mode of operation */ enum rrlp_mode { diff --git a/include/osmocom/bsc/gsm_subscriber.h b/include/osmocom/bsc/gsm_subscriber.h deleted file mode 100644 index ca66d47..0000000 --- a/include/osmocom/bsc/gsm_subscriber.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _GSM_SUBSCR_H -#define _GSM_SUBSCR_H - -#include - -#include -#include - -#include - -#define GSM_NAME_LENGTH 160 - -#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ -#define GSM_MIN_EXTEN 20000 -#define GSM_MAX_EXTEN 49999 - -#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 -/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ - -#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 - -enum gsm_subscriber_field { - GSM_SUBSCRIBER_IMSI, - GSM_SUBSCRIBER_TMSI, - GSM_SUBSCRIBER_EXTENSION, - GSM_SUBSCRIBER_ID, -}; - -enum gsm_subscriber_update_reason { - GSM_SUBSCRIBER_UPDATE_ATTACHED, - GSM_SUBSCRIBER_UPDATE_DETACHED, - GSM_SUBSCRIBER_UPDATE_EQUIPMENT, -}; - -/* - * Struct for pending channel requests. This is managed in the - * llist_head requests of each subscriber. The reference counting - * should work in such a way that a subscriber with a pending request - * remains in memory. - */ -struct subscr_request { - struct llist_head entry; - - /* human readable label to be able to log pending request kinds */ - const char *label; - - /* the callback data */ - gsm_cbfn *cbfn; - void *param; -}; - -int subscr_update(struct vlr_subscr *vsub, int reason); - -/* - * Paging handling with authentication - */ -struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub, - gsm_cbfn *cbfn, void *param, - const char *label); - -void subscr_remove_request(struct subscr_request *req); -int subscr_rx_paging_response(struct msgb *msg, - struct gsm_subscriber_connection *conn); - -int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, - struct msgb *msg, void *data, void *param); - -#endif /* _GSM_SUBSCR_H */ diff --git a/include/osmocom/bsc/ipaccess.h b/include/osmocom/bsc/ipaccess.h index 82e89c2..3d0f612 100644 --- a/include/osmocom/bsc/ipaccess.h +++ b/include/osmocom/bsc/ipaccess.h @@ -2,11 +2,13 @@ #define _IPACCESS_H #include -#include "gsm_subscriber.h" #include #include #include +struct gsm_bts; +struct gsm_bts_trx; + struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; diff --git a/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h deleted file mode 100644 index 881e041..0000000 --- a/include/osmocom/bsc/mncc.h +++ /dev/null @@ -1,215 +0,0 @@ -/* GSM Mobile Radio Interface Layer 3 messages on the A-bis interface - * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */ - -/* (C) 2008-2009 by Harald Welte - * (C) 2008, 2009 by Holger Hans Peter Freyther - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#ifndef _MNCC_H -#define _MNCC_H - -#include -#include - -#include - -struct gsm_network; -struct msgb; - - -/* One end of a call */ -struct gsm_call { - struct llist_head entry; - - /* network handle */ - void *net; - - /* the 'local' transaction */ - uint32_t callref; - /* the 'remote' transaction */ - uint32_t remote_ref; -}; - -#define MNCC_SETUP_REQ 0x0101 -#define MNCC_SETUP_IND 0x0102 -#define MNCC_SETUP_RSP 0x0103 -#define MNCC_SETUP_CNF 0x0104 -#define MNCC_SETUP_COMPL_REQ 0x0105 -#define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ -#define MNCC_CALL_CONF_IND 0x0107 -#define MNCC_CALL_PROC_REQ 0x0108 -#define MNCC_PROGRESS_REQ 0x0109 -#define MNCC_ALERT_REQ 0x010a -#define MNCC_ALERT_IND 0x010b -#define MNCC_NOTIFY_REQ 0x010c -#define MNCC_NOTIFY_IND 0x010d -#define MNCC_DISC_REQ 0x010e -#define MNCC_DISC_IND 0x010f -#define MNCC_REL_REQ 0x0110 -#define MNCC_REL_IND 0x0111 -#define MNCC_REL_CNF 0x0112 -#define MNCC_FACILITY_REQ 0x0113 -#define MNCC_FACILITY_IND 0x0114 -#define MNCC_START_DTMF_IND 0x0115 -#define MNCC_START_DTMF_RSP 0x0116 -#define MNCC_START_DTMF_REJ 0x0117 -#define MNCC_STOP_DTMF_IND 0x0118 -#define MNCC_STOP_DTMF_RSP 0x0119 -#define MNCC_MODIFY_REQ 0x011a -#define MNCC_MODIFY_IND 0x011b -#define MNCC_MODIFY_RSP 0x011c -#define MNCC_MODIFY_CNF 0x011d -#define MNCC_MODIFY_REJ 0x011e -#define MNCC_HOLD_IND 0x011f -#define MNCC_HOLD_CNF 0x0120 -#define MNCC_HOLD_REJ 0x0121 -#define MNCC_RETRIEVE_IND 0x0122 -#define MNCC_RETRIEVE_CNF 0x0123 -#define MNCC_RETRIEVE_REJ 0x0124 -#define MNCC_USERINFO_REQ 0x0125 -#define MNCC_USERINFO_IND 0x0126 -#define MNCC_REJ_REQ 0x0127 -#define MNCC_REJ_IND 0x0128 - -#define MNCC_BRIDGE 0x0200 -#define MNCC_FRAME_RECV 0x0201 -#define MNCC_FRAME_DROP 0x0202 -#define MNCC_LCHAN_MODIFY 0x0203 -#define MNCC_RTP_CREATE 0x0204 -#define MNCC_RTP_CONNECT 0x0205 -#define MNCC_RTP_FREE 0x0206 - -#define GSM_TCHF_FRAME 0x0300 -#define GSM_TCHF_FRAME_EFR 0x0301 -#define GSM_TCHH_FRAME 0x0302 -#define GSM_TCH_FRAME_AMR 0x0303 -#define GSM_BAD_FRAME 0x03ff - -#define MNCC_SOCKET_HELLO 0x0400 - -#define GSM_MAX_FACILITY 128 -#define GSM_MAX_SSVERSION 128 -#define GSM_MAX_USERUSER 128 - -#define MNCC_F_BEARER_CAP 0x0001 -#define MNCC_F_CALLED 0x0002 -#define MNCC_F_CALLING 0x0004 -#define MNCC_F_REDIRECTING 0x0008 -#define MNCC_F_CONNECTED 0x0010 -#define MNCC_F_CAUSE 0x0020 -#define MNCC_F_USERUSER 0x0040 -#define MNCC_F_PROGRESS 0x0080 -#define MNCC_F_EMERGENCY 0x0100 -#define MNCC_F_FACILITY 0x0200 -#define MNCC_F_SSVERSION 0x0400 -#define MNCC_F_CCCAP 0x0800 -#define MNCC_F_KEYPAD 0x1000 -#define MNCC_F_SIGNAL 0x2000 - -struct gsm_mncc { - /* context based information */ - uint32_t msg_type; - uint32_t callref; - - /* which fields are present */ - uint32_t fields; - - /* data derived informations (MNCC_F_ based) */ - struct gsm_mncc_bearer_cap bearer_cap; - struct gsm_mncc_number called; - struct gsm_mncc_number calling; - struct gsm_mncc_number redirecting; - struct gsm_mncc_number connected; - struct gsm_mncc_cause cause; - struct gsm_mncc_progress progress; - struct gsm_mncc_useruser useruser; - struct gsm_mncc_facility facility; - struct gsm_mncc_cccap cccap; - struct gsm_mncc_ssversion ssversion; - struct { - int sup; - int inv; - } clir; - int signal; - - /* data derived information, not MNCC_F based */ - int keypad; - int more; - int notify; /* 0..127 */ - int emergency; - char imsi[16]; -}; - -struct gsm_data_frame { - uint32_t msg_type; - uint32_t callref; - unsigned char data[0]; -}; - -#define MNCC_SOCK_VERSION 5 -struct gsm_mncc_hello { - uint32_t msg_type; - uint32_t version; - - /* send the sizes of the structs */ - uint32_t mncc_size; - uint32_t data_frame_size; - - /* send some offsets */ - uint32_t called_offset; - uint32_t signal_offset; - uint32_t emergency_offset; -}; - -struct gsm_mncc_rtp { - uint32_t msg_type; - uint32_t callref; - uint32_t ip; - uint16_t port; - uint32_t payload_type; - uint32_t payload_msg_type; -}; - -struct gsm_mncc_bridge { - uint32_t msg_type; - uint32_t callref[2]; -}; - -const char *get_mncc_name(int value); -void mncc_set_cause(struct gsm_mncc *data, int loc, int val); -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_builtin */ -int int_mncc_recv(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_sock */ -int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg); - -int mncc_sock_init(struct gsm_network *net, const char *sock_path); - -#define mncc_is_data_frame(msg_type) \ - (msg_type == GSM_TCHF_FRAME \ - || msg_type == GSM_TCHF_FRAME_EFR \ - || msg_type == GSM_TCHH_FRAME \ - || msg_type == GSM_TCH_FRAME_AMR \ - || msg_type == GSM_BAD_FRAME) - - -#endif diff --git a/include/osmocom/bsc/mncc_int.h b/include/osmocom/bsc/mncc_int.h deleted file mode 100644 index 213ce14..0000000 --- a/include/osmocom/bsc/mncc_int.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MNCC_INT_H -#define _MNCC_INT_H - -#include - -struct mncc_int { - uint8_t def_codec[2]; -}; - -extern struct mncc_int mncc_int; - -uint8_t mncc_codec_for_mode(int lchan_type); - -#endif diff --git a/include/osmocom/bsc/msc_ifaces.h b/include/osmocom/bsc/msc_ifaces.h deleted file mode 100644 index dadb828..0000000 --- a/include/osmocom/bsc/msc_ifaces.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -/* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, - * i.e. in the direction towards the mobile device (MS aka UE). - * - * 2G will use the A-interface, - * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). - * - * To allow linking parts of the MSC code without having to include entire - * infrastructures of external libraries, the core transmitting and receiving - * functions are left unimplemented. For example, a unit test does not need to - * link against external ASN1 libraries if it is never going to encode actual - * outgoing messages. It is up to each building scope to implement real world - * functions or to plug mere dummy implementations. - * - * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call - * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not - * yet implemented]. When you try to link against libmsc, you will find that - * the compiler complains about an undefined reference to iu_tx(). If you, - * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is - * available. A unit test may instead simply implement a dummy iu_tx() function - * and not link against osmo-iuh, see tests/libiudummy/. - */ - -/* Each main linkage must implement this function (see comment above). */ -extern int iu_tx(struct msgb *msg, uint8_t sapi); - -int msc_tx_dtap(struct gsm_subscriber_connection *conn, - struct msgb *msg); - -int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); -int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, - enum gsm48_reject_value value); - -int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h deleted file mode 100644 index 918420c..0000000 --- a/include/osmocom/bsc/rtp_proxy.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RTP_PROXY_H -#define _RTP_PROXY_H - -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - - -#include - -#include -#include - -#include - -#define RTP_PT_GSM_FULL 3 -#define RTP_PT_GSM_HALF 96 -#define RTP_PT_GSM_EFR 97 -#define RTP_PT_AMR 98 -#define RTP_LEN_GSM_FULL 33 -#define RTP_LEN_GSM_HALF 15 -#define RTP_LEN_GSM_EFR 31 -#define RTP_GSM_DURATION 160 - -enum rtp_rx_action { - RTP_NONE, - RTP_PROXY, - RTP_RECV_UPSTREAM, -}; - -enum rtp_tx_action { - RTP_SEND_NONE, - RTP_SEND_DOWNSTREAM, -}; - -struct rtp_sub_socket { - struct sockaddr_in sin_local; - struct sockaddr_in sin_remote; - - struct osmo_fd bfd; - /* linked list of to-be-transmitted msgb's */ - struct llist_head tx_queue; -}; - -struct rtp_socket { - struct llist_head list; - - struct rtp_sub_socket rtp; - struct rtp_sub_socket rtcp; - - /* what should we do on receive? */ - enum rtp_rx_action rx_action; - union { - struct { - struct rtp_socket *other_sock; - } proxy; - struct { - struct gsm_network *net; - uint32_t callref; - } receive; - }; - enum rtp_tx_action tx_action; - struct { - uint16_t sequence; - uint32_t timestamp; - uint32_t ssrc; - struct timeval last_tv; - } transmit; -}; - -struct rtp_socket *rtp_socket_create(void); -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip); -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port); -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other); -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref); -int rtp_socket_free(struct rtp_socket *rs); -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame); - -#endif /* _RTP_PROXY_H */ diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index feab246..58d9acf 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -34,34 +34,21 @@ */ enum signal_subsystems { SS_PAGING, - SS_SMS, SS_ABISIP, SS_NM, SS_LCHAN, - SS_SUBSCR, - SS_SCALL, SS_CHALLOC, SS_IPAC_NWL, SS_RF, SS_MSC, SS_HO, SS_CCCH, - SS_SGSN, }; /* SS_PAGING signals */ enum signal_paging { S_PAGING_SUCCEEDED, S_PAGING_EXPIRED, -}; - -/* SS_SMS signals */ -enum signal_sms { - S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */ - S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */ - S_SMS_SMMA, /* A MS tells us it has more space available */ - S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */ - S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */ }; /* SS_ABISIP signals */ @@ -108,20 +95,6 @@ S_CHALLOC_FREED, /* lchan has been successfully freed */ }; -/* SS_SUBSCR signals */ -enum signal_subscr { - S_SUBSCR_ATTACHED, - S_SUBSCR_DETACHED, - S_SUBSCR_IDENTITY, /* we've received some identity information */ -}; - -/* SS_SCALL signals */ -enum signal_scall { - S_SCALL_SUCCESS, - S_SCALL_EXPIRED, - S_SCALL_DETACHED, -}; - /* SS_IPAC_NWL signals */ enum signal_ipaccess { S_IPAC_NWL_COMPLETE, @@ -136,21 +109,6 @@ S_RF_OFF, S_RF_ON, S_RF_GRACE, -}; - -struct paging_signal_data { - struct vlr_subscr *vsub; - struct gsm_bts *bts; - - int paging_result; - - /* NULL in case the paging didn't work */ - struct gsm_subscriber_connection *conn; -}; - -struct scall_signal_data { - struct gsm_subscriber_connection *conn; - void *data; }; struct ipacc_ack_signal_data { @@ -197,15 +155,6 @@ struct gsm_network *net; }; -struct sms_signal_data { - /* The transaction where this occured */ - struct gsm_trans *trans; - /* Can be NULL for SMMA */ - struct gsm_sms *sms; - /* int paging result. Only the ones with > 0 */ - int paging_result; -}; - struct lchan_signal_data { /* The lchan the signal happened on */ struct gsm_lchan *lchan; @@ -237,24 +186,6 @@ uint16_t rach_slot_count; uint16_t rach_busy_count; uint16_t rach_access_count; -}; - -/* GPRS SGSN signals SS_SGSN */ -enum signal_sgsn { - S_SGSN_ATTACH, - S_SGSN_DETACH, - S_SGSN_UPDATE, - S_SGSN_PDP_ACT, - S_SGSN_PDP_DEACT, - S_SGSN_PDP_TERMINATE, - S_SGSN_PDP_FREE, - S_SGSN_MM_FREE, -}; - -struct sgsn_mm_ctx; -struct sgsn_signal_data { - struct sgsn_mm_ctx *mm; - struct sgsn_pdp_ctx *pdp; /* non-NULL for PDP_ACT, PDP_DEACT, PDP_FREE */ }; #endif diff --git a/include/osmocom/bsc/silent_call.h b/include/osmocom/bsc/silent_call.h deleted file mode 100644 index 5fec77b..0000000 --- a/include/osmocom/bsc/silent_call.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _SILENT_CALL_H -#define _SILENT_CALL_H - -struct gsm_subscriber_connection; - -extern int gsm_silent_call_start(struct vlr_subscr *vsub, - void *data, int type); -extern int gsm_silent_call_stop(struct vlr_subscr *vsub); - -#if 0 -extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); -extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); -#endif - -#endif /* _SILENT_CALL_H */ diff --git a/include/osmocom/bsc/smpp.h b/include/osmocom/bsc/smpp.h deleted file mode 100644 index bcdac8f..0000000 --- a/include/osmocom/bsc/smpp.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -int smpp_openbsc_alloc_init(void *ctx); -int smpp_openbsc_start(struct gsm_network *net); diff --git a/include/osmocom/bsc/sms_queue.h b/include/osmocom/bsc/sms_queue.h deleted file mode 100644 index 2a8bd58..0000000 --- a/include/osmocom/bsc/sms_queue.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SMS_QUEUE_H -#define SMS_QUEUE_H - -struct gsm_network; -struct gsm_sms_queue; -struct vty; - -int sms_queue_start(struct gsm_network *, int in_flight); -int sms_queue_trigger(struct gsm_sms_queue *); - -/* vty helper functions */ -int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty); -int sms_queue_set_max_pending(struct gsm_sms_queue *, int max); -int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail); -int sms_queue_clear(struct gsm_sms_queue *); - -#endif diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h deleted file mode 100644 index 5465548..0000000 --- a/include/osmocom/bsc/transaction.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _TRANSACT_H -#define _TRANSACT_H - -#include -#include -#include -#include -#include -#include - -enum bridge_state { - BRIDGE_STATE_NONE, - BRIDGE_STATE_LOOPBACK_PENDING, - BRIDGE_STATE_LOOPBACK_ESTABLISHED, - BRIDGE_STATE_BRIDGE_PENDING, - BRIDGE_STATE_BRIDGE_ESTABLISHED, -}; - -/* One transaction */ -struct gsm_trans { - /* Entry in list of all transactions */ - struct llist_head entry; - - /* Back pointer to the network struct */ - struct gsm_network *net; - - /* The protocol within which we live */ - uint8_t protocol; - - /* The current transaction ID */ - uint8_t transaction_id; - - /* To whom we belong, unique identifier of remote MM entity */ - struct vlr_subscr *vsub; - - /* The associated connection we are using to transmit messages */ - struct gsm_subscriber_connection *conn; - - /* reference from MNCC or other application */ - uint32_t callref; - - /* if traffic channel receive was requested */ - int tch_recv; - - /* is thats one paging? */ - struct subscr_request *paging_request; - - /* bearer capabilities (rate and codec) */ - struct gsm_mncc_bearer_cap bearer_cap; - - /* status of the assignment, true when done */ - bool assignment_done; - - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - - union { - struct { - - /* current call state */ - int state; - - /* current timer and message queue */ - int Tcurrent; /* current CC timer */ - int T308_second; /* used to send release again */ - struct osmo_timer_list timer; - struct gsm_mncc msg; /* stores setup/disconnect/release message */ - } cc; - struct { - struct gsm411_smc_inst smc_inst; - struct gsm411_smr_inst smr_inst; - - struct gsm_sms *sms; - } sms; - }; - - struct { - struct gsm_trans *peer; - enum bridge_state state; - } bridge; -}; - - - -struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn, - uint8_t proto, uint8_t trans_id); -struct gsm_trans *trans_find_by_callref(struct gsm_network *net, - uint32_t callref); - -struct gsm_trans *trans_alloc(struct gsm_network *net, - struct vlr_subscr *vsub, - uint8_t protocol, uint8_t trans_id, - uint32_t callref); -void trans_free(struct gsm_trans *trans); - -int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub, - uint8_t protocol, uint8_t ti_flag); -struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn); -void trans_conn_closed(struct gsm_subscriber_connection *conn); - -#endif diff --git a/include/osmocom/bsc/trau_mux.h b/include/osmocom/bsc/trau_mux.h deleted file mode 100644 index eeceff5..0000000 --- a/include/osmocom/bsc/trau_mux.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1 - * timeslot on which E1 interface) should be directly muxed to which other - * sub-slot. Entries in the mux map are always bi-directional. - * - * The idea of all this is to directly switch voice channels in the BSC - * from one phone to another. We do this right now since we don't support - * any external interface for voice channels, and in the future as an - * optimization to routing them externally. - */ - -#include -#include -#include - -struct decoded_trau_frame; - -/* map a TRAU mux map entry */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst); -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst); - -/* unmap a TRAU mux map entry */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref); - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits); - -/* add a trau receiver */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref); - -/* send trau from application */ -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame); - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan); - -/* callback invoked if we receive TRAU frames */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv); - -/* TRAU frame transcoding */ -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf); -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf); -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data); -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data); diff --git a/include/osmocom/bsc/trau_upqueue.h b/include/osmocom/bsc/trau_upqueue.h deleted file mode 100644 index ecc7658..0000000 --- a/include/osmocom/bsc/trau_upqueue.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _TRAU_UPQUEUE_H -#define _TRAU_UPQUEUE_H - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -#endif /* _TRAU_UPQUEUE_H */ - diff --git a/src/Makefile.am b/src/Makefile.am index 454bf26..637272d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,6 @@ libcommon \ libcommon-cs \ libbsc \ - libtrau \ libfilter \ $(NULL) diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am index 4dfe247..b3b2b8c 100644 --- a/src/ipaccess/Makefile.am +++ b/src/ipaccess/Makefile.am @@ -30,7 +30,6 @@ abisip_find_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -49,7 +48,6 @@ ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -60,7 +58,6 @@ ipaccess_proxy_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index c68e3ea..957a5bb 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -978,7 +978,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) exit(1); diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ef7a6fb..980b3e6 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,6 +48,11 @@ #define RSL_ALLOC_SIZE 1024 #define RSL_ALLOC_HEADROOM 128 + +#define RTP_PT_GSM_FULL 3 +#define RTP_PT_GSM_HALF 96 +#define RTP_PT_GSM_EFR 97 +#define RTP_PT_AMR 98 enum sacch_deact { SACCH_NONE, @@ -159,9 +162,6 @@ if (rc < 0) LOGP(DRSL, LOGL_ERROR, "%s %smismatching chan_nr=0x%02x\n", gsm_ts_and_pchan_name(lchan->ts), log_name, chan_nr); - - if (lchan->conn) - log_set_context(LOG_CTX_VLR_SUBSCR, lchan->conn->vsub); return lchan; } @@ -2420,20 +2420,6 @@ msg->dst = lchan->ts->trx->rsl_link; return abis_rsl_sendmsg(msg); -} - -/* tell BTS to connect RTP stream to our local RTP socket */ -int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan) -{ - struct rtp_socket *rs = lchan->abis_ip.rtp_socket; - int rc; - - rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), - ntohs(rs->rtp.sin_local.sin_port), - /* FIXME: use RTP payload of bound socket, not BTS*/ - lchan->abis_ip.rtp_payload2); - - return rc; } int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 845b1b7..6ff1688 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -24,13 +24,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include @@ -263,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->via_ran = RAN_GERAN_A; conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); @@ -277,11 +274,6 @@ if (conn->network->bsc_api->conn_cleanup) conn->network->bsc_api->conn_cleanup(conn); - - if (conn->vsub) { - LOGP(DNM, LOGL_ERROR, "conn->vsub should have been cleared.\n"); - conn->vsub = NULL; - } if (conn->ho_lchan) { LOGP(DNM, LOGL_ERROR, "The ho_lchan should have been cleared.\n"); @@ -452,10 +444,6 @@ msgb_l3len(msg) - sizeof(*gh)); return; } - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(conn->bts)) - switch_trau_mux(conn->lchan, conn->secondary_lchan); /* swap channels */ osmo_timer_del(&conn->T10); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 2fb3842..34dfd36 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -529,10 +529,10 @@ return 0; } -int bsc_network_alloc(mncc_recv_cb_t mncc_recv) +int bsc_network_alloc(void) { /* initialize our data structures */ - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) return -ENOMEM; diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 4b2531e..ad24a1e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -25,12 +25,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -392,13 +390,6 @@ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, &sig); } - if (lchan->abis_ip.rtp_socket) { - LOGP(DRLL, LOGL_ERROR, "%s RTP Proxy Socket remained open.\n", - gsm_lchan_name(lchan)); - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } - /* stop the timer */ osmo_timer_del(&lchan->T3101); @@ -449,11 +440,6 @@ lchan->type = GSM_LCHAN_NONE; rsl_lchan_set_state(lchan, LCHAN_S_NONE); - - if (lchan->abis_ip.rtp_socket) { - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } } /* Drive the release process of the lchan */ diff --git a/src/libbsc/e1_config.c b/src/libbsc/e1_config.c index 3656315..90e29d3 100644 --- a/src/libbsc/e1_config.c +++ b/src/libbsc/e1_config.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ { struct gsm_e1_subslot *e1_link = &ts->e1_link; struct e1inp_line *line; - struct e1inp_ts *e1_ts; DEBUGP(DLMI, "e1_reconfig_ts(%u,%u,%u)\n", ts->trx->bts->nr, ts->trx->nr, ts->nr); @@ -61,12 +58,6 @@ "non-existing E1 line %u\n", ts->nr, ts->trx->nr, ts->trx->bts->nr, e1_link->e1_nr); return -ENOMEM; - } - - if (ts_is_tch(ts)) { - e1_ts = &line->ts[e1_link->e1_ts-1]; - e1inp_ts_config_trau(e1_ts, line, subch_cb); - subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); } return 0; diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..414fd6d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 7b9dece..a30cd09 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -32,13 +32,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include @@ -270,10 +267,6 @@ rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); osmo_timer_del(&ho->T3103); - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(new_lchan->conn->bts)) - switch_trau_mux(ho->old_lchan, new_lchan); /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..59a8d5c 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -24,12 +24,11 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; - net = gsm_network_init(ctx, country_code, network_code, mncc_recv); + net = gsm_network_init(ctx, country_code, network_code); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 2ac2612..b410b17 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -39,8 +38,7 @@ */ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; @@ -55,15 +53,12 @@ net->t3212 = 5; INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); net->active_calls = osmo_counter_alloc("msc.active_calls"); - - net->mncc_recv = mncc_recv; net->dyn_ts_allow_tch_f = true; @@ -127,17 +122,4 @@ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2; return gsm48_extract_mi(classmark2_lv, length - classmark_offset, mi_string, mi_type); -} - -uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) -{ - const uint8_t rp_msg_ref = *next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - *next_rp_ref += 1; - - return rp_msg_ref; } diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 74b1a93..beb936b 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -28,7 +28,6 @@ #include #include -#include struct cmd_node net_node = { GSMNET_NODE, diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..ec997b7 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -25,5 +25,4 @@ gsm_data_shared.c \ socket.c \ talloc_ctx.c \ - gsm_subscriber_base.c \ $(NULL) diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c index d4d5fb5..82327d1 100644 --- a/src/libcommon/common_vty.c +++ b/src/libcommon/common_vty.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c deleted file mode 100644 index a746c24..0000000 --- a/src/libcommon/gsm_subscriber_base.c +++ /dev/null @@ -1,37 +0,0 @@ -/* The concept of a subscriber as seen by the BSC */ - -/* (C) 2008 by Harald Welte - * (C) 2009-2010 by Holger Hans Peter Freyther - * (C) 2010 by On-Waves - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -LLIST_HEAD(active_subscribers); -void *tall_subscr_ctx; - diff --git a/src/libcommon/talloc_ctx.c b/src/libcommon/talloc_ctx.c index c8e9cd3..9f64d75 100644 --- a/src/libcommon/talloc_ctx.c +++ b/src/libcommon/talloc_ctx.c @@ -32,8 +32,6 @@ extern void *tall_sigh_ctx; extern void *tall_tqe_ctx; extern void *tall_trans_ctx; -extern void *tall_map_ctx; -extern void *tall_upq_ctx; extern void *tall_ctr_ctx; void talloc_ctx_init(void *ctx_root) @@ -49,7 +47,5 @@ tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); - tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); - tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); } diff --git a/src/libtrau/Makefile.am b/src/libtrau/Makefile.am deleted file mode 100644 index 46becd6..0000000 --- a/src/libtrau/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - -I$(top_builddir) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMONETIF_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -noinst_LIBRARIES = \ - libtrau.a \ - $(NULL) - -libtrau_a_SOURCES = \ - rtp_proxy.c \ - trau_mux.c \ - trau_upqueue.c \ - $(NULL) diff --git a/src/libtrau/rtp_proxy.c b/src/libtrau/rtp_proxy.c deleted file mode 100644 index 5b1ca79..0000000 --- a/src/libtrau/rtp_proxy.c +++ /dev/null @@ -1,764 +0,0 @@ -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009-2013 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include /* gettimeofday() */ -#include /* get..() */ -#include /* clock() */ -#include /* uname() */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* attempt to determine byte order */ -#include -#include - -static LLIST_HEAD(rtp_sockets); - -/* should we mangle the CNAME inside SDES of RTCP packets? We disable - * this by default, as it seems to be not needed */ -static int mangle_rtcp_cname = 0; - -enum rtp_bfd_priv { - RTP_PRIV_NONE, - RTP_PRIV_RTP, - RTP_PRIV_RTCP -}; - -#define RTP_ALLOC_SIZE 1500 - -#define RTCP_TYPE_SDES 202 - -#define RTCP_IE_CNAME 1 - - -#define RTP_VERSION 2 - -/* 33 for FR, all other codecs have smaller size */ -#define MAX_RTP_PAYLOAD_LEN 33 - -/* decode an rtp frame and create a new buffer with payload */ -static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data) -{ - struct msgb *new_msg; - struct gsm_data_frame *frame; - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; - struct rtp_x_hdr *rtpxh; - uint8_t *payload, *payload_out; - int payload_len; - int msg_type; - int x_len; - - if (msg->len < 12) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", - msg->len); - return -EINVAL; - } - if (rtph->version != RTP_VERSION) { - DEBUGPC(DLMUX, "received RTP version %d not supported.\n", - rtph->version); - return -EINVAL; - } - payload = msg->data + sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); - payload_len = msg->len - sizeof(struct rtp_hdr) - (rtph->csrc_count << 2); - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); - return -EINVAL; - } - if (rtph->extension) { - if (payload_len < sizeof(struct rtp_x_hdr)) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "extension header\n"); - return -EINVAL; - } - rtpxh = (struct rtp_x_hdr *)payload; - x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short, " - "extension header exceeds frame length\n"); - return -EINVAL; - } - } - if (rtph->padding) { - if (payload_len < 1) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "padding length\n"); - return -EINVAL; - } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); - return -EINVAL; - } - } - - switch (rtph->payload_type) { - case RTP_PT_GSM_FULL: - msg_type = GSM_TCHF_FRAME; - if (payload_len != RTP_LEN_GSM_FULL) { - DEBUGPC(DLMUX, "received RTP full rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_FULL, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_EFR: - msg_type = GSM_TCHF_FRAME_EFR; - if (payload_len != RTP_LEN_GSM_EFR) { - DEBUGPC(DLMUX, "received RTP extended full rate frame " - "with payload length != %d (len = %d)\n", - RTP_LEN_GSM_EFR, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_HALF: - msg_type = GSM_TCHH_FRAME; - if (payload_len != RTP_LEN_GSM_HALF) { - DEBUGPC(DLMUX, "received RTP half rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_HALF, payload_len); - return -EINVAL; - } - break; - case RTP_PT_AMR: - msg_type = GSM_TCH_FRAME_AMR; - break; - default: - DEBUGPC(DLMUX, "received RTP frame with unknown payload " - "type %d\n", rtph->payload_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN || - (rtph->payload_type == RTP_PT_AMR && - payload_len > MAX_RTP_PAYLOAD_LEN - 1)) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - /* always allocate for the maximum possible size to avoid - * fragmentation */ - new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); - - if (!new_msg) - return -ENOMEM; - frame = (struct gsm_data_frame *) msgb_put(new_msg, sizeof(struct gsm_data_frame)); - frame->msg_type = msg_type; - frame->callref = callref; - if (rtph->payload_type == RTP_PT_AMR) { - /* for FR/HR/EFR the length is implicit. In AMR, we - * need to make it explicit by using the first byte of - * the data[] buffer as length byte */ - uint8_t *data0 = msgb_put(new_msg, 1); - *data0 = payload_len; - } - payload_out = msgb_put(new_msg, payload_len); - memcpy(payload_out, payload, payload_len); - - *data = new_msg; - return 0; -} - -/*! \brief encode and send a rtp frame - * \param[in] rs RTP socket through which we shall send - * \param[in] frame GSM RTP frame to be sent - */ -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame) -{ - struct rtp_sub_socket *rss = &rs->rtp; - struct msgb *msg; - struct rtp_hdr *rtph; - uint8_t *payload; - int payload_type; - int payload_len; - int duration; /* in samples */ - int is_bfi = 0; - - if (rs->tx_action != RTP_SEND_DOWNSTREAM) { - /* initialize sequences */ - rs->tx_action = RTP_SEND_DOWNSTREAM; - rs->transmit.ssrc = rand(); - rs->transmit.sequence = random(); - rs->transmit.timestamp = random(); - } - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - payload_type = RTP_PT_GSM_FULL; - payload_len = RTP_LEN_GSM_FULL; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHF_FRAME_EFR: - payload_type = RTP_PT_GSM_EFR; - payload_len = RTP_LEN_GSM_EFR; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHH_FRAME: - payload_type = RTP_PT_GSM_HALF; - payload_len = RTP_LEN_GSM_HALF; - duration = RTP_GSM_DURATION; - break; - case GSM_TCH_FRAME_AMR: - payload_type = RTP_PT_AMR; - payload_len = frame->data[0]; - duration = RTP_GSM_DURATION; - break; - case GSM_BAD_FRAME: - payload_type = 0; - payload_len = 0; - duration = RTP_GSM_DURATION; - is_bfi = 1; - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - if (is_bfi) { - /* In case of a bad frame, just count and drop packet. */ - rs->transmit.timestamp += duration; - rs->transmit.sequence++; - return 0; - } - - msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM"); - if (!msg) - return -ENOMEM; - rtph = (struct rtp_hdr *) msgb_put(msg, sizeof(struct rtp_hdr)); - rtph->version = RTP_VERSION; - rtph->padding = 0; - rtph->extension = 0; - rtph->csrc_count = 0; - rtph->marker = 0; - rtph->payload_type = payload_type; - rtph->sequence = htons(rs->transmit.sequence++); - rtph->timestamp = htonl(rs->transmit.timestamp); - rs->transmit.timestamp += duration; - rtph->ssrc = htonl(rs->transmit.ssrc); - - payload = msgb_put(msg, payload_len); - if (frame->msg_type == GSM_TCH_FRAME_AMR) - memcpy(payload, frame->data + 1, payload_len); - else - memcpy(payload, frame->data, payload_len); - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - - return 0; -} - -/* iterate over all chunks in one RTCP message, look for CNAME IEs and - * replace all of those with 'new_cname' */ -static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh, - uint16_t *rtcp_len, const char *new_cname) -{ - uint8_t *rtcp_end; - uint8_t *cur = (uint8_t *) rh; - uint8_t tag, len = 0; - - rtcp_end = cur + *rtcp_len; - /* move cur to end of RTP header */ - cur += sizeof(*rh); - - /* iterate over Chunks */ - while (cur+4 < rtcp_end) { - /* skip four bytes SSRC/CSRC */ - cur += 4; - - /* iterate over IE's inside the chunk */ - while (cur+1 < rtcp_end) { - tag = *cur++; - if (tag == 0) { - /* end of chunk, skip additional zero */ - while ((*cur++ == 0) && (cur < rtcp_end)) { } - break; - } - len = *cur++; - - if (tag == RTCP_IE_CNAME) { - /* we've found the CNAME, lets mangle it */ - if (len < strlen(new_cname)) { - /* we need to make more space */ - int increase = strlen(new_cname) - len; - - msgb_push(msg, increase); - memmove(cur+len+increase, cur+len, - rtcp_end - (cur+len)); - /* FIXME: we have to respect RTCP - * padding/alignment rules! */ - len += increase; - *(cur-1) += increase; - rtcp_end += increase; - *rtcp_len += increase; - } - /* copy new CNAME into message */ - memcpy(cur, new_cname, strlen(new_cname)); - /* FIXME: zero the padding in case new CNAME - * is smaller than old one !!! */ - } - cur += len; - } - } - - return 0; -} - -static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs) -{ - struct rtp_sub_socket *rss = &rs->rtcp; - struct rtcp_hdr *rtph; - uint16_t old_len; - int rc; - - if (!mangle_rtcp_cname) - return 0; - - printf("RTCP\n"); - /* iterate over list of RTCP messages */ - rtph = (struct rtcp_hdr *)msg->data; - while ((void *)rtph + sizeof(*rtph) <= (void *)msg->data + msg->len) { - old_len = (ntohs(rtph->length) + 1) * 4; - if ((void *)rtph + old_len > (void *)msg->data + msg->len) { - DEBUGPC(DLMUX, "received RTCP packet too short for " - "length element\n"); - return -EINVAL; - } - if (rtph->type == RTCP_TYPE_SDES) { - char new_cname[255]; - osmo_strlcpy(new_cname, - inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, - new_cname); - if (rc < 0) - return rc; - } - rtph = (void *)rtph + old_len; - } - - return 0; -} - -/* read from incoming RTP/RTCP socket */ -static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - int rc; - struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP"); - struct msgb *new_msg; - struct rtp_sub_socket *other_rss; - - if (!msg) - return -ENOMEM; - - rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } else if (rc < 0) { - /* Ignore "connection refused". this happens, If we open the - * socket faster than the remote side. */ - if (errno == ECONNREFUSED) - goto out_free; - DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " - "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } - - msgb_put(msg, rc); - - switch (rs->rx_action) { - case RTP_PROXY: - if (!rs->proxy.other_sock) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTP) - other_rss = &rs->proxy.other_sock->rtp; - else if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - other_rss = &rs->proxy.other_sock->rtcp; - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - } else { - rc = -EINVAL; - goto out_free; - } - msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; - break; - - case RTP_RECV_UPSTREAM: - if (!rs->receive.callref || !rs->receive.net) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - if (!mangle_rtcp_cname) { - msgb_free(msg); - break; - } - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - break; - } - if (rss->bfd.priv_nr != RTP_PRIV_RTP) { - rc = -EINVAL; - goto out_free; - } - rc = rtp_decode(msg, rs->receive.callref, &new_msg); - if (rc < 0) - goto out_free; - msgb_free(msg); - trau_tx_to_mncc(rs->receive.net, new_msg); - break; - - case RTP_NONE: /* if socket exists, but disabled by app */ - msgb_free(msg); - break; - } - - return 0; - -out_free: - msgb_free(msg); - return rc; -} - -/* \brief write from tx_queue to RTP/RTCP socket */ -static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - struct msgb *msg; - int written; - - msg = msgb_dequeue(&rss->tx_queue); - if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; - return 0; - } - - written = write(rss->bfd.fd, msg->data, msg->len); - if (written < msg->len) { - LOGP(DLMIB, LOGL_ERROR, "short write"); - msgb_free(msg); - return -EIO; - } - - msgb_free(msg); - - return 0; -} - - -/*! \brief callback for the select.c:bfd_* layer */ -static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags) -{ - struct rtp_socket *rs = bfd->data; - struct rtp_sub_socket *rss; - - switch (bfd->priv_nr) { - case RTP_PRIV_RTP: - rss = &rs->rtp; - break; - case RTP_PRIV_RTCP: - rss = &rs->rtcp; - break; - default: - return -EINVAL; - } - - if (flags & BSC_FD_READ) - rtp_socket_read(rs, rss); - - if (flags & BSC_FD_WRITE) - rtp_socket_write(rs, rss); - - return 0; -} - -/*! \brief initialize one rtp sub-socket */ -static void init_rss(struct rtp_sub_socket *rss, - struct rtp_socket *rs, int fd, int priv_nr) -{ - /* initialize bfd */ - rss->bfd.fd = fd; - rss->bfd.data = rs; - rss->bfd.priv_nr = priv_nr; - rss->bfd.cb = rtp_bfd_cb; -} - -/*! \brief create a new RTP/RTCP socket and bind it */ -struct rtp_socket *rtp_socket_create(void) -{ - int rc; - struct rtp_socket *rs; - - DEBUGP(DLMUX, "rtp_socket_create(): "); - - rs = talloc_zero(tall_bsc_ctx, struct rtp_socket); - if (!rs) - return NULL; - - INIT_LLIST_HEAD(&rs->rtp.tx_queue); - INIT_LLIST_HEAD(&rs->rtcp.tx_queue); - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_free; - - init_rss(&rs->rtp, rs, rc, RTP_PRIV_RTP); - rc = osmo_fd_register(&rs->rtp.bfd); - if (rc < 0) - goto out_rtp_socket; - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_rtp_bfd; - - init_rss(&rs->rtcp, rs, rc, RTP_PRIV_RTCP); - rc = osmo_fd_register(&rs->rtcp.bfd); - if (rc < 0) - goto out_rtcp_socket; - - DEBUGPC(DLMUX, "success\n"); - - rc = rtp_socket_bind(rs, INADDR_ANY); - if (rc < 0) - goto out_rtcp_bfd; - - return rs; - -out_rtcp_bfd: - osmo_fd_unregister(&rs->rtcp.bfd); -out_rtcp_socket: - close(rs->rtcp.bfd.fd); -out_rtp_bfd: - osmo_fd_unregister(&rs->rtp.bfd); -out_rtp_socket: - close(rs->rtp.bfd.fd); -out_free: - talloc_free(rs); - DEBUGPC(DLMUX, "failed\n"); - return NULL; -} - -static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip, - uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_local.sin_family = AF_INET; - rss->sin_local.sin_addr.s_addr = htonl(ip); - rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; - - rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - sizeof(rss->sin_local)); - if (rc < 0) - return rc; - - /* retrieve the address we actually bound to, in case we - * passed INADDR_ANY as IP address */ - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -#define RTP_PORT_BASE 30000 -static unsigned int next_udp_port = RTP_PORT_BASE; - -/*! \brief bind a RTP socket to a specific local address - * \param[in] rs RTP socket to be bound - * \param[in] ip local IP address to which socket is to be bound - */ -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip) -{ - int rc = -EIO; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_bind(rs=%p, IP=%s): ", rs, - inet_ntoa(ia)); - - /* try to bind to a consecutive pair of ports */ - for (next_udp_port = next_udp_port % 0xffff; - next_udp_port < 0xffff; next_udp_port += 2) { - rc = rtp_sub_socket_bind(&rs->rtp, ip, next_udp_port); - if (rc != 0) - continue; - - rc = rtp_sub_socket_bind(&rs->rtcp, ip, next_udp_port+1); - if (rc == 0) - break; - } - if (rc < 0) { - DEBUGPC(DLMUX, "failed\n"); - return rc; - } - - ia.s_addr = rs->rtp.sin_local.sin_addr.s_addr; - DEBUGPC(DLMUX, "BOUND_IP=%s, BOUND_PORT=%u\n", - inet_ntoa(ia), ntohs(rs->rtp.sin_local.sin_port)); - return ntohs(rs->rtp.sin_local.sin_port); -} - -static int rtp_sub_socket_connect(struct rtp_sub_socket *rss, - uint32_t ip, uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_remote.sin_family = AF_INET; - rss->sin_remote.sin_addr.s_addr = htonl(ip); - rss->sin_remote.sin_port = htons(port); - - rc = connect(rss->bfd.fd, (struct sockaddr *) &rss->sin_remote, - sizeof(rss->sin_remote)); - if (rc < 0) - return rc; - - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -/*! \brief 'connect' a RTP socket to a remote peer - * \param[in] rs RTP socket to be connected - * \param[in] ip remote IP address to which to connect - * \param[in] port remote UDP port number to which to connect - */ -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port) -{ - int rc; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_connect(rs=%p, ip=%s, port=%u)\n", - rs, inet_ntoa(ia), port); - - rc = rtp_sub_socket_connect(&rs->rtp, ip, port); - if (rc < 0) - return rc; - - return rtp_sub_socket_connect(&rs->rtcp, ip, port+1); -} - -/*! \brief bind two RTP/RTCP sockets together in the proxy - * \param[in] this First RTP socket - * \param[in] other Second RTP socket - */ -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n", - this, other); - - this->rx_action = RTP_PROXY; - this->proxy.other_sock = other; - - other->rx_action = RTP_PROXY; - other->proxy.other_sock = this; - - return 0; -} - -/*! \brief bind RTP/RTCP socket to application, disabling proxy - * \param[in] this RTP socket - * \param[in] net gsm_network argument to trau_tx_to_mncc() - * \param[in] callref callref argument to trau_tx_to_mncc() - */ -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, - uint32_t callref) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n", - this, callref); - - if (callref) { - this->rx_action = RTP_RECV_UPSTREAM; - this->receive.net = net; - this->receive.callref = callref; - } else - this->rx_action = RTP_NONE; - - return 0; -} - -static void free_tx_queue(struct rtp_sub_socket *rss) -{ - struct msgb *msg; - - while ((msg = msgb_dequeue(&rss->tx_queue))) - msgb_free(msg); -} - -/*! \brief Free/release a previously allocated RTP socket - * \param[in[] rs RTP/RTCP socket to be released - */ -int rtp_socket_free(struct rtp_socket *rs) -{ - DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs); - - /* make sure we don't leave references dangling to us */ - if (rs->rx_action == RTP_PROXY && - rs->proxy.other_sock) - rs->proxy.other_sock->proxy.other_sock = NULL; - - osmo_fd_unregister(&rs->rtp.bfd); - close(rs->rtp.bfd.fd); - free_tx_queue(&rs->rtp); - - osmo_fd_unregister(&rs->rtcp.bfd); - close(rs->rtcp.bfd.fd); - free_tx_queue(&rs->rtcp); - - talloc_free(rs); - - return 0; -} diff --git a/src/libtrau/trau_mux.c b/src/libtrau/trau_mux.c deleted file mode 100644 index e570b93..0000000 --- a/src/libtrau/trau_mux.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* this corresponds to the bit-lengths of the individual codec - * parameters as indicated in Table 1.1 of TS 06.10 */ -static const uint8_t gsm_fr_map[] = { - 6, 6, 5, 5, 4, 4, 3, 3, - 7, 2, 2, 6, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 7, 2, 2, 6, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 7, 2, 2, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 7, 2, 2, 6, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3 -}; - - -/* - * EFR TRAU parity - * - * g(x) = x^3 + x^1 + 1 - */ -static const struct osmo_crc8gen_code gsm0860_efr_crc3 = { - .bits = 3, - .poly = 0x3, - .init = 0x0, - .remainder = 0x7, -}; - -/* EFR parity bits */ -static inline void efr_parity_bits_1(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 0, 22); - memcpy(check_bits + 22 , d_bits + 24, 3); - check_bits[25] = d_bits[28]; -} - -static inline void efr_parity_bits_2(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 42, 10); - memcpy(check_bits + 10 , d_bits + 90, 2); -} - -static inline void efr_parity_bits_3(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 98, 5); - check_bits[5] = d_bits[104]; - memcpy(check_bits + 6 , d_bits + 143, 2); -} - -static inline void efr_parity_bits_4(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 151, 10); - memcpy(check_bits + 10 , d_bits + 199, 2); -} - -static inline void efr_parity_bits_5(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 207, 5); - check_bits[5] = d_bits[213]; - memcpy(check_bits + 6 , d_bits + 252, 2); -} - -struct map_entry { - struct llist_head list; - struct gsm_e1_subslot src, dst; -}; - -struct upqueue_entry { - struct llist_head list; - struct gsm_network *net; - struct gsm_e1_subslot src; - uint32_t callref; -}; - -static LLIST_HEAD(ss_map); -static LLIST_HEAD(ss_upqueue); - -void *tall_map_ctx, *tall_upq_ctx; - -/* map one particular subslot to another subslot */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst) -{ - struct map_entry *me; - - me = talloc(tall_map_ctx, struct map_entry); - if (!me) { - LOGP(DLMIB, LOGL_FATAL, "Out of memory\n"); - return -ENOMEM; - } - - DEBUGP(DCC, "Setting up TRAU mux map between (e1=%u,ts=%u,ss=%u) " - "and (e1=%u,ts=%u,ss=%u)\n", - src->e1_nr, src->e1_ts, src->e1_ts_ss, - dst->e1_nr, dst->e1_ts, dst->e1_ts_ss); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src, 0); - trau_mux_unmap(dst, 0); - - memcpy(&me->src, src, sizeof(me->src)); - memcpy(&me->dst, dst, sizeof(me->dst)); - llist_add(&me->list, &ss_map); - - return 0; -} - -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst) -{ - struct gsm_e1_subslot *src_ss, *dst_ss; - - src_ss = &src->ts->e1_link; - dst_ss = &dst->ts->e1_link; - - return trau_mux_map(src_ss, dst_ss); -} - - -/* unmap one particular subslot from another subslot */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref) -{ - struct map_entry *me, *me2; - struct upqueue_entry *ue, *ue2; - - if (ss) - llist_for_each_entry_safe(me, me2, &ss_map, list) { - if (!memcmp(&me->src, ss, sizeof(*ss)) || - !memcmp(&me->dst, ss, sizeof(*ss))) { - llist_del(&me->list); - return 0; - } - } - llist_for_each_entry_safe(ue, ue2, &ss_upqueue, list) { - if (ue->callref == callref) { - llist_del(&ue->list); - return 0; - } - if (ss && !memcmp(&ue->src, ss, sizeof(*ss))) { - llist_del(&ue->list); - return 0; - } - } - return -ENOENT; -} - -/* look-up an enty in the TRAU mux map */ -static struct gsm_e1_subslot * -lookup_trau_mux_map(const struct gsm_e1_subslot *src) -{ - struct map_entry *me; - - llist_for_each_entry(me, &ss_map, list) { - if (!memcmp(&me->src, src, sizeof(*src))) - return &me->dst; - if (!memcmp(&me->dst, src, sizeof(*src))) - return &me->src; - } - return NULL; -} - -/* look-up an enty in the TRAU upqueue */ -struct upqueue_entry * -lookup_trau_upqueue(const struct gsm_e1_subslot *src) -{ - struct upqueue_entry *ue; - - llist_for_each_entry(ue, &ss_upqueue, list) { - if (!memcmp(&ue->src, src, sizeof(*src))) - return ue; - } - return NULL; -} - -static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, k, l, o; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 33, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - data = frame->data; - data[0] = 0xd << 4; - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts output bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset input bits */ - while (i < 260) { - data[j/8] |= (tf->d_bits[k+o] << (7-(j%8))); - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } - if (tf->c_bits[11]) /* BFI */ - frame->msg_type = GSM_BAD_FRAME; - else - frame->msg_type = GSM_TCHF_FRAME; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 33); - - return msg; -} - -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, rc; - ubit_t check_bits[26]; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 31, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - frame->msg_type = GSM_TCHF_FRAME_EFR; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 31); - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - - data = frame->data; - data[0] = 0xc << 4; - /* reassemble d-bits */ - for (i = 1, j = 4; i < 39; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_1(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - if (rc) - goto bad_frame; - for (i = 42, j = 42; i < 95; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_2(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - if (rc) - goto bad_frame; - for (i = 98, j = 95; i < 148; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_3(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - if (rc) - goto bad_frame; - for (i = 151, j = 145; i < 204; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_4(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - if (rc) - goto bad_frame; - for (i = 207, j = 198; i < 257; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_5(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); - if (rc) - goto bad_frame; - - return msg; - -bad_frame: - frame->msg_type = GSM_BAD_FRAME; - - return msg; -} - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits) -{ - struct decoded_trau_frame tf; - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss); - struct subch_mux *mx; - struct upqueue_entry *ue; - int rc; - - /* decode TRAU, change it to downlink, re-encode */ - rc = decode_trau_frame(&tf, trau_bits); - if (rc) - return rc; - - if (!dst_e1_ss) { - struct msgb *msg = NULL; - /* frame shall be sent to upqueue */ - if (!(ue = lookup_trau_upqueue(src_e1_ss))) - return -EINVAL; - if (!ue->callref) - return -EINVAL; - if (!memcmp(tf.c_bits, c_bits_check_fr, 5)) - msg = trau_decode_fr(ue->callref, &tf); - else if (!memcmp(tf.c_bits, c_bits_check_efr, 5)) - msg = trau_decode_efr(ue->callref, &tf); - else { - DEBUGPC(DLMUX, "illegal trau (C1-C5) %s\n", - osmo_hexdump(tf.c_bits, 5)); - DEBUGPC(DLMUX, "test trau (C1-C5) %s\n", - osmo_hexdump(c_bits_check_efr, 5)); - return -EINVAL; - } - if (!msg) - return -ENOMEM; - trau_tx_to_mncc(ue->net, msg); - - return 0; - } - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - trau_frame_up2down(&tf); - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* callback when a TRAU frame was received */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, - void *_priv) -{ - struct e1inp_ts *e1i_ts = _priv; - struct gsm_e1_subslot src_ss; - - src_ss.e1_nr = e1i_ts->line->num; - src_ss.e1_ts = e1i_ts->num; - src_ss.e1_ts_ss = ch; - - return trau_mux_input(&src_ss, data, len); -} - -/* add receiver instance for lchan and callref */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref) -{ - struct gsm_e1_subslot *src_ss; - struct upqueue_entry *ue; - - ue = talloc(tall_upq_ctx, struct upqueue_entry); - if (!ue) - return -ENOMEM; - - src_ss = &lchan->ts->e1_link; - - DEBUGP(DCC, "Setting up TRAU receiver (e1=%u,ts=%u,ss=%u) " - "and (callref 0x%x)\n", - src_ss->e1_nr, src_ss->e1_ts, src_ss->e1_ts_ss, - callref); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src_ss, callref); - - memcpy(&ue->src, src_ss, sizeof(ue->src)); - ue->net = lchan->ts->trx->bts->network; - ue->callref = callref; - llist_add(&ue->list, &ss_upqueue); - - return 0; -} - -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j, k, l, o; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 1; - tf->c_bits[3] = 0; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts input bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset output bits */ - while (i < 260) { - tf->d_bits[k+o] = (data[j/8] >> (7-(j%8))) & 1; - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } -} - -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j; - ubit_t check_bits[26]; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 0; - tf->c_bits[3] = 1; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - tf->d_bits[0] = 1; - for (i = 1, j = 4; i < 39; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_1(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - for (i = 42, j = 42; i < 95; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_2(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - for (i = 98, j = 95; i < 148; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_3(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - for (i = 151, j = 145; i < 204; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_4(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - for (i = 207, j = 198; i < 257; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_5(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); -} - -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame) -{ - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link; - struct subch_mux *mx; - struct decoded_trau_frame tf; - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - trau_encode_fr(&tf, frame->data); - break; - case GSM_TCHF_FRAME_EFR: - trau_encode_efr(&tf, frame->data); - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan) -{ - struct gsm_network *net = old_lchan->ts->trx->bts->network; - struct gsm_trans *trans; - - /* look up transaction with TCH frame receive enabled */ - llist_for_each_entry(trans, &net->trans_list, entry) { - if (trans->conn && trans->conn->lchan == old_lchan && trans->tch_recv) { - /* switch */ - trau_recv_lchan(new_lchan, trans->callref); - } - } - - return 0; -} diff --git a/src/libtrau/trau_upqueue.c b/src/libtrau/trau_upqueue.c deleted file mode 100644 index c1c0003..0000000 --- a/src/libtrau/trau_upqueue.c +++ /dev/null @@ -1,27 +0,0 @@ -/* trau_upqueue.c - Pass msgb's up the chain */ - -/* (C) 2010 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 7db698c..4acbe56 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -40,12 +40,10 @@ osmo_bsc_ctrl.c \ $(NULL) -# once again since TRAU uses CC symbol :( osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 2b71b85..17dddf8 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5d25701..829f207 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -201,7 +201,7 @@ osmo_stats_init(tall_bsc_ctx); /* Allocate global gsm_network struct */ - rc = bsc_network_alloc(NULL); + rc = bsc_network_alloc(); if (rc) { fprintf(stderr, "Allocation failed. exiting.\n"); exit(1); diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index dd20ddb..1bee68e 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -42,7 +42,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc_nat/bsc_filter.c b/src/osmo-bsc_nat/bsc_filter.c index 8d4a680..77ef583 100644 --- a/src/osmo-bsc_nat/bsc_filter.c +++ b/src/osmo-bsc_nat/bsc_filter.c @@ -20,6 +20,8 @@ * */ +#include + #include #include #include diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index d3f6d62..78d4965 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -49,7 +49,6 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 6487df2..c72a23a 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..9207434 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc6248..137321c 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897..d20bd0a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a9..7f6730e 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4a..96f87f5 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018..1d7baa1 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9ea..77309c9 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c1..579cae2 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e..7957b14 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include #include #include -#include void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22..c5ae061 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 72a1772..77cd1e8 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -147,7 +147,7 @@ static inline void test_si2q_segfault(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); if (!network) @@ -162,7 +162,7 @@ static inline void test_si2q_mu(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater multiple UARFCNs:\n"); if (!network) @@ -181,7 +181,7 @@ static inline void test_si2q_u(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); if (!network) @@ -209,7 +209,7 @@ static inline void test_si2q_e(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); if (!network) @@ -242,7 +242,7 @@ static inline void test_si2q_long(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); if (!network) @@ -649,7 +649,7 @@ static void test_si_ba_ind(void) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); struct gsm_bts *bts = gsm_bts_alloc(network, 0); const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b49518..336ccaf 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bc..b743063 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e1..6ef3f29 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c184..0000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5e..0000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef71230..0000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:33:59 +0000 Subject: [PATCH] osmo-bsc[master]: Remove unused RRLP options/codec Message-ID: Review at https://gerrit.osmocom.org/5476 Remove unused RRLP options/codec RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/rrlp.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/gsm_data.c 8 files changed, 0 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/5476/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 64c3abd..6ad5e59 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -12,7 +12,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 4dc6639..6f0f2b2 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -43,7 +43,6 @@ pcu_if.h \ pcuif_proto.h \ rest_octets.h \ - rrlp.h \ rs232.h \ signal.h \ socket.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3268426..0f8bcb9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -332,11 +332,6 @@ /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; - /* Radio Resource Location Protocol (TS 04.31) */ - struct { - enum rrlp_mode mode; - } rrlp; - enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ @@ -519,9 +514,6 @@ enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); const char *gsm_auth_policy_name(enum gsm_auth_policy policy); - -enum rrlp_mode rrlp_mode_parse(const char *arg); -const char *rrlp_mode_name(enum rrlp_mode mode); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 9bbcabd..5d9b570 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -34,14 +34,6 @@ struct osmo_bsc_sccp_con; -/* RRLP mode of operation */ -enum rrlp_mode { - RRLP_MODE_NONE, - RRLP_MODE_MS_BASED, - RRLP_MODE_MS_PREF, - RRLP_MODE_ASS_PREF, -}; - /* Channel Request reason */ enum gsm_chreq_reason_t { GSM_CHREQ_REASON_EMERG, diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h deleted file mode 100644 index c89402a..0000000 --- a/include/osmocom/bsc/rrlp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RRLP_H -#define _RRLP_H - -void on_dso_load_rrlp(void); - -#endif /* _RRLP_H */ - diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 9500645..6fa8e04 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -180,8 +180,6 @@ VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", @@ -817,8 +815,6 @@ vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index beb936b..8f6e4ef 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -133,22 +133,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, - "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", - "Radio Resource Location Protocol\n" - "Set the Radio Resource Location Protocol Mode\n" - "Don't send RRLP request\n" - "Request MS-based location\n" - "Request any location, prefer MS-based\n" - "Request any location, prefer MS-assisted\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, "mm info (0|1)", "Mobility Management\n" @@ -282,7 +266,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..514708b 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -138,24 +138,6 @@ return get_value_string(auth_policy_names, policy); } -static const struct value_string rrlp_mode_names[] = { - { RRLP_MODE_NONE, "none" }, - { RRLP_MODE_MS_BASED, "ms-based" }, - { RRLP_MODE_MS_PREF, "ms-preferred" }, - { RRLP_MODE_ASS_PREF, "ass-preferred" }, - { 0, NULL } -}; - -enum rrlp_mode rrlp_mode_parse(const char *arg) -{ - return get_string_value(rrlp_mode_names, arg); -} - -const char *rrlp_mode_name(enum rrlp_mode mode) -{ - return get_value_string(rrlp_mode_names, mode); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, -- To view, visit https://gerrit.osmocom.org/5476 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:33:59 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus vty config for LU reject cause Message-ID: Review at https://gerrit.osmocom.org/5477 Remove bogus vty config for LU reject cause The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs_vty.c 4 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/5477/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0f8bcb9..8e4dc04 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -280,7 +280,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm48_reject_value reject_cause; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 6fa8e04..a73c6a4 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -172,8 +172,6 @@ vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, " Location updating reject cause: %u%s", - net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, @@ -810,8 +808,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " location updating reject cause %u%s", - gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index 59a8d5c..30de0cc 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -42,7 +42,6 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->num_bts = 0; - net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; net->T3103 = GSM_T3103_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 8f6e4ef..2732ebf 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -102,22 +102,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_reject_cause, - cfg_net_reject_cause_cmd, - "location updating reject cause <2-111>", - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Cause Value as Per GSM TS 04.08\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->reject_cause = atoi(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -264,7 +248,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5477 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:33:59 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration Message-ID: Review at https://gerrit.osmocom.org/5478 Remove bogus MM INFO configuration The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_ctrl_commands.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 5 files changed, 0 insertions(+), 91 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 8e4dc04..7a1b62d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -278,8 +278,6 @@ /* global parameters */ uint16_t country_code; uint16_t network_code; - char *name_long; - char *name_short; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c index 2d6fcb6..41d2361 100644 --- a/src/libbsc/bsc_ctrl_commands.c +++ b/src/libbsc/bsc_ctrl_commands.c @@ -30,45 +30,8 @@ #include #include -#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \ - CTRL_HELPER_GET_STRING(cmdname, dtype, element) \ - CTRL_HELPER_SET_STRING(cmdname, dtype, element) \ -static struct ctrl_cmd_element cmd_##cmdname = { \ - .name = cmdstr, \ - .get = get_##cmdname, \ - .set = set_##cmdname, \ - .verify = verify_vty_description_string, \ -} - -/** - * Check that there are no newlines or comments or other things - * that could make the VTY configuration unparsable. - */ -static int verify_vty_description_string(struct ctrl_cmd *cmd, - const char *value, void *data) -{ - int i; - const size_t len = strlen(value); - - for (i = 0; i < len; ++i) { - switch(value[i]) { - case '#': - case '\n': - case '\r': - cmd->reply = "String includes illegal character"; - return -1; - default: - break; - } - } - - return 0; -} - CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999); CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999); -CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); -CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -452,8 +415,6 @@ int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 34dfd36..c5a75aa 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -536,9 +536,6 @@ if (!bsc_gsmnet) return -ENOMEM; - bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); - bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); - return 0; } diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index a73c6a4..7612eda 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -167,18 +167,12 @@ vty_out(vty, "BSC is on Country Code %u, Network Code %u " "and has %u BTS%s", net->country_code, net->network_code, net->num_bts, VTY_NEWLINE); - vty_out(vty, " Long network name: '%s'%s", - net->name_long, VTY_NEWLINE); - vty_out(vty, " Short network name: '%s'%s", - net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, - VTY_NEWLINE); - vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", VTY_NEWLINE); @@ -806,12 +800,9 @@ vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); - vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); - vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 2732ebf..35c13dd 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -80,28 +80,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_name_short, - cfg_net_name_short_cmd, - "short name NAME", - "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_long, - cfg_net_name_long_cmd, - "long name NAME", - "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -113,19 +91,6 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->a5_encryption = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, - "mm info (0|1)", - "Mobility Management\n" - "Send MM INFO after LOC UPD ACCEPT\n" - "Disable\n" "Enable\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->send_mm_info = atoi(argv[0]); return CMD_SUCCESS; } @@ -246,10 +211,7 @@ install_node(&net_node, config_write_net); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); - install_element(GSMNET_NODE, &cfg_net_name_short_cmd); - install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5478 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:34:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:34:00 +0000 Subject: [PATCH] osmo-bsc[master]: Remove some more dead code Message-ID: Review at https://gerrit.osmocom.org/5479 Remove some more dead code Change-Id: I919bffe88babd90227c89abd4434322965c32ebb --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon-cs/common_cs.c M src/libcommon/gsm_data.c 4 files changed, 0 insertions(+), 163 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/5479/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7a1b62d..1cedef0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,9 +24,7 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct gsm_subscriber_group; struct bsc_subscr; -struct vlr_instance; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -40,26 +38,11 @@ #define EARFCN_QRXLV_INVALID 32 #define EARFCN_THRESH_LOW_INVALID 32 -enum gsm_security_event { - GSM_SECURITY_NOAVAIL, - GSM_SECURITY_AUTH_FAILED, - GSM_SECURITY_SUCCEEDED, - GSM_SECURITY_ALREADY, -}; - struct msgb; typedef int gsm_cbfn(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param); - -/* - * A dummy to keep a connection up for at least - * a couple of seconds to work around MSC issues. - */ -struct gsm_anchor_operation { - struct osmo_timer_list timeout; -}; /* Maximum number of neighbor cells whose average we track */ #define MAX_NEIGH_MEAS 10 @@ -75,16 +58,6 @@ uint8_t last_seen_nr; }; -enum ran_type { - RAN_UNKNOWN, - RAN_GERAN_A, /* 2G / A-interface */ - RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */ -}; - -extern const struct value_string ran_type_names[]; -static inline const char *ran_type_name(enum ran_type val) -{ return get_value_string(ran_type_names, val); } - struct gsm_classmark { bool classmark1_set; struct gsm48_classmark1 classmark1; @@ -92,12 +65,6 @@ uint8_t classmark2[3]; uint8_t classmark3_len; uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */ -}; - -enum integrity_protection_state { - INTEGRITY_PROTECTION_NONE = 0, - INTEGRITY_PROTECTION_IK = 1, - INTEGRITY_PROTECTION_IK_CK = 2, }; /* active radio connection of a mobile subscriber */ @@ -125,29 +92,6 @@ struct gsm_classmark classmark; uint16_t lac; - struct gsm_encr encr; - - struct { - unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; - } rtp; - - struct { - /* A pointer to the SCCP user that handles - * the SCCP connections for this subscriber - * connection */ - struct osmo_sccp_user *scu; - - /* The address of the BSC that is associated - * with this subscriber connection */ - struct osmo_sccp_addr bsc_addr; - - /* The connection identifier that is used - * to reference the SCCP connection that is - * associated with this subscriber connection */ - int conn_id; - } a; }; @@ -241,13 +185,6 @@ bsc_ctr_description, }; -enum gsm_auth_policy { - GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ - GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ - GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ - GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ -}; - #define GSM_T3101_DEFAULT 3 /* s */ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ @@ -280,7 +217,6 @@ uint16_t network_code; int a5_encryption; int neci; - int send_mm_info; struct { int active; /* Window RXLEV averaging */ @@ -299,7 +235,6 @@ } handover; struct rate_ctr_group *bsc_ctrs; - struct osmo_counter *active_calls; /* * TODO: Move the trans_list into the subscriber connection and @@ -361,12 +296,6 @@ * pointer is NULL to indicate absence of a bsc_subscribers list. */ struct llist_head *bsc_subscribers; - /* MSC: GSUP server address of the HLR */ - const char *gsup_server_addr_str; - uint16_t gsup_server_port; - - struct vlr_instance *vlr; - /* Periodic location update default value */ uint8_t t3212; @@ -374,65 +303,6 @@ struct mgcp_client_conf *conf; struct mgcp_client *client; } mgw; - - struct { - /* CS7 instance id number (set via VTY) */ - uint32_t cs7_instance; - /* A list with the context information about - * all BSCs we have connections with */ - struct llist_head bscs; - struct osmo_sccp_instance *sccp; - } a; -}; - -struct osmo_esme; - -enum gsm_sms_source_id { - SMS_SOURCE_UNKNOWN = 0, - SMS_SOURCE_MS, /* received from MS */ - SMS_SOURCE_VTY, /* received from VTY */ - SMS_SOURCE_SMPP, /* received via SMPP */ -}; - -#define SMS_HDR_SIZE 128 -#define SMS_TEXT_SIZE 256 - -struct gsm_sms_addr { - uint8_t ton; - uint8_t npi; - char addr[21+1]; -}; - -struct gsm_sms { - unsigned long long id; - struct gsm_sms_addr src, dst; - enum gsm_sms_source_id source; - - struct { - uint8_t transaction_id; - uint32_t msg_ref; - } gsm411; - - struct { - struct osmo_esme *esme; - uint32_t sequence_nr; - int transaction_mode; - char msg_id[16]; - } smpp; - - unsigned long validity_minutes; - time_t created; - bool is_report; - uint8_t reply_path_req; - uint8_t status_rep_req; - uint8_t ud_hdr_ind; - uint8_t protocol_id; - uint8_t data_coding_scheme; - uint8_t msg_ref; - uint8_t user_data_len; - uint8_t user_data[SMS_TEXT_SIZE]; - - char text[SMS_TEXT_SIZE]; }; extern void talloc_ctx_init(void *ctx_root); @@ -508,9 +378,6 @@ return 0; } - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); -const char *gsm_auth_policy_name(enum gsm_auth_policy policy); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 5d9b570..db854fd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -83,7 +83,6 @@ }; struct gsm_lchan; -struct gsm_mncc; struct osmo_rtp_socket; struct rtp_socket; struct bsc_api; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index b410b17..39df45e 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -58,11 +58,7 @@ net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); - net->active_calls = osmo_counter_alloc("msc.active_calls"); - net->dyn_ts_allow_tch_f = true; - - INIT_LLIST_HEAD(&net->a.bscs); return net; } diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 514708b..87d954a 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -120,24 +120,6 @@ return NULL; } -static const struct value_string auth_policy_names[] = { - { GSM_AUTH_POLICY_CLOSED, "closed" }, - { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, - { GSM_AUTH_POLICY_TOKEN, "token" }, - { GSM_AUTH_POLICY_REGEXP, "regexp" }, - { 0, NULL } -}; - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg) -{ - return get_string_value(auth_policy_names, arg); -} - -const char *gsm_auth_policy_name(enum gsm_auth_policy policy) -{ - return get_value_string(auth_policy_names, policy); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, @@ -433,10 +415,3 @@ rev_lev = (cm->classmark2[0] >> 5) & 0x3; return rev_lev >= 2; } - -const struct value_string ran_type_names[] = { - OSMO_VALUE_STRING(RAN_UNKNOWN), - OSMO_VALUE_STRING(RAN_GERAN_A), - OSMO_VALUE_STRING(RAN_UTRAN_IU), - { 0, NULL } -}; -- To view, visit https://gerrit.osmocom.org/5479 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I919bffe88babd90227c89abd4434322965c32ebb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 07:40:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 07:40:50 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: remove bogus line sfrom osmo-bsc.cfg Message-ID: Review at https://gerrit.osmocom.org/5480 BSC_Tests: remove bogus line sfrom osmo-bsc.cfg Those lines serve no purpose (and are being removed from osmo-bsc master) Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d --- M bsc/osmo-bsc.cfg 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/5480/1 diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index 9b45904..d97c210 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -69,14 +69,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 1 paging any use tch 0 - rrlp mode none - mm info 1 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 -- To view, visit https://gerrit.osmocom.org/5480 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:07:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:07:38 +0000 Subject: [PATCH] osmo-bsc[master]: Remove dead code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5475 to look at the new patch set (#2). Remove dead code There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 --- M configure.ac M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/auth.h M include/osmocom/bsc/bss.h M include/osmocom/bsc/chan_alloc.h M include/osmocom/bsc/common_bsc.h M include/osmocom/bsc/common_cs.h D include/osmocom/bsc/crc24.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/gsm_subscriber.h M include/osmocom/bsc/ipaccess.h D include/osmocom/bsc/mncc.h D include/osmocom/bsc/mncc_int.h D include/osmocom/bsc/msc_ifaces.h D include/osmocom/bsc/rtp_proxy.h M include/osmocom/bsc/signal.h D include/osmocom/bsc/silent_call.h D include/osmocom/bsc/smpp.h D include/osmocom/bsc/sms_queue.h D include/osmocom/bsc/transaction.h D include/osmocom/bsc/trau_mux.h D include/osmocom/bsc/trau_upqueue.h M src/Makefile.am M src/ipaccess/Makefile.am M src/ipaccess/ipaccess-config.c M src/libbsc/abis_rsl.c M src/libbsc/bsc_api.c M src/libbsc/bsc_init.c M src/libbsc/chan_alloc.c M src/libbsc/e1_config.c M src/libbsc/gsm_04_08_utils.c M src/libbsc/handover_logic.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/Makefile.am M src/libcommon/common_vty.c D src/libcommon/gsm_subscriber_base.c M src/libcommon/talloc_ctx.c D src/libtrau/Makefile.am D src/libtrau/rtp_proxy.c D src/libtrau/trau_mux.c D src/libtrau/trau_upqueue.c M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_filter.c M src/utils/Makefile.am M src/utils/bs11_config.c M tests/Makefile.am M tests/abis/Makefile.am M tests/bsc-nat-trie/Makefile.am M tests/bsc-nat/Makefile.am M tests/bsc/Makefile.am M tests/bsc/bsc_test.c M tests/bssap/Makefile.am M tests/bssap/bssap_test.c M tests/channel/channel_test.c M tests/gsm0408/Makefile.am M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/Makefile.am M tests/subscr/Makefile.am M tests/testsuite.at D tests/trau/Makefile.am D tests/trau/trau_test.c D tests/trau/trau_test.ok 68 files changed, 30 insertions(+), 2,489 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/2 diff --git a/configure.ac b/configure.ac index b7dd016..540d2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ include/osmocom/Makefile include/osmocom/bsc/Makefile src/Makefile - src/libtrau/Makefile src/libbsc/Makefile src/libcommon/Makefile src/libfilter/Makefile @@ -161,7 +160,6 @@ tests/bsc-nat/Makefile tests/bsc-nat-trie/Makefile tests/abis/Makefile - tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile tests/bssap/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..1b86f9a 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,7 +4,6 @@ abis_om2000.h \ abis_rsl.h \ arfcn_range_encode.h \ - auth.h \ bsc_msc.h \ bsc_msg_filter.h \ bsc_nat.h \ @@ -18,7 +17,6 @@ common.h \ common_bsc.h \ common_cs.h \ - crc24.h \ ctrl.h \ debug.h \ e1_config.h \ @@ -26,16 +24,12 @@ gsm_04_80.h \ gsm_data.h \ gsm_data_shared.h \ - gsm_subscriber.h \ handover.h \ handover_decision.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ misdn.h \ - mncc.h \ - mncc_int.h \ - msc_ifaces.h \ nat_rewrite_trie.h \ network_listen.h \ openbscdefines.h \ @@ -52,15 +46,9 @@ rest_octets.h \ rrlp.h \ rs232.h \ - rtp_proxy.h \ signal.h \ - silent_call.h \ - sms_queue.h \ socket.h \ system_information.h \ - transaction.h \ - trau_mux.h \ - trau_upqueue.h \ ussd.h \ vty.h \ bsc_api.h \ diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h deleted file mode 100644 index b314bbf..0000000 --- a/include/osmocom/bsc/auth.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _AUTH_H -#define _AUTH_H - -#include - -struct gsm_auth_tuple; - -enum auth_action { - AUTH_ERROR = -1, /* Internal error */ - AUTH_NOT_AVAIL = 0, /* No auth tuple available */ - AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ - AUTH_DO_CIPH = 2, /* Only ciphering */ - AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ -}; - -extern const struct value_string auth_action_names[]; -static inline const char *auth_action_str(enum auth_action a) -{ - return get_value_string(auth_action_names, a); -} - -#endif /* _AUTH_H */ diff --git a/include/osmocom/bsc/bss.h b/include/osmocom/bsc/bss.h index b12487d..9891f5f 100644 --- a/include/osmocom/bsc/bss.h +++ b/include/osmocom/bsc/bss.h @@ -6,7 +6,7 @@ struct msgb; /* start and stop network */ -extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_alloc(void); extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 320fa94..62d0286 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -24,9 +24,6 @@ struct gsm_subscriber_connection; -/* Find an allocated channel for a specified subscriber */ -struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub); - /* Allocate a logical channel (SDCCH, TCH, ...) */ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger); diff --git a/include/osmocom/bsc/common_bsc.h b/include/osmocom/bsc/common_bsc.h index 08394e9..32e5097 100644 --- a/include/osmocom/bsc/common_bsc.h +++ b/include/osmocom/bsc/common_bsc.h @@ -5,5 +5,4 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); diff --git a/include/osmocom/bsc/common_cs.h b/include/osmocom/bsc/common_cs.h index 09a4b02..c2e8515 100644 --- a/include/osmocom/bsc/common_cs.h +++ b/include/osmocom/bsc/common_cs.h @@ -6,8 +6,6 @@ struct msgb; struct gsm_network; -typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); - struct vty; #define MAX_A5_KEY_LEN (128/8) @@ -20,8 +18,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); int common_cs_vty_init(struct gsm_network *network, int (* config_write_net )(struct vty *)); diff --git a/include/osmocom/bsc/crc24.h b/include/osmocom/bsc/crc24.h deleted file mode 100644 index 756638c..0000000 --- a/include/osmocom/bsc/crc24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CRC24_H -#define _CRC24_H - -#include - -#define INIT_CRC24 0xffffff - -uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); - -#endif diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cbb809b..3268426 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,11 +24,9 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; struct vlr_instance; -struct vlr_subscr; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -107,34 +105,8 @@ /* global linked list of subscriber_connections */ struct llist_head entry; - /* usage count. If this drops to zero, we start the release - * towards A/Iu */ - uint32_t use_count; - - /* The MS has opened the conn with a CM Service Request, and we shall - * keep it open for an actual request (or until timeout). */ - bool received_cm_service_request; - /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - - /* libmsc/libvlr subscriber information (if available) */ - struct vlr_subscr *vsub; - - /* LU expiration handling */ - uint8_t expire_timer_stopped; - /* SMS helpers for libmsc */ - uint8_t next_rp_ref; - - struct osmo_fsm_inst *conn_fsm; - - /* Are we part of a special "silent" call */ - int silent_call; - - /* MNCC rtp bridge markers */ - int mncc_rtp_bridge; - int mncc_rtp_create_pending; - int mncc_rtp_connect_pending; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; /* BSC */ @@ -142,7 +114,6 @@ /* back pointers */ struct gsm_network *network; - bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -150,9 +121,6 @@ /* for assignment handling */ struct osmo_timer_list T10; /* BSC */ struct gsm_lchan *secondary_lchan; /* BSC */ - - /* connected via 2G or 3G? */ - enum ran_type via_ran; struct gsm_classmark classmark; @@ -336,10 +304,6 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_counter *active_calls; - /* layer 4 */ - struct mncc_sock_state *mncc_state; - mncc_recv_cb_t mncc_recv; - struct llist_head upqueue; /* * TODO: Move the trans_list into the subscriber connection and * create a pending list for MT transactions. These exist before @@ -380,8 +344,6 @@ /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - - struct gsm_sms_queue *sms_queue; /* control interface */ struct ctrl_handle *ctrl; @@ -451,7 +413,6 @@ struct gsm_sms { unsigned long long id; - struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index e762c24..9bbcabd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -33,7 +33,6 @@ struct osmo_bsc_data; struct osmo_bsc_sccp_con; -struct gsm_sms_queue; /* RRLP mode of operation */ enum rrlp_mode { diff --git a/include/osmocom/bsc/gsm_subscriber.h b/include/osmocom/bsc/gsm_subscriber.h deleted file mode 100644 index ca66d47..0000000 --- a/include/osmocom/bsc/gsm_subscriber.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _GSM_SUBSCR_H -#define _GSM_SUBSCR_H - -#include - -#include -#include - -#include - -#define GSM_NAME_LENGTH 160 - -#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ -#define GSM_MIN_EXTEN 20000 -#define GSM_MAX_EXTEN 49999 - -#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 -/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ - -#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 - -enum gsm_subscriber_field { - GSM_SUBSCRIBER_IMSI, - GSM_SUBSCRIBER_TMSI, - GSM_SUBSCRIBER_EXTENSION, - GSM_SUBSCRIBER_ID, -}; - -enum gsm_subscriber_update_reason { - GSM_SUBSCRIBER_UPDATE_ATTACHED, - GSM_SUBSCRIBER_UPDATE_DETACHED, - GSM_SUBSCRIBER_UPDATE_EQUIPMENT, -}; - -/* - * Struct for pending channel requests. This is managed in the - * llist_head requests of each subscriber. The reference counting - * should work in such a way that a subscriber with a pending request - * remains in memory. - */ -struct subscr_request { - struct llist_head entry; - - /* human readable label to be able to log pending request kinds */ - const char *label; - - /* the callback data */ - gsm_cbfn *cbfn; - void *param; -}; - -int subscr_update(struct vlr_subscr *vsub, int reason); - -/* - * Paging handling with authentication - */ -struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub, - gsm_cbfn *cbfn, void *param, - const char *label); - -void subscr_remove_request(struct subscr_request *req); -int subscr_rx_paging_response(struct msgb *msg, - struct gsm_subscriber_connection *conn); - -int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, - struct msgb *msg, void *data, void *param); - -#endif /* _GSM_SUBSCR_H */ diff --git a/include/osmocom/bsc/ipaccess.h b/include/osmocom/bsc/ipaccess.h index 82e89c2..3d0f612 100644 --- a/include/osmocom/bsc/ipaccess.h +++ b/include/osmocom/bsc/ipaccess.h @@ -2,11 +2,13 @@ #define _IPACCESS_H #include -#include "gsm_subscriber.h" #include #include #include +struct gsm_bts; +struct gsm_bts_trx; + struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; diff --git a/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h deleted file mode 100644 index 881e041..0000000 --- a/include/osmocom/bsc/mncc.h +++ /dev/null @@ -1,215 +0,0 @@ -/* GSM Mobile Radio Interface Layer 3 messages on the A-bis interface - * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */ - -/* (C) 2008-2009 by Harald Welte - * (C) 2008, 2009 by Holger Hans Peter Freyther - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#ifndef _MNCC_H -#define _MNCC_H - -#include -#include - -#include - -struct gsm_network; -struct msgb; - - -/* One end of a call */ -struct gsm_call { - struct llist_head entry; - - /* network handle */ - void *net; - - /* the 'local' transaction */ - uint32_t callref; - /* the 'remote' transaction */ - uint32_t remote_ref; -}; - -#define MNCC_SETUP_REQ 0x0101 -#define MNCC_SETUP_IND 0x0102 -#define MNCC_SETUP_RSP 0x0103 -#define MNCC_SETUP_CNF 0x0104 -#define MNCC_SETUP_COMPL_REQ 0x0105 -#define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ -#define MNCC_CALL_CONF_IND 0x0107 -#define MNCC_CALL_PROC_REQ 0x0108 -#define MNCC_PROGRESS_REQ 0x0109 -#define MNCC_ALERT_REQ 0x010a -#define MNCC_ALERT_IND 0x010b -#define MNCC_NOTIFY_REQ 0x010c -#define MNCC_NOTIFY_IND 0x010d -#define MNCC_DISC_REQ 0x010e -#define MNCC_DISC_IND 0x010f -#define MNCC_REL_REQ 0x0110 -#define MNCC_REL_IND 0x0111 -#define MNCC_REL_CNF 0x0112 -#define MNCC_FACILITY_REQ 0x0113 -#define MNCC_FACILITY_IND 0x0114 -#define MNCC_START_DTMF_IND 0x0115 -#define MNCC_START_DTMF_RSP 0x0116 -#define MNCC_START_DTMF_REJ 0x0117 -#define MNCC_STOP_DTMF_IND 0x0118 -#define MNCC_STOP_DTMF_RSP 0x0119 -#define MNCC_MODIFY_REQ 0x011a -#define MNCC_MODIFY_IND 0x011b -#define MNCC_MODIFY_RSP 0x011c -#define MNCC_MODIFY_CNF 0x011d -#define MNCC_MODIFY_REJ 0x011e -#define MNCC_HOLD_IND 0x011f -#define MNCC_HOLD_CNF 0x0120 -#define MNCC_HOLD_REJ 0x0121 -#define MNCC_RETRIEVE_IND 0x0122 -#define MNCC_RETRIEVE_CNF 0x0123 -#define MNCC_RETRIEVE_REJ 0x0124 -#define MNCC_USERINFO_REQ 0x0125 -#define MNCC_USERINFO_IND 0x0126 -#define MNCC_REJ_REQ 0x0127 -#define MNCC_REJ_IND 0x0128 - -#define MNCC_BRIDGE 0x0200 -#define MNCC_FRAME_RECV 0x0201 -#define MNCC_FRAME_DROP 0x0202 -#define MNCC_LCHAN_MODIFY 0x0203 -#define MNCC_RTP_CREATE 0x0204 -#define MNCC_RTP_CONNECT 0x0205 -#define MNCC_RTP_FREE 0x0206 - -#define GSM_TCHF_FRAME 0x0300 -#define GSM_TCHF_FRAME_EFR 0x0301 -#define GSM_TCHH_FRAME 0x0302 -#define GSM_TCH_FRAME_AMR 0x0303 -#define GSM_BAD_FRAME 0x03ff - -#define MNCC_SOCKET_HELLO 0x0400 - -#define GSM_MAX_FACILITY 128 -#define GSM_MAX_SSVERSION 128 -#define GSM_MAX_USERUSER 128 - -#define MNCC_F_BEARER_CAP 0x0001 -#define MNCC_F_CALLED 0x0002 -#define MNCC_F_CALLING 0x0004 -#define MNCC_F_REDIRECTING 0x0008 -#define MNCC_F_CONNECTED 0x0010 -#define MNCC_F_CAUSE 0x0020 -#define MNCC_F_USERUSER 0x0040 -#define MNCC_F_PROGRESS 0x0080 -#define MNCC_F_EMERGENCY 0x0100 -#define MNCC_F_FACILITY 0x0200 -#define MNCC_F_SSVERSION 0x0400 -#define MNCC_F_CCCAP 0x0800 -#define MNCC_F_KEYPAD 0x1000 -#define MNCC_F_SIGNAL 0x2000 - -struct gsm_mncc { - /* context based information */ - uint32_t msg_type; - uint32_t callref; - - /* which fields are present */ - uint32_t fields; - - /* data derived informations (MNCC_F_ based) */ - struct gsm_mncc_bearer_cap bearer_cap; - struct gsm_mncc_number called; - struct gsm_mncc_number calling; - struct gsm_mncc_number redirecting; - struct gsm_mncc_number connected; - struct gsm_mncc_cause cause; - struct gsm_mncc_progress progress; - struct gsm_mncc_useruser useruser; - struct gsm_mncc_facility facility; - struct gsm_mncc_cccap cccap; - struct gsm_mncc_ssversion ssversion; - struct { - int sup; - int inv; - } clir; - int signal; - - /* data derived information, not MNCC_F based */ - int keypad; - int more; - int notify; /* 0..127 */ - int emergency; - char imsi[16]; -}; - -struct gsm_data_frame { - uint32_t msg_type; - uint32_t callref; - unsigned char data[0]; -}; - -#define MNCC_SOCK_VERSION 5 -struct gsm_mncc_hello { - uint32_t msg_type; - uint32_t version; - - /* send the sizes of the structs */ - uint32_t mncc_size; - uint32_t data_frame_size; - - /* send some offsets */ - uint32_t called_offset; - uint32_t signal_offset; - uint32_t emergency_offset; -}; - -struct gsm_mncc_rtp { - uint32_t msg_type; - uint32_t callref; - uint32_t ip; - uint16_t port; - uint32_t payload_type; - uint32_t payload_msg_type; -}; - -struct gsm_mncc_bridge { - uint32_t msg_type; - uint32_t callref[2]; -}; - -const char *get_mncc_name(int value); -void mncc_set_cause(struct gsm_mncc *data, int loc, int val); -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_builtin */ -int int_mncc_recv(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_sock */ -int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg); - -int mncc_sock_init(struct gsm_network *net, const char *sock_path); - -#define mncc_is_data_frame(msg_type) \ - (msg_type == GSM_TCHF_FRAME \ - || msg_type == GSM_TCHF_FRAME_EFR \ - || msg_type == GSM_TCHH_FRAME \ - || msg_type == GSM_TCH_FRAME_AMR \ - || msg_type == GSM_BAD_FRAME) - - -#endif diff --git a/include/osmocom/bsc/mncc_int.h b/include/osmocom/bsc/mncc_int.h deleted file mode 100644 index 213ce14..0000000 --- a/include/osmocom/bsc/mncc_int.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MNCC_INT_H -#define _MNCC_INT_H - -#include - -struct mncc_int { - uint8_t def_codec[2]; -}; - -extern struct mncc_int mncc_int; - -uint8_t mncc_codec_for_mode(int lchan_type); - -#endif diff --git a/include/osmocom/bsc/msc_ifaces.h b/include/osmocom/bsc/msc_ifaces.h deleted file mode 100644 index dadb828..0000000 --- a/include/osmocom/bsc/msc_ifaces.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -/* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, - * i.e. in the direction towards the mobile device (MS aka UE). - * - * 2G will use the A-interface, - * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). - * - * To allow linking parts of the MSC code without having to include entire - * infrastructures of external libraries, the core transmitting and receiving - * functions are left unimplemented. For example, a unit test does not need to - * link against external ASN1 libraries if it is never going to encode actual - * outgoing messages. It is up to each building scope to implement real world - * functions or to plug mere dummy implementations. - * - * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call - * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not - * yet implemented]. When you try to link against libmsc, you will find that - * the compiler complains about an undefined reference to iu_tx(). If you, - * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is - * available. A unit test may instead simply implement a dummy iu_tx() function - * and not link against osmo-iuh, see tests/libiudummy/. - */ - -/* Each main linkage must implement this function (see comment above). */ -extern int iu_tx(struct msgb *msg, uint8_t sapi); - -int msc_tx_dtap(struct gsm_subscriber_connection *conn, - struct msgb *msg); - -int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); -int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, - enum gsm48_reject_value value); - -int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h deleted file mode 100644 index 918420c..0000000 --- a/include/osmocom/bsc/rtp_proxy.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RTP_PROXY_H -#define _RTP_PROXY_H - -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - - -#include - -#include -#include - -#include - -#define RTP_PT_GSM_FULL 3 -#define RTP_PT_GSM_HALF 96 -#define RTP_PT_GSM_EFR 97 -#define RTP_PT_AMR 98 -#define RTP_LEN_GSM_FULL 33 -#define RTP_LEN_GSM_HALF 15 -#define RTP_LEN_GSM_EFR 31 -#define RTP_GSM_DURATION 160 - -enum rtp_rx_action { - RTP_NONE, - RTP_PROXY, - RTP_RECV_UPSTREAM, -}; - -enum rtp_tx_action { - RTP_SEND_NONE, - RTP_SEND_DOWNSTREAM, -}; - -struct rtp_sub_socket { - struct sockaddr_in sin_local; - struct sockaddr_in sin_remote; - - struct osmo_fd bfd; - /* linked list of to-be-transmitted msgb's */ - struct llist_head tx_queue; -}; - -struct rtp_socket { - struct llist_head list; - - struct rtp_sub_socket rtp; - struct rtp_sub_socket rtcp; - - /* what should we do on receive? */ - enum rtp_rx_action rx_action; - union { - struct { - struct rtp_socket *other_sock; - } proxy; - struct { - struct gsm_network *net; - uint32_t callref; - } receive; - }; - enum rtp_tx_action tx_action; - struct { - uint16_t sequence; - uint32_t timestamp; - uint32_t ssrc; - struct timeval last_tv; - } transmit; -}; - -struct rtp_socket *rtp_socket_create(void); -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip); -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port); -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other); -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref); -int rtp_socket_free(struct rtp_socket *rs); -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame); - -#endif /* _RTP_PROXY_H */ diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index feab246..58d9acf 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -34,34 +34,21 @@ */ enum signal_subsystems { SS_PAGING, - SS_SMS, SS_ABISIP, SS_NM, SS_LCHAN, - SS_SUBSCR, - SS_SCALL, SS_CHALLOC, SS_IPAC_NWL, SS_RF, SS_MSC, SS_HO, SS_CCCH, - SS_SGSN, }; /* SS_PAGING signals */ enum signal_paging { S_PAGING_SUCCEEDED, S_PAGING_EXPIRED, -}; - -/* SS_SMS signals */ -enum signal_sms { - S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */ - S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */ - S_SMS_SMMA, /* A MS tells us it has more space available */ - S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */ - S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */ }; /* SS_ABISIP signals */ @@ -108,20 +95,6 @@ S_CHALLOC_FREED, /* lchan has been successfully freed */ }; -/* SS_SUBSCR signals */ -enum signal_subscr { - S_SUBSCR_ATTACHED, - S_SUBSCR_DETACHED, - S_SUBSCR_IDENTITY, /* we've received some identity information */ -}; - -/* SS_SCALL signals */ -enum signal_scall { - S_SCALL_SUCCESS, - S_SCALL_EXPIRED, - S_SCALL_DETACHED, -}; - /* SS_IPAC_NWL signals */ enum signal_ipaccess { S_IPAC_NWL_COMPLETE, @@ -136,21 +109,6 @@ S_RF_OFF, S_RF_ON, S_RF_GRACE, -}; - -struct paging_signal_data { - struct vlr_subscr *vsub; - struct gsm_bts *bts; - - int paging_result; - - /* NULL in case the paging didn't work */ - struct gsm_subscriber_connection *conn; -}; - -struct scall_signal_data { - struct gsm_subscriber_connection *conn; - void *data; }; struct ipacc_ack_signal_data { @@ -197,15 +155,6 @@ struct gsm_network *net; }; -struct sms_signal_data { - /* The transaction where this occured */ - struct gsm_trans *trans; - /* Can be NULL for SMMA */ - struct gsm_sms *sms; - /* int paging result. Only the ones with > 0 */ - int paging_result; -}; - struct lchan_signal_data { /* The lchan the signal happened on */ struct gsm_lchan *lchan; @@ -237,24 +186,6 @@ uint16_t rach_slot_count; uint16_t rach_busy_count; uint16_t rach_access_count; -}; - -/* GPRS SGSN signals SS_SGSN */ -enum signal_sgsn { - S_SGSN_ATTACH, - S_SGSN_DETACH, - S_SGSN_UPDATE, - S_SGSN_PDP_ACT, - S_SGSN_PDP_DEACT, - S_SGSN_PDP_TERMINATE, - S_SGSN_PDP_FREE, - S_SGSN_MM_FREE, -}; - -struct sgsn_mm_ctx; -struct sgsn_signal_data { - struct sgsn_mm_ctx *mm; - struct sgsn_pdp_ctx *pdp; /* non-NULL for PDP_ACT, PDP_DEACT, PDP_FREE */ }; #endif diff --git a/include/osmocom/bsc/silent_call.h b/include/osmocom/bsc/silent_call.h deleted file mode 100644 index 5fec77b..0000000 --- a/include/osmocom/bsc/silent_call.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _SILENT_CALL_H -#define _SILENT_CALL_H - -struct gsm_subscriber_connection; - -extern int gsm_silent_call_start(struct vlr_subscr *vsub, - void *data, int type); -extern int gsm_silent_call_stop(struct vlr_subscr *vsub); - -#if 0 -extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); -extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); -#endif - -#endif /* _SILENT_CALL_H */ diff --git a/include/osmocom/bsc/smpp.h b/include/osmocom/bsc/smpp.h deleted file mode 100644 index bcdac8f..0000000 --- a/include/osmocom/bsc/smpp.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -int smpp_openbsc_alloc_init(void *ctx); -int smpp_openbsc_start(struct gsm_network *net); diff --git a/include/osmocom/bsc/sms_queue.h b/include/osmocom/bsc/sms_queue.h deleted file mode 100644 index 2a8bd58..0000000 --- a/include/osmocom/bsc/sms_queue.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SMS_QUEUE_H -#define SMS_QUEUE_H - -struct gsm_network; -struct gsm_sms_queue; -struct vty; - -int sms_queue_start(struct gsm_network *, int in_flight); -int sms_queue_trigger(struct gsm_sms_queue *); - -/* vty helper functions */ -int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty); -int sms_queue_set_max_pending(struct gsm_sms_queue *, int max); -int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail); -int sms_queue_clear(struct gsm_sms_queue *); - -#endif diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h deleted file mode 100644 index 5465548..0000000 --- a/include/osmocom/bsc/transaction.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _TRANSACT_H -#define _TRANSACT_H - -#include -#include -#include -#include -#include -#include - -enum bridge_state { - BRIDGE_STATE_NONE, - BRIDGE_STATE_LOOPBACK_PENDING, - BRIDGE_STATE_LOOPBACK_ESTABLISHED, - BRIDGE_STATE_BRIDGE_PENDING, - BRIDGE_STATE_BRIDGE_ESTABLISHED, -}; - -/* One transaction */ -struct gsm_trans { - /* Entry in list of all transactions */ - struct llist_head entry; - - /* Back pointer to the network struct */ - struct gsm_network *net; - - /* The protocol within which we live */ - uint8_t protocol; - - /* The current transaction ID */ - uint8_t transaction_id; - - /* To whom we belong, unique identifier of remote MM entity */ - struct vlr_subscr *vsub; - - /* The associated connection we are using to transmit messages */ - struct gsm_subscriber_connection *conn; - - /* reference from MNCC or other application */ - uint32_t callref; - - /* if traffic channel receive was requested */ - int tch_recv; - - /* is thats one paging? */ - struct subscr_request *paging_request; - - /* bearer capabilities (rate and codec) */ - struct gsm_mncc_bearer_cap bearer_cap; - - /* status of the assignment, true when done */ - bool assignment_done; - - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - - union { - struct { - - /* current call state */ - int state; - - /* current timer and message queue */ - int Tcurrent; /* current CC timer */ - int T308_second; /* used to send release again */ - struct osmo_timer_list timer; - struct gsm_mncc msg; /* stores setup/disconnect/release message */ - } cc; - struct { - struct gsm411_smc_inst smc_inst; - struct gsm411_smr_inst smr_inst; - - struct gsm_sms *sms; - } sms; - }; - - struct { - struct gsm_trans *peer; - enum bridge_state state; - } bridge; -}; - - - -struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn, - uint8_t proto, uint8_t trans_id); -struct gsm_trans *trans_find_by_callref(struct gsm_network *net, - uint32_t callref); - -struct gsm_trans *trans_alloc(struct gsm_network *net, - struct vlr_subscr *vsub, - uint8_t protocol, uint8_t trans_id, - uint32_t callref); -void trans_free(struct gsm_trans *trans); - -int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub, - uint8_t protocol, uint8_t ti_flag); -struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn); -void trans_conn_closed(struct gsm_subscriber_connection *conn); - -#endif diff --git a/include/osmocom/bsc/trau_mux.h b/include/osmocom/bsc/trau_mux.h deleted file mode 100644 index eeceff5..0000000 --- a/include/osmocom/bsc/trau_mux.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1 - * timeslot on which E1 interface) should be directly muxed to which other - * sub-slot. Entries in the mux map are always bi-directional. - * - * The idea of all this is to directly switch voice channels in the BSC - * from one phone to another. We do this right now since we don't support - * any external interface for voice channels, and in the future as an - * optimization to routing them externally. - */ - -#include -#include -#include - -struct decoded_trau_frame; - -/* map a TRAU mux map entry */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst); -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst); - -/* unmap a TRAU mux map entry */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref); - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits); - -/* add a trau receiver */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref); - -/* send trau from application */ -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame); - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan); - -/* callback invoked if we receive TRAU frames */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv); - -/* TRAU frame transcoding */ -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf); -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf); -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data); -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data); diff --git a/include/osmocom/bsc/trau_upqueue.h b/include/osmocom/bsc/trau_upqueue.h deleted file mode 100644 index ecc7658..0000000 --- a/include/osmocom/bsc/trau_upqueue.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _TRAU_UPQUEUE_H -#define _TRAU_UPQUEUE_H - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -#endif /* _TRAU_UPQUEUE_H */ - diff --git a/src/Makefile.am b/src/Makefile.am index 454bf26..637272d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,6 @@ libcommon \ libcommon-cs \ libbsc \ - libtrau \ libfilter \ $(NULL) diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am index 4dfe247..b3b2b8c 100644 --- a/src/ipaccess/Makefile.am +++ b/src/ipaccess/Makefile.am @@ -30,7 +30,6 @@ abisip_find_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -49,7 +48,6 @@ ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -60,7 +58,6 @@ ipaccess_proxy_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index c68e3ea..957a5bb 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -978,7 +978,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) exit(1); diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ef7a6fb..980b3e6 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,6 +48,11 @@ #define RSL_ALLOC_SIZE 1024 #define RSL_ALLOC_HEADROOM 128 + +#define RTP_PT_GSM_FULL 3 +#define RTP_PT_GSM_HALF 96 +#define RTP_PT_GSM_EFR 97 +#define RTP_PT_AMR 98 enum sacch_deact { SACCH_NONE, @@ -159,9 +162,6 @@ if (rc < 0) LOGP(DRSL, LOGL_ERROR, "%s %smismatching chan_nr=0x%02x\n", gsm_ts_and_pchan_name(lchan->ts), log_name, chan_nr); - - if (lchan->conn) - log_set_context(LOG_CTX_VLR_SUBSCR, lchan->conn->vsub); return lchan; } @@ -2420,20 +2420,6 @@ msg->dst = lchan->ts->trx->rsl_link; return abis_rsl_sendmsg(msg); -} - -/* tell BTS to connect RTP stream to our local RTP socket */ -int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan) -{ - struct rtp_socket *rs = lchan->abis_ip.rtp_socket; - int rc; - - rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), - ntohs(rs->rtp.sin_local.sin_port), - /* FIXME: use RTP payload of bound socket, not BTS*/ - lchan->abis_ip.rtp_payload2); - - return rc; } int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 845b1b7..6ff1688 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -24,13 +24,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include @@ -263,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->via_ran = RAN_GERAN_A; conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); @@ -277,11 +274,6 @@ if (conn->network->bsc_api->conn_cleanup) conn->network->bsc_api->conn_cleanup(conn); - - if (conn->vsub) { - LOGP(DNM, LOGL_ERROR, "conn->vsub should have been cleared.\n"); - conn->vsub = NULL; - } if (conn->ho_lchan) { LOGP(DNM, LOGL_ERROR, "The ho_lchan should have been cleared.\n"); @@ -452,10 +444,6 @@ msgb_l3len(msg) - sizeof(*gh)); return; } - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(conn->bts)) - switch_trau_mux(conn->lchan, conn->secondary_lchan); /* swap channels */ osmo_timer_del(&conn->T10); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 2fb3842..34dfd36 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -529,10 +529,10 @@ return 0; } -int bsc_network_alloc(mncc_recv_cb_t mncc_recv) +int bsc_network_alloc(void) { /* initialize our data structures */ - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) return -ENOMEM; diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 4b2531e..ad24a1e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -25,12 +25,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -392,13 +390,6 @@ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, &sig); } - if (lchan->abis_ip.rtp_socket) { - LOGP(DRLL, LOGL_ERROR, "%s RTP Proxy Socket remained open.\n", - gsm_lchan_name(lchan)); - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } - /* stop the timer */ osmo_timer_del(&lchan->T3101); @@ -449,11 +440,6 @@ lchan->type = GSM_LCHAN_NONE; rsl_lchan_set_state(lchan, LCHAN_S_NONE); - - if (lchan->abis_ip.rtp_socket) { - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } } /* Drive the release process of the lchan */ diff --git a/src/libbsc/e1_config.c b/src/libbsc/e1_config.c index 3656315..90e29d3 100644 --- a/src/libbsc/e1_config.c +++ b/src/libbsc/e1_config.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ { struct gsm_e1_subslot *e1_link = &ts->e1_link; struct e1inp_line *line; - struct e1inp_ts *e1_ts; DEBUGP(DLMI, "e1_reconfig_ts(%u,%u,%u)\n", ts->trx->bts->nr, ts->trx->nr, ts->nr); @@ -61,12 +58,6 @@ "non-existing E1 line %u\n", ts->nr, ts->trx->nr, ts->trx->bts->nr, e1_link->e1_nr); return -ENOMEM; - } - - if (ts_is_tch(ts)) { - e1_ts = &line->ts[e1_link->e1_ts-1]; - e1inp_ts_config_trau(e1_ts, line, subch_cb); - subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); } return 0; diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..414fd6d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 7b9dece..a30cd09 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -32,13 +32,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include @@ -270,10 +267,6 @@ rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); osmo_timer_del(&ho->T3103); - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(new_lchan->conn->bts)) - switch_trau_mux(ho->old_lchan, new_lchan); /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..59a8d5c 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -24,12 +24,11 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; - net = gsm_network_init(ctx, country_code, network_code, mncc_recv); + net = gsm_network_init(ctx, country_code, network_code); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 2ac2612..b410b17 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -39,8 +38,7 @@ */ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; @@ -55,15 +53,12 @@ net->t3212 = 5; INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); net->active_calls = osmo_counter_alloc("msc.active_calls"); - - net->mncc_recv = mncc_recv; net->dyn_ts_allow_tch_f = true; @@ -127,17 +122,4 @@ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2; return gsm48_extract_mi(classmark2_lv, length - classmark_offset, mi_string, mi_type); -} - -uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) -{ - const uint8_t rp_msg_ref = *next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - *next_rp_ref += 1; - - return rp_msg_ref; } diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 74b1a93..beb936b 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -28,7 +28,6 @@ #include #include -#include struct cmd_node net_node = { GSMNET_NODE, diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..ec997b7 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -25,5 +25,4 @@ gsm_data_shared.c \ socket.c \ talloc_ctx.c \ - gsm_subscriber_base.c \ $(NULL) diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c index d4d5fb5..82327d1 100644 --- a/src/libcommon/common_vty.c +++ b/src/libcommon/common_vty.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c deleted file mode 100644 index a746c24..0000000 --- a/src/libcommon/gsm_subscriber_base.c +++ /dev/null @@ -1,37 +0,0 @@ -/* The concept of a subscriber as seen by the BSC */ - -/* (C) 2008 by Harald Welte - * (C) 2009-2010 by Holger Hans Peter Freyther - * (C) 2010 by On-Waves - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -LLIST_HEAD(active_subscribers); -void *tall_subscr_ctx; - diff --git a/src/libcommon/talloc_ctx.c b/src/libcommon/talloc_ctx.c index c8e9cd3..9f64d75 100644 --- a/src/libcommon/talloc_ctx.c +++ b/src/libcommon/talloc_ctx.c @@ -32,8 +32,6 @@ extern void *tall_sigh_ctx; extern void *tall_tqe_ctx; extern void *tall_trans_ctx; -extern void *tall_map_ctx; -extern void *tall_upq_ctx; extern void *tall_ctr_ctx; void talloc_ctx_init(void *ctx_root) @@ -49,7 +47,5 @@ tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); - tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); - tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); } diff --git a/src/libtrau/Makefile.am b/src/libtrau/Makefile.am deleted file mode 100644 index 46becd6..0000000 --- a/src/libtrau/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - -I$(top_builddir) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMONETIF_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -noinst_LIBRARIES = \ - libtrau.a \ - $(NULL) - -libtrau_a_SOURCES = \ - rtp_proxy.c \ - trau_mux.c \ - trau_upqueue.c \ - $(NULL) diff --git a/src/libtrau/rtp_proxy.c b/src/libtrau/rtp_proxy.c deleted file mode 100644 index 5b1ca79..0000000 --- a/src/libtrau/rtp_proxy.c +++ /dev/null @@ -1,764 +0,0 @@ -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009-2013 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include /* gettimeofday() */ -#include /* get..() */ -#include /* clock() */ -#include /* uname() */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* attempt to determine byte order */ -#include -#include - -static LLIST_HEAD(rtp_sockets); - -/* should we mangle the CNAME inside SDES of RTCP packets? We disable - * this by default, as it seems to be not needed */ -static int mangle_rtcp_cname = 0; - -enum rtp_bfd_priv { - RTP_PRIV_NONE, - RTP_PRIV_RTP, - RTP_PRIV_RTCP -}; - -#define RTP_ALLOC_SIZE 1500 - -#define RTCP_TYPE_SDES 202 - -#define RTCP_IE_CNAME 1 - - -#define RTP_VERSION 2 - -/* 33 for FR, all other codecs have smaller size */ -#define MAX_RTP_PAYLOAD_LEN 33 - -/* decode an rtp frame and create a new buffer with payload */ -static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data) -{ - struct msgb *new_msg; - struct gsm_data_frame *frame; - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; - struct rtp_x_hdr *rtpxh; - uint8_t *payload, *payload_out; - int payload_len; - int msg_type; - int x_len; - - if (msg->len < 12) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", - msg->len); - return -EINVAL; - } - if (rtph->version != RTP_VERSION) { - DEBUGPC(DLMUX, "received RTP version %d not supported.\n", - rtph->version); - return -EINVAL; - } - payload = msg->data + sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); - payload_len = msg->len - sizeof(struct rtp_hdr) - (rtph->csrc_count << 2); - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); - return -EINVAL; - } - if (rtph->extension) { - if (payload_len < sizeof(struct rtp_x_hdr)) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "extension header\n"); - return -EINVAL; - } - rtpxh = (struct rtp_x_hdr *)payload; - x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short, " - "extension header exceeds frame length\n"); - return -EINVAL; - } - } - if (rtph->padding) { - if (payload_len < 1) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "padding length\n"); - return -EINVAL; - } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); - return -EINVAL; - } - } - - switch (rtph->payload_type) { - case RTP_PT_GSM_FULL: - msg_type = GSM_TCHF_FRAME; - if (payload_len != RTP_LEN_GSM_FULL) { - DEBUGPC(DLMUX, "received RTP full rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_FULL, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_EFR: - msg_type = GSM_TCHF_FRAME_EFR; - if (payload_len != RTP_LEN_GSM_EFR) { - DEBUGPC(DLMUX, "received RTP extended full rate frame " - "with payload length != %d (len = %d)\n", - RTP_LEN_GSM_EFR, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_HALF: - msg_type = GSM_TCHH_FRAME; - if (payload_len != RTP_LEN_GSM_HALF) { - DEBUGPC(DLMUX, "received RTP half rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_HALF, payload_len); - return -EINVAL; - } - break; - case RTP_PT_AMR: - msg_type = GSM_TCH_FRAME_AMR; - break; - default: - DEBUGPC(DLMUX, "received RTP frame with unknown payload " - "type %d\n", rtph->payload_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN || - (rtph->payload_type == RTP_PT_AMR && - payload_len > MAX_RTP_PAYLOAD_LEN - 1)) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - /* always allocate for the maximum possible size to avoid - * fragmentation */ - new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); - - if (!new_msg) - return -ENOMEM; - frame = (struct gsm_data_frame *) msgb_put(new_msg, sizeof(struct gsm_data_frame)); - frame->msg_type = msg_type; - frame->callref = callref; - if (rtph->payload_type == RTP_PT_AMR) { - /* for FR/HR/EFR the length is implicit. In AMR, we - * need to make it explicit by using the first byte of - * the data[] buffer as length byte */ - uint8_t *data0 = msgb_put(new_msg, 1); - *data0 = payload_len; - } - payload_out = msgb_put(new_msg, payload_len); - memcpy(payload_out, payload, payload_len); - - *data = new_msg; - return 0; -} - -/*! \brief encode and send a rtp frame - * \param[in] rs RTP socket through which we shall send - * \param[in] frame GSM RTP frame to be sent - */ -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame) -{ - struct rtp_sub_socket *rss = &rs->rtp; - struct msgb *msg; - struct rtp_hdr *rtph; - uint8_t *payload; - int payload_type; - int payload_len; - int duration; /* in samples */ - int is_bfi = 0; - - if (rs->tx_action != RTP_SEND_DOWNSTREAM) { - /* initialize sequences */ - rs->tx_action = RTP_SEND_DOWNSTREAM; - rs->transmit.ssrc = rand(); - rs->transmit.sequence = random(); - rs->transmit.timestamp = random(); - } - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - payload_type = RTP_PT_GSM_FULL; - payload_len = RTP_LEN_GSM_FULL; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHF_FRAME_EFR: - payload_type = RTP_PT_GSM_EFR; - payload_len = RTP_LEN_GSM_EFR; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHH_FRAME: - payload_type = RTP_PT_GSM_HALF; - payload_len = RTP_LEN_GSM_HALF; - duration = RTP_GSM_DURATION; - break; - case GSM_TCH_FRAME_AMR: - payload_type = RTP_PT_AMR; - payload_len = frame->data[0]; - duration = RTP_GSM_DURATION; - break; - case GSM_BAD_FRAME: - payload_type = 0; - payload_len = 0; - duration = RTP_GSM_DURATION; - is_bfi = 1; - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - if (is_bfi) { - /* In case of a bad frame, just count and drop packet. */ - rs->transmit.timestamp += duration; - rs->transmit.sequence++; - return 0; - } - - msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM"); - if (!msg) - return -ENOMEM; - rtph = (struct rtp_hdr *) msgb_put(msg, sizeof(struct rtp_hdr)); - rtph->version = RTP_VERSION; - rtph->padding = 0; - rtph->extension = 0; - rtph->csrc_count = 0; - rtph->marker = 0; - rtph->payload_type = payload_type; - rtph->sequence = htons(rs->transmit.sequence++); - rtph->timestamp = htonl(rs->transmit.timestamp); - rs->transmit.timestamp += duration; - rtph->ssrc = htonl(rs->transmit.ssrc); - - payload = msgb_put(msg, payload_len); - if (frame->msg_type == GSM_TCH_FRAME_AMR) - memcpy(payload, frame->data + 1, payload_len); - else - memcpy(payload, frame->data, payload_len); - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - - return 0; -} - -/* iterate over all chunks in one RTCP message, look for CNAME IEs and - * replace all of those with 'new_cname' */ -static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh, - uint16_t *rtcp_len, const char *new_cname) -{ - uint8_t *rtcp_end; - uint8_t *cur = (uint8_t *) rh; - uint8_t tag, len = 0; - - rtcp_end = cur + *rtcp_len; - /* move cur to end of RTP header */ - cur += sizeof(*rh); - - /* iterate over Chunks */ - while (cur+4 < rtcp_end) { - /* skip four bytes SSRC/CSRC */ - cur += 4; - - /* iterate over IE's inside the chunk */ - while (cur+1 < rtcp_end) { - tag = *cur++; - if (tag == 0) { - /* end of chunk, skip additional zero */ - while ((*cur++ == 0) && (cur < rtcp_end)) { } - break; - } - len = *cur++; - - if (tag == RTCP_IE_CNAME) { - /* we've found the CNAME, lets mangle it */ - if (len < strlen(new_cname)) { - /* we need to make more space */ - int increase = strlen(new_cname) - len; - - msgb_push(msg, increase); - memmove(cur+len+increase, cur+len, - rtcp_end - (cur+len)); - /* FIXME: we have to respect RTCP - * padding/alignment rules! */ - len += increase; - *(cur-1) += increase; - rtcp_end += increase; - *rtcp_len += increase; - } - /* copy new CNAME into message */ - memcpy(cur, new_cname, strlen(new_cname)); - /* FIXME: zero the padding in case new CNAME - * is smaller than old one !!! */ - } - cur += len; - } - } - - return 0; -} - -static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs) -{ - struct rtp_sub_socket *rss = &rs->rtcp; - struct rtcp_hdr *rtph; - uint16_t old_len; - int rc; - - if (!mangle_rtcp_cname) - return 0; - - printf("RTCP\n"); - /* iterate over list of RTCP messages */ - rtph = (struct rtcp_hdr *)msg->data; - while ((void *)rtph + sizeof(*rtph) <= (void *)msg->data + msg->len) { - old_len = (ntohs(rtph->length) + 1) * 4; - if ((void *)rtph + old_len > (void *)msg->data + msg->len) { - DEBUGPC(DLMUX, "received RTCP packet too short for " - "length element\n"); - return -EINVAL; - } - if (rtph->type == RTCP_TYPE_SDES) { - char new_cname[255]; - osmo_strlcpy(new_cname, - inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, - new_cname); - if (rc < 0) - return rc; - } - rtph = (void *)rtph + old_len; - } - - return 0; -} - -/* read from incoming RTP/RTCP socket */ -static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - int rc; - struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP"); - struct msgb *new_msg; - struct rtp_sub_socket *other_rss; - - if (!msg) - return -ENOMEM; - - rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } else if (rc < 0) { - /* Ignore "connection refused". this happens, If we open the - * socket faster than the remote side. */ - if (errno == ECONNREFUSED) - goto out_free; - DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " - "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } - - msgb_put(msg, rc); - - switch (rs->rx_action) { - case RTP_PROXY: - if (!rs->proxy.other_sock) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTP) - other_rss = &rs->proxy.other_sock->rtp; - else if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - other_rss = &rs->proxy.other_sock->rtcp; - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - } else { - rc = -EINVAL; - goto out_free; - } - msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; - break; - - case RTP_RECV_UPSTREAM: - if (!rs->receive.callref || !rs->receive.net) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - if (!mangle_rtcp_cname) { - msgb_free(msg); - break; - } - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - break; - } - if (rss->bfd.priv_nr != RTP_PRIV_RTP) { - rc = -EINVAL; - goto out_free; - } - rc = rtp_decode(msg, rs->receive.callref, &new_msg); - if (rc < 0) - goto out_free; - msgb_free(msg); - trau_tx_to_mncc(rs->receive.net, new_msg); - break; - - case RTP_NONE: /* if socket exists, but disabled by app */ - msgb_free(msg); - break; - } - - return 0; - -out_free: - msgb_free(msg); - return rc; -} - -/* \brief write from tx_queue to RTP/RTCP socket */ -static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - struct msgb *msg; - int written; - - msg = msgb_dequeue(&rss->tx_queue); - if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; - return 0; - } - - written = write(rss->bfd.fd, msg->data, msg->len); - if (written < msg->len) { - LOGP(DLMIB, LOGL_ERROR, "short write"); - msgb_free(msg); - return -EIO; - } - - msgb_free(msg); - - return 0; -} - - -/*! \brief callback for the select.c:bfd_* layer */ -static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags) -{ - struct rtp_socket *rs = bfd->data; - struct rtp_sub_socket *rss; - - switch (bfd->priv_nr) { - case RTP_PRIV_RTP: - rss = &rs->rtp; - break; - case RTP_PRIV_RTCP: - rss = &rs->rtcp; - break; - default: - return -EINVAL; - } - - if (flags & BSC_FD_READ) - rtp_socket_read(rs, rss); - - if (flags & BSC_FD_WRITE) - rtp_socket_write(rs, rss); - - return 0; -} - -/*! \brief initialize one rtp sub-socket */ -static void init_rss(struct rtp_sub_socket *rss, - struct rtp_socket *rs, int fd, int priv_nr) -{ - /* initialize bfd */ - rss->bfd.fd = fd; - rss->bfd.data = rs; - rss->bfd.priv_nr = priv_nr; - rss->bfd.cb = rtp_bfd_cb; -} - -/*! \brief create a new RTP/RTCP socket and bind it */ -struct rtp_socket *rtp_socket_create(void) -{ - int rc; - struct rtp_socket *rs; - - DEBUGP(DLMUX, "rtp_socket_create(): "); - - rs = talloc_zero(tall_bsc_ctx, struct rtp_socket); - if (!rs) - return NULL; - - INIT_LLIST_HEAD(&rs->rtp.tx_queue); - INIT_LLIST_HEAD(&rs->rtcp.tx_queue); - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_free; - - init_rss(&rs->rtp, rs, rc, RTP_PRIV_RTP); - rc = osmo_fd_register(&rs->rtp.bfd); - if (rc < 0) - goto out_rtp_socket; - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_rtp_bfd; - - init_rss(&rs->rtcp, rs, rc, RTP_PRIV_RTCP); - rc = osmo_fd_register(&rs->rtcp.bfd); - if (rc < 0) - goto out_rtcp_socket; - - DEBUGPC(DLMUX, "success\n"); - - rc = rtp_socket_bind(rs, INADDR_ANY); - if (rc < 0) - goto out_rtcp_bfd; - - return rs; - -out_rtcp_bfd: - osmo_fd_unregister(&rs->rtcp.bfd); -out_rtcp_socket: - close(rs->rtcp.bfd.fd); -out_rtp_bfd: - osmo_fd_unregister(&rs->rtp.bfd); -out_rtp_socket: - close(rs->rtp.bfd.fd); -out_free: - talloc_free(rs); - DEBUGPC(DLMUX, "failed\n"); - return NULL; -} - -static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip, - uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_local.sin_family = AF_INET; - rss->sin_local.sin_addr.s_addr = htonl(ip); - rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; - - rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - sizeof(rss->sin_local)); - if (rc < 0) - return rc; - - /* retrieve the address we actually bound to, in case we - * passed INADDR_ANY as IP address */ - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -#define RTP_PORT_BASE 30000 -static unsigned int next_udp_port = RTP_PORT_BASE; - -/*! \brief bind a RTP socket to a specific local address - * \param[in] rs RTP socket to be bound - * \param[in] ip local IP address to which socket is to be bound - */ -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip) -{ - int rc = -EIO; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_bind(rs=%p, IP=%s): ", rs, - inet_ntoa(ia)); - - /* try to bind to a consecutive pair of ports */ - for (next_udp_port = next_udp_port % 0xffff; - next_udp_port < 0xffff; next_udp_port += 2) { - rc = rtp_sub_socket_bind(&rs->rtp, ip, next_udp_port); - if (rc != 0) - continue; - - rc = rtp_sub_socket_bind(&rs->rtcp, ip, next_udp_port+1); - if (rc == 0) - break; - } - if (rc < 0) { - DEBUGPC(DLMUX, "failed\n"); - return rc; - } - - ia.s_addr = rs->rtp.sin_local.sin_addr.s_addr; - DEBUGPC(DLMUX, "BOUND_IP=%s, BOUND_PORT=%u\n", - inet_ntoa(ia), ntohs(rs->rtp.sin_local.sin_port)); - return ntohs(rs->rtp.sin_local.sin_port); -} - -static int rtp_sub_socket_connect(struct rtp_sub_socket *rss, - uint32_t ip, uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_remote.sin_family = AF_INET; - rss->sin_remote.sin_addr.s_addr = htonl(ip); - rss->sin_remote.sin_port = htons(port); - - rc = connect(rss->bfd.fd, (struct sockaddr *) &rss->sin_remote, - sizeof(rss->sin_remote)); - if (rc < 0) - return rc; - - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -/*! \brief 'connect' a RTP socket to a remote peer - * \param[in] rs RTP socket to be connected - * \param[in] ip remote IP address to which to connect - * \param[in] port remote UDP port number to which to connect - */ -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port) -{ - int rc; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_connect(rs=%p, ip=%s, port=%u)\n", - rs, inet_ntoa(ia), port); - - rc = rtp_sub_socket_connect(&rs->rtp, ip, port); - if (rc < 0) - return rc; - - return rtp_sub_socket_connect(&rs->rtcp, ip, port+1); -} - -/*! \brief bind two RTP/RTCP sockets together in the proxy - * \param[in] this First RTP socket - * \param[in] other Second RTP socket - */ -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n", - this, other); - - this->rx_action = RTP_PROXY; - this->proxy.other_sock = other; - - other->rx_action = RTP_PROXY; - other->proxy.other_sock = this; - - return 0; -} - -/*! \brief bind RTP/RTCP socket to application, disabling proxy - * \param[in] this RTP socket - * \param[in] net gsm_network argument to trau_tx_to_mncc() - * \param[in] callref callref argument to trau_tx_to_mncc() - */ -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, - uint32_t callref) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n", - this, callref); - - if (callref) { - this->rx_action = RTP_RECV_UPSTREAM; - this->receive.net = net; - this->receive.callref = callref; - } else - this->rx_action = RTP_NONE; - - return 0; -} - -static void free_tx_queue(struct rtp_sub_socket *rss) -{ - struct msgb *msg; - - while ((msg = msgb_dequeue(&rss->tx_queue))) - msgb_free(msg); -} - -/*! \brief Free/release a previously allocated RTP socket - * \param[in[] rs RTP/RTCP socket to be released - */ -int rtp_socket_free(struct rtp_socket *rs) -{ - DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs); - - /* make sure we don't leave references dangling to us */ - if (rs->rx_action == RTP_PROXY && - rs->proxy.other_sock) - rs->proxy.other_sock->proxy.other_sock = NULL; - - osmo_fd_unregister(&rs->rtp.bfd); - close(rs->rtp.bfd.fd); - free_tx_queue(&rs->rtp); - - osmo_fd_unregister(&rs->rtcp.bfd); - close(rs->rtcp.bfd.fd); - free_tx_queue(&rs->rtcp); - - talloc_free(rs); - - return 0; -} diff --git a/src/libtrau/trau_mux.c b/src/libtrau/trau_mux.c deleted file mode 100644 index e570b93..0000000 --- a/src/libtrau/trau_mux.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* this corresponds to the bit-lengths of the individual codec - * parameters as indicated in Table 1.1 of TS 06.10 */ -static const uint8_t gsm_fr_map[] = { - 6, 6, 5, 5, 4, 4, 3, 3, - 7, 2, 2, 6, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 7, 2, 2, 6, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 7, 2, 2, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 7, 2, 2, 6, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3 -}; - - -/* - * EFR TRAU parity - * - * g(x) = x^3 + x^1 + 1 - */ -static const struct osmo_crc8gen_code gsm0860_efr_crc3 = { - .bits = 3, - .poly = 0x3, - .init = 0x0, - .remainder = 0x7, -}; - -/* EFR parity bits */ -static inline void efr_parity_bits_1(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 0, 22); - memcpy(check_bits + 22 , d_bits + 24, 3); - check_bits[25] = d_bits[28]; -} - -static inline void efr_parity_bits_2(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 42, 10); - memcpy(check_bits + 10 , d_bits + 90, 2); -} - -static inline void efr_parity_bits_3(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 98, 5); - check_bits[5] = d_bits[104]; - memcpy(check_bits + 6 , d_bits + 143, 2); -} - -static inline void efr_parity_bits_4(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 151, 10); - memcpy(check_bits + 10 , d_bits + 199, 2); -} - -static inline void efr_parity_bits_5(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 207, 5); - check_bits[5] = d_bits[213]; - memcpy(check_bits + 6 , d_bits + 252, 2); -} - -struct map_entry { - struct llist_head list; - struct gsm_e1_subslot src, dst; -}; - -struct upqueue_entry { - struct llist_head list; - struct gsm_network *net; - struct gsm_e1_subslot src; - uint32_t callref; -}; - -static LLIST_HEAD(ss_map); -static LLIST_HEAD(ss_upqueue); - -void *tall_map_ctx, *tall_upq_ctx; - -/* map one particular subslot to another subslot */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst) -{ - struct map_entry *me; - - me = talloc(tall_map_ctx, struct map_entry); - if (!me) { - LOGP(DLMIB, LOGL_FATAL, "Out of memory\n"); - return -ENOMEM; - } - - DEBUGP(DCC, "Setting up TRAU mux map between (e1=%u,ts=%u,ss=%u) " - "and (e1=%u,ts=%u,ss=%u)\n", - src->e1_nr, src->e1_ts, src->e1_ts_ss, - dst->e1_nr, dst->e1_ts, dst->e1_ts_ss); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src, 0); - trau_mux_unmap(dst, 0); - - memcpy(&me->src, src, sizeof(me->src)); - memcpy(&me->dst, dst, sizeof(me->dst)); - llist_add(&me->list, &ss_map); - - return 0; -} - -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst) -{ - struct gsm_e1_subslot *src_ss, *dst_ss; - - src_ss = &src->ts->e1_link; - dst_ss = &dst->ts->e1_link; - - return trau_mux_map(src_ss, dst_ss); -} - - -/* unmap one particular subslot from another subslot */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref) -{ - struct map_entry *me, *me2; - struct upqueue_entry *ue, *ue2; - - if (ss) - llist_for_each_entry_safe(me, me2, &ss_map, list) { - if (!memcmp(&me->src, ss, sizeof(*ss)) || - !memcmp(&me->dst, ss, sizeof(*ss))) { - llist_del(&me->list); - return 0; - } - } - llist_for_each_entry_safe(ue, ue2, &ss_upqueue, list) { - if (ue->callref == callref) { - llist_del(&ue->list); - return 0; - } - if (ss && !memcmp(&ue->src, ss, sizeof(*ss))) { - llist_del(&ue->list); - return 0; - } - } - return -ENOENT; -} - -/* look-up an enty in the TRAU mux map */ -static struct gsm_e1_subslot * -lookup_trau_mux_map(const struct gsm_e1_subslot *src) -{ - struct map_entry *me; - - llist_for_each_entry(me, &ss_map, list) { - if (!memcmp(&me->src, src, sizeof(*src))) - return &me->dst; - if (!memcmp(&me->dst, src, sizeof(*src))) - return &me->src; - } - return NULL; -} - -/* look-up an enty in the TRAU upqueue */ -struct upqueue_entry * -lookup_trau_upqueue(const struct gsm_e1_subslot *src) -{ - struct upqueue_entry *ue; - - llist_for_each_entry(ue, &ss_upqueue, list) { - if (!memcmp(&ue->src, src, sizeof(*src))) - return ue; - } - return NULL; -} - -static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, k, l, o; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 33, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - data = frame->data; - data[0] = 0xd << 4; - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts output bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset input bits */ - while (i < 260) { - data[j/8] |= (tf->d_bits[k+o] << (7-(j%8))); - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } - if (tf->c_bits[11]) /* BFI */ - frame->msg_type = GSM_BAD_FRAME; - else - frame->msg_type = GSM_TCHF_FRAME; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 33); - - return msg; -} - -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, rc; - ubit_t check_bits[26]; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 31, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - frame->msg_type = GSM_TCHF_FRAME_EFR; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 31); - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - - data = frame->data; - data[0] = 0xc << 4; - /* reassemble d-bits */ - for (i = 1, j = 4; i < 39; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_1(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - if (rc) - goto bad_frame; - for (i = 42, j = 42; i < 95; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_2(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - if (rc) - goto bad_frame; - for (i = 98, j = 95; i < 148; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_3(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - if (rc) - goto bad_frame; - for (i = 151, j = 145; i < 204; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_4(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - if (rc) - goto bad_frame; - for (i = 207, j = 198; i < 257; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_5(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); - if (rc) - goto bad_frame; - - return msg; - -bad_frame: - frame->msg_type = GSM_BAD_FRAME; - - return msg; -} - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits) -{ - struct decoded_trau_frame tf; - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss); - struct subch_mux *mx; - struct upqueue_entry *ue; - int rc; - - /* decode TRAU, change it to downlink, re-encode */ - rc = decode_trau_frame(&tf, trau_bits); - if (rc) - return rc; - - if (!dst_e1_ss) { - struct msgb *msg = NULL; - /* frame shall be sent to upqueue */ - if (!(ue = lookup_trau_upqueue(src_e1_ss))) - return -EINVAL; - if (!ue->callref) - return -EINVAL; - if (!memcmp(tf.c_bits, c_bits_check_fr, 5)) - msg = trau_decode_fr(ue->callref, &tf); - else if (!memcmp(tf.c_bits, c_bits_check_efr, 5)) - msg = trau_decode_efr(ue->callref, &tf); - else { - DEBUGPC(DLMUX, "illegal trau (C1-C5) %s\n", - osmo_hexdump(tf.c_bits, 5)); - DEBUGPC(DLMUX, "test trau (C1-C5) %s\n", - osmo_hexdump(c_bits_check_efr, 5)); - return -EINVAL; - } - if (!msg) - return -ENOMEM; - trau_tx_to_mncc(ue->net, msg); - - return 0; - } - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - trau_frame_up2down(&tf); - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* callback when a TRAU frame was received */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, - void *_priv) -{ - struct e1inp_ts *e1i_ts = _priv; - struct gsm_e1_subslot src_ss; - - src_ss.e1_nr = e1i_ts->line->num; - src_ss.e1_ts = e1i_ts->num; - src_ss.e1_ts_ss = ch; - - return trau_mux_input(&src_ss, data, len); -} - -/* add receiver instance for lchan and callref */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref) -{ - struct gsm_e1_subslot *src_ss; - struct upqueue_entry *ue; - - ue = talloc(tall_upq_ctx, struct upqueue_entry); - if (!ue) - return -ENOMEM; - - src_ss = &lchan->ts->e1_link; - - DEBUGP(DCC, "Setting up TRAU receiver (e1=%u,ts=%u,ss=%u) " - "and (callref 0x%x)\n", - src_ss->e1_nr, src_ss->e1_ts, src_ss->e1_ts_ss, - callref); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src_ss, callref); - - memcpy(&ue->src, src_ss, sizeof(ue->src)); - ue->net = lchan->ts->trx->bts->network; - ue->callref = callref; - llist_add(&ue->list, &ss_upqueue); - - return 0; -} - -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j, k, l, o; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 1; - tf->c_bits[3] = 0; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts input bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset output bits */ - while (i < 260) { - tf->d_bits[k+o] = (data[j/8] >> (7-(j%8))) & 1; - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } -} - -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j; - ubit_t check_bits[26]; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 0; - tf->c_bits[3] = 1; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - tf->d_bits[0] = 1; - for (i = 1, j = 4; i < 39; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_1(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - for (i = 42, j = 42; i < 95; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_2(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - for (i = 98, j = 95; i < 148; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_3(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - for (i = 151, j = 145; i < 204; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_4(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - for (i = 207, j = 198; i < 257; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_5(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); -} - -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame) -{ - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link; - struct subch_mux *mx; - struct decoded_trau_frame tf; - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - trau_encode_fr(&tf, frame->data); - break; - case GSM_TCHF_FRAME_EFR: - trau_encode_efr(&tf, frame->data); - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan) -{ - struct gsm_network *net = old_lchan->ts->trx->bts->network; - struct gsm_trans *trans; - - /* look up transaction with TCH frame receive enabled */ - llist_for_each_entry(trans, &net->trans_list, entry) { - if (trans->conn && trans->conn->lchan == old_lchan && trans->tch_recv) { - /* switch */ - trau_recv_lchan(new_lchan, trans->callref); - } - } - - return 0; -} diff --git a/src/libtrau/trau_upqueue.c b/src/libtrau/trau_upqueue.c deleted file mode 100644 index c1c0003..0000000 --- a/src/libtrau/trau_upqueue.c +++ /dev/null @@ -1,27 +0,0 @@ -/* trau_upqueue.c - Pass msgb's up the chain */ - -/* (C) 2010 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 7db698c..4acbe56 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -40,12 +40,10 @@ osmo_bsc_ctrl.c \ $(NULL) -# once again since TRAU uses CC symbol :( osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 2b71b85..17dddf8 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5d25701..829f207 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -201,7 +201,7 @@ osmo_stats_init(tall_bsc_ctx); /* Allocate global gsm_network struct */ - rc = bsc_network_alloc(NULL); + rc = bsc_network_alloc(); if (rc) { fprintf(stderr, "Allocation failed. exiting.\n"); exit(1); diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index dd20ddb..1bee68e 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -42,7 +42,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc_nat/bsc_filter.c b/src/osmo-bsc_nat/bsc_filter.c index 8d4a680..77ef583 100644 --- a/src/osmo-bsc_nat/bsc_filter.c +++ b/src/osmo-bsc_nat/bsc_filter.c @@ -20,6 +20,8 @@ * */ +#include + #include #include #include diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index d3f6d62..78d4965 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -49,7 +49,6 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 6487df2..c72a23a 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..9207434 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc6248..137321c 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897..d20bd0a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a9..7f6730e 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4a..96f87f5 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018..1d7baa1 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9ea..77309c9 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c1..579cae2 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e..7957b14 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include #include #include -#include void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22..c5ae061 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 72a1772..77cd1e8 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -147,7 +147,7 @@ static inline void test_si2q_segfault(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); if (!network) @@ -162,7 +162,7 @@ static inline void test_si2q_mu(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater multiple UARFCNs:\n"); if (!network) @@ -181,7 +181,7 @@ static inline void test_si2q_u(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); if (!network) @@ -209,7 +209,7 @@ static inline void test_si2q_e(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); if (!network) @@ -242,7 +242,7 @@ static inline void test_si2q_long(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); if (!network) @@ -649,7 +649,7 @@ static void test_si_ba_ind(void) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); struct gsm_bts *bts = gsm_bts_alloc(network, 0); const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b49518..336ccaf 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bc..b743063 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e1..6ef3f29 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c184..0000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5e..0000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef71230..0000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:17:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:17:18 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: remove bogus line sfrom osmo-bsc.cfg In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5480 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:17:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:17:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: remove bogus line sfrom osmo-bsc.cfg In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: remove bogus line sfrom osmo-bsc.cfg ...................................................................... BSC_Tests: remove bogus line sfrom osmo-bsc.cfg Those lines serve no purpose (and are being removed from osmo-bsc master) Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d --- M bsc/osmo-bsc.cfg 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg index 9b45904..d97c210 100644 --- a/bsc/osmo-bsc.cfg +++ b/bsc/osmo-bsc.cfg @@ -69,14 +69,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 1 paging any use tch 0 - rrlp mode none - mm info 1 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 -- To view, visit https://gerrit.osmocom.org/5480 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf037e8cd9a51e676eac472b29c0d616a5632c5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:18:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:18:08 +0000 Subject: osmo-msc[master]: cosmetic prep: publish vlr_use_umts_aka() decision In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5468 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:18:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:18:58 +0000 Subject: osmo-msc[master]: log: a_iface.c: revisit logging, use LOGPCONN In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5474 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9cb0e7a5cef2ec37a1a7c548aecf11a11c22eec Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:19:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:19:17 +0000 Subject: osmo-msc[master]: debug log: a_iface_tx_cipher_mode(): log cipher and key In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:19:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:19:32 +0000 Subject: osmo-msc[master]: cosmetic: msc_vlr_tests: log SMS details when invoked with -v In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5465 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b7d2fd3fb38bf50eeabd6f7ef736d70a17de7a6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:20:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:20:01 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: msc_vlr_tests: log SMS details when invoked with -v In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: msc_vlr_tests: log SMS details when invoked with -v ...................................................................... cosmetic: msc_vlr_tests: log SMS details when invoked with -v DLSMS logs SMS pointers, so is not suitable for logging them always. Allow logging for manual invocation, though. Change-Id: I1b7d2fd3fb38bf50eeabd6f7ef736d70a17de7a6 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..f0a112b 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -824,6 +824,9 @@ log_set_print_filename(osmo_stderr_target, _log_lines? 1 : 0); log_set_print_category(osmo_stderr_target, 1); + if (cmdline_opts.verbose) + log_set_category_filter(osmo_stderr_target, DLSMS, 1, LOGL_DEBUG); + net = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); net->gsup_server_addr_str = talloc_strdup(net, "no_gsup_server"); net->gsup_server_port = 0; -- To view, visit https://gerrit.osmocom.org/5465 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b7d2fd3fb38bf50eeabd6f7ef736d70a17de7a6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:20:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:20:02 +0000 Subject: [MERGED] osmo-msc[master]: debug log: a_iface_tx_cipher_mode(): log cipher and key In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: debug log: a_iface_tx_cipher_mode(): log cipher and key ...................................................................... debug log: a_iface_tx_cipher_mode(): log cipher and key Introduce LOGPCONN() which would also be useful in numerous other places in this file. Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 --- M src/libmsc/a_iface.c 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 83ec82f..f863517 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,8 +39,14 @@ #include #include #include +#include #include + +#define LOGPCONN(conn, level, fmt, args...) \ + LOGP(DMSC, level, "(subscr %s, conn_id %d) " fmt, \ + vlr_subscr_name(conn ? conn->vsub : NULL), conn ? conn->a.conn_id : -1, \ + ## args) /* A pointer to the GSM network we work with. By the current paradigm, * there can only be one gsm_network per MSC. The pointer is set once @@ -172,10 +178,12 @@ OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_DEBUG, "Passing Cipher mode command message from MSC to BSC (conn_id=%i)\n", conn->a.conn_id); uint8_t crm = 0x01; uint8_t *crm_ptr = NULL; + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", + cipher, osmo_hexdump_nospc(key, len)); + /* Setup encryption information */ if (len > ENCRY_INFO_KEY_MAXLEN || !key) { LOGP(DMSC, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/5374 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib406d6e6784342341e716206997e382c702ac9d2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:20:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:20:02 +0000 Subject: [MERGED] osmo-msc[master]: vlr: debug log: log Ciphering Mode details In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vlr: debug log: log Ciphering Mode details ...................................................................... vlr: debug log: log Ciphering Mode details Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 5 files changed, 28 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 59eb37d..16f365e 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1104,6 +1104,8 @@ case VLR_CIPH_A5_1: case VLR_CIPH_A5_3: + LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode: %d=%s\n", + ciph_mode, vlr_ciph_name(ciph_mode)); return vlr->ops.set_ciph_mode(msc_conn_ref, ciph_mode, retrieve_imeisv); diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 7149d83..662074d 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -489,6 +489,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -665,6 +666,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -793,6 +795,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1459,6 +1462,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1635,6 +1639,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1749,6 +1754,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1863,6 +1869,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2329,6 +2336,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2519,6 +2527,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 5ffab4a..c7c7d8d 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -63,6 +63,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -225,6 +226,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -409,6 +411,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -579,6 +582,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 07f5e55..711ca48 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -61,6 +61,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -222,6 +223,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -366,6 +368,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -542,6 +545,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -740,6 +744,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -884,6 +889,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1060,6 +1066,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1279,6 +1286,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1487,6 +1495,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 0621ac2..41bdf49 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -523,6 +523,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -705,6 +706,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -840,6 +842,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1249,6 +1252,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) -- To view, visit https://gerrit.osmocom.org/5375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib19dfd7255bda01ebace62386df4ec89697d9d14 Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:20:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:20:04 +0000 Subject: [MERGED] osmo-msc[master]: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms ...................................................................... fix BSSMAP Cipher Mode Cmd: properly set permitted algorithms The bit shifting is performed in gsm0808_enc_encrypt_info(), and must not be done when populating the gsm0808_encrypt_info struct. Provide vlr_ciph_to_gsm0808_alg_id() to translate the enum vlr_ciph to the GSM0808_* constants we need to put in the gsm0808_encrypt_info struct instead. Related: OS#2745 Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a --- M include/osmocom/msc/vlr.h M src/libmsc/a_iface.c 2 files changed, 17 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 9e6b12c..640d35b 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -7,6 +7,7 @@ #include #include #include +#include #include // for GSM_NAME_LENGTH #include @@ -172,6 +173,21 @@ VLR_CIPH_A5_3, /*< A5/3, 'new secure' encryption */ }; +static inline uint8_t vlr_ciph_to_gsm0808_alg_id(enum vlr_ciph ciph) +{ + switch (ciph) { + default: + case VLR_CIPH_NONE: + return GSM0808_ALG_ID_A5_0; + case VLR_CIPH_A5_1: + return GSM0808_ALG_ID_A5_1; + case VLR_CIPH_A5_2: + return GSM0808_ALG_ID_A5_2; + case VLR_CIPH_A5_3: + return GSM0808_ALG_ID_A5_3; + } +} + struct vlr_ops { /* encode + transmit an AUTH REQ towards the MS. * \param[in] at auth tuple providing rand, key_seq and autn. diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index f863517..69b4c09 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -198,7 +198,7 @@ if (include_imeisv) crm_ptr = &crm; - ei.perm_algo[0] = (uint8_t) (1 << cipher); + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); ei.perm_algo_len = 1; msg_resp = gsm0808_create_cipher(&ei, crm_ptr); -- To view, visit https://gerrit.osmocom.org/5376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If75f95e8a5cc8b9979610ce6d746c1f0073ee39a Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:20:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 08:20:04 +0000 Subject: [MERGED] osmo-msc[master]: compiler warning: drop double 'const' in a_iface_tx_cipher_m... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: compiler warning: drop double 'const' in a_iface_tx_cipher_mode() ...................................................................... compiler warning: drop double 'const' in a_iface_tx_cipher_mode() Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0 --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index 40ad9c8..f0da248 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -57,7 +57,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv); + int cipher, const uint8_t *key, int len, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..83ec82f 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -164,7 +164,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const const uint8_t *key, int len, int include_imeisv) + int cipher, const uint8_t *key, int len, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; -- To view, visit https://gerrit.osmocom.org/5373 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b8baa9a259704e719ce7f12776f2d2125ebdef0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 08:53:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 08:53:30 +0000 Subject: osmo-sgsn[master]: .service: remove OpenBSC from service desription In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:12:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 09:12:17 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#9). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/9 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:12:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 09:12:17 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5277 to look at the new patch set (#8). Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add basic module import tests for python 2 and 3 * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/77/5277/8 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,13 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install +python2 tests/test_py2.py + rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py + +# TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:12:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 09:12:17 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#9). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write proper version-specific tests. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/9 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:24:37 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 18 Dec 2017 09:24:37 +0000 Subject: libosmocore[master]: libosmocodec: implement ECU (Error Concealment Unit) for FR In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 > BTW: I've changed the license header from AGPL V3+ to GPL V2+ > in order to avoid license mix in libosmocore. > > @dexter, @Harald, is it ok? Thanks for correcting this (cut and past error). -- To view, visit https://gerrit.osmocom.org/5421 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:38:43 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 18 Dec 2017 09:38:43 +0000 Subject: [PATCH] osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5402 to look at the new patch set (#2). octphy: l1_oml: check returncode of trx_by_l1h() The function trx_by_l1h() is used to fetch the pointer to a an osmo_bts_trx from a list. The ID that is used to reference the transceiver comes from the incoming message. If the firmware sends odd identifiers (firmware bugs, damaged packets) the transceiver can not be found in the list and a nullpointer is returned, which then leads into a nullpointer derefernece problem. Check the returncode, and depending on the situation either return with -EINVAL or exit osmo-bts immediately. Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/5402/2 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index a1c384a..ec1cc10 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -377,6 +377,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while lchan act\n", + ar->TrxId.byTrxId); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ar->LchId); sapi = ar->LchId.bySAPI; @@ -488,6 +493,12 @@ } trx = trx_by_l1h(fl1, pcr->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (pcr->TrxId.byTrxId=%u) while ciphering\n", + pcr->TrxId.byTrxId); + return -EINVAL; + } + OSMO_ASSERT(pcr->TrxId.byTrxId == trx->nr); ts = &trx->ts[pcr->PchId.byTimeslotNb]; /* for some strange reason the response does not tell which @@ -687,6 +698,11 @@ mOCTVC1_GSM_MSG_TRX_DEACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ldr); trx = trx_by_l1h(fl1, ldr->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ldr->TrxId.byTrxId=%u) while lchan deact\n", + ldr->TrxId.byTrxId); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ldr->LchId); @@ -1266,6 +1282,11 @@ mOCTVC1_GSM_MSG_TRX_OPEN_RSP_SWAP(or); trx = trx_by_l1h(fl1h, or->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (or->TrxId.byTrxId=%u) while opening trx -- abort\n", + or->TrxId.byTrxId); + exit(1); + } LOGP(DL1C, LOGL_INFO, "TRX-OPEN.resp(trx=%u) = %s\n", trx->nr, octvc1_rc2string(or->Header.ulReturnCode)); @@ -1394,6 +1415,12 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while activating physical channel -- abort\n", + ar->TrxId.byTrxId); + exit(1); + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); @@ -1472,6 +1499,12 @@ struct gsm_bts_trx_ts *ts; trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while disconnecting ts\n", + ar->TrxId.byTrxId); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; ts = &trx->ts[ts_nr]; @@ -1495,6 +1528,12 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while connecting ts\n", + ar->TrxId.byTrxId); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:50:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:50:36 +0000 Subject: osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 6 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:51:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:51:12 +0000 Subject: osmo-msc[master]: cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5469 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:51:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:51:17 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA is used ...................................................................... cosmetic prep: tell vlr_ops.set_ciph_mode() whether UMTS AKA is used In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. To decide (in an upcoming patch) whether to use UMTS AKA derived Kc or the Kc from the auth vector, the set_ciph_mode() from vlr_ops needs to know whether UMTS AKA is being used. This could possibly derived from the msc_conn_ref, but all flags are already available in the vlr_lu_fsm and vlr_access_req_fsm. Hence add a umts_aka flag to the set_ciph_mode() callback invocation. The VLR FSMs thus decide whether UMTS AKA or GSM AKA is to be used during Ciphering Mode Command, which makes more sense than re-implementing the same decision process in the MSC. I considered placing the Kc derivation in vlr_set_ciph_mode() and only tell the MSC's set_ciph_mode() implementation the precise keys it should use, but the RAN particulars, and whether a Kc is used at all, rather belong with the MSC. Related: OS#2745 Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M tests/msc_vlr/msc_vlr_tests.c 6 files changed, 14 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index df7d354..b625608 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -207,7 +207,7 @@ int (*tx_cm_serv_rej)(void *msc_conn_ref, enum vlr_proc_arq_result result); int (*set_ciph_mode)(void *msc_conn_ref, enum vlr_ciph ciph_mode, - bool retrieve_imeisv); + bool umts_aka, bool retrieve_imeisv); /* UTRAN: send Common Id (when auth+ciph are complete) */ int (*tx_common_id)(void *msc_conn_ref); @@ -433,6 +433,7 @@ struct osmo_fsm_inst *fi, void *msc_conn_ref, enum vlr_ciph ciph_mode, + bool umts_aka, bool retrieve_imeisv); bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d2c56c5..472acf0 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3388,6 +3388,7 @@ /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, enum vlr_ciph ciph, + bool umts_aka, bool retrieve_imeisv) { struct gsm_subscriber_connection *conn = msc_conn_ref; diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 55b8de0..670ff83 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1096,6 +1096,7 @@ struct osmo_fsm_inst *fi, void *msc_conn_ref, enum vlr_ciph ciph_mode, + bool umts_aka, bool retrieve_imeisv) { switch (ciph_mode) { @@ -1108,6 +1109,7 @@ ciph_mode, vlr_ciph_name(ciph_mode)); return vlr->ops.set_ciph_mode(msc_conn_ref, ciph_mode, + umts_aka, retrieve_imeisv); case VLR_CIPH_A5_2: diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index e90d8de..41e629e 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -294,6 +294,7 @@ if (vlr_set_ciph_mode(vsub->vlr, fi, par->msc_conn_ref, par->ciphering_required, + vlr_use_umts_aka(&vsub->last_tuple->vec, par->is_r99), vsub->vlr->cfg.retrieve_imeisv_ciphered)) { LOGPFSML(fi, LOGL_ERROR, "Failed to send Ciphering Mode Command\n"); diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index a3a68ed..e540e2a 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -826,8 +826,15 @@ return; } + if (!vsub->last_tuple) { + LOGPFSML(fi, LOGL_ERROR, "No auth tuple available\n"); + vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE); + return; + } + if (vlr_set_ciph_mode(vsub->vlr, fi, lfp->msc_conn_ref, lfp->ciphering_required, + vlr_use_umts_aka(&vsub->last_tuple->vec, lfp->is_r99), vsub->vlr->cfg.retrieve_imeisv_ciphered)) { LOGPFSML(fi, LOGL_ERROR, "Failed to send Ciphering Mode Command\n"); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index f0a112b..9cc61b1 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -665,7 +665,7 @@ } static int fake_vlr_tx_ciph_mode_cmd(void *msc_conn_ref, enum vlr_ciph ciph, - bool retrieve_imeisv) + bool umts_aka, bool retrieve_imeisv) { /* FIXME: we actually would like to see the message bytes checked here, * not possible while msc_vlr_set_ciph_mode() calls -- To view, visit https://gerrit.osmocom.org/5469 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I983c48347faf4ee1b405d8174b4e006c904157cf Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:51:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:51:17 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() ...................................................................... cosmetic: move translation of vlr_ciph into msc_vlr_set_ciph_mode() a_iface_tx_cipher_mode() is a bit too far away from the VLR to be handling its ciphering enums. Instead, construct the gsm0808_encrypt_info in the msc_vlr_set_ciph_mode() callback. Greatly simplify the sanity checking code: a_iface_tx_cipher_mode() no longer needs to re-verify the presence of the gsm0808_encrypt_info contents. Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e --- M include/osmocom/msc/a_iface.h M src/libmsc/a_iface.c M src/libmsc/gsm_04_08.c 3 files changed, 24 insertions(+), 29 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h index f0da248..7417298 100644 --- a/include/osmocom/msc/a_iface.h +++ b/include/osmocom/msc/a_iface.h @@ -22,6 +22,7 @@ #include #include +#include /* A struct to keep a context information about the BSCs we are associated with */ struct bsc_context { @@ -57,7 +58,7 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv); + struct gsm0808_encrypt_info *ei, int include_imeisv); /* Page a subscriber via A-interface */ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 69b4c09..cdd8d89 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -170,38 +170,18 @@ /* Send Cipher mode command via A-interface */ int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn, - int cipher, const uint8_t *key, int len, int include_imeisv) + struct gsm0808_encrypt_info *ei, int include_imeisv) { /* TODO generalize for A- and Iu interfaces, don't name after 08.08 */ struct msgb *msg_resp; - struct gsm0808_encrypt_info ei; + uint8_t crm = 0x01; OSMO_ASSERT(conn); + LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, %u ciphers (%s)", + ei->perm_algo_len, osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len)); + LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); - uint8_t crm = 0x01; - uint8_t *crm_ptr = NULL; - - LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, cipher=%d key=%s\n", - cipher, osmo_hexdump_nospc(key, len)); - - /* Setup encryption information */ - if (len > ENCRY_INFO_KEY_MAXLEN || !key) { - LOGP(DMSC, LOGL_ERROR, - "Cipher mode command message could not be generated due to invalid key! (conn_id=%i)\n", - conn->a.conn_id); - return -EINVAL; - } else { - memcpy(&ei.key, key, len); - ei.key_len = len; - } - - if (include_imeisv) - crm_ptr = &crm; - - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(cipher); - ei.perm_algo_len = 1; - - msg_resp = gsm0808_create_cipher(&ei, crm_ptr); + msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..d2c56c5 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3381,6 +3381,10 @@ return msc_gsm48_tx_mm_serv_rej(conn, cause); } +/* For msc_vlr_set_ciph_mode() */ +osmo_static_assert(sizeof(((struct gsm0808_encrypt_info*)0)->key) >= sizeof(((struct osmo_auth_vector*)0)->kc), + gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc); + /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, enum vlr_ciph ciph, @@ -3410,8 +3414,18 @@ case RAN_GERAN_A: DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); - return a_iface_tx_cipher_mode(conn, ciph, tuple->vec.kc, 8, - retrieve_imeisv); + { + struct gsm0808_encrypt_info ei; + + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo_len = 1; + + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + ei.key_len = sizeof(tuple->vec.kc); + + return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); + } + case RAN_UTRAN_IU: #ifdef BUILD_IU DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", -- To view, visit https://gerrit.osmocom.org/5377 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id46f9a513b555d0a481f7124c9984c2b5b196b3e Gerrit-PatchSet: 6 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:51:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:51:18 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic prep: publish vlr_use_umts_aka() decision In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic prep: publish vlr_use_umts_aka() decision ...................................................................... cosmetic prep: publish vlr_use_umts_aka() decision During Set Ciphering Mode on GERAN, it is required to know whether UMTS AKA is used to decide which Kc to pick. Change static function is_umts_auth() into public vlr_use_umts_aka(), so future patches can re-use it. Prepares: If04e405426c55a81341747a9b450a69188525d5c Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041 --- M include/osmocom/msc/vlr.h M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c 3 files changed, 20 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 640d35b..df7d354 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -435,5 +435,7 @@ enum vlr_ciph ciph_mode, bool retrieve_imeisv); +bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99); + void log_set_filter_vlr_subscr(struct log_target *target, struct vlr_subscr *vlr_subscr); diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 16f365e..55b8de0 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1122,6 +1122,23 @@ } } +/* Decide whether UMTS AKA should be used. + * UTRAN networks are by definition R99 capable, and the auth vector is required to contain UMTS AKA + * tokens. This is expected to be verified by the caller. On GERAN, UMTS AKA must be used iff MS and + * GERAN are R99 capable and UMTS AKA tokens are available. + * \param[in] vec Auth tokens (received from the HLR). + * \param[in] is_r99 True when BTS and GERAN are R99 capable. + * \returns true to use UMTS AKA, false to use pre-R99 GSM AKA. + */ +bool vlr_use_umts_aka(struct osmo_auth_vector *vec, bool is_r99) +{ + if (!is_r99) + return false; + if (!(vec->auth_types & OSMO_AUTH_TYPE_UMTS)) + return false; + return true; +} + void log_set_filter_vlr_subscr(struct log_target *target, struct vlr_subscr *vlr_subscr) { diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 1376c82..d14ae8e 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -211,16 +211,6 @@ vlr_subscr_tx_auth_fail_rep(vsub); } -static bool is_umts_auth(struct auth_fsm_priv *afp, - uint32_t auth_types) -{ - if (!afp->is_r99) - return false; - if (!(auth_types & OSMO_AUTH_TYPE_UMTS)) - return false; - return true; -} - /* Terminate the Auth FSM Instance and notify parent */ static void auth_fsm_term(struct osmo_fsm_inst *fi, enum vlr_auth_fsm_result res) { @@ -268,7 +258,7 @@ afp->auth_requested = true; vsub->last_tuple = at; vsub->vlr->ops.tx_auth_req(vsub->msc_conn_ref, at, - is_umts_auth(afp, at->vec.auth_types)); + vlr_use_umts_aka(&at->vec, afp->is_r99)); return 0; } -- To view, visit https://gerrit.osmocom.org/5468 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85d784c62ecbabdb6186a3dae4dcd554e7921041 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:51:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 09:51:37 +0000 Subject: osmo-msc[master]: fix GSM-Milenage in presence of 2G keys In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5470 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If04e405426c55a81341747a9b450a69188525d5c Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:53:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 09:53:19 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests Message-ID: Review at https://gerrit.osmocom.org/5481 Explicitly check syntax in jenkins tests By default setup.py ignores compilation errorsand proceed with installation anyway. Make sure that it fails if any errorsis encountered bymanually call compilation step. Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Related: OS#2770 --- M contrib/jenkins.sh 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/81/5481/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..d4b30cb 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,3 +2,7 @@ python2 ./setup.py install || python ./setup.py install rm -rf ./build python3 ./setup.py install + +# check for syntax errors +python2 -m compileall osmopy +python3 -m compileall osmopy -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 09:59:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 09:59:03 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5481 to look at the new patch set (#2). Explicitly check syntax in jenkins tests By default setup.py ignores compilation errorsand proceed with installation anyway. Make sure that it fails if any errorsis encountered bymanually call compilation step. Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Related: OS#2770 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/81/5481/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e51dd1..a60438e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,9 +5,11 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install python2 tests/test_py2.py +python2 -m compileall osmopy rm -rf ./build python3 ./setup.py install python3 tests/test_py3.py +python3 -m compileall osmopy # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 11:19:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 11:19:40 +0000 Subject: python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 11:20:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 11:20:31 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 11:20:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 11:20:47 +0000 Subject: python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:09:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:09:48 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Expand CI tests In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Expand CI tests ...................................................................... Expand CI tests * make sure jenkins.sh fails on any errors similar to other jenkins jobs * always explicitly use python2 instead of generic python * add basic module import tests for python 2 and 3 * add comments Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb --- M contrib/jenkins.sh A tests/test_py2.py A tests/test_py3.py 3 files changed, 24 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 802ba2d..4e51dd1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,13 @@ #!/bin/sh -python2 ./setup.py install || python ./setup.py install + +set -ex + +# FIXME: remove once python 2 support is deprecated +python2 ./setup.py install +python2 tests/test_py2.py + rm -rf ./build python3 ./setup.py install +python3 tests/test_py3.py + +# TODO: add more tests diff --git a/tests/test_py2.py b/tests/test_py2.py new file mode 100644 index 0000000..cac5261 --- /dev/null +++ b/tests/test_py2.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python2 + +# just import a smoke test for osmopy + +import osmopy + +print '[Python2] Smoke test PASSED.' diff --git a/tests/test_py3.py b/tests/test_py3.py new file mode 100644 index 0000000..cac2f93 --- /dev/null +++ b/tests/test_py3.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +# just import a smoke test for osmopy + +import osmopy + +print('[Python3] Smoke test PASSED.') -- To view, visit https://gerrit.osmocom.org/5277 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f4639537d227c513859d4552533ce1e41df9deb Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:13:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:13:02 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5280 to look at the new patch set (#10). Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/80/5280/10 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:13:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:13:02 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5481 to look at the new patch set (#3). Explicitly check syntax in jenkins tests By default setup.py ignores compilation errorsand proceed with installation anyway. Make sure that it fails if any errorsis encountered bymanually call compilation step. Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Related: OS#2770 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/81/5481/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e51dd1..a60438e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,9 +5,11 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install python2 tests/test_py2.py +python2 -m compileall osmopy rm -rf ./build python3 ./setup.py install python3 tests/test_py3.py +python3 -m compileall osmopy # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:13:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:13:02 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5278 to look at the new patch set (#10). Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write separate tests for python 2 and 3. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/78/5278/10 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:32:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:32:33 +0000 Subject: libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Patch Set 4: That looks like lot's of code duplication. Can we just set error string and call some generic function with it as parameter? Smth like case CTRL_TRAP: handle_incoming("TRAP",...)... -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:42:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:42:08 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5438/4/src/ctrl/control_cmd.c File src/ctrl/control_cmd.c: Line 284: static bool id_str_valid(const char *str) Are we absolutely sure that all current and future users of this function always use null-terminated strings only? Line 296: struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) We take msgb as input so we know the length of data to process. This means we can pass it to id_str_valid() explicitly instead of hoping that we won't forget to null-terminate the input to it one day. -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 12:44:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 12:44:19 +0000 Subject: libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5434 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:30:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:30:50 +0000 Subject: python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:30:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:30:53 +0000 Subject: python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:30:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:30:55 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Fix python3 compatibility In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix python3 compatibility ...................................................................... Fix python3 compatibility Use print() function with proper import. Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 --- M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmoutil.py M scripts/osmo_ctrl.py 4 files changed, 24 insertions(+), 22 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmopy/__init__.py b/osmopy/__init__.py index e3bf016..6150ea4 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.4' +__version__ = '0.0.5' __all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 1e05d77..d39d3da 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -16,6 +16,7 @@ # # VTY helper code for OpenBSC # +from __future__ import print_function import re import socket import sys, subprocess @@ -31,12 +32,12 @@ debug_tcp_sockets = (os.getenv('OSMOPY_DEBUG_TCP_SOCKETS', '0') != '0') def cmd(what): - print '\n> %s' % what + print('\n> %s' % what) sys.stdout.flush() subprocess.call(what, shell=True) sys.stdout.flush() sys.stderr.flush() - print '' + print('') sys.stdout.flush() def print_used_tcp_sockets(): @@ -86,16 +87,16 @@ raise # possibly the binary hasn't launched yet if debug_tcp_sockets: - print "Connecting socket failed, retrying..." + print("Connecting socket failed, retrying...") time.sleep(.1) continue break if debug_tcp_sockets: VTYInteract.all_sockets.append(self.socket) - print "Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( + print("Socket: in %d tries, connected to %s:%d %r (%d sockets open)" % ( took, self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.recv(4096) def _close_socket(self): @@ -108,9 +109,9 @@ VTYInteract.all_sockets.remove(self.socket) except ValueError: pass - print "Socket: closing %s:%d %r (%d sockets open)" % ( + print("Socket: closing %s:%d %r (%d sockets open)" % ( self.host, self.port, self.socket, - len(VTYInteract.all_sockets)) + len(VTYInteract.all_sockets))) self.socket.close() self.socket = None @@ -248,7 +249,7 @@ if loud: if res != results: - print "Rec: %s\nExp: %s" % (res, results) + print("Rec: %s\nExp: %s" % (res, results)) return res == results diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py index 8f0369b..54a3456 100755 --- a/osmopy/osmoutil.py +++ b/osmopy/osmoutil.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import print_function import subprocess import os import sys @@ -30,10 +31,10 @@ global devnull if devnull is None: if verbose: - print "Opening /dev/null" + print("Opening /dev/null") devnull = open(os.devnull, 'w') if verbose: - print "Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd])) + print("Launching: PWD=%s %s" % (os.getcwd(), ' '.join([repr(c) for c in cmd]))) return subprocess.Popen(cmd, stdout=devnull, stderr=devnull) @@ -65,9 +66,9 @@ if proc.poll() is None: # termination seems to be slower than that, let's just kill proc.kill() - print "Killed child process" + print("Killed child process") elif waited_time > .002: - print "Terminating took %.3fs" % waited_time + print("Terminating took %.3fs" % waited_time) proc.wait() @@ -80,9 +81,9 @@ return importlib.import_module(confname) except ImportError as e: if p_set: - print >> sys.stderr, "osmoappdesc not found in %s" % dirname + print("osmoappdesc not found in %s" % dirname, file=sys.stderr) else: - print >> sys.stderr, "set osmoappdesc location with -p " + print("set osmoappdesc location with -p ", file=sys.stderr) sys.exit(1) diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 2b8c4be..bec6d1d 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ - +from __future__ import print_function from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket @@ -30,7 +30,7 @@ def connect(host, port): if verbose: - print "Connecting to host %s:%i" % (host, port) + print("Connecting to host %s:%i" % (host, port)) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) @@ -57,13 +57,13 @@ """ try: data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): + except socket.error as _: return False if len(data) != 0: tail = data while True: (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) + print("Got message:", Ctrl().rem_header(head)) if len(tail) == 0: break return True @@ -103,18 +103,18 @@ if len(args) < 2: parser.error("Set requires var and value arguments") _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) + print("Got message:", set_var(sock, args[0], ' '.join(args[1:]))) if options.cmd_get: if len(args) != 1: parser.error("Get requires the var argument") _leftovers(sock, socket.MSG_DONTWAIT) (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a + print("Got message:", a) if options.monitor: while True: if not _leftovers(sock, 0): - print "Connection is gone." + print("Connection is gone.") break sock.close() -- To view, visit https://gerrit.osmocom.org/5280 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60 Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:30:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:30:56 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Move scripts to appropriate directory In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Move scripts to appropriate directory ...................................................................... Move scripts to appropriate directory Having the scripts in the same directory with library code means that it'll be installed unconditionally regardless of version check in setup.py which makes it impossible to write separate tests for python 2 and 3. Fix this by moving the scripts into separate directory and adjusting init and setup files accordingly. This is necessary for implementing proper CI tests in follow-up patches. Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db --- M osmopy/__init__.py R scripts/osmo_ctrl.py R scripts/osmo_interact_common.py R scripts/osmo_interact_ctrl.py R scripts/osmo_interact_vty.py R scripts/osmo_verify_transcript_ctrl.py R scripts/osmo_verify_transcript_vty.py R scripts/osmodumpdoc.py R scripts/osmotestconfig.py R scripts/osmotestvty.py R scripts/soap.py R scripts/twisted_ipa.py M setup.py 13 files changed, 10 insertions(+), 22 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 3fd197f..e3bf016 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,14 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.3' +__version__ = '0.0.4' -__all__ = ['obscvty', 'osmodumpdoc', 'osmotestconfig', 'osmotestvty', - 'osmoutil', - 'osmo_ipa', - 'osmo_ctrl', - 'soap', - 'twisted_ipa', - 'osmo_interact_common', - 'osmo_interact_vty', - 'osmo_interact_ctrl', - 'osmo_verify_transcript_vty', - 'osmo_verify_transcript_ctrl'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] diff --git a/osmopy/osmo_ctrl.py b/scripts/osmo_ctrl.py similarity index 100% rename from osmopy/osmo_ctrl.py rename to scripts/osmo_ctrl.py diff --git a/osmopy/osmo_interact_common.py b/scripts/osmo_interact_common.py similarity index 100% rename from osmopy/osmo_interact_common.py rename to scripts/osmo_interact_common.py diff --git a/osmopy/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py similarity index 100% rename from osmopy/osmo_interact_ctrl.py rename to scripts/osmo_interact_ctrl.py diff --git a/osmopy/osmo_interact_vty.py b/scripts/osmo_interact_vty.py similarity index 100% rename from osmopy/osmo_interact_vty.py rename to scripts/osmo_interact_vty.py diff --git a/osmopy/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py similarity index 100% rename from osmopy/osmo_verify_transcript_ctrl.py rename to scripts/osmo_verify_transcript_ctrl.py diff --git a/osmopy/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py similarity index 100% rename from osmopy/osmo_verify_transcript_vty.py rename to scripts/osmo_verify_transcript_vty.py diff --git a/osmopy/osmodumpdoc.py b/scripts/osmodumpdoc.py similarity index 100% rename from osmopy/osmodumpdoc.py rename to scripts/osmodumpdoc.py diff --git a/osmopy/osmotestconfig.py b/scripts/osmotestconfig.py similarity index 100% rename from osmopy/osmotestconfig.py rename to scripts/osmotestconfig.py diff --git a/osmopy/osmotestvty.py b/scripts/osmotestvty.py similarity index 100% rename from osmopy/osmotestvty.py rename to scripts/osmotestvty.py diff --git a/osmopy/soap.py b/scripts/soap.py similarity index 100% rename from osmopy/soap.py rename to scripts/soap.py diff --git a/osmopy/twisted_ipa.py b/scripts/twisted_ipa.py similarity index 100% rename from osmopy/twisted_ipa.py rename to scripts/twisted_ipa.py diff --git a/setup.py b/setup.py index 993c2b3..533272e 100755 --- a/setup.py +++ b/setup.py @@ -20,17 +20,15 @@ import sys if sys.version_info.major == 2: - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py"] + scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", + "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["osmopy/osmo_interact_vty.py", - "osmopy/osmo_interact_ctrl.py", - "osmopy/soap.py", - "osmopy/osmo_ctrl.py", - "osmopy/osmo_ipa.py", - "osmopy/twisted_ipa.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"] + scripts = ["scripts/osmo_interact_vty.py", + "scripts/osmo_interact_ctrl.py", + "scripts/soap.py", + "scripts/twisted_ipa.py", + "scripts/osmo_verify_transcript_vty.py", + "scripts/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', -- To view, visit https://gerrit.osmocom.org/5278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30cdf0f85b2a60a235960911c9827f4129da40db Gerrit-PatchSet: 10 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:32:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:32:19 +0000 Subject: python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:32:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 13:32:21 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Explicitly check syntax in jenkins tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Explicitly check syntax in jenkins tests ...................................................................... Explicitly check syntax in jenkins tests By default setup.py ignores compilation errorsand proceed with installation anyway. Make sure that it fails if any errorsis encountered bymanually call compilation step. Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Related: OS#2770 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 4e51dd1..a60438e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,9 +5,11 @@ # FIXME: remove once python 2 support is deprecated python2 ./setup.py install python2 tests/test_py2.py +python2 -m compileall osmopy rm -rf ./build python3 ./setup.py install python3 tests/test_py3.py +python3 -m compileall osmopy # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5481 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2235e3fff21b7c09d3fba00ecdccca7f4515e071 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:54:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 13:54:19 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Fix ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#4). Fix ctrl command parsing for python3 In python3 we got bytes, not string from the socket so we have to decode it properly before using split(). Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M osmopy/osmo_ipa.py M scripts/twisted_ipa.py 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/4 diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..b5d11fc 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,12 +231,13 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data, op=None): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ + data = self.rem_header(raw_data).decode('utf-8') (s, i, v) = data.split(' ', 2) if s == self.CTRL_ERR: return None, v diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..5bc6740 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:54:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 13:54:19 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#5). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README A scripts/osmo_rate_ctr2csv.py M setup.py 3 files changed, 88 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/5 diff --git a/README b/README index 25be782..5b02bfa 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. diff --git a/scripts/osmo_rate_ctr2csv.py b/scripts/osmo_rate_ctr2csv.py new file mode 100644 index 0000000..3741212 --- /dev/null +++ b/scripts/osmo_rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index 533272e..dd1ac4f 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ elif sys.version_info.major == 3: scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", + "scripts/osmo_rate_ctr2csv.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 13:55:32 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 13:55:32 +0000 Subject: python/osmo-python-tests[master]: Fix ctrl command parsing for python3 In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 This should be merged alongside with appropriate test showing the error fixed. -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 14:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 14:08:11 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins Message-ID: Review at https://gerrit.osmocom.org/5482 Add scripts to compilation tests in jenkins Related: OS#2684 Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 --- M contrib/jenkins.sh 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/82/5482/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a60438e..33454ac 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -6,10 +6,27 @@ python2 ./setup.py install python2 tests/test_py2.py python2 -m compileall osmopy +python2 -m compileall scripts/osmo_ctrl.py +python2 -m compileall scripts/osmodumpdoc.py +python2 -m compileall scripts/osmotestvty.py +python2 -m compileall scripts/osmotestconfig.py +python2 -m compileall scripts/ +python2 -m compileall scripts/ +python2 -m compileall scripts/ +python2 -m compileall scripts/ +python2 -m compileall scripts/ rm -rf ./build python3 ./setup.py install python3 tests/test_py3.py python3 -m compileall osmopy +python3 -m compileall scripts/osmo_ctrl.py +python3 -m compileall scripts/osmo_interact_common.py +python3 -m compileall scripts/osmo_interact_ctrl.py +python3 -m compileall scripts/osmo_interact_vty.py +python3 -m compileall scripts/osmo_verify_transcript_ctrl.py +python3 -m compileall scripts/osmo_verify_transcript_vty.py +python3 -m compileall scripts/soap.py +python3 -m compileall scripts/twisted_ipa.py # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 14:08:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 14:08:11 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Ignore compilation byproducts Message-ID: Review at https://gerrit.osmocom.org/5483 Ignore compilation byproducts Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/83/5483/1 diff --git a/.gitignore b/.gitignore index 766f495..22a4bec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ osmopython.egg-info/ +*.pyc -- To view, visit https://gerrit.osmocom.org/5483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 14:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 14:11:16 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5482 to look at the new patch set (#2). Add scripts to compilation tests in jenkins Related: OS#2684 Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 --- M contrib/jenkins.sh 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/82/5482/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a60438e..91dccad 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -6,10 +6,22 @@ python2 ./setup.py install python2 tests/test_py2.py python2 -m compileall osmopy +python2 -m compileall scripts/osmo_ctrl.py +python2 -m compileall scripts/osmodumpdoc.py +python2 -m compileall scripts/osmotestvty.py +python2 -m compileall scripts/osmotestconfig.py rm -rf ./build python3 ./setup.py install python3 tests/test_py3.py python3 -m compileall osmopy +python3 -m compileall scripts/osmo_ctrl.py +python3 -m compileall scripts/osmo_interact_common.py +python3 -m compileall scripts/osmo_interact_ctrl.py +python3 -m compileall scripts/osmo_interact_vty.py +python3 -m compileall scripts/osmo_verify_transcript_ctrl.py +python3 -m compileall scripts/osmo_verify_transcript_vty.py +python3 -m compileall scripts/soap.py +python3 -m compileall scripts/twisted_ipa.py # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 14:27:37 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 14:27:37 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5038 to look at the new patch set (#3). Improve python3 compatibility Use proper print() function to make scripts compatible with both python 2 and 3. Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M contrib/jenkins.sh M scripts/osmodumpdoc.py M scripts/osmotestconfig.py M scripts/osmotestvty.py M setup.py 5 files changed, 33 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 91dccad..39e502c 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,6 +16,9 @@ python3 tests/test_py3.py python3 -m compileall osmopy python3 -m compileall scripts/osmo_ctrl.py +python3 -m compileall scripts/osmodumpdoc.py +python3 -m compileall scripts/osmotestvty.py +python3 -m compileall scripts/osmotestconfig.py python3 -m compileall scripts/osmo_interact_common.py python3 -m compileall scripts/osmo_interact_ctrl.py python3 -m compileall scripts/osmo_interact_vty.py diff --git a/scripts/osmodumpdoc.py b/scripts/osmodumpdoc.py index 2464b05..d71edc8 100644 --- a/scripts/osmodumpdoc.py +++ b/scripts/osmodumpdoc.py @@ -4,7 +4,7 @@ # Fixes may need to be applied to both. """Start the process and dump the documentation to the doc dir.""" - +from __future__ import print_function import subprocess import time import os @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py index 2132c43..f227504 100644 --- a/scripts/osmotestconfig.py +++ b/scripts/osmotestconfig.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import os.path import time @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/scripts/osmotestvty.py b/scripts/osmotestvty.py index e513c05..55017a5 100644 --- a/scripts/osmotestvty.py +++ b/scripts/osmotestvty.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import time import unittest @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/setup.py b/setup.py index 533272e..455650a 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,10 @@ scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["scripts/osmo_interact_vty.py", + scripts = ["scripts/osmodumpdoc.py", + "scripts/osmotestconfig.py", + "scripts/osmotestvty.py", + "scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/soap.py", "scripts/twisted_ipa.py", -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 14:38:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 14:38:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5061 to look at the new patch set (#2). Use python3 for osmo_ctrl.py It's a standalone script illustrating the use of ctrl protocol from python. Since it's not used as a library and nothing depends on it, we can safely switch to python3. Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 --- M contrib/jenkins.sh M scripts/osmo_ctrl.py M setup.py 3 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/61/5061/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 39e502c..e04d7e8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -6,7 +6,6 @@ python2 ./setup.py install python2 tests/test_py2.py python2 -m compileall osmopy -python2 -m compileall scripts/osmo_ctrl.py python2 -m compileall scripts/osmodumpdoc.py python2 -m compileall scripts/osmotestvty.py python2 -m compileall scripts/osmotestconfig.py @@ -27,4 +26,7 @@ python3 -m compileall scripts/soap.py python3 -m compileall scripts/twisted_ipa.py +cd scripts +./osmo_ctrl.py --help + # TODO: add more tests diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index bec6d1d..8c0608f 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * Copyright (C) 2016-2017 sysmocom s.f.m.c. GmbH * * All Rights Reserved * @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ -from __future__ import print_function + from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket diff --git a/setup.py b/setup.py index 455650a..bbb4b93 100755 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "scripts/osmotestvty.py", "scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", + "scripts/osmo_ctrl.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 15:13:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 15:13:18 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5463/1/include/osmocom/msc/gsm_data.h File include/osmocom/msc/gsm_data.h: Line 347: #define MSC_PAGING_TIMEOUT_DEFAULT 60 when looking at https://osmocom.org/issues/2756 "T3113 default of 60s seems way too large" it appears that this should also be 10 instead? -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 15:44:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 15:44:57 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5038/3/scripts/osmodumpdoc.py File scripts/osmodumpdoc.py: Line 51: print("Skipping app %s" % appname, file=sys.stderr) With the "from future" import, does this now work in py2? I am still asking myself why you want to make the py2 scripts py3 compatible in the first place, and would welcome if you could answer this question I've raised a couple times now. We already have a py3 version of osmodumpdoc as osmo_interact_vty.py --gen-xml-ref [...] The osmodumpdoc.py script should not be installed by py3 since https://gerrit.osmocom.org/4312 -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 15:58:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 15:58:23 +0000 Subject: osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) Let me revisit this one; VTY and cleanup extensions might go in separate patch submissions... https://gerrit.osmocom.org/#/c/5381/1/src/iu_client.c File src/iu_client.c: Line 182: llist_for_each_entry(e, &rnc->lac_rac_list, entry) { > we typically introduce a helper function for the look-up. You have this in ack Line 195: llist_add(&e->entry, &rnc->lac_rac_list); > so we always keep adding RAC+LAC to the list but don't ever remove them. T my idea was that the effort to save LACs for an RNC Id is far less than placing more hNodeBs to attach to the HNBGW... but agreed, there should be *some* way to get rid of them. About re-attaching a LAC to another HNBGW, gotcha, I think I'm not handling that one properly. -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:06:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:06:20 +0000 Subject: osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/5402/2/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 381: LOGP(DL1C, LOGL_ERROR, "response with unexpected physical transceiver-id (ar->TrxId.byTrxId=%u) while lchan act\n", along the lines of harald's comment to my recent https://gerrit.osmocom.org/5374 and like the LOGPFSML: rather have one common LOGPTRX or maybe LOGPAR() macro that prints the same context prefix for every log message below. Wording: "while lchan act" might sound like "while lchan is active", but it should mean "during lchan activation", right? Or "in lchan activation complete message"? -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:08:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:08:45 +0000 Subject: osmo-pcu[master]: Remove unused includes and forward declarations In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Is there a tool that told you these are unused? I'd be interested... -- To view, visit https://gerrit.osmocom.org/5403 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:12:03 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:12:03 +0000 Subject: libosmocore[master]: libosmocodec: add FR/HR/EFR frame length definitions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 * Would there be a naming conflict when this is merged to libosmocore? * are there patches that move osmo-bts and osmocombb to these definitions, which we could hint to from the commit log? (I think we want to add OSMO_ or osmo_ prefix to all new additions to libosmocore, but not so sure about GSM_, since it is already ubiquitous...) -- To view, visit https://gerrit.osmocom.org/5420 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:15:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 16:15:18 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: print proper error message if rate_ctr already exists Message-ID: Review at https://gerrit.osmocom.org/5484 rate_ctr: print proper error message if rate_ctr already exists Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8 --- M src/rate_ctr.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/5484/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index c27ac68..72c6bb1 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,8 +190,11 @@ unsigned int size; struct rate_ctr_group *group; - if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { + LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u\n", + desc->group_name_prefix, idx); return NULL; /* group already exist */ + } size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); -- To view, visit https://gerrit.osmocom.org/5484 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:18:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 16:18:52 +0000 Subject: libosmocore[master]: rate_ctr: print proper error message if rate_ctr already exists In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5484 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:18:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 16:18:58 +0000 Subject: [MERGED] libosmocore[master]: rate_ctr: print proper error message if rate_ctr already exists In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rate_ctr: print proper error message if rate_ctr already exists ...................................................................... rate_ctr: print proper error message if rate_ctr already exists Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8 --- M src/rate_ctr.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rate_ctr.c b/src/rate_ctr.c index c27ac68..72c6bb1 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -190,8 +190,11 @@ unsigned int size; struct rate_ctr_group *group; - if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) + if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { + LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u\n", + desc->group_name_prefix, idx); return NULL; /* group already exist */ + } size = sizeof(struct rate_ctr_group) + desc->num_ctr * sizeof(struct rate_ctr); -- To view, visit https://gerrit.osmocom.org/5484 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:24:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:24:39 +0000 Subject: osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword In-Reply-To: References: Message-ID: Patch Set 1: heh i did the same in https://gerrit.osmocom.org/5373 -- yours is nicer since it shows the actual warnings, but mine already got merged... -- To view, visit https://gerrit.osmocom.org/5422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:36:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:36:11 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 4: (4 comments) https://gerrit.osmocom.org/#/c/5438/4/src/ctrl/control_cmd.c File src/ctrl/control_cmd.c: Line 284: static bool id_str_valid(const char *str) > Are we absolutely sure that all current and future users of this function a yes, the strtok actually places a '\0' after each token (and overwrites the input string I think) Line 296: struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) > We take msgb as input so we know the length of data to process. This means the msgb length is the entire command's length, the id string is only the second token, separated out by strtok. And furthermore, the start of this function actually adds a '\0' to the end of the msgb to be sure that the string is nul terminated... Remaining issue could be that the msgb already contains a '\0' halfway thru and there might be more data following which would be ignored -- not related to this patch. Line 331: tmp = strtok_r(NULL, " ", &saveptr); here the id string gets separated and terminated Line 341: if (!id_str_valid(tmp)) { all i do here is validate the resulting string which is guaranteed to be terminated -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:42:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:42:18 +0000 Subject: libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Patch Set 4: > That looks like lot's of code duplication. Can we just set error > string and call some generic function with it as parameter? Smth > like > case CTRL_TRAP: handle_incoming("TRAP",...)... yes, you're right. I thought about the same but in the end didn't get around to it... trying to find a reason why I didn't want to do that, but there doesn't seem to be any besides laziness on my side -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:48:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 16:48:42 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 3: > osmo_interact_vty.py --gen-xml-ref That's cool, didn't know about it. Is there example use somewhere in osmo*? Also, is there equivalent counterpart for osmotestvty.py? -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:52:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:52:55 +0000 Subject: [PATCH] libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5439 to look at the new patch set (#5). ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP So far, error reporting just says "Trap/Reply", more accurately report 'GET REPLY', 'SET REPLY' and 'TRAP' as appropriate. Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 --- M src/ctrl/control_cmd.c 1 file changed, 28 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/5439/5 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f32a200..c747e84 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -410,31 +410,34 @@ LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, osmo_escape_str(cmd->value, -1)); break; - case CTRL_TYPE_GET_REPLY: - case CTRL_TYPE_SET_REPLY: - case CTRL_TYPE_TRAP: - var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, "", &saveptr); - if (!var || !val) { - cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); - goto err; - } - if (!osmo_separated_identifiers_valid(var, ".")) { - cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply variable contains invalid characters"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", - osmo_escape_str(var, -1)); - goto err; - } - cmd->variable = talloc_strdup(cmd, var); - cmd->reply = talloc_strdup(cmd, val); - if (!cmd->variable || !cmd->reply) - goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, - osmo_escape_str(cmd->reply, -1)); - break; +#define REPLY_CASE(TYPE, NAME) \ + case TYPE: \ + var = strtok_r(NULL, " ", &saveptr); \ + val = strtok_r(NULL, "", &saveptr); \ + if (!var) { \ + cmd->type = CTRL_TYPE_ERROR; \ + cmd->reply = NAME " incomplete"; \ + LOGP(DLCTRL, LOGL_NOTICE, NAME " incomplete\n"); \ + goto err; \ + } \ + if (!osmo_separated_identifiers_valid(var, ".")) { \ + cmd->type = CTRL_TYPE_ERROR; \ + cmd->reply = NAME " variable contains invalid characters"; \ + LOGP(DLCTRL, LOGL_NOTICE, NAME " variable contains invalid characters: \"%s\"\n", \ + osmo_escape_str(var, -1)); \ + goto err; \ + } \ + cmd->variable = talloc_strdup(cmd, var); \ + cmd->reply = talloc_strdup(cmd, val); \ + if (!cmd->variable || !cmd->reply) \ + goto oom; \ + LOGP(DLCTRL, LOGL_DEBUG, "Command: " NAME " %s: %s\n", cmd->variable, \ + osmo_escape_str(cmd->reply, -1)); \ + break + REPLY_CASE(CTRL_TYPE_GET_REPLY, "GET REPLY"); + REPLY_CASE(CTRL_TYPE_SET_REPLY, "SET REPLY"); + REPLY_CASE(CTRL_TYPE_TRAP, "TRAP"); +#undef REPLY_CASE case CTRL_TYPE_ERROR: var = strtok_r(NULL, "", &saveptr); if (!var) { -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 16:55:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 16:55:43 +0000 Subject: osmo-msc[master]: fix GSM-Milenage in presence of 2G keys In-Reply-To: References: Message-ID: Patch Set 4: this still needs https://gerrit.osmocom.org/5466 to compile -- To view, visit https://gerrit.osmocom.org/5470 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If04e405426c55a81341747a9b450a69188525d5c Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 17:05:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 17:05:25 +0000 Subject: [PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5463 to look at the new patch set (#2). fix paging: add timeout to discard unsuccessful paging Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/vlr.h M src/libcommon-cs/common_cs.c M src/libmsc/gsm_subscriber.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 7 files changed, 298 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/5463/2 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 6349fe0..1540524 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,6 +344,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; +#define MSC_PAGING_TIMEOUT_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -408,6 +409,7 @@ unsigned int num_bts; struct llist_head bts_list; + unsigned int paging_timeout; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b625608..76bb36c 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -157,6 +157,7 @@ struct { /* pending requests */ bool is_paging; + struct osmo_timer_list paging_timeout; /* list of struct subscr_request */ struct llist_head requests; uint8_t lac; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index bad8262..ef30aba 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -60,6 +60,8 @@ /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; + net->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index a013e0e..b534b3f 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -76,7 +76,10 @@ return -EINVAL; } - if (event == GSM_PAGING_SUCCEEDED) + osmo_timer_del(&vsub->cs.paging_timeout); + + if (event == GSM_PAGING_SUCCEEDED + || event == GSM_PAGING_EXPIRED) msc_stop_paging(vsub); /* Inform parts of the system we don't know */ @@ -126,6 +129,12 @@ return -EINVAL; } +static void paging_timeout_cb(void *data) +{ + struct vlr_subscr *vsub = data; + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); +} + /*! \brief Start a paging request for vsub, call cbfn(param) when done. * \param vsub subscriber to page. * \param cbfn function to call when the conn is established. @@ -138,6 +147,7 @@ { int rc; struct subscr_request *request; + struct gsm_network *net = vsub->vlr->user_ctx; /* Start paging.. we know it is async so we can do it before */ if (!vsub->cs.is_paging) { @@ -152,6 +162,8 @@ /* reduced on the first paging callback */ vlr_subscr_get(vsub); vsub->cs.is_paging = true; + osmo_timer_setup(&vsub->cs.paging_timeout, paging_timeout_cb, vsub); + osmo_timer_schedule(&vsub->cs.paging_timeout, net->paging_timeout, 0); } else { LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n", vlr_subscr_name(vsub)); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 14ad19e..a4d4a39 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -109,6 +109,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_paging_timeout, cfg_msc_paging_timeout_cmd, + "paging timeout (default|<1-65535>)", + "Configure Paging\n" + "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards" + " BSS or RNC\n" + "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_TIMEOUT_DEFAULT) " seconds)\n" + "Set paging timeout in seconds\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (!strcmp(argv[0], "default")) + gsmnet->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + else + gsmnet->paging_timeout = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -129,6 +145,9 @@ if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error) vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); + + if (gsmnet->paging_timeout != MSC_PAGING_TIMEOUT_DEFAULT) + vty_out(vty, " paging timeout %u%s", gsmnet->paging_timeout, VTY_NEWLINE); mgcp_client_config_write(vty, " "); #ifdef BUILD_IU @@ -186,6 +205,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); + install_element(MSC_NODE, &cfg_msc_paging_timeout_cmd); mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); #ifdef BUILD_IU diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index d8a3a31..be11456 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,8 +182,101 @@ comment_end(); } +void test_ms_timeout_paging() +{ + struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; + + rx_from_ran = RAN_GERAN_A; + + comment_start(); + + fake_time_start(); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0"); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1", + "12010809710000004026f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0", NULL); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + EXPECT_CONN_COUNT(0); + + BTW("an SMS is sent, MS is paged"); + paging_expect_imsi(imsi); + paging_sent = false; + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("time passes and no paging result is received"); + + fake_time_passes(MSC_PAGING_TIMEOUT_DEFAULT - 1, 0); + + btw("the paging timeout has not yet expired"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == true, "%d"); + btw("another request is added to the list but does not cause another paging"); + paging_sent = false; + paging_expect_imsi(NULL); + send_sms(vsub, vsub, + "One paging ought to be enough for anyone."); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 2, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == false, "%d"); + + btw("the paging timeout expires, the paging as well as the requests are canceled"); + fake_time_passes(2, 0); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + + BTW("subscriber detaches"); + expect_bssap_clear(); + ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(!vsub); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_ms_timeout_lu_auth_resp, test_ms_timeout_cm_auth_resp, + test_ms_timeout_paging, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 50f60fd..c8b7e96 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -337,6 +337,173 @@ full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 +===== test_ms_timeout_paging +- Total time passed: 0.000000 s +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH +DMM LU/new-LAC: 1/23 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0 +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000004620: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 +DVLR GSUP rx 17: 10010809710000004026f00804036470f1 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR GSUP tx: 12010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 +DVLR GSUP rx 11: 06010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:46071, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:46071: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:46071: Freeing subscriber connection +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +--- +- an SMS is sent, MS is paged +DREF VLR subscr MSISDN:46071 usage increases to: 2 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- time passes and no paging result is received +- Total time passed: 9.000000 s +- the paging timeout has not yet expired + paging_stopped == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + vsub->cs.is_paging == 1 +- another request is added to the list but does not cause another paging +DREF VLR subscr MSISDN:46071 usage increases to: 5 +DMM Subscriber MSISDN:46071 already paged. + llist_count(&vsub->cs.requests) == 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 4 + paging_sent == 0 +- the paging timeout expires, the paging as well as the requests are canceled +- Total time passed: 11.000000 s +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 + paging_stopped == 1 +DREF VLR subscr MSISDN:46071 usage increases to: 2 + vsub->cs.is_paging == 0 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +--- +- subscriber detaches + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) +DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DMM IMSI DETACH for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 +DMM msc_subscr_conn_close(vsub=unknown, cause=0): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF unknown: MSC conn use - compl_l3 == 0 (0x0) +DRLL Freeing subscriber connection with NULL subscriber + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +===== test_ms_timeout_paging: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 17:06:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 17:06:44 +0000 Subject: [PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5463 to look at the new patch set (#3). fix paging: add timeout to discard unsuccessful paging Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/vlr.h M src/libcommon-cs/common_cs.c M src/libmsc/gsm_subscriber.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 7 files changed, 298 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/5463/3 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 6349fe0..1540524 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,6 +344,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; +#define MSC_PAGING_TIMEOUT_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -408,6 +409,7 @@ unsigned int num_bts; struct llist_head bts_list; + unsigned int paging_timeout; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b625608..76bb36c 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -157,6 +157,7 @@ struct { /* pending requests */ bool is_paging; + struct osmo_timer_list paging_timeout; /* list of struct subscr_request */ struct llist_head requests; uint8_t lac; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index bad8262..ef30aba 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -60,6 +60,8 @@ /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; + net->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index a013e0e..b534b3f 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -76,7 +76,10 @@ return -EINVAL; } - if (event == GSM_PAGING_SUCCEEDED) + osmo_timer_del(&vsub->cs.paging_timeout); + + if (event == GSM_PAGING_SUCCEEDED + || event == GSM_PAGING_EXPIRED) msc_stop_paging(vsub); /* Inform parts of the system we don't know */ @@ -126,6 +129,12 @@ return -EINVAL; } +static void paging_timeout_cb(void *data) +{ + struct vlr_subscr *vsub = data; + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); +} + /*! \brief Start a paging request for vsub, call cbfn(param) when done. * \param vsub subscriber to page. * \param cbfn function to call when the conn is established. @@ -138,6 +147,7 @@ { int rc; struct subscr_request *request; + struct gsm_network *net = vsub->vlr->user_ctx; /* Start paging.. we know it is async so we can do it before */ if (!vsub->cs.is_paging) { @@ -152,6 +162,8 @@ /* reduced on the first paging callback */ vlr_subscr_get(vsub); vsub->cs.is_paging = true; + osmo_timer_setup(&vsub->cs.paging_timeout, paging_timeout_cb, vsub); + osmo_timer_schedule(&vsub->cs.paging_timeout, net->paging_timeout, 0); } else { LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n", vlr_subscr_name(vsub)); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 14ad19e..a4d4a39 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -109,6 +109,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_paging_timeout, cfg_msc_paging_timeout_cmd, + "paging timeout (default|<1-65535>)", + "Configure Paging\n" + "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards" + " BSS or RNC\n" + "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_TIMEOUT_DEFAULT) " seconds)\n" + "Set paging timeout in seconds\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (!strcmp(argv[0], "default")) + gsmnet->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT; + else + gsmnet->paging_timeout = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -129,6 +145,9 @@ if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error) vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); + + if (gsmnet->paging_timeout != MSC_PAGING_TIMEOUT_DEFAULT) + vty_out(vty, " paging timeout %u%s", gsmnet->paging_timeout, VTY_NEWLINE); mgcp_client_config_write(vty, " "); #ifdef BUILD_IU @@ -186,6 +205,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); + install_element(MSC_NODE, &cfg_msc_paging_timeout_cmd); mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); #ifdef BUILD_IU diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index d8a3a31..b8efd06 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,8 +182,101 @@ comment_end(); } +void test_ms_timeout_paging() +{ + struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; + + rx_from_ran = RAN_GERAN_A; + + comment_start(); + + fake_time_start(); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0"); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1", + "12010809710000004026f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0", NULL); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + EXPECT_CONN_COUNT(0); + + BTW("an SMS is sent, MS is paged"); + paging_expect_imsi(imsi); + paging_sent = false; + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("time passes and no paging result is received"); + + fake_time_passes(MSC_PAGING_TIMEOUT_DEFAULT - 1, 0); + + btw("the paging timeout has not yet expired"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == true, "%d"); + btw("another request is added to the list but does not cause another paging"); + paging_sent = false; + paging_expect_imsi(NULL); + send_sms(vsub, vsub, + "One paging ought to be enough for anyone."); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 2, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == false, "%d"); + + btw("the paging timeout expires, the paging as well as the requests are canceled"); + fake_time_passes(2, 0); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + + BTW("subscriber detaches"); + expect_bssap_clear(); + ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(!vsub); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_ms_timeout_lu_auth_resp, test_ms_timeout_cm_auth_resp, + test_ms_timeout_paging, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 50f60fd..c8b7e96 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -337,6 +337,173 @@ full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 +===== test_ms_timeout_paging +- Total time passed: 0.000000 s +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH +DMM LU/new-LAC: 1/23 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0 +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000004620: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 +DVLR GSUP rx 17: 10010809710000004026f00804036470f1 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR GSUP tx: 12010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 +DVLR GSUP rx 11: 06010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:46071, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:46071: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:46071: Freeing subscriber connection +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +--- +- an SMS is sent, MS is paged +DREF VLR subscr MSISDN:46071 usage increases to: 2 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- time passes and no paging result is received +- Total time passed: 9.000000 s +- the paging timeout has not yet expired + paging_stopped == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + vsub->cs.is_paging == 1 +- another request is added to the list but does not cause another paging +DREF VLR subscr MSISDN:46071 usage increases to: 5 +DMM Subscriber MSISDN:46071 already paged. + llist_count(&vsub->cs.requests) == 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 4 + paging_sent == 0 +- the paging timeout expires, the paging as well as the requests are canceled +- Total time passed: 11.000000 s +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 + paging_stopped == 1 +DREF VLR subscr MSISDN:46071 usage increases to: 2 + vsub->cs.is_paging == 0 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +--- +- subscriber detaches + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) +DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DMM IMSI DETACH for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 +DMM msc_subscr_conn_close(vsub=unknown, cause=0): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF unknown: MSC conn use - compl_l3 == 0 (0x0) +DRLL Freeing subscriber connection with NULL subscriber + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +===== test_ms_timeout_paging: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 18:15:18 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 18 Dec 2017 18:15:18 +0000 Subject: [PATCH] meta-telephony[201705]: osmo-sgsn: no longer depend on libpcap Message-ID: Review at https://gerrit.osmocom.org/5485 osmo-sgsn: no longer depend on libpcap Since osmo-sgsn a801fba4d32825da044c3c713043e9e919a09fc6 the libcap dependency is removed. Change-Id: I284c16c1f7abd3b24525b824baca357576f16675 --- M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/85/5485/1 diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc index 25c6a25..84c4e41 100644 --- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc +++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc @@ -3,7 +3,7 @@ LICENSE = "AGPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" -DEPENDS = "c-ares libpcap libosmocore libosmo-netif osmo-ggsn" +DEPENDS = "c-ares libosmocore libosmo-netif osmo-ggsn" INC_PR="r4.${META_TELEPHONY_OSMO_INC}" -- To view, visit https://gerrit.osmocom.org/5485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I284c16c1f7abd3b24525b824baca357576f16675 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 18:28:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 18 Dec 2017 18:28:49 +0000 Subject: osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va... In-Reply-To: References: Message-ID: Patch Set 1: In case you didn't see it, I submitted related https://gerrit.osmocom.org/#/c/5424 -- To view, visit https://gerrit.osmocom.org/5472 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 18:34:25 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Mon, 18 Dec 2017 18:34:25 +0000 Subject: [ABANDON] osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword In-Reply-To: References: Message-ID: Pau Espin Pedrol has abandoned this change. Change subject: libmsc: a_iface: Remove duplicated 'const' keyword ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5422 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Mon Dec 18 20:07:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:07:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a38200e311e2_fd1472f5c23018b2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 175s] -show_rbb: RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR [ 175s] -show_rbb: IIRRIIIR [ 175s] -assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b [ 175s] -assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b [ 175s] +backtrace() returned 7 addresses [ 175s] +/usr/lib/i386-linux-gnu/libosmocore.so.9(osmo_generate_backtrace+0x11) [0xf76b85b1] [ 175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0xb37b) [0x5663137b] [ 175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0xa0ba) [0x566300ba] [ 175s] +/usr/src/packages/BUILD/tests/types/TypesTest(main+0xdb) [0x5662e93b] [ 175s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xf73c9723] [ 175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x9289) [0x5662f289] [ 175s] ./testsuite.at:44: exit code was 134, expected 0 [ 175s] 6. testsuite.at:40: 6. types (testsuite.at:40): FAILED (testsuite.at:44) [ 175s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 175s] make[1]: *** [override_dh_auto_test] Error 1 [ 175s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 175s] debian/rules:12: recipe for target 'build' failed [ 175s] make: *** [build] Error 2 [ 175s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 175s] [ 175s] lamb14 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:07:19 UTC 2017. [ 175s] [ 175s] ### VM INTERACTION START ### [ 175s] Powering off. [ 175s] [ 168.106983] reboot: Power down [ 175s] ### VM INTERACTION END ### [ 175s] [ 175s] lamb14 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:07:20 UTC 2017. [ 175s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:08:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:08:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a382048bbb84_fd1472f5c23020bb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 215s] | #define HAVE_SYS_STAT_H 1 [ 215s] | #define HAVE_STDLIB_H 1 [ 215s] | #define HAVE_STRING_H 1 [ 215s] | #define HAVE_MEMORY_H 1 [ 215s] | #define HAVE_STRINGS_H 1 [ 215s] | #define HAVE_INTTYPES_H 1 [ 215s] | #define HAVE_STDINT_H 1 [ 215s] | #define HAVE_UNISTD_H 1 [ 215s] | #define HAVE_DLFCN_H 1 [ 215s] | #define LT_OBJDIR ".libs/" [ 215s] | #define STDC_HEADERS 1 [ 215s] | [ 215s] | configure: exit 0 [ 215s] [ 215s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 215s] make[1]: *** [override_dh_auto_test] Error 1 [ 215s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 215s] debian/rules:12: recipe for target 'build' failed [ 215s] make: *** [build] Error 2 [ 215s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 215s] [ 215s] lamb22 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:08:04 UTC 2017. [ 215s] [ 215s] ### VM INTERACTION START ### [ 218s] [ 209.645211] reboot: Power down [ 218s] ### VM INTERACTION END ### [ 218s] [ 218s] lamb22 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:08:07 UTC 2017. [ 218s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:09:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:09:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a3820868bfee_fd1472f5c2302154@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 242s] | #define HAVE_SYS_STAT_H 1 [ 242s] | #define HAVE_STDLIB_H 1 [ 242s] | #define HAVE_STRING_H 1 [ 242s] | #define HAVE_MEMORY_H 1 [ 242s] | #define HAVE_STRINGS_H 1 [ 242s] | #define HAVE_INTTYPES_H 1 [ 242s] | #define HAVE_STDINT_H 1 [ 242s] | #define HAVE_UNISTD_H 1 [ 242s] | #define HAVE_DLFCN_H 1 [ 242s] | #define LT_OBJDIR ".libs/" [ 242s] | #define STDC_HEADERS 1 [ 242s] | [ 242s] | configure: exit 0 [ 242s] [ 242s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 242s] make[1]: *** [override_dh_auto_test] Error 1 [ 242s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 242s] debian/rules:12: recipe for target 'build' failed [ 242s] make: *** [build] Error 2 [ 242s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 242s] [ 242s] cloud119 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:09:20 UTC 2017. [ 242s] [ 242s] ### VM INTERACTION START ### [ 245s] [ 228.182270] reboot: Power down [ 246s] ### VM INTERACTION END ### [ 246s] [ 246s] cloud119 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:09:25 UTC 2017. [ 246s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:10:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:10:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a3820c220ac8_fd1472f5c23026a1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 181s] | #define HAVE_SYS_STAT_H 1 [ 181s] | #define HAVE_STDLIB_H 1 [ 181s] | #define HAVE_STRING_H 1 [ 181s] | #define HAVE_MEMORY_H 1 [ 181s] | #define HAVE_STRINGS_H 1 [ 181s] | #define HAVE_INTTYPES_H 1 [ 181s] | #define HAVE_STDINT_H 1 [ 181s] | #define HAVE_UNISTD_H 1 [ 181s] | #define HAVE_DLFCN_H 1 [ 181s] | #define LT_OBJDIR ".libs/" [ 181s] | #define STDC_HEADERS 1 [ 181s] | [ 181s] | configure: exit 0 [ 181s] [ 181s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 181s] make[1]: *** [override_dh_auto_test] Error 1 [ 181s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 181s] debian/rules:12: recipe for target 'build' failed [ 181s] make: *** [build] Error 2 [ 181s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 181s] [ 181s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:10:11 UTC 2017. [ 181s] [ 181s] ### VM INTERACTION START ### [ 184s] [ 176.133975] reboot: Power down [ 184s] ### VM INTERACTION END ### [ 184s] [ 184s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:10:15 UTC 2017. [ 184s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:10:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:10:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a3820c36e3e0_fd1472f5c2302743@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 189s] === end test_rlc_unit_encoder === [ 189s] -=== start uplink_header_type2_test === [ 189s] -=== end uplink_header_type2_test === [ 189s] -=== start uplink_header_type1_test === [ 189s] -=== end uplink_header_type1_test === [ 189s] +backtrace() returned 6 addresses [ 189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x310a9) [0x557405ef00a9] [ 189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x1f1ee) [0x557405ede1ee] [ 189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x18c1e) [0x557405ed7c1e] [ 189s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7ff666793b45] [ 189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x1b177) [0x557405eda177] [ 189s] ./testsuite.at:37: exit code was 134, expected 0 [ 189s] 5. testsuite.at:33: 5. edge (testsuite.at:33): FAILED (testsuite.at:37) [ 189s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 189s] make[1]: *** [override_dh_auto_test] Error 1 [ 189s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 189s] debian/rules:12: recipe for target 'build' failed [ 189s] make: *** [build] Error 2 [ 189s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 189s] [ 189s] lamb10 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:10:18 UTC 2017. [ 189s] [ 189s] ### VM INTERACTION START ### [ 190s] Powering off. [ 190s] [ 182.370985] reboot: Power down [ 190s] ### VM INTERACTION END ### [ 190s] [ 190s] lamb10 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:10:20 UTC 2017. [ 190s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:11:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:11:46 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a38211a5e54a_fd1472f5c2303234@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 173s] rbb: 00 00 00 00 00 00 00 31 [ 173s] rbb: 10 00 00 00 00 00 00 01 [ 173s] -show_rbb: RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR [ 173s] -show_rbb: IIRRIIIR [ 173s] -assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b [ 173s] -assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b [ 173s] +backtrace() returned 6 addresses [ 173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x181a9) [0x56204b2ca1a9] [ 173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x170b3) [0x56204b2c90b3] [ 173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x15dfd) [0x56204b2c7dfd] [ 173s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f6a0f2e03f1] [ 173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x1634a) [0x56204b2c834a] [ 173s] ./testsuite.at:44: exit code was 134, expected 0 [ 173s] 6. testsuite.at:40: 6. types (testsuite.at:40): FAILED (testsuite.at:44) [ 173s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 173s] make[1]: *** [override_dh_auto_test] Error 1 [ 173s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 173s] debian/rules:12: recipe for target 'build' failed [ 173s] make: *** [build] Error 2 [ 173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 173s] [ 173s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:11:29 UTC 2017. [ 173s] [ 173s] ### VM INTERACTION START ### [ 176s] [ 168.366079] reboot: Power down [ 176s] ### VM INTERACTION END ### [ 176s] [ 176s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:11:32 UTC 2017. [ 176s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:12:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:12:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a382156e7c5b_fd1472f5c2303642@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 197s] | #define HAVE_SYS_STAT_H 1 [ 197s] | #define HAVE_STDLIB_H 1 [ 197s] | #define HAVE_STRING_H 1 [ 197s] | #define HAVE_MEMORY_H 1 [ 197s] | #define HAVE_STRINGS_H 1 [ 197s] | #define HAVE_INTTYPES_H 1 [ 197s] | #define HAVE_STDINT_H 1 [ 197s] | #define HAVE_UNISTD_H 1 [ 197s] | #define HAVE_DLFCN_H 1 [ 197s] | #define LT_OBJDIR ".libs/" [ 197s] | #define STDC_HEADERS 1 [ 197s] | [ 197s] | configure: exit 0 [ 197s] [ 197s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 197s] make[1]: *** [override_dh_auto_test] Error 1 [ 197s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 197s] debian/rules:12: recipe for target 'build' failed [ 197s] make: *** [build] Error 2 [ 197s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 197s] [ 197s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:12:20 UTC 2017. [ 197s] [ 197s] ### VM INTERACTION START ### [ 200s] [ 192.955743] reboot: Power down [ 200s] ### VM INTERACTION END ### [ 200s] [ 200s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:12:23 UTC 2017. [ 200s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:12:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:12:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a38215693ce1_fd1472f5c2303545@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 184s] === start test_rlc_unit_encoder === [ 184s] === end test_rlc_unit_encoder === [ 184s] -=== start uplink_header_type2_test === [ 184s] -=== end uplink_header_type2_test === [ 184s] -=== start uplink_header_type1_test === [ 184s] -=== end uplink_header_type1_test === [ 184s] +backtrace() returned 6 addresses [ 184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x229cb) [0x5664c9cb] [ 184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x10b36) [0x5663ab36] [ 184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(main+0x10f2) [0x566340c2] [ 184s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xf7328637] [ 184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0xc599) [0x56636599] [ 184s] ./testsuite.at:37: exit code was 134, expected 0 [ 184s] 5. testsuite.at:33: 5. edge (testsuite.at:33): FAILED (testsuite.at:37) [ 184s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 184s] make[1]: *** [override_dh_auto_test] Error 1 [ 184s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 184s] debian/rules:12: recipe for target 'build' failed [ 184s] make: *** [build] Error 2 [ 184s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 184s] [ 184s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:12:20 UTC 2017. [ 184s] [ 184s] ### VM INTERACTION START ### [ 187s] [ 179.590314] reboot: Power down [ 187s] ### VM INTERACTION END ### [ 187s] [ 187s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:12:23 UTC 2017. [ 187s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:16:03 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:16:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a38220c6d038_fd1472f5c23046cb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 193s] - TBF[31] class 14 reserves ......C. [ 193s] - TBF[31] class 15 reserves .......C [ 193s] - Successfully allocated 160 TBFs [ 193s] -Testing DL TS allocation for Multi UEs [ 193s] -TBF1: numTs(4) [ 193s] -TBF2: numTs(3) [ 193s] +backtrace() returned 6 addresses [ 193s] +/usr/src/packages/BUILD/tests/alloc/AllocTest(+0x1a537) [0x5661e537] [ 193s] +/usr/src/packages/BUILD/tests/alloc/AllocTest(+0xb699) [0x5660f699] [ 193s] +/usr/src/packages/BUILD/tests/alloc/AllocTest(main+0xb3) [0x5660c733] [ 193s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf732e276] [ 193s] +/usr/src/packages/BUILD/tests/alloc/AllocTest(+0x91f9) [0x5660d1f9] [ 193s] ./testsuite.at:16: exit code was 134, expected 0 [ 193s] 2. testsuite.at:12: 2. ts_alloc (testsuite.at:12): FAILED (testsuite.at:16) [ 193s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 193s] make[1]: *** [override_dh_auto_test] Error 1 [ 193s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 193s] debian/rules:12: recipe for target 'build' failed [ 193s] make: *** [build] Error 2 [ 193s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 193s] [ 193s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:15:45 UTC 2017. [ 193s] [ 193s] ### VM INTERACTION START ### [ 195s] [ 187.311910] reboot: Power down [ 195s] ### VM INTERACTION END ### [ 195s] [ 195s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:15:49 UTC 2017. [ 195s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:16:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:16:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a38222679ed0_fd1472f5c230473a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 202s] | #define HAVE_SYS_STAT_H 1 [ 202s] | #define HAVE_STDLIB_H 1 [ 202s] | #define HAVE_STRING_H 1 [ 202s] | #define HAVE_MEMORY_H 1 [ 202s] | #define HAVE_STRINGS_H 1 [ 202s] | #define HAVE_INTTYPES_H 1 [ 202s] | #define HAVE_STDINT_H 1 [ 202s] | #define HAVE_UNISTD_H 1 [ 202s] | #define HAVE_DLFCN_H 1 [ 202s] | #define LT_OBJDIR ".libs/" [ 202s] | #define STDC_HEADERS 1 [ 202s] | [ 202s] | configure: exit 0 [ 202s] [ 202s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 202s] make[1]: *** [override_dh_auto_test] Error 1 [ 202s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 202s] debian/rules:12: recipe for target 'build' failed [ 202s] make: *** [build] Error 2 [ 202s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 202s] [ 202s] lamb20 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:16:01 UTC 2017. [ 202s] [ 202s] ### VM INTERACTION START ### [ 205s] [ 197.020188] reboot: Power down [ 205s] ### VM INTERACTION END ### [ 205s] [ 205s] lamb20 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:16:05 UTC 2017. [ 205s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:18:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:18:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a3822a1d9436_fd1472f5c2305424@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 190s] -packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 190s] -=== end test_packet_access_rej_epdan === [ 190s] -=== start test_packet_access_rej_prr === [ 190s] -=== end test_packet_access_rej_prr === [ 190s] -=== start test_packet_access_rej_prr_no_other_tbfs === [ 190s] -=== end test_packet_access_rej_prr_no_other_tbfs === [ 190s] +backtrace() returned 6 addresses [ 190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x38589) [0x559e94c94589] [ 190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x17c3b) [0x559e94c73c3b] [ 190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x1751f) [0x559e94c7351f] [ 190s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f98890613f1] [ 190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x17aba) [0x559e94c73aba] [ 190s] ./testsuite.at:23: exit code was 134, expected 0 [ 190s] 3. testsuite.at:19: 3. tbf (testsuite.at:19): FAILED (testsuite.at:23) [ 190s] debian/rules:28: recipe for target 'override_dh_auto_test' failed [ 190s] make[1]: *** [override_dh_auto_test] Error 1 [ 190s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 190s] debian/rules:12: recipe for target 'build' failed [ 190s] make: *** [build] Error 2 [ 190s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 190s] [ 190s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:18:11 UTC 2017. [ 190s] [ 190s] ### VM INTERACTION START ### [ 193s] [ 185.876182] reboot: Power down [ 193s] ### VM INTERACTION END ### [ 193s] [ 193s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:18:14 UTC 2017. [ 193s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:25:13 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:25:13 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a38244828d83_fd1472f5c2306943@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 162s] | #define HAVE_STDLIB_H 1 [ 162s] | #define HAVE_STRING_H 1 [ 162s] | #define HAVE_MEMORY_H 1 [ 162s] | #define HAVE_STRINGS_H 1 [ 162s] | #define HAVE_INTTYPES_H 1 [ 162s] | #define HAVE_STDINT_H 1 [ 162s] | #define HAVE_UNISTD_H 1 [ 162s] | #define HAVE_DLFCN_H 1 [ 162s] | #define LT_OBJDIR ".libs/" [ 162s] | #define STDC_HEADERS 1 [ 162s] | [ 162s] | configure: exit 0 [ 162s] [ 162s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 162s] make[1]: *** [override_dh_auto_test] Error 1 [ 162s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 162s] debian/rules:45: recipe for target 'build' failed [ 162s] make: *** [build] Error 2 [ 162s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 162s] [ 162s] cloud111 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:25:09 UTC 2017. [ 162s] [ 162s] ### VM INTERACTION START ### [ 163s] Powering off. [ 163s] [ 148.998005] reboot: Power down [ 165s] ### VM INTERACTION END ### [ 165s] [ 165s] cloud111 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:25:12 UTC 2017. [ 165s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:25:47 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:25:47 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a382464be496_fd1472f5c2307123@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 134s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 134s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 134s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 134s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 134s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 134s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 134s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 134s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 134s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 134s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 134s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 134s] -Done. [ 134s] ./testsuite.at:7: exit code was 1, expected 0 [ 134s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 134s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 134s] make[1]: *** [override_dh_auto_test] Error 1 [ 134s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 134s] debian/rules:45: recipe for target 'build' failed [ 134s] make: *** [build] Error 2 [ 134s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 134s] [ 134s] lamb04 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:25:29 UTC 2017. [ 134s] [ 134s] ### VM INTERACTION START ### [ 137s] [ 129.313387] reboot: Power down [ 137s] ### VM INTERACTION END ### [ 137s] [ 137s] lamb04 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:25:33 UTC 2017. [ 137s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:26:04 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:26:04 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a3824656e7e9_fd1472f5c230728b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 152s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 152s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 152s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 152s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 152s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 152s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -Done. [ 152s] ./testsuite.at:7: exit code was 139, expected 0 [ 152s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 152s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 152s] make[1]: *** [override_dh_auto_test] Error 1 [ 152s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 152s] debian/rules:13: recipe for target 'build' failed [ 152s] make: *** [build] Error 2 [ 152s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 152s] [ 152s] lamb63 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:25:59 UTC 2017. [ 152s] [ 152s] ### VM INTERACTION START ### [ 156s] [ 148.041613] reboot: Power down [ 156s] ### VM INTERACTION END ### [ 156s] [ 156s] lamb63 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:26:03 UTC 2017. [ 156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:27:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:27:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a3824be235e2_fd1472f5c23075a4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 173s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 173s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 173s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 173s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 173s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 173s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 173s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 173s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 173s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 173s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 173s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 173s] -Done. [ 173s] ./testsuite.at:7: exit code was 1, expected 0 [ 173s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 173s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 173s] make[1]: *** [override_dh_auto_test] Error 1 [ 173s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 173s] debian/rules:45: recipe for target 'build' failed [ 173s] make: *** [build] Error 2 [ 173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 173s] [ 173s] lamb03 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:27:12 UTC 2017. [ 173s] [ 173s] ### VM INTERACTION START ### [ 176s] [ 165.022658] reboot: Power down [ 176s] ### VM INTERACTION END ### [ 176s] [ 176s] lamb03 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:27:17 UTC 2017. [ 176s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:27:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:27:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a3824dcd3f7a_fd1472f5c23076f0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 143s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 143s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 143s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 143s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 143s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 143s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 143s] -Done. [ 143s] ./testsuite.at:7: exit code was 139, expected 0 [ 143s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 143s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 143s] make[1]: *** [override_dh_auto_test] Error 1 [ 143s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 143s] debian/rules:13: recipe for target 'build' failed [ 143s] make: *** [build] Error 2 [ 143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 143s] [ 143s] lamb01 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:27:42 UTC 2017. [ 143s] [ 143s] ### VM INTERACTION START ### [ 145s] [ 137.853865] reboot: Power down [ 145s] ### VM INTERACTION END ### [ 145s] [ 145s] lamb01 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:27:45 UTC 2017. [ 145s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:28:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:28:38 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a382515e5458_fd1472f5c23094aa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_8.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 163s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test [ 163s] stderr: [ 163s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0 [ 163s] /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source: line 25: 22865 Segmentation fault $abs_top_builddir/tests/channel/channel_test [ 163s] --- expout 2017-12-18 20:28:28.652000000 +0000 [ 163s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 2017-12-18 20:28:28.652000000 +0000 [ 163s] @@ -1,4 +0,0 @@ [ 163s] -Testing the gsm_subscriber chan logic [ 163s] -Reached, didn't crash, test passed [ 163s] -Testing subslot numbers for pchan types [ 163s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) (bts=45,trx=1,ts=3,ss=4) [ 163s] ./testsuite.at:34: exit code was 139, expected 0 [ 163s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED (testsuite.at:34) [ 163s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 163s] make[1]: *** [override_dh_auto_test] Error 1 [ 163s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 163s] debian/rules:13: recipe for target 'build' failed [ 163s] make: *** [build] Error 2 [ 163s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 163s] [ 163s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:28:30 UTC 2017. [ 163s] [ 163s] ### VM INTERACTION START ### [ 163s] Powering off. [ 163s] [ 156.485892] reboot: Power down [ 163s] ### VM INTERACTION END ### [ 163s] [ 163s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:28:32 UTC 2017. [ 163s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:28:55 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:28:55 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a38251911a8_fd1472f5c2309632@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 257s] | #define HAVE_STRINGS_H 1 [ 257s] | #define HAVE_INTTYPES_H 1 [ 257s] | #define HAVE_STDINT_H 1 [ 257s] | #define HAVE_UNISTD_H 1 [ 257s] | #define HAVE_DLFCN_H 1 [ 257s] | #define LT_OBJDIR ".libs/" [ 257s] | #define BUILD_SMPP 1 [ 257s] | #define STDC_HEADERS 1 [ 257s] | #define HAVE_DBI_DBD_H 1 [ 257s] | #define HAVE_PCAP_PCAP_H 1 [ 257s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 257s] | [ 257s] | configure: exit 0 [ 257s] [ 257s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 257s] make[1]: *** [override_dh_auto_test] Error 1 [ 257s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 257s] debian/rules:13: recipe for target 'build' failed [ 257s] make: *** [build] Error 2 [ 257s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 257s] [ 257s] lamb52 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:28:39 UTC 2017. [ 257s] [ 257s] ### VM INTERACTION START ### [ 260s] [ 241.902043] sysrq: SysRq : [ 241.929776] reboot: Power down [ 260s] ### VM INTERACTION END ### [ 260s] [ 260s] lamb52 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:28:44 UTC 2017. [ 260s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:29:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:29:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a3825349c9f5_fd1472f5c2309962@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 127s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 127s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 127s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 127s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 127s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 127s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 127s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 127s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 127s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 127s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 127s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 127s] -Done. [ 127s] ./testsuite.at:7: exit code was 1, expected 0 [ 127s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 127s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 127s] make[1]: *** [override_dh_auto_test] Error 1 [ 127s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 127s] debian/rules:45: recipe for target 'build' failed [ 127s] make: *** [build] Error 2 [ 127s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 127s] [ 127s] lamb27 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:29:14 UTC 2017. [ 127s] [ 127s] ### VM INTERACTION START ### [ 130s] [ 123.667547] reboot: Power down [ 130s] ### VM INTERACTION END ### [ 130s] [ 130s] lamb27 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:29:18 UTC 2017. [ 130s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:29:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:29:46 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a382553e36c5_fd1472f5c23100e5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 131s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 131s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 131s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 131s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 131s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 131s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 131s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 131s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 131s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 131s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 131s] -Done. [ 131s] ./testsuite.at:7: exit code was 1, expected 0 [ 131s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 131s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 131s] make[1]: *** [override_dh_auto_test] Error 1 [ 131s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 131s] debian/rules:45: recipe for target 'build' failed [ 131s] make: *** [build] Error 2 [ 131s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 131s] [ 131s] lamb59 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:29:35 UTC 2017. [ 131s] [ 131s] ### VM INTERACTION START ### [ 131s] Powering off. [ 131s] [ 123.506160] reboot: Power down [ 131s] ### VM INTERACTION END ### [ 131s] [ 131s] lamb59 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:29:37 UTC 2017. [ 131s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:30:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:30:20 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a3825712cc5a_fd1472f5c23103bf@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 282s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 282s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 282s] -Done. [ 282s] ./testsuite.at:7: exit code was 139, expected 0 [ 282s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 282s] # -*- compilation -*- [ 282s] 5. testsuite.at:31: testing channel ... [ 282s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test [ 282s] stderr: [ 282s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0 [ 282s] /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source: line 25: 20433 Segmentation fault $abs_top_builddir/tests/channel/channel_test [ 282s] --- expout 2017-12-18 20:30:12.972000000 +0000 [ 282s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 2017-12-18 20:30:12.976000000 +0000 [ 282s] @@ -1,4 +0,0 @@ [ 282s] -Testing the gsm_subscriber chan logic [ 282s] -Reached, didn't crash, test passed [ 282s] -Testing subslot numbers for pchan types [ 282s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) (bts=45,trx=1,ts=3,ss=4) [ 282s] ./testsuite.at:34: exit code was 139, expected 0 [ 284s] 5. testsuite.a[ 273.681076] reboot: Power down [ 284s] ### VM INTERACTION END ### [ 284s] [ 284s] lamb70 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:30:18 UTC 2017. [ 284s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:30:55 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:30:55 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a38258cea7d5_fd1472f5c23106e0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 211s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 211s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 211s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 211s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 211s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 211s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 211s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 211s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 211s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 211s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 211s] -Done. [ 211s] ./testsuite.at:7: exit code was 1, expected 0 [ 211s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 211s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 211s] make[1]: *** [override_dh_auto_test] Error 1 [ 211s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 211s] debian/rules:45: recipe for target 'build' failed [ 211s] make: *** [build] Error 2 [ 211s] dpkg-buildpackage: error: debian/rul[ 201.850634] serial8250: too much work for irq4 [ 211s] es build gave error exit status 2 [ 211s] [ 211s] lamb52 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:30:37 UTC 2017. [ 211s] [ 211s] ### VM INTERACTION START ### [ 213s] [ 204.300672] reboot: Power down [ 213s] ### VM INTERACTION END ### [ 213s] [ 213s] lamb52 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:30:41 UTC 2017. [ 213s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:31:12 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:31:12 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a3825ad43e08_fd1472f5c2310954@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 135s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 135s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 135s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 135s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 135s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 135s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 135s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 135s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 135s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 135s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 135s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 135s] -Done. [ 135s] ./testsuite.at:7: exit code was 1, expected 0 [ 135s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 135s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 135s] make[1]: *** [override_dh_auto_test] Error 1 [ 135s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 135s] debian/rules:45: recipe for target 'build' failed [ 135s] make: *** [build] Error 2 [ 135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 135s] [ 135s] lamb51 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:31:00 UTC 2017. [ 135s] [ 135s] ### VM INTERACTION START ### [ 138s] [ 129.373884] reboot: Power down [ 138s] ### VM INTERACTION END ### [ 138s] [ 138s] lamb51 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:31:04 UTC 2017. [ 138s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:31:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:31:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a3825af4fed9_fd1472f5c2311176@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 120s] | #define HAVE_SYS_STAT_H 1 [ 120s] | #define HAVE_STDLIB_H 1 [ 120s] | #define HAVE_STRING_H 1 [ 120s] | #define HAVE_MEMORY_H 1 [ 120s] | #define HAVE_STRINGS_H 1 [ 120s] | #define HAVE_INTTYPES_H 1 [ 120s] | #define HAVE_STDINT_H 1 [ 120s] | #define HAVE_UNISTD_H 1 [ 120s] | #define HAVE_DLFCN_H 1 [ 120s] | #define LT_OBJDIR ".libs/" [ 120s] | #define STDC_HEADERS 1 [ 120s] | [ 120s] | configure: exit 0 [ 120s] [ 120s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 120s] make[1]: *** [override_dh_auto_test] Error 1 [ 120s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 120s] debian/rules:45: recipe for target 'build' failed [ 120s] make: *** [build] Error 2 [ 120s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 120s] [ 120s] lamb60 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:31:24 UTC 2017. [ 120s] [ 120s] ### VM INTERACTION START ### [ 123s] [ 115.768935] reboot: Power down [ 123s] ### VM INTERACTION END ### [ 123s] [ 123s] lamb60 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:31:27 UTC 2017. [ 123s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:31:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:31:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a3825c97eb37_fd1472f5c231132f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 221s] | #define HAVE_STRINGS_H 1 [ 221s] | #define HAVE_INTTYPES_H 1 [ 221s] | #define HAVE_STDINT_H 1 [ 221s] | #define HAVE_UNISTD_H 1 [ 221s] | #define HAVE_DLFCN_H 1 [ 221s] | #define LT_OBJDIR ".libs/" [ 221s] | #define BUILD_SMPP 1 [ 221s] | #define STDC_HEADERS 1 [ 221s] | #define HAVE_DBI_DBD_H 1 [ 221s] | #define HAVE_PCAP_PCAP_H 1 [ 221s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 221s] | [ 221s] | configure: exit 0 [ 221s] [ 221s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 221s] make[1]: *** [override_dh_auto_test] Error 1 [ 221s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 221s] debian/rules:13: recipe for target 'build' failed [ 221s] make: *** [build] Error 2 [ 221s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 221s] [ 221s] cloud129 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:31:29 UTC 2017. [ 221s] [ 221s] ### VM INTERACTION START ### [ 224s] [ 206.814821] reboot: Power down [ 225s] ### VM INTERACTION END ### [ 225s] [ 225s] cloud129 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:31:32 UTC 2017. [ 225s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:32:55 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:32:55 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a382605356a1_fd1472f5c2311791@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 187s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 187s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 187s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 187s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 187s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 187s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 187s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 187s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 187s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 187s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 187s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 187s] -Done. [ 187s] ./testsuite.at:7: exit code was 1, expected 0 [ 187s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 187s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 187s] make[1]: *** [override_dh_auto_test] Error 1 [ 187s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 187s] debian/rules:45: recipe for target 'build' failed [ 187s] make: *** [build] Error 2 [ 187s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 187s] [ 187s] lamb57 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:32:43 UTC 2017. [ 187s] [ 187s] ### VM INTERACTION START ### [ 189s] [ 181.282132] reboot: Power down [ 189s] ### VM INTERACTION END ### [ 189s] [ 189s] lamb57 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:32:47 UTC 2017. [ 189s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:34:03 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:34:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a38264575ab6_fd1472f5c231185c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 118s] [ 110.848122] serial8250: too much work for irq4 [ 118s] [ 110.914872] serial8250: too much work for irq4 [ 118s] 6 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 118s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 118s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 118s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 118s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 118s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 118s] -Done. [ 118s] ./testsuite.at:7: exit code was 1, expected 0 [ 118s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 118s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 118s] make[1]: *** [override_dh_auto_test] Error 1 [ 118s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 118s] debian/rules:45: recipe for target 'build' failed [ 118s] make: *** [build] Error 2 [ 118s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 118s] [ 118s] lamb07 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:33:44 UTC 2017. [ 118s] [ 118s] ### VM INTERACTION START ### [ 120s] [ 113.472145] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] lamb07 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:33:48 UTC 2017. [ 120s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:34:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:34:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a382662788f3_fd1472f5c2312217@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 866s] | | #define PACKAGE_VERSION "0.4.0.20171218" [ 866s] | | #define PACKAGE_STRING "osmo-pcu 0.4.0.20171218" [ 866s] | | #define PACKAGE_BUGREPORT "osmocom-net-gprs at lists.osmocom.org" [ 866s] | | #define PACKAGE_URL "" [ 866s] | | #define PACKAGE "osmo-pcu" [ 866s] | | #define VERSION "0.4.0.20171218" [ 866s] | | #define STDC_HEADERS 1 [ 866s] | | #define HAVE_SYS_TYPES_H 1 [ 866s] | | #define HAVE_SYS_STAT_H 1 [ 866s] | | #define HAVE_STDLIB_H 1 [ 866s] | | #define HAVE_STRING_H 1 [ 866s] | | #define HAVE_MEMORY_H 1 [ 866s] | | #define HAVE_STRINGS_H 1 [ 866s] | | #define HAVE_INTTYPES_H 1 [ 866s] | | #define HAVE_STDINT_H 1 [ 866s] | | #define HAVE_UNISTD_H 1 [ 866s] | | #define HAVE_DLFCN_H 1 [ 866s] | | #define LT_OBJDIR ".libs/" [ 866s] | | /* end confdefs.h. */ [ 866s] | | #include [ 866s] | configure:12598: result: g++ -E [ 866s] | configure:12618: g++ -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.cpp [ 866s] | configure:12618: $? = 0 [ 868s] | configure:12632: g++ -E -[ 839.258607] sysrq: SysRq : Power Off [ 868s] [ 839.261916] reboot: Power down [ 869s] ### VM INTERACTION END ### [ 869s] [ 869s] obs-arm-4 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:34:35 UTC 2017. [ 869s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:36:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:36:20 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a3826d783cf9_fd1472f5c23124d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 147s] 5. testsuite.at:31: testing channel ... [ 147s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test [ 147s] stderr: [ 147s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0 [ 147s] /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source: line 25: 21601 Segmentation fault $abs_top_builddir/tests/channel/channel_test [ 147s] --- expout 2017-12-18 20:36:03.440000000 +0000 [ 147s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 2017-12-18 20:36:03.440000000 +0000 [ 147s] @@ -1,4 +0,0 @@ [ 147s] -Testing the gsm_subscriber chan logic [ 147s] -Reached, didn't crash, test passed [ 147s] -Testing subslot numbers for pchan types [ 147s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) (bts=45,trx=1,ts=3,ss=4) [ 147s] ./testsuite.at:34: exit code was 139, expected 0 [ 147s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED (testsuite.at:34) [ 147s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 147s] make[1]: *** [override_dh_auto_test] Error 1 [ 147s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 147s] debian/rules:13: recipe for target 'build' failed [ 147s] make: *** [build] Error 2 [ 147s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 147s] [ 147s] lamb27 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:36:04 UTC 2017. [ 147s] [ 147s] ### VM INTERACTION START ### [ 150s] [ 141.937139] reboot: Power down [ 150s] ### VM INTERACTION END ### [ 150s] [ 150s] lamb27 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:36:08 UTC 2017. [ 150s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:36:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:36:38 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a3826d959609_fd1472f5c23126c2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 394s] | #define HAVE_STRINGS_H 1 [ 394s] | #define HAVE_INTTYPES_H 1 [ 394s] | #define HAVE_STDINT_H 1 [ 394s] | #define HAVE_UNISTD_H 1 [ 394s] | #define HAVE_DLFCN_H 1 [ 394s] | #define LT_OBJDIR ".libs/" [ 394s] | #define BUILD_SMPP 1 [ 394s] | #define STDC_HEADERS 1 [ 394s] | #define HAVE_DBI_DBD_H 1 [ 394s] | #define HAVE_PCAP_PCAP_H 1 [ 394s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 394s] | [ 394s] | configure: exit 0 [ 394s] [ 394s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 394s] make[1]: *** [override_dh_auto_test] Error 1 [ 394s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 394s] debian/rules:13: recipe for target 'build' failed [ 394s] make: *** [build] Error 2 [ 394s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 394s] [ 394s] wildcard2 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:36:03 UTC 2017. [ 394s] [ 394s] ### VM INTERACTION START ### [ 397s] [ 264.600691] reboot: Power down [ 412s] ### VM INTERACTION END ### [ 412s] [ 412s] wildcard2 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:36:22 UTC 2017. [ 412s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:37:29 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:37:29 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a382712b5638_fd1472f5c23129db@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 222s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 222s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 222s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 222s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 222s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 222s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 222s] -Done. [ 222s] ./testsuite.at:7: exit code was 139, expected 0 [ 222s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 222s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 222s] make[1]: *** [override_dh_auto_test] Error 1 [ 222s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 222s] debian/rules:13: recipe for target 'build' failed [ 222s] make: *** [build] Error 2 [ 222s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 222s] [ 222s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:37:16 UTC 2017. [ 222s] [ 222s] ### VM INTERACTION START ### [ 224s] [ 215.326633] reboot: Power down [ 224s] ### VM INTERACTION END ### [ 224s] [ 224s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 20:37:20 UTC 2017. [ 224s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:38:03 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:38:03 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a3827331d110_fd1472f5c231305f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 152s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 152s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 152s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 152s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 152s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 152s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b [ 152s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b [ 152s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 152s] -Done. [ 152s] ./testsuite.at:7: exit code was 1, expected 0 [ 152s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 152s] debian/rules:60: recipe for target 'override_dh_auto_test' failed [ 152s] make[1]: *** [override_dh_auto_test] Error 1 [ 152s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 152s] debian/rules:45: recipe for target 'build' failed [ 152s] make: *** [build] Error 2 [ 152s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 152s] [ 152s] lamb58 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:37:51 UTC 2017. [ 152s] [ 152s] ### VM INTERACTION START ### [ 155s] [ 146.099761] reboot: Power down [ 155s] ### VM INTERACTION END ### [ 155s] [ 155s] lamb58 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 20:37:54 UTC 2017. [ 155s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 20:45:12 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 20:45:12 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a3828f66c554_fd1472f5c231635e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 531s] | ## Output variables. ## [ 531s] | ## ----------------- ## [ 531s] | [ 531s] | ACLOCAL='${SHELL} /usr/src/packages/BUILD/missing aclocal-1.15' [ 531s] | AMDEPBACKSLASH='' [ 531s] | AMDEP_FALSE='' [ 531s] | AMDEP_TRUE='#' [ 531s] | AMTAR='$${TAR-tar}' [ 531s] | AM_BACKSLASH='\' [ 531s] | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' [ 531s] | AM_DEFAULT_VERBOSITY='1' [ 531s] | AM_V='$(V)' [ 531s] | AR='ar' [ 531s] | AUTOCONF='${SHELL} /usr/src/packages/BUILD/missing autoconf' [ 531s] | AUTOHEADER='${SHELL} /usr/src/packages/BUILD/missing autoheader' [ 531s] | AUTOMAKE='${SHELL} /usr/src/packages/BUILD/missing automake-1.15' [ 531s] | AWK='gawk' [ 531s] | CC='gcc' [ 531s] | CCDEPMODE='depmode=none' [ 531s] | CFLAGS='-g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security' [ 531s] | CPP='gcc -E' [ 531s] | CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' [ 532s] | CX/var/run/obs/worker/1/build/build-vm: line 428: warning: command substitution: ignored null byte in input [ 533s] [ 473.205384] SysRq : Power Off [ 533s] [ 473.207059] reboot: Power down [ 533s] ### VM INTERACTION END ### [ 533s] [ 533s] armbuild16 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 20:44:58 UTC 2017. [ 533s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:14:11 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 21:14:11 +0000 Subject: [PATCH] osmo-bsc[master]: Fix tests after rate_ctr change Message-ID: Review at https://gerrit.osmocom.org/5486 Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * deregister rate_ctr group after each test * free bts struct after each test Related: OS#2757 Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 62 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/5486/1 diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 72a1772..d2085a9 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -144,30 +144,37 @@ } } -static inline void test_si2q_segfault(void) +static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, const char *msg) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); - - if (!network) + struct gsm_bts *bts = gsm_bts_alloc(net, 0); + if (!bts) { + printf("BTS allocation failure in %s()\n", msg); exit(1); - bts = gsm_bts_alloc(network, 0); + } + printf("BTS allocation OK in %s()\n", msg); + + bts->network = net; + + return bts; +} + +static inline void test_si2q_segfault(struct gsm_network *net) +{ + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); _bts_uarfcn_add(bts, 10564, 319, 0); _bts_uarfcn_add(bts, 10612, 319, 0); gen(bts, __func__); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_mu(void) +static inline void test_si2q_mu(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Test SI2quater multiple UARFCNs:\n"); - - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); _bts_uarfcn_add(bts, 10564, 318, 0); _bts_uarfcn_add(bts, 10612, 319, 0); @@ -176,18 +183,15 @@ _bts_uarfcn_add(bts, 10613, 64, 0); _bts_uarfcn_add(bts, 10613, 164, 0); _bts_uarfcn_add(bts, 10613, 14, 0); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_u(void) +static inline void test_si2q_u(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); /* first generate invalid SI as no UARFCN added */ gen(bts, __func__); @@ -204,18 +208,15 @@ _bts_uarfcn_add(bts, 1982, 223, 1); _bts_uarfcn_add(bts, 1982, 14, 0); _bts_uarfcn_add(bts, 1982, 88, 0); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_e(void) +static inline void test_si2q_e(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -237,18 +238,15 @@ add_earfcn_b(bts, 1965, OSMO_EARFCN_MEAS_INVALID); add_earfcn_b(bts, 1967, 4); add_earfcn_b(bts, 1982, 3); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_long(void) +static inline void test_si2q_long(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -285,6 +283,9 @@ _bts_uarfcn_add(bts, 1976, 224, 1); _bts_uarfcn_add(bts, 1976, 225, 1); _bts_uarfcn_add(bts, 1976, 226, 1); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } static void test_mi_functionality(void) @@ -647,10 +648,10 @@ VERIFY(f0, ==, 1); } -static void test_si_ba_ind(void) +static void test_si_ba_ind(struct gsm_network *net) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - struct gsm_bts *bts = gsm_bts_alloc(network, 0); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); const struct gsm48_system_information_type_2bis *si2bis = @@ -666,7 +667,6 @@ int rc; - bts->network = network; bts->c0->arfcn = 23; printf("Testing if BA-IND is set as expected in SI2xxx and SI5xxx\n"); @@ -710,8 +710,16 @@ int main(int argc, char **argv) { + struct gsm_network *net; + osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); + + net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!net) { + printf("Network init failure.\n"); + return EXIT_FAILURE; + } test_location_area_identifier(); test_mi_functionality(); @@ -721,13 +729,13 @@ test_print_encoding(); test_range_encoding(); - test_si2q_segfault(); - test_si2q_e(); - test_si2q_u(); - test_si2q_mu(); - test_si2q_long(); + test_si2q_segfault(net); + test_si2q_e(net); + test_si2q_u(net); + test_si2q_mu(net); + test_si2q_long(net); - test_si_ba_ind(); + test_si_ba_ind(net); printf("Done.\n"); diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 536287c..b85141a 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -58,6 +58,7 @@ Random range test: range 255, max num ARFCNs 22 Random range test: range 511, max num ARFCNs 18 Random range test: range 1023, max num ARFCNs 16 +BTS allocation OK in test_si2q_segfault() Test SI2quater UARFCN (same scrambling code and diversity): generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -65,6 +66,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 2 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_e() Testing SYSINFO_TYPE_2quater EARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -88,6 +90,7 @@ added EARFCN 1982 - generating SI2quater for 7 EARFCNs and 0 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e4 1e fa c2 80 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_u() Testing SYSINFO_TYPE_2quater UARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -113,6 +116,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 50 1c 3b 31 fa dd 88 85 7b c4 1c 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 11 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 58 1c 3b 25 7a ea 08 91 fb c4 1f b0 2b 2b 2b +BTS allocation OK in test_si2q_mu() Test SI2quater multiple UARFCNs: generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7c 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -128,6 +132,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7d 52 e8 18 3f f4 90 54 ba 84 52 67 03 2b generating SI2quater for 0 EARFCNs and 7 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7d 52 e8 18 3f f4 90 54 ba 86 20 73 8c 81 +BTS allocation OK in test_si2q_long() Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation: generating SI2quater for 17 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 0c 1a 10 99 66 0f 04 83 c1 1c bb 2b 03 2b 2b @@ -201,6 +206,7 @@ generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si_ba_ind() Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b -- To view, visit https://gerrit.osmocom.org/5486 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:50:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 21:50:40 +0000 Subject: osmo-bsc[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5486 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:50:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 21:50:43 +0000 Subject: [MERGED] osmo-bsc[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix tests after rate_ctr change ...................................................................... Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * deregister rate_ctr group after each test * free bts struct after each test Related: OS#2757 Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 62 insertions(+), 48 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 72a1772..d2085a9 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -144,30 +144,37 @@ } } -static inline void test_si2q_segfault(void) +static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, const char *msg) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); - - if (!network) + struct gsm_bts *bts = gsm_bts_alloc(net, 0); + if (!bts) { + printf("BTS allocation failure in %s()\n", msg); exit(1); - bts = gsm_bts_alloc(network, 0); + } + printf("BTS allocation OK in %s()\n", msg); + + bts->network = net; + + return bts; +} + +static inline void test_si2q_segfault(struct gsm_network *net) +{ + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); _bts_uarfcn_add(bts, 10564, 319, 0); _bts_uarfcn_add(bts, 10612, 319, 0); gen(bts, __func__); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_mu(void) +static inline void test_si2q_mu(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Test SI2quater multiple UARFCNs:\n"); - - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); _bts_uarfcn_add(bts, 10564, 318, 0); _bts_uarfcn_add(bts, 10612, 319, 0); @@ -176,18 +183,15 @@ _bts_uarfcn_add(bts, 10613, 64, 0); _bts_uarfcn_add(bts, 10613, 164, 0); _bts_uarfcn_add(bts, 10613, 14, 0); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_u(void) +static inline void test_si2q_u(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); /* first generate invalid SI as no UARFCN added */ gen(bts, __func__); @@ -204,18 +208,15 @@ _bts_uarfcn_add(bts, 1982, 223, 1); _bts_uarfcn_add(bts, 1982, 14, 0); _bts_uarfcn_add(bts, 1982, 88, 0); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_e(void) +static inline void test_si2q_e(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -237,18 +238,15 @@ add_earfcn_b(bts, 1965, OSMO_EARFCN_MEAS_INVALID); add_earfcn_b(bts, 1967, 4); add_earfcn_b(bts, 1982, 3); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } -static inline void test_si2q_long(void) +static inline void test_si2q_long(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -285,6 +283,9 @@ _bts_uarfcn_add(bts, 1976, 224, 1); _bts_uarfcn_add(bts, 1976, 225, 1); _bts_uarfcn_add(bts, 1976, 226, 1); + + rate_ctr_group_free(bts->bts_ctrs); + talloc_free(bts); } static void test_mi_functionality(void) @@ -647,10 +648,10 @@ VERIFY(f0, ==, 1); } -static void test_si_ba_ind(void) +static void test_si_ba_ind(struct gsm_network *net) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - struct gsm_bts *bts = gsm_bts_alloc(network, 0); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); const struct gsm48_system_information_type_2bis *si2bis = @@ -666,7 +667,6 @@ int rc; - bts->network = network; bts->c0->arfcn = 23; printf("Testing if BA-IND is set as expected in SI2xxx and SI5xxx\n"); @@ -710,8 +710,16 @@ int main(int argc, char **argv) { + struct gsm_network *net; + osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); + + net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!net) { + printf("Network init failure.\n"); + return EXIT_FAILURE; + } test_location_area_identifier(); test_mi_functionality(); @@ -721,13 +729,13 @@ test_print_encoding(); test_range_encoding(); - test_si2q_segfault(); - test_si2q_e(); - test_si2q_u(); - test_si2q_mu(); - test_si2q_long(); + test_si2q_segfault(net); + test_si2q_e(net); + test_si2q_u(net); + test_si2q_mu(net); + test_si2q_long(net); - test_si_ba_ind(); + test_si_ba_ind(net); printf("Done.\n"); diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 536287c..b85141a 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -58,6 +58,7 @@ Random range test: range 255, max num ARFCNs 22 Random range test: range 511, max num ARFCNs 18 Random range test: range 1023, max num ARFCNs 16 +BTS allocation OK in test_si2q_segfault() Test SI2quater UARFCN (same scrambling code and diversity): generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -65,6 +66,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 2 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_e() Testing SYSINFO_TYPE_2quater EARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -88,6 +90,7 @@ added EARFCN 1982 - generating SI2quater for 7 EARFCNs and 0 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e4 1e fa c2 80 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_u() Testing SYSINFO_TYPE_2quater UARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -113,6 +116,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 50 1c 3b 31 fa dd 88 85 7b c4 1c 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 11 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 58 1c 3b 25 7a ea 08 91 fb c4 1f b0 2b 2b 2b +BTS allocation OK in test_si2q_mu() Test SI2quater multiple UARFCNs: generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7c 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -128,6 +132,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7d 52 e8 18 3f f4 90 54 ba 84 52 67 03 2b generating SI2quater for 0 EARFCNs and 7 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7d 52 e8 18 3f f4 90 54 ba 86 20 73 8c 81 +BTS allocation OK in test_si2q_long() Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation: generating SI2quater for 17 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 0c 1a 10 99 66 0f 04 83 c1 1c bb 2b 03 2b 2b @@ -201,6 +206,7 @@ generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si_ba_ind() Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b -- To view, visit https://gerrit.osmocom.org/5486 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:51:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 21:51:41 +0000 Subject: osmo-msc[master]: drop unused T* timers (BSC land, not MSC) In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5461 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:51:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 21:51:50 +0000 Subject: osmo-msc[master]: cosmetic: msc_paging_request: drop obsolete comment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5462 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From admin at opensuse.org Mon Dec 18 21:56:20 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 21:56:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a38399a1c1d4_fd1472f5c233889c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 863s] | configure:5010: result: 1572864 [ 863s] | configure:5058: checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format [ 863s] | configure:5098: result: func_convert_file_noop [ 863s] | configure:5105: checking how to convert aarch64-unknown-linux-gnu file names to toolchain format [ 863s] | configure:5125: result: func_convert_file_noop [ 863s] | configure:5132: checking for /usr/bin/ld option to reload object files [ 863s] | configure:5139: result: -r [ 863s] | configure:5213: checking for objdump [ 863s] | configure:5229: found /usr/bin/objdump [ 863s] | configure:5240: result: objdump [ 863s] | configure:5272: checking how to recognize dependent libraries [ 863s] | configure:5472: result: pass_all [ 863s] | configure:5557: checking for dlltool [ 863s] | configure:5587: result: no [ 863s] | configure:5617: checking how to associate runtime and link libraries [ 863s] | configure:5644: result: printf %s\n [ 863s] | configure:5705: checking for ar [ 863s] | configure:5721: found /usr/bin/ar [ 863s] | configure:5732: result: ar [ 863s] | configure:5769: checking for archiver @FILE support [ 863s] | configure:5786: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 863s] | configure:5786: $? = 0 [ 863s] | configure:5789: ar cru libconftest.a @conftest.lst >&5 [ 865s] | ar: `u' modifier ignored since `D' is the default (see `U[ 807.127856] sysrq: SysRq : Power Off [ 865s] [ 807.144807] reboot: Power down [ 866s] ### VM INTERACTION END ### [ 866s] [ 866s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 21:56:07 UTC 2017. [ 866s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 18 21:57:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 21:57:01 +0000 Subject: [PATCH] osmo-pcu[master]: Fix tests after rate_ctr change Message-ID: Review at https://gerrit.osmocom.org/5487 Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this check if rate counters arealready allocated (by static allocator of BTS singleton for example) and register rate counter with different index. This fixes the tests for now but eventually we'll remove the BTS singleton which will allow us to remove this hack. Change-Id: I7c552ce653b44ec3a31049641728926adc07361d Related: OS#2757 --- M src/bts.cpp 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/5487/1 diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..e17399a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -218,8 +218,16 @@ } } - m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); + /* The static allocator might have already registered the counter group. + If this happens and we still called explicitly (in tests/* for example) + than just allocate the group with different index. + This shall be removed once weget rid of BTS singleton */ + if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0)) + m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 1); + else + m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); OSMO_ASSERT(m_ratectrs); + m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, &bts_statg_desc, 0); OSMO_ASSERT(m_statg); } -- To view, visit https://gerrit.osmocom.org/5487 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c552ce653b44ec3a31049641728926adc07361d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From admin at opensuse.org Mon Dec 18 21:59:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 21:59:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a383a6ca8ce7_fd1472f5c2339662@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 1311s] | configure:14186: checking for SQLITE3 [ 1311s] | configure:14193: $PKG_CONFIG --exists --print-errors "sqlite3" [ 1311s] | Package sqlite3 was not found in the pkg-config search path. [ 1311s] | Perhaps you should add the directory containing `sqlite3.pc' [ 1311s] | to the PKG_CONFIG_PATH environment variable [ 1311s] | No package 'sqlite3' found [ 1311s] | configure:14196: $? = 1 [ 1311s] | configure:14210: $PKG_CONFIG --exists --print-errors "sqlite3" [ 1311s] | Package sqlite3 was not found in the pkg-config search path. [ 1311s] | Perhaps you should add the directory containing `sqlite3.pc' [ 1311s] | to the PKG_CONFIG_PATH environment variable [ 1311s] | No package 'sqlite3' found [ 1311s] | configure:14213: $? = 1 [ 1311s] | configure:14227: result: no [ 1311s] | No package 'sqlite3' found [ 1311s] | configure:14270: checking if gcc supports -fvisibility=hidden [ 1311s] | configure:14276: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -fvisibility=hidden -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 1311s] | configure:14276: $? = 0 [ 1311s] | configure:14277: result: yes [ 1311s] | configure:14288: checking whether C compiler accepts -Werror=implicit [ 1311s] | configure:14307: gcc -c -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Werror=implicit -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5 [ 1311s] | configure:14307: $? = 0 [ 1311s] | configure:14315: result: yes [ 1313s] | configure:14323: checking whether C[ 1237.631648] sysrq: SysRq : Power Off [ 1313s] [ 1237.654226] reboot: Power down [ 1314s] ### VM INTERACTION END ### [ 1314s] [ 1314s] obs-arm-3 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 21:59:33 UTC 2017. [ 1314s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:05:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 22:05:18 +0000 Subject: osmo-pcu[master]: Remove unused includes and forward declarations In-Reply-To: References: Message-ID: Patch Set 1: I've used (iwyu) include-what-you-use but unfortunatelyit seems to works with c++ only and gives plenty of false positives. Nevertheless, better than nothing. -- To view, visit https://gerrit.osmocom.org/5403 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:05:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 22:05:23 +0000 Subject: [MERGED] osmo-pcu[master]: Remove unused includes and forward declarations In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove unused includes and forward declarations ...................................................................... Remove unused includes and forward declarations Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 --- M src/gprs_bssgp_pcu.cpp M src/gprs_debug.cpp M src/gprs_debug.h M src/gprs_ms.h M src/gprs_rlcmac.cpp M src/gprs_rlcmac.h M src/llc.cpp M src/llc.h M src/rlc.cpp M src/rlc.h M src/sba.h M src/tbf.h 12 files changed, 0 insertions(+), 24 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 7b78e2f..a86e09d 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #define BSSGP_TIMER_T1 30 /* Guards the (un)blocking procedures */ #define BSSGP_TIMER_T2 30 /* Guards the reset procedure */ diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp index c35eafa..283962f 100644 --- a/src/gprs_debug.cpp +++ b/src/gprs_debug.cpp @@ -16,16 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/gprs_debug.h b/src/gprs_debug.h index 863d76b..747465b 100644 --- a/src/gprs_debug.h +++ b/src/gprs_debug.h @@ -19,11 +19,9 @@ #pragma once -#include #ifdef __cplusplus extern "C" { #endif -#include #include #ifdef __cplusplus }; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 72a86c9..f094e96 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -20,9 +20,6 @@ #pragma once -struct gprs_rlcmac_tbf; -struct gprs_rlcmac_dl_tbf; -struct gprs_rlcmac_ul_tbf; struct gprs_codel; #include "cxx_linuxlist.h" diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp index 16870c3..06c5479 100644 --- a/src/gprs_rlcmac.cpp +++ b/src/gprs_rlcmac.cpp @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include #include diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index be1e686..aa773fc 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -41,7 +41,6 @@ struct gprs_rlcmac_tbf; struct gprs_rlcmac_bts; -struct BTS; struct GprsMs; #ifdef __cplusplus diff --git a/src/llc.cpp b/src/llc.cpp index 79afc37..b155063 100644 --- a/src/llc.cpp +++ b/src/llc.cpp @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include diff --git a/src/llc.h b/src/llc.h index 4883624..9d402c3 100644 --- a/src/llc.h +++ b/src/llc.h @@ -29,7 +29,6 @@ #define LLC_MAX_LEN 1543 struct BTS; -struct timeval; struct msgb; /** diff --git a/src/rlc.cpp b/src/rlc.cpp index c52417d..37e83cd 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "tbf.h" #include "bts.h" #include "gprs_debug.h" diff --git a/src/rlc.h b/src/rlc.h index 14d2082..b62e3ac 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -36,7 +36,6 @@ #define RLC_MAX_LEN 74 /* MCS-9 data unit */ struct BTS; -struct gprs_rlc_v_n; /* The state of a BSN in the send/receive window */ enum gprs_rlc_ul_bsn_state { diff --git a/src/sba.h b/src/sba.h index 9047f1a..d2d3106 100644 --- a/src/sba.h +++ b/src/sba.h @@ -28,7 +28,6 @@ struct BTS; class PollController; -struct gprs_rlcmac_sba; struct gprs_rlcmac_pdch; /* diff --git a/src/tbf.h b/src/tbf.h index 518bd9b..9a1b4c7 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -32,8 +32,6 @@ } struct bssgp_bvc_ctx; -struct rlc_ul_header; -struct msgb; struct pcu_l1_meas; class GprsMs; -- To view, visit https://gerrit.osmocom.org/5403 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From admin at opensuse.org Mon Dec 18 22:07:46 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 22:07:46 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a383c48d8587_fd1472f5c2342575@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 429s] -generating SI2quater for 17 EARFCNs and 2 UARFCNs... [ 429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 14 4d e7 00 44 b3 07 82 41 e0 8e 5d 95 83 2b [ 429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c2 6c 1e 0f 60 f0 bb 08 3f d7 2e ca c1 2b [ 429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 20 64 21 06 e1 08 55 08 53 d7 2e ca c1 2b [ 429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 2a 64 21 56 e1 0a d5 08 49 d7 2e ca c1 2b [ 429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 25 64 21 2e e1 09 94 e5 d9 58 2b 2b 2b 2b [ 429s] -generating SI2quater for 17 EARFCNs and 3 UARFCNs... [ 429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 1c 4d e7 03 04 86 59 83 c1 20 f0 47 2e ca c1 [ 429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c2 6c 1e 0f 60 f0 bb 08 3f d7 2e ca c1 2b [ 429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 20 64 21 06 e1 08 55 08 53 d7 2e ca c1 2b [ 429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 2a 64 21 56 e1 0a d5 08 49 d7 2e ca c1 2b [ 429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 25 64 21 2e e1 09 94 e5 d9 58 2b 2b 2b 2b [ 429s] -generating SI2quater for 17 EARFCNs and 4 UARFCNs... [ 429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 24 59 fa 26 73 84 86 59 83 c1 1c bb 2b 03 2b [ 429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c1 20 f0 9b 07 83 d8 3c 2e b9 76 56 0b 2b [ 429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 1f ec 21 03 21 08 37 08 42 a7 2e ca c1 2b [ 429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 29 ec 21 53 21 0a b7 08 56 a7 2e ca c1 2b [ 429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 24 ec 21 2b 21 09 77 08 4c a7 2e ca c1 2b [ 429s] -generating SI2quater for 17 EARFCNs and 5 UARFCNs... [ 429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 2c 59 fa 30 73 f6 04 86 59 83 c1 1c bb 2b 03 [ 429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c1 20 f0 9b 07 83 d8 3c 2e b9 76 56 0b 2b [ 429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 1f ec 21 03 21 08 37 08 42 a7 2e ca c1 2b [ 429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 29 ec 21 53 21 0a b7 08 56 a7 2e ca c1 2b [ 431s] -generated valid SI2quater [0[ 373.850028] SysRq : Power Off [ 431s] [ 373.851364] reboot: Power down [ 431s] ### VM INTERACTION END ### [ 431s] [ 431s] armbuild18 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 22:07:31 UTC 2017. [ 431s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 18 22:20:38 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 18 Dec 2017 22:20:38 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a383f37bf2a6_fd1472f5c23453fd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 340s] # -*- compilation -*- [ 340s] 1. testsuite.at:4: testing gsm0408 ... [ 340s] ./testsuite.at:7: $abs_top_builddir/tests/gsm0408/gsm0408_test [ 340s] stderr: [ 340s] range=511, arfcns_used=11, f0=1, f0_included=1 [ 340s] range=511, arfcns_used=16, f0=1, f0_included=1 [ 340s] range=511, arfcns_used=17, f0=1, f0_included=1 [ 340s] range=511, arfcns_used=17, f0=1, f0_included=1 [ 340s] range=511, arfcns_used=5, f0=1, f0_included=1 [ 340s] range=511, arfcns_used=5, f0=10, f0_included=1 [ 340s] range=1023, arfcns_used=16, f0=0, f0_included=1 [ 340s] range=1023, arfcns_used=16, f0=0, f0_included=0 [ 340s] <0021> rate_ctr.c:195 counter group 'bsc' already exists for index 0 [ 340s] --- expout 2017-12-18 22:20:25.200000830 +0000 [ 340s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/1/stdout 2017-12-18 22:20:26.480000834 +0000 [ 340s] @@ -66,146 +66,3 @@ [ 340s] generating SI2quater for 0 EARFCNs and 2 UARFCNs... [ 340s] generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b [ 340s] Testing SYSINFO_TYPE_2quater EARFCN generation: [ 340s] -generating SI2quater for 0 EARFCNs and 0 UARFCNs... [ 340s] -generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 340s] -added EARFCN 1917 - generating SI2quater for 1 EARFCNs and 0 UARFCNs... [ 341s] -generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be e8 50 0b 2/var/run/obs/worker/3/build/build-vm: line 428: warning: command substitution: ignored null byte in input [ 342s] [ 285.931061] SysRq : Power Off [ 342s] [ 285.932593] reboot: Power down [ 343s] ### VM INTERACTION END ### [ 344s] [ 344s] armbuild17 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 22:20:32 UTC 2017. [ 344s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:57:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:57:51 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:58:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:58:26 +0000 Subject: osmo-pcu[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5487 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7c552ce653b44ec3a31049641728926adc07361d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:58:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:58:29 +0000 Subject: [MERGED] osmo-pcu[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix tests after rate_ctr change ...................................................................... Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this check if rate counters arealready allocated (by static allocator of BTS singleton for example) and register rate counter with different index. This fixes the tests for now but eventually we'll remove the BTS singleton which will allow us to remove this hack. Change-Id: I7c552ce653b44ec3a31049641728926adc07361d Related: OS#2757 --- M src/bts.cpp 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 341c9d4..e17399a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -218,8 +218,16 @@ } } - m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); + /* The static allocator might have already registered the counter group. + If this happens and we still called explicitly (in tests/* for example) + than just allocate the group with different index. + This shall be removed once weget rid of BTS singleton */ + if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0)) + m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 1); + else + m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); OSMO_ASSERT(m_ratectrs); + m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, &bts_statg_desc, 0); OSMO_ASSERT(m_statg); } -- To view, visit https://gerrit.osmocom.org/5487 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c552ce653b44ec3a31049641728926adc07361d Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:59:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:59:02 +0000 Subject: osmo-msc[master]: fix: properly cancel all Paging on IMSI Detach In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:59:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:59:05 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: msc_paging_request: drop obsolete comment In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: msc_paging_request: drop obsolete comment ...................................................................... cosmetic: msc_paging_request: drop obsolete comment Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e --- M src/libmsc/gsm_subscriber.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index 8bc060f..a013e0e 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -109,8 +109,6 @@ /* The subscriber was last seen in subscr->lac. Find out which * BSCs/RNCs are responsible and send them a paging request via open * SCCP connections (if any). */ - /* TODO Implementing only RNC paging, since this is code on the iu branch. - * Need to add BSC paging at some point. */ switch (vsub->cs.attached_via_ran) { case RAN_GERAN_A: return a_iface_tx_paging(vsub->imsi, vsub->tmsi, vsub->lac); -- To view, visit https://gerrit.osmocom.org/5462 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:59:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:59:06 +0000 Subject: [MERGED] osmo-msc[master]: drop unused T* timers (BSC land, not MSC) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: drop unused T* timers (BSC land, not MSC) ...................................................................... drop unused T* timers (BSC land, not MSC) Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744 --- M include/osmocom/msc/gsm_data.h 1 file changed, 0 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..6349fe0 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,18 +344,6 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; -#define GSM_T3101_DEFAULT 10 /* s */ -#define GSM_T3103_DEFAULT 5 /* s */ -#define GSM_T3105_DEFAULT 100 /* ms */ -#define GSM_T3107_DEFAULT 5 /* s */ -#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ -#define GSM_T3111_DEFAULT 2 /* s */ -#define GSM_T3113_DEFAULT 60 -#define GSM_T3115_DEFAULT 10 -#define GSM_T3117_DEFAULT 10 -#define GSM_T3119_DEFAULT 10 -#define GSM_T3122_DEFAULT 10 -#define GSM_T3141_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -420,19 +408,6 @@ unsigned int num_bts; struct llist_head bts_list; - /* timer values */ - int T3101; - int T3103; - int T3105; - int T3107; - int T3109; - int T3111; - int T3113; - int T3115; - int T3117; - int T3119; - int T3122; - int T3141; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; -- To view, visit https://gerrit.osmocom.org/5461 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 22:59:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 22:59:33 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: are we sure there's no GSM timer number/name for this? -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:00:26 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:00:26 +0000 Subject: osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5472 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:00:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:00:40 +0000 Subject: osmo-msc[master]: compiler warning: extend #if 0 to include unused array In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5467 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:01:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:01:02 +0000 Subject: osmo-msc[master]: cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5473 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:01:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:01:16 +0000 Subject: meta-telephony[201705]: osmo-sgsn: no longer depend on libpcap In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I284c16c1f7abd3b24525b824baca357576f16675 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:02:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:02:18 +0000 Subject: libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:03:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:03:17 +0000 Subject: libosmocore[master]: utils: add osmo_escape_str() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:03:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:03:25 +0000 Subject: libosmocore[master]: ctrl_test.c: replace print_escaped() with new osmo_escape_str() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5430 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:04:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:04:04 +0000 Subject: libosmocore[master]: ctrl: prep test: separate new ctrl_handle_msg() from handle_... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5431 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:04:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:04:15 +0000 Subject: libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5432 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:04:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:04:27 +0000 Subject: libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5433 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:04:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:04:30 +0000 Subject: libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5434 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:22 +0000 Subject: libosmocore[master]: add osmo_auth_c3() (separate from gsm_milenage()) In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:24 +0000 Subject: [MERGED] libosmocore[master]: add osmo_auth_c3() (separate from gsm_milenage()) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add osmo_auth_c3() (separate from gsm_milenage()) ...................................................................... add osmo_auth_c3() (separate from gsm_milenage()) To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa --- M include/osmocom/crypt/auth.h M src/gsm/auth_core.c M src/gsm/libosmogsm.map M src/gsm/milenage/milenage.c 4 files changed, 18 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h index 4dbc6a4..e544126 100644 --- a/include/osmocom/crypt/auth.h +++ b/include/osmocom/crypt/auth.h @@ -105,4 +105,6 @@ const char *osmo_auth_alg_name(enum osmo_auth_algo alg); enum osmo_auth_algo osmo_auth_alg_parse(const char *name); +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]); + /* @} */ diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index 400708f..f171ed4 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -236,4 +236,17 @@ { 0, NULL } }; +/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 from 3GPP TS 33.103 ? + * 4.6.1). + * \param[out] kc GSM AKA Kc, 8 byte target buffer. + * \param[in] ck UMTS AKA CK, 16 byte input buffer. + * \param[in] ik UMTS AKA IK, 16 byte input buffer. + */ +void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]) +{ + int i; + for (i = 0; i < 8; i++) + kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 6e6638a..d915234 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -340,6 +340,7 @@ osmo_auth_load; osmo_auth_register; osmo_auth_supported; +osmo_auth_c3; osmo_sub_auth_type_names; osmo_rsl2sitype; diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c index 7cf3312..3c14ab9 100644 --- a/src/gsm/milenage/milenage.c +++ b/src/gsm/milenage/milenage.c @@ -29,7 +29,7 @@ #include "common.h" #include "aes_wrap.h" #include "milenage.h" - +#include /** * milenage_f1 - Milenage f1 and f1* algorithms @@ -249,8 +249,7 @@ if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; - for (i = 0; i < 8; i++) - kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; + osmo_auth_c3(kc, ck, ik); #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); -- To view, visit https://gerrit.osmocom.org/5466 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:50 +0000 Subject: [MERGED] libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY ...................................................................... ctrl: fix mem leak when handling GET_REPLY and SET_REPLY In ctrl_handle_msg() (code recently propagated from handle_control_read()), talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED. CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by ctrl_test.c. With the memleak fixed, adjust expected test output and make a detected mem leak abort the test immediately. Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 3 files changed, 3 insertions(+), 7 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 7c1d81a..5c73b63 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -387,7 +387,6 @@ cmd->ccon = ccon; if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } } else { cmd = talloc_zero(ccon, struct ctrl_cmd); @@ -398,9 +397,9 @@ cmd->id = "err"; cmd->reply = "Command parser error."; ctrl_cmd_send(&ccon->write_queue, cmd); - talloc_free(cmd); } + talloc_free(cmd); return 0; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 9c7316f..e25929c 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -120,9 +120,8 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - // hide mem leak to be fixed in subsequent patch - //talloc_report_full(ctx, stdout); - //OSMO_ASSERT(false); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); } printf("ok\n"); diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 9ddcfdb..210c599 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -167,7 +167,6 @@ value = '(null)' reply = 'OK' handling: -mem leak! ok test: 'SET_REPLY 1 variable OK' parsing: @@ -176,5 +175,4 @@ value = '(null)' reply = 'OK' handling: -mem leak! ok -- To view, visit https://gerrit.osmocom.org/5434 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:50 +0000 Subject: [MERGED] libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands ...................................................................... ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands The "memleak!" output shows messages that lack a talloc_free() of the parsed ctrl command buffer. The leak shall be fixed in a subsequent patch. Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 40 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b3fa05e..9c7316f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -120,8 +120,9 @@ if (talloc_total_size(ctx) != ctx_size_was) { printf("mem leak!\n"); - talloc_report_full(ctx, stdout); - OSMO_ASSERT(false); + // hide mem leak to be fixed in subsequent patch + //talloc_report_full(ctx, stdout); + //OSMO_ASSERT(false); } printf("ok\n"); @@ -294,6 +295,25 @@ "ERROR \t Command not found", }, + { "GET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_GET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + { "SET_REPLY 1 variable OK", + { + .type = CTRL_TYPE_SET_REPLY, + .id = "1", + .variable = "variable", + .reply = "OK", + }, + .reply_str = NULL, + }, + }; static void test_messages() diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index edf97ea..9ddcfdb 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -160,3 +160,21 @@ handling: replied: 'ERROR \t Command not found' ok +test: 'GET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +mem leak! +ok +test: 'SET_REPLY 1 variable OK' +parsing: +id = '1' +variable = 'variable' +value = '(null)' +reply = 'OK' +handling: +mem leak! +ok -- To view, visit https://gerrit.osmocom.org/5433 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:51 +0000 Subject: [MERGED] libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl_test: expand to test message handling and detect mem leaks ...................................................................... ctrl_test: expand to test message handling and detect mem leaks Subsequent patches that tighten CTRL input validation will make the results more interesting. Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 197 insertions(+), 57 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 2bc3128..b3fa05e 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include static void check_type(enum ctrl_type c) { @@ -24,18 +26,34 @@ struct msgb *msgb_from_string(const char *str) { - char *rc; + struct ipaccess_head *iph; + struct ipaccess_head_ext *ipx; + char *str_msg; size_t len = strlen(str) + 1; - /* ctrl_cmd_parse() appends a '\0' to the msgb, allow one more byte. */ - struct msgb *msg = msgb_alloc(len + 1, str); - msg->l2h = msg->head; - rc = (char*)msgb_put(msg, len); - OSMO_ASSERT(rc == (char*)msg->l2h); - strcpy(rc, str); + + struct msgb *msg = msgb_alloc(1024, str); + + iph = (void*)msgb_put(msg, sizeof(*iph)); + iph->proto = IPAC_PROTO_OSMO; + + ipx = (void*)msgb_put(msg, sizeof(*ipx)); + ipx->proto = IPAC_PROTO_EXT_CTRL; + + str_msg = (char*)msgb_put(msg, len); + msg->l2h = (void*)str_msg; + osmo_strlcpy(str_msg, str, len); + + iph->len = msgb_length(msg); return msg; } static void *ctx = NULL; + +struct one_test { + const char *cmd_str; + struct ctrl_cmd expect_parsed; + const char *reply_str; +}; void assert_same_str(const char *label, const char *expect, const char *got) { @@ -49,20 +67,22 @@ OSMO_ASSERT(expect == got); } -static void assert_parsing(const char *str, const struct ctrl_cmd *expect) +static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, const struct one_test *t) { struct ctrl_cmd *cmd; - struct msgb *msg = msgb_from_string(str); + struct msgb *msg = msgb_from_string(t->cmd_str); + int ctx_size_was; - printf("test parsing: '%s'\n", osmo_escape_str(str, -1)); + printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); + printf("parsing:\n"); cmd = ctrl_cmd_parse(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(expect->type == cmd->type); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); #define ASSERT_SAME_STR(field) \ - assert_same_str(#field, expect->field, cmd->field) + assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); ASSERT_SAME_STR(variable); @@ -72,35 +92,67 @@ talloc_free(cmd); msgb_free(msg); + printf("handling:\n"); + + ctx_size_was = talloc_total_size(ctx); + + msg = msgb_from_string(t->cmd_str); + ctrl_handle_msg(ctrl, ccon, msg); + + if (llist_empty(&ccon->write_queue.msg_queue)) { + if (t->reply_str) { + printf("Got no reply, but expected \"%s\"\n", osmo_escape_str(t->reply_str, -1)); + OSMO_ASSERT(!t->reply_str); + } + } else { + struct msgb *sent_msg = msgb_dequeue(&ccon->write_queue.msg_queue); + OSMO_ASSERT(sent_msg); + msgb_put_u8(sent_msg, 0); + + printf("replied: '%s'\n", osmo_escape_str((char*)msgb_l2(sent_msg), -1)); + OSMO_ASSERT(t->reply_str); + OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg))) + msgb_free(sent_msg); + } + osmo_wqueue_clear(&ccon->write_queue); + + msgb_free(msg); + + if (talloc_total_size(ctx) != ctx_size_was) { + printf("mem leak!\n"); + talloc_report_full(ctx, stdout); + OSMO_ASSERT(false); + } + printf("ok\n"); } -struct one_parsing_test { - const char *cmd_str; - struct ctrl_cmd expect; -}; - -static const struct one_parsing_test test_parsing_list[] = { +static const struct one_test test_messages_list[] = { { "GET 1 variable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable", - } + }, + "ERROR 1 Command not found", }, { "GET 1 variable\n", { .type = CTRL_TYPE_GET, .id = "1", .variable = "variable\n", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 var\ni\nable", { .type = CTRL_TYPE_GET, .id = "1", .variable = "var\ni\nable", /* current bug */ - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { @@ -108,7 +160,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value\n", { @@ -116,7 +170,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens", { @@ -124,7 +180,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "GET 1 variable multiple value tokens\n", { @@ -132,7 +190,9 @@ .id = "1", .variable = "variable", .value = NULL, - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value", { @@ -140,7 +200,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value\n", { @@ -148,7 +210,9 @@ .id = "1", .variable = "variable", .value = "value", - } + }, + "ERROR 1 Command not found", + }, { "SET weird_id variable value", { @@ -156,7 +220,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET weird_id variable value\n", { @@ -164,7 +230,9 @@ .id = "weird_id", .variable = "variable", .value = "value", - } + }, + "ERROR weird_id Command not found", + }, { "SET 1 variable multiple value tokens", { @@ -172,7 +240,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable multiple value tokens\n", { @@ -180,7 +250,9 @@ .id = "1", .variable = "variable", .value = "multiple value tokens", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces ", { @@ -188,7 +260,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -196,7 +270,9 @@ .id = "1", .variable = "variable", .value = "value_with_trailing_spaces ", - } + }, + "ERROR 1 Command not found", + }, { "SET \n special_char_id value", { @@ -204,7 +280,9 @@ .id = "\n", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \n Command not found", + }, { "SET \t special_char_id value", { @@ -212,17 +290,28 @@ .id = "\t", .variable = "special_char_id", .value = "value", - } + }, + "ERROR \t Command not found", + }, }; -static void test_parsing() +static void test_messages() { + struct ctrl_handle *ctrl; + struct ctrl_connection *ccon; int i; - for (i = 0; i < ARRAY_SIZE(test_parsing_list); i++) - assert_parsing(test_parsing_list[i].cmd_str, - &test_parsing_list[i].expect); + ctrl = ctrl_handle_alloc2(ctx, NULL, NULL, 0); + ccon = talloc_zero(ctx, struct ctrl_connection); + + osmo_wqueue_init(&ccon->write_queue, 1); + + for (i = 0; i < ARRAY_SIZE(test_messages_list); i++) + assert_test(ctrl, ccon, &test_messages_list[i]); + + talloc_free(ccon); + talloc_free(ctrl); } static struct log_info_cat test_categories[] = { @@ -249,7 +338,7 @@ check_type(CTRL_TYPE_ERROR); check_type(64); - test_parsing(); + test_messages(); return 0; } diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 5775eb2..edf97ea 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -7,105 +7,156 @@ ctrl type 5 is TRAP -> 5 OK ctrl type 6 is ERROR -> 6 OK ctrl type 64 is unknown 0x40 [PARSE FAILED] -test parsing: 'GET 1 variable' +test: 'GET 1 variable' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable\n' +test: 'GET 1 variable\n' +parsing: id = '1' variable = 'variable\n' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 var\ni\nable' +test: 'GET 1 var\ni\nable' +parsing: id = '1' variable = 'var\ni\nable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value' +test: 'GET 1 variable value' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable value\n' +test: 'GET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens' +test: 'GET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'GET 1 variable multiple value tokens\n' +test: 'GET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = '(null)' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value' +test: 'SET 1 variable value' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value\n' +test: 'SET 1 variable value\n' +parsing: id = '1' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET weird_id variable value' +test: 'SET weird_id variable value' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET weird_id variable value\n' +test: 'SET weird_id variable value\n' +parsing: id = 'weird_id' variable = 'variable' value = 'value' reply = '(null)' +handling: +replied: 'ERROR weird_id Command not found' ok -test parsing: 'SET 1 variable multiple value tokens' +test: 'SET 1 variable multiple value tokens' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable multiple value tokens\n' +test: 'SET 1 variable multiple value tokens\n' +parsing: id = '1' variable = 'variable' value = 'multiple value tokens' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces ' +test: 'SET 1 variable value_with_trailing_spaces ' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET 1 variable value_with_trailing_spaces \n' +test: 'SET 1 variable value_with_trailing_spaces \n' +parsing: id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' ok -test parsing: 'SET \n special_char_id value' +test: 'SET \n special_char_id value' +parsing: id = '\n' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \n Command not found' ok -test parsing: 'SET \t special_char_id value' +test: 'SET \t special_char_id value' +parsing: id = '\t' variable = 'special_char_id' value = 'value' reply = '(null)' +handling: +replied: 'ERROR \t Command not found' ok -- To view, visit https://gerrit.osmocom.org/5432 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:51 +0000 Subject: [MERGED] libosmocore[master]: ctrl: prep test: separate new ctrl_handle_msg() from handle_... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read() ...................................................................... ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read() In order to allow unit testing the ctrl iface msgb handling, have a separate msgb entry point function from the actual fd read function. An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test that needs this separation. Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 28 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index d444328..5fa9588 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -43,3 +43,5 @@ struct ctrl_cmd *ctrl_cmd_exec_from_string(struct ctrl_handle *ch, const char *cmdstr); int ctrl_lookup_register(ctrl_cmd_lookup lookup); + +int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, struct msgb *msg); diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 015c55e..7c1d81a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -326,10 +326,7 @@ int ret = -1; struct osmo_wqueue *queue; struct ctrl_connection *ccon; - struct ipaccess_head *iph; - struct ipaccess_head_ext *iph_ext; struct msgb *msg = NULL; - struct ctrl_cmd *cmd; struct ctrl_handle *ctrl = bfd->data; queue = container_of(bfd, struct osmo_wqueue, bfd); @@ -338,30 +335,48 @@ ret = ipa_msg_recv_buffered(bfd->fd, &msg, &ccon->pending_msg); if (ret <= 0) { if (ret == -EAGAIN) + /* received part of a message, it is stored in ccon->pending_msg and there's + * nothing left to do now. */ return 0; - if (ret == 0) + /* msg was already discarded. */ + if (ret == 0) { LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); + ret = -EIO; + } else LOGP(DLCTRL, LOGL_ERROR, "Failed to parse ip access message: %d\n", ret); - goto err; + return ret; } + + ret = ctrl_handle_msg(ctrl, ccon, msg); + msgb_free(msg); + if (ret) + control_close_conn(ccon); + return ret; +} + +int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, struct msgb *msg) +{ + struct ctrl_cmd *cmd; + struct ipaccess_head *iph; + struct ipaccess_head_ext *iph_ext; if (msg->len < sizeof(*iph) + sizeof(*iph_ext)) { LOGP(DLCTRL, LOGL_ERROR, "The message is too short.\n"); - goto err; + return -EINVAL; } iph = (struct ipaccess_head *) msg->data; if (iph->proto != IPAC_PROTO_OSMO) { LOGP(DLCTRL, LOGL_ERROR, "Protocol mismatch. We got 0x%x\n", iph->proto); - goto err; + return -EINVAL; } iph_ext = (struct ipaccess_head_ext *) iph->data; if (iph_ext->proto != IPAC_PROTO_EXT_CTRL) { LOGP(DLCTRL, LOGL_ERROR, "Extended protocol mismatch. We got 0x%x\n", iph_ext->proto); - goto err; + return -EINVAL; } msg->l2h = iph_ext->data; @@ -371,28 +386,22 @@ if (cmd) { cmd->ccon = ccon; if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { - ctrl_cmd_send(queue, cmd); + ctrl_cmd_send(&ccon->write_queue, cmd); talloc_free(cmd); } } else { cmd = talloc_zero(ccon, struct ctrl_cmd); if (!cmd) - goto err; + return -ENOMEM; LOGP(DLCTRL, LOGL_ERROR, "Command parser error.\n"); cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Command parser error."; - ctrl_cmd_send(queue, cmd); + ctrl_cmd_send(&ccon->write_queue, cmd); talloc_free(cmd); } - msgb_free(msg); return 0; - -err: - control_close_conn(ccon); - msgb_free(msg); - return ret; } static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/5431 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:51 +0000 Subject: [MERGED] libosmocore[master]: ctrl_test.c: replace print_escaped() with new osmo_escape_str() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl_test.c: replace print_escaped() with new osmo_escape_str() ...................................................................... ctrl_test.c: replace print_escaped() with new osmo_escape_str() Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 28 insertions(+), 60 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b8425c7..2bc3128 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -37,45 +37,15 @@ static void *ctx = NULL; -void print_escaped(const char *str) -{ - if (!str) { - printf("NULL"); - return; - } - - printf("'"); - for (;*str; str++) { - switch (*str) { - case '\n': - printf("\\n"); - break; - case '\r': - printf("\\r"); - break; - case '\t': - printf("\\t"); - break; - default: - printf("%c", *str); - break; - } - } - printf("'"); -} - void assert_same_str(const char *label, const char *expect, const char *got) { if ((expect == got) || (expect && got && (strcmp(expect, got) == 0))) { - printf("%s = ", label); - print_escaped(got); - printf("\n"); + printf("%s = '%s'\n", label, osmo_escape_str(got, -1)); return; } - printf("MISMATCH for '%s':\ngot: ", label); print_escaped(got); - printf("\nexpected: "); print_escaped(expect); - printf("\n"); + printf("MISMATCH for '%s':\ngot: %s\n", label, osmo_escape_str(got, -1)); + printf("expected: %s\n", osmo_escape_str(expect, -1)); OSMO_ASSERT(expect == got); } @@ -84,9 +54,7 @@ struct ctrl_cmd *cmd; struct msgb *msg = msgb_from_string(str); - printf("test parsing: "); - print_escaped(str); - printf("\n"); + printf("test parsing: '%s'\n", osmo_escape_str(str, -1)); cmd = ctrl_cmd_parse(ctx, msg); OSMO_ASSERT(cmd); diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 9c8877b..5775eb2 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -10,102 +10,102 @@ test parsing: 'GET 1 variable' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable\n' id = '1' variable = 'variable\n' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 var\ni\nable' id = '1' variable = 'var\ni\nable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable value' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable value\n' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable multiple value tokens' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'GET 1 variable multiple value tokens\n' id = '1' variable = 'variable' -value = NULL -reply = NULL +value = '(null)' +reply = '(null)' ok test parsing: 'SET 1 variable value' id = '1' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value\n' id = '1' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET weird_id variable value' id = 'weird_id' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET weird_id variable value\n' id = 'weird_id' variable = 'variable' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable multiple value tokens' id = '1' variable = 'variable' value = 'multiple value tokens' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable multiple value tokens\n' id = '1' variable = 'variable' value = 'multiple value tokens' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value_with_trailing_spaces ' id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' -reply = NULL +reply = '(null)' ok test parsing: 'SET 1 variable value_with_trailing_spaces \n' id = '1' variable = 'variable' value = 'value_with_trailing_spaces ' -reply = NULL +reply = '(null)' ok test parsing: 'SET \n special_char_id value' id = '\n' variable = 'special_char_id' value = 'value' -reply = NULL +reply = '(null)' ok test parsing: 'SET \t special_char_id value' id = '\t' variable = 'special_char_id' value = 'value' -reply = NULL +reply = '(null)' ok -- To view, visit https://gerrit.osmocom.org/5430 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:51 +0000 Subject: [MERGED] libosmocore[master]: utils: add osmo_escape_str() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils: add osmo_escape_str() ...................................................................... utils: add osmo_escape_str() To report invalid characters in identifiers, it is desirable to escape any weird characters. Otherwise we might print stray newlines or control characters in the log output. ctrl_test.c already uses a print_escaped() function, which will be replaced by osmo_escape_str() in a subsequent patch. control_cmd.c will use osmo_escape_str() to log invalid identifiers. Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 167 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 0973b4c..72266ae 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -120,4 +120,7 @@ bool osmo_identifier_valid(const char *str); bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); +const char *osmo_escape_str(const char *str, int len); +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); + /*! @} */ diff --git a/src/utils.c b/src/utils.c index 6cc823e..109aac0 100644 --- a/src/utils.c +++ b/src/utils.c @@ -467,4 +467,91 @@ return osmo_separated_identifiers_valid(str, NULL); } +/*! Return the string with all non-printable characters escaped. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \param[inout] buf string buffer to write escaped characters to. + * \param[in] bufsize size of \a buf. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize) +{ + int in_pos = 0; + int next_unprintable = 0; + int out_pos = 0; + char *out = buf; + /* -1 to leave space for a final \0 */ + int out_len = bufsize-1; + + if (!str) + return "(null)"; + + if (in_len < 0) + in_len = strlen(str); + + while (in_pos < in_len) { + for (next_unprintable = in_pos; + next_unprintable < in_len && isprint((int)str[next_unprintable]) + && str[next_unprintable] != '"' + && str[next_unprintable] != '\\'; + next_unprintable++); + + if (next_unprintable == in_len + && in_pos == 0) + return str; + + while (in_pos < next_unprintable && out_pos < out_len) + out[out_pos++] = str[in_pos++]; + + if (out_pos == out_len || in_pos == in_len) + goto done; + + switch (str[next_unprintable]) { +#define BACKSLASH_CASE(c, repr) \ + case c: \ + if (out_pos > out_len-2) \ + goto done; \ + out[out_pos++] = '\\'; \ + out[out_pos++] = repr; \ + break + + BACKSLASH_CASE('\n', 'n'); + BACKSLASH_CASE('\r', 'r'); + BACKSLASH_CASE('\t', 't'); + BACKSLASH_CASE('\0', '0'); + BACKSLASH_CASE('\a', 'a'); + BACKSLASH_CASE('\b', 'b'); + BACKSLASH_CASE('\v', 'v'); + BACKSLASH_CASE('\f', 'f'); + BACKSLASH_CASE('\\', '\\'); + BACKSLASH_CASE('"', '"'); +#undef BACKSLASH_CASE + + default: + out_pos += snprintf(&out[out_pos], out_len - out_pos, "\\%u", (unsigned char)str[in_pos]); + if (out_pos > out_len) { + out_pos = out_len; + goto done; + } + break; + } + in_pos ++; + } + +done: + out[out_pos] = '\0'; + return out; +} + +/*! Return the string with all non-printable characters escaped. + * Call osmo_escape_str_buf() with a static buffer. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns buf containing an escaped representation, possibly truncated, or str itself. + */ +const char *osmo_escape_str(const char *str, int in_len) +{ + return osmo_escape_str_buf(str, in_len, namebuf, sizeof(namebuf)); +} + /*! @} */ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index e6d7ae8..b4f7cd3 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -323,6 +323,53 @@ } } +static void str_escape_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + + printf("\nTesting string escaping\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("\"%s\"\n", osmo_escape_str((const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("\"%s\"\n", osmo_escape_str("termi\nated", -1)); + + printf("- passthru:\n"); + res = osmo_escape_str(printable, -1); + if (res != printable) + printf("NOT passed through! \"%s\"\n", res); + else + printf("passed through unchanged \"%s\"\n", res); + + printf("- zero length:\n"); + printf("\"%s\"\n", osmo_escape_str("omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[7] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, sizeof(in_buf), out_buf, 10)); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- passthrough without truncation when no escaping needed:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[19] = 'E'; + in_buf[20] = '\0'; + memset(out_buf, 0x7f, sizeof(out_buf)); + printf("\"%s\"\n", osmo_escape_str_buf((const char *)in_buf, -1, out_buf, 10)); + OSMO_ASSERT(out_buf[0] == 0x7f); +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -333,5 +380,6 @@ test_idtag_parsing(); test_is_hexstr(); bcd_test(); + str_escape_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 33a185b..fb1d62e 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -75,3 +75,32 @@ val=0xd, expected=D, found=D val=0xe, expected=E, found=E val=0xf, expected=F, found=F + +Testing string escaping +- all chars from 0 to 255 in batches of 16: +"\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15" +"\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\127" +"\128\129\130\131\132\133\134\135\136\137\138\139\140\141\142\143" +"\144\145\146\147\148\149\150\151\152\153\154\155\156\157\158\159" +"\160\161\162\163\164\165\166\167\168\169\170\171\172\173\174\175" +"\176\177\178\179\180\181\182\183\184\185\186\187\188\189\190\191" +"\192\193\194\195\196\197\198\199\200\201\202\203\204\205\206\207" +"\208\209\210\211\212\213\214\215\216\217\218\219\220\221\222\223" +"\224\225\226\227\228\229\230\231\232\233\234\235\236\237\238\239" +"\240\241\242\243\244\245\246\247\248\249\250\251\252\253\254\255" +- nul terminated: +"termi\nated" +- passthru: +passed through unchanged "printable" +- zero length: +"" +- truncation when too long: +"\axxxxxxE" +- passthrough without truncation when no escaping needed: +"xxxxxxxxxxxxxxxxxxxE" -- To view, visit https://gerrit.osmocom.org/5429 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:52 +0000 Subject: [MERGED] libosmocore[master]: ctrl: on parse errors, return a detailed message to sender In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: on parse errors, return a detailed message to sender ...................................................................... ctrl: on parse errors, return a detailed message to sender The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send those back to the CTRL command sender as reply. Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2() should return NULL, which shouldn't actually happen at all. Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d --- M src/ctrl/control_if.c M tests/ctrl/ctrl_test.c 2 files changed, 25 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 5c73b63..17a012a 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -381,14 +381,10 @@ msg->l2h = iph_ext->data; - cmd = ctrl_cmd_parse(ccon, msg); + cmd = ctrl_cmd_parse2(ccon, msg); - if (cmd) { - cmd->ccon = ccon; - if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) { - ctrl_cmd_send(&ccon->write_queue, cmd); - } - } else { + if (!cmd) { + /* should never happen */ cmd = talloc_zero(ccon, struct ctrl_cmd); if (!cmd) return -ENOMEM; @@ -396,10 +392,23 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Command parser error."; - ctrl_cmd_send(&ccon->write_queue, cmd); } - talloc_free(cmd); + if (cmd->type != CTRL_TYPE_ERROR) { + cmd->ccon = ccon; + if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) == CTRL_CMD_HANDLED) { + /* On CTRL_CMD_HANDLED, no reply needs to be sent back. */ + talloc_free(cmd); + cmd = NULL; + } + } + + if (cmd) { + /* There is a reply or error that should be reported back to the sender. */ + ctrl_cmd_send(&ccon->write_queue, cmd); + talloc_free(cmd); + } + return 0; } @@ -894,13 +903,16 @@ osmo_strlcpy((char *)msg->data, cmdstr, msgb_tailroom(msg)); msgb_put(msg, strlen(cmdstr)); - cmd = ctrl_cmd_parse(ch, msg); + cmd = ctrl_cmd_parse2(ch, msg); msgb_free(msg); if (!cmd) return NULL; - if (ctrl_cmd_handle(ch, cmd, NULL) < 0) { + if (cmd->type == CTRL_TYPE_ERROR) + return cmd; + if (ctrl_cmd_handle(ch, cmd, NULL) == CTRL_CMD_HANDLED) { + /* No reply should be sent back. */ talloc_free(cmd); - return NULL; + cmd = NULL; } return cmd; } diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index b1d4f23..39ec61a 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -76,7 +76,7 @@ printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1)); printf("parsing:\n"); - cmd = ctrl_cmd_parse(ctx, msg); + cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); OSMO_ASSERT(t->expect_parsed.type == cmd->type); -- To view, visit https://gerrit.osmocom.org/5437 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:52 +0000 Subject: [MERGED] libosmocore[master]: add ctrl_cmd_parse2() to return parsing errors In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add ctrl_cmd_parse2() to return parsing errors ...................................................................... add ctrl_cmd_parse2() to return parsing errors If a control command fails to parse, we so far discard specific error messages and instead send just "Command parser error". In ctrl_cmd_parse() we actually compose detailed error replies, but in the end simply talloc_free() them and return NULL. A first step to report these errors to the ctrl command issuer is to not return NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add ctrl_cmd_parse2() to return such instead of NULL. To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors. ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper around ctrl_cmd_parse2() which discards the cmd on error. No need really to deprecate ctrl_cmd_parse() yet; especially as long as compiler warnings might break jenkins builds. Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 --- M include/osmocom/ctrl/control_cmd.h M src/ctrl/control_cmd.c 2 files changed, 17 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 4372e25..865b006 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -103,6 +103,7 @@ int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd); int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd); +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg); struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg); struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd); struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd); diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f616479..c2ce2be 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -269,7 +269,22 @@ return NULL; } +/*! Parse CTRL command struct from msgb, return NULL on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg) +{ + struct ctrl_cmd *res = ctrl_cmd_parse2(ctx, msg); + if (res->type == CTRL_TYPE_ERROR) { + talloc_free(res); + return NULL; + } + return res; +} + +/*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in + * ctrl->reply on any error. + * The caller is responsible to talloc_free() the returned struct pointer. */ +struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg) { char *str, *tmp, *saveptr = NULL; char *var, *val; @@ -382,8 +397,7 @@ cmd->id = "err"; cmd->reply = "OOM"; err: - talloc_free(cmd); - return NULL; + return cmd; } struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd) -- To view, visit https://gerrit.osmocom.org/5436 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:05:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:05:52 +0000 Subject: [MERGED] libosmocore[master]: ctrl_test: add two more current parsing bugs to prep for fix In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl_test: add two more current parsing bugs to prep for fix ...................................................................... ctrl_test: add two more current parsing bugs to prep for fix Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 --- M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok 2 files changed, 34 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index e25929c..b1d4f23 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -154,6 +154,22 @@ "ERROR 1 Command not found", }, + { "GET 1 var\ti\table", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ti\table", /* current bug */ + }, + "ERROR 1 Command not found", + }, + { "GET 1 var\ri\rable", + { + .type = CTRL_TYPE_GET, + .id = "1", + .variable = "var\ri\rable", /* current bug */ + }, + "ERROR 1 Command not found", + }, { "GET 1 variable value", { .type = CTRL_TYPE_GET, diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 210c599..4a3a169 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -34,6 +34,24 @@ handling: replied: 'ERROR 1 Command not found' ok +test: 'GET 1 var\ti\table' +parsing: +id = '1' +variable = 'var\ti\table' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok +test: 'GET 1 var\ri\rable' +parsing: +id = '1' +variable = 'var\ri\rable' +value = '(null)' +reply = '(null)' +handling: +replied: 'ERROR 1 Command not found' +ok test: 'GET 1 variable value' parsing: id = '1' -- To view, visit https://gerrit.osmocom.org/5435 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:14:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 18 Dec 2017 23:14:54 +0000 Subject: [MERGED] osmo-msc[master]: fix GSM-Milenage in presence of 2G keys In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix GSM-Milenage in presence of 2G keys ...................................................................... fix GSM-Milenage in presence of 2G keys In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth tokens. tuple->vec.kc was calculated from the GSM algorithm and is not necessarily a match for the UMTS AKA tokens. So far we were always sending the Kc retrieved from osmo-hlr. If the 2G auth algo is set to milenage, the 2G Kc coincides with the one derived from 3G tokens, but if 2G is set to a different algorithm, the Kc received from the osmo-hlr is not usable for ciphering when UMTS AKA was used for authentication (on R99 capable GERAN and MS). Implementation: To decide whether to use UMTS AKA derived Kc or the Kc from the auth vector, use the umts_aka flag added to set_ciph_mode() in a previous patch. Use osmo_auth_c3() to derive the GSM AKA Kc from the UMTS AKA CK and KI. Related: OS#2745 Requires: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa (libosmocore) Change-Id: If04e405426c55a81341747a9b450a69188525d5c --- M src/libmsc/gsm_04_08.c 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 472acf0..e370962 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3421,7 +3421,13 @@ ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); ei.perm_algo_len = 1; - memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); + /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth + * tokens. tuple->vec.kc was calculated from the GSM algorithm and is not + * necessarily a match for the UMTS AKA tokens. */ + if (umts_aka) + osmo_auth_c3(ei.key, tuple->vec.ck, tuple->vec.ik); + else + memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc)); ei.key_len = sizeof(tuple->vec.kc); return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv); -- To view, visit https://gerrit.osmocom.org/5470 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If04e405426c55a81341747a9b450a69188525d5c Gerrit-PatchSet: 5 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:14:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:14:58 +0000 Subject: [MERGED] osmo-msc[master]: compiler warning: extend #if 0 to include unused array In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: compiler warning: extend #if 0 to include unused array ...................................................................... compiler warning: extend #if 0 to include unused array Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085 --- M src/libmsc/silent_call.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c index b9a8ed9..a99f218 100644 --- a/src/libmsc/silent_call.c +++ b/src/libmsc/silent_call.c @@ -85,7 +85,6 @@ LOGP(DLSMS, LOGL_NOTICE, "Discarding L3 message from a silent call.\n"); return 0; } -#endif struct msg_match { uint8_t pdisc; @@ -98,7 +97,6 @@ { GSM48_PDISC_MM, GSM48_MT_MM_CM_SERV_REQ }, }; -#if 0 /* decide if we need to reroute a message as part of a silent call */ int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg) { -- To view, visit https://gerrit.osmocom.org/5467 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:14:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:14:58 +0000 Subject: [MERGED] osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: a_iface_bssap: compiler warning: cast const away from TLV val for l2h ...................................................................... a_iface_bssap: compiler warning: cast const away from TLV val for l2h Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a --- M src/libmsc/a_iface_bssap.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..8a1e39b 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -325,7 +325,7 @@ /* Parse Layer 3 Information element */ /* FIXME: This is probably to hackish, compiler also complains "assignment discards ?const? qualifier..." */ - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); + msg->l3h = (uint8_t*)TLVP_VAL(&tp, GSM0808_IE_LAYER_3_INFORMATION); msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_INFORMATION); /* Create new subscriber context */ @@ -421,7 +421,7 @@ } if (TLVP_PRESENT(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)) { - msg->l3h = TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); + msg->l3h = (uint8_t*)TLVP_VAL(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); msg->tail = msg->l3h + TLVP_LEN(&tp, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS); } else { msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/5472 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:19:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:19:07 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 5: IMO Max's comments do not hold. However, this patch *does* make CTRL input parsing stricter and, I don't know of any, but this might break sloppy CTRL interface clients. E.g. trailing spaces or characters after a GET lead to a parsing error; before, we ignored any data following the cmds. -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:20:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:20:36 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: > are we sure there's no GSM timer number/name for this? not sure. I can try to have a look... -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:25:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 18 Dec 2017 23:25:36 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 5: -Code-Review It does improve situation but I still think it's better to be paranoid about string parsing even if ATM we explicitly null-terminate it. -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:45:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:45:41 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: > > are we sure there's no GSM timer number/name for this? > > not sure. I can try to have a look... So far all "Paging" chapters I have found talk merely of initiating a Paging; closest match would be the 48.008 "3.1.10 Paging", which doesn't mention any timeouts. The T3113 timer is mentioned for the RR layer in 44.018 "3.3.2.1 Paging initiation by the network", but I'm looking at the MSC, i.e. BSSMAP and IuCS. I feel like I'm searching the needle in the hay stack. On another note, I personally find "paging timeout" much easier to understand than "T1234"... -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:49:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:49:42 +0000 Subject: [ABANDON] python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install" In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: Revert "Add osmo_ipa.py to setup's install" ...................................................................... Abandoned merged as part of I30cdf0f85b2a60a235960911c9827f4129da40db -- To view, visit https://gerrit.osmocom.org/5382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Dec 18 23:50:32 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 18 Dec 2017 23:50:32 +0000 Subject: [ABANDON] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: HO prep: introduce per-BTS handover config, with defaults on net node ...................................................................... Abandoned I'll abandon this for now until the HO branch is ready -- To view, visit https://gerrit.osmocom.org/5050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:26:52 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:26:52 +0000 Subject: libosmocore[master]: logging vty: tweak general 'logging' command doc In-Reply-To: References: Message-ID: Patch Set 1: I took a look now and currently the LOGGING_STR is used for log_vty_command_description(), which composes the doc string for logging_level_cmd, which is installed in all of VIEW, ENABLE and CONFIG nodes as well as the log target nodes by logging_vty.c:logging_vty_add_cmds(): logging_level_cmd.string = log_vty_command_string(); logging_level_cmd.doc = log_vty_command_description(); install_element_ve(&logging_level_cmd); [...] install_element(CFG_LOG_NODE, &logging_level_cmd); [...] install_element(CFG_LOG_NODE, &logging_level_cmd); To have differing doc strings for these nodes would take a bit more effort, looks like we'd need to separate these. Most logging commands are also used on both install_element_ve() and the CFG_LOG_NODE. I guess it makes more sense to use a generally matching LOGGING_STR than going for the effort of separating this. If you agree I could go through that code, do the separation and some more talloc_asprintf_append() simplifications; but other tasks should probably come first, right? -- To view, visit https://gerrit.osmocom.org/5253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:38:19 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:38:19 +0000 Subject: [PATCH] libosmocore[master]: cosmetic: logging: simplify logging level VTY cmd doc compos... Message-ID: Review at https://gerrit.osmocom.org/5488 cosmetic: logging: simplify logging level VTY cmd doc composition In log_vty_command_description(), which composes a VTY command doc string, use talloc_asprintf_append() to compose the doc string instead of the strangely convoluted way the function worked before this patch. Looking at LOGGING_STR, I came across this function and "by accident" started to refactor it, to understand what it is doing. I considered dropping the patch but since it is already here I might as well submit it. Change-Id: Ib818e2d524c750f07bea2aa585011f40e3ee82e8 --- M src/logging.c 1 file changed, 15 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/5488/1 diff --git a/src/logging.c b/src/logging.c index 20ec443..8e65208 100644 --- a/src/logging.c +++ b/src/logging.c @@ -904,59 +904,34 @@ { struct log_info *info = osmo_log_info; char *str; - int i, ret, len = 0, offset = 0, rem; - unsigned int size = - strlen(LOGGING_STR - "Set the log level for a specified category\n") + 1; + int i; assert_loginfo(); - for (i = 0; i < info->num_cat; i++) { - if (info->cat[i].name == NULL) - continue; - size += strlen(info->cat[i].description) + 1; - } - - for (i = 0; i < LOGLEVEL_DEFS; i++) - size += strlen(loglevel_descriptions[i]) + 1; - - size += strlen("Global setting for all subsystems") + 1; - rem = size; - str = talloc_zero_size(tall_log_ctx, size); + str = talloc_zero_size(tall_log_ctx, 4096); if (!str) return NULL; - ret = snprintf(str + offset, rem, LOGGING_STR - "Set the log level for a specified category\n"); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); +#define SPRINTF(fmt, args...) \ + do {\ + str = talloc_asprintf_append(str, fmt, ## args); \ + if (!str) \ + return NULL; \ + } while(0) - ret = snprintf(str + offset, rem, - "Global setting for all subsystems\n"); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); + SPRINTF(LOGGING_STR "Set the log level for a specified category\n"); + SPRINTF("Global setting for all subsystems\n"); for (i = 0; i < info->num_cat; i++) { if (info->cat[i].name == NULL) continue; - ret = snprintf(str + offset, rem, "%s\n", - info->cat[i].description); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); + SPRINTF("%s\n", info->cat[i].description); } - for (i = 0; i < LOGLEVEL_DEFS; i++) { - ret = snprintf(str + offset, rem, "%s\n", - loglevel_descriptions[i]); - if (ret < 0) - goto err; - OSMO_SNPRINTF_RET(ret, rem, offset, len); - } -err: - str[size-1] = '\0'; + for (i = 0; i < LOGLEVEL_DEFS; i++) + SPRINTF("%s\n", loglevel_descriptions[i]); + return str; +#undef SPRINTF } /*! Initialize the Osmocom logging core -- To view, visit https://gerrit.osmocom.org/5488 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib818e2d524c750f07bea2aa585011f40e3ee82e8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:45:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:45:04 +0000 Subject: [ABANDON] osmo-msc[master]: db: wrap dbi querying to log actual SQL on debug and error In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: db: wrap dbi querying to log actual SQL on debug and error ...................................................................... Abandoned I don't want to spend time on this, maybe I'll come back to it when the next SQL error happens -- To view, visit https://gerrit.osmocom.org/5205 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I4171dad8ffffbf634a75dedde752d82c51ff7803 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:52:23 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:52:23 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: msc cfg: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: msc cfg: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' ...................................................................... Abandoned this already seems to be merged from another patch -- To view, visit https://gerrit.osmocom.org/4600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Idd970917e84f923d229b0c3de43f3e964a0a20c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:52:41 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:52:41 +0000 Subject: [ABANDON] osmo-gsm-tester[master]: cosmetic: use name 'mgw' instead of 'mgcpgw' In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: cosmetic: use name 'mgw' instead of 'mgcpgw' ...................................................................... Abandoned the code has moved forward and it is too much effort to fix the merge conflicts -- To view, visit https://gerrit.osmocom.org/4601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Icf65bd1daa52b280d73e56b6267b3c81ed1c5487 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 00:56:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 00:56:08 +0000 Subject: libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Patch Set 5: there's a rationale now; By now I don't care much about this, will abandon in a few days if nothing happens -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 02:13:51 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 02:13:51 +0000 Subject: [PATCH] osmo-iuh[master]: fix 3 compiler warnings in ranap_common.c Message-ID: Review at https://gerrit.osmocom.org/5489 fix 3 compiler warnings in ranap_common.c ranap_common.c:282 col 45: warning: format ?%u? expects argument of type ?unsigned int?, but argument 4 has type ?RANAP_CauseNon_Standard_t {aka const long int}? [-Wformat=] ranap_common.c:527 col 15: warning: implicit declaration of function ?asn1str_to_u16?; did you mean ?asn_strtol?? [-Wimplicit-function-declaration] ranap_common.c:546 col 11: warning: unused variable ?addr? [-Wunused-variable] Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e --- M src/ranap_common.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/89/5489/1 diff --git a/src/ranap_common.c b/src/ranap_common.c index 13c913f..46203e0 100644 --- a/src/ranap_common.c +++ b/src/ranap_common.c @@ -24,6 +24,7 @@ #include #include +#include extern int asn1_xer_print; int _ranap_DRANAP = 0; @@ -278,7 +279,7 @@ cause->choice.misc)); break; case RANAP_Cause_PR_non_Standard: - snprintf(buf, sizeof(buf), "non-standard(%u)", + snprintf(buf, sizeof(buf), "non-standard(%ld)", cause->choice.non_Standard); break; default: @@ -542,7 +543,6 @@ int ranap_ip_from_transp_layer_addr(const BIT_STRING_t *in, uint32_t *ip) { - uint32_t addr; uint8_t x213[] = {0x35, 0x00, 0x01}; /* Only support IPv4 for now - plain and with x213 encapsulation */ -- To view, visit https://gerrit.osmocom.org/5489 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 02:15:14 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 02:15:14 +0000 Subject: [PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5381 to look at the new patch set (#2). iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than one LAC per OsmoHNBGW. iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page successfully in a setup with multiple LACs (read: multiple hNodeB) connected to an OsmoHNBGW. Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC shows up on a different RNC Id than before, move it over to the new RNC Id. Future patches should probably add: * timeouts of RNC Id / LAC,RAC validity, to remove unused entries. * VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed. * VTY/CTRL commands to remove RNC Id / LAC,RAC entries. Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 --- M src/iu_client.c 1 file changed, 127 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/2 diff --git a/src/iu_client.c b/src/iu_client.c index 3ee900c..0f19181 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -47,6 +47,15 @@ uint16_t rnc_id; }; +struct iu_lac_rac_entry { + struct llist_head entry; + + /* LAC: Location Area Code (for CS and PS) */ + uint16_t lac; + /* RAC: Routing Area Code (for PS only) */ + uint8_t rac; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -58,9 +67,10 @@ struct llist_head entry; uint16_t rnc_id; - uint16_t lac; /* Location Area Code (used for CS and PS) */ - uint8_t rac; /* Routing Area Code (used for PS only) */ struct osmo_sccp_addr sccp_addr; + + /* A list of struct iu_lac_rac_entry */ + struct llist_head lac_rac_list; }; void *talloc_iu_ctx; @@ -81,6 +91,9 @@ #define LOGPIU(level, fmt, args...) \ LOGP(iu_log_subsystem, level, fmt, ## args) + +#define LOGPIUC(level, fmt, args...) \ + LOGPC(iu_log_subsystem, level, fmt, ## args) static LLIST_HEAD(ue_conn_ctx_list); static LLIST_HEAD(rnc_list); @@ -119,53 +132,109 @@ return NULL; } -static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, uint8_t rac, - struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); + OSMO_ASSERT(rnc); + + INIT_LLIST_HEAD(&rnc->lac_rac_list); rnc->rnc_id = rnc_id; - rnc->lac = lac; - rnc->rac = rac; rnc->sccp_addr = *addr; llist_add(&rnc->entry, &rnc_list); - LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n", - rnc->rnc_id, rnc->lac, rnc->rac); + LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, osmo_sccp_addr_dump(addr)); return rnc; +} + +/* Find a match for the given LAC (and RAC). For CS, pass rac as 0. + * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no match is found, or to the + * match if a match is found. Return true if a match is found. */ +static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct iu_lac_rac_entry **lre, + uint16_t lac, uint8_t rac) +{ + struct ranap_iu_rnc *r; + struct iu_lac_rac_entry *e; + + if (rnc) + *rnc = NULL; + if (lre) + *lre = NULL; + + llist_for_each_entry(r, &rnc_list, entry) { + llist_for_each_entry(e, &r->lac_rac_list, entry) { + if (e->lac == lac && e->rac == rac) { + if (rnc) + *rnc = r; + if (lre) + *lre = e; + return true; + } + } + } + return false; +} + +static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id) +{ + struct ranap_iu_rnc *rnc; + llist_for_each_entry(rnc, &rnc_list, entry) { + if (rnc->rnc_id == rnc_id) + return rnc; + } + return NULL; +} + +static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +{ + char buf[256]; + osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); + return !strcmp(buf, osmo_sccp_addr_dump(b)); } static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac, uint8_t rac, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->rnc_id != rnc_id) - continue; + struct ranap_iu_rnc *old_rnc; + struct iu_lac_rac_entry *lre; - /* We have this RNC Id registered already. Make sure that the - * details match. */ + /* Make sure we know this rnc_id and that this SCCP address is in our records */ + rnc = iu_rnc_id_find(rnc_id); - /* TODO should a mismatch be an error? */ - if (rnc->lac != lac || rnc->rac != rac) - LOGPIU(LOGL_NOTICE, "RNC %d changes its details:" - " LAC=%d RAC=%d --> LAC=%d RAC=%d\n", - rnc->rnc_id, rnc->lac, rnc->rac, - lac, rac); - rnc->lac = lac; - rnc->rac = rac; + if (rnc) { + if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + LOGPIU(LOGL_NOTICE, "RNC %u on New SCCP Addr %s (LAC=%u RAC=%u)\n", + rnc_id, osmo_sccp_addr_dump(addr), lac, rac); + rnc->sccp_addr = *addr; + } + } else + rnc = iu_rnc_alloc(rnc_id, addr); - if (addr && memcmp(&rnc->sccp_addr, addr, sizeof(*addr))) - LOGPIU(LOGL_NOTICE, "RNC %d on New SCCP Addr %s" - " (LAC=%d RAC=%d)\n", - rnc->rnc_id, osmo_sccp_addr_dump(addr), rnc->lac, rnc->rac); - rnc->sccp_addr = *addr; - return rnc; + /* Detect whether the LAC,RAC is already recorded in another RNC */ + iu_rnc_lac_rac_find(&old_rnc, &lre, lac, rac); + + if (old_rnc && old_rnc != rnc) { + /* LAC,RAC already exists in a different RNC */ + LOGPIU(LOGL_NOTICE, "LAC %u RAC %u moved from RNC %u %s", + lac, rac, old_rnc->rnc_id, osmo_sccp_addr_dump(&old_rnc->sccp_addr)); + LOGPIUC(LOGL_NOTICE, " to RNC %u %s\n", + rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); + + llist_del(&lre->entry); + llist_add(&lre->entry, &rnc->lac_rac_list); + } else if (!old_rnc) { + /* LAC,RAC not recorded yet */ + LOGPIU(LOGL_NOTICE, "RNC %u: new LAC %u RAC %u\n", rnc_id, lac, rac); + lre = talloc_zero(rnc, struct iu_lac_rac_entry); + lre->lac = lac; + lre->rac = rac; + llist_add(&lre->entry, &rnc->lac_rac_list); } + /* else, LAC,RAC already recorded with the current RNC. */ - /* Not found, make a new one. */ - return iu_rnc_alloc(rnc_id, lac, rac, addr); + return rnc; } /*********************************************************************** @@ -602,69 +671,46 @@ struct msgb *msg; msg = ranap_new_msg_paging_cmd(imsi, tmsi, is_ps? 1 : 0, paging_cause); msg->l2h = msg->data; - osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); - return 0; + return osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); } -static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi, +static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptmsi, uint16_t lac, uint8_t rac, bool is_ps) { struct ranap_iu_rnc *rnc; - int pagings_sent = 0; + int rc; + const char *log_msg; + int log_level; + int paged = 0; - if (tmsi_or_ptimsi) { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use %s %x)\n", - is_ps? "IuPS" : "IuCS", - imsi, - is_ps? "PTMSI" : "TMSI", - *tmsi_or_ptimsi); + iu_rnc_lac_rac_find(&rnc, NULL, lac, rac); + if (rnc) { + if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptmsi, is_ps, 0) == 0) { + log_msg = "Paging"; + log_level = LOGL_DEBUG; + paged = 1; + } else { + log_msg = "Paging failed"; + log_level = LOGL_ERROR; + } } else { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use IMSI)\n", - is_ps? "IuPS" : "IuCS", - imsi - ); + log_msg = "Found no RNC to Page"; + log_level = LOGL_ERROR; } - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->lac != lac) - continue; - if (is_ps && rnc->rac != rac) - continue; - /* Found a match! */ - if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0) - == 0) { - LOGPIU(LOGL_DEBUG, - "%s: Paged for IMSI %s on RNC %d, on SCCP addr %s\n", - is_ps? "IuPS" : "IuCS", - imsi, rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); - pagings_sent ++; - } - } + if (is_ps) + LOGPIU(log_level, "IuPS: %s on LAC %d RAC %d", log_msg, lac, rac); + else + LOGPIU(log_level, "IuCS: %s on LAC %d", log_msg, lac); + if (rnc) + LOGPIUC(log_level, " at SCCP-addr %s", osmo_sccp_addr_dump(&rnc->sccp_addr)); + if (tmsi_or_ptmsi) + LOGPIUC(log_level, ", for %s %08x\n", is_ps? "PTMSI" : "TMSI", *tmsi_or_ptmsi); + else + LOGPIUC(log_level, ", for IMSI %s\n", imsi); - /* Some logging... */ - if (pagings_sent > 0) { - LOGPIU(LOGL_DEBUG, - "%s: %d RNCs were paged for IMSI %s.\n", - is_ps? "IuPS" : "IuCS", - pagings_sent, imsi); - } - else { - if (is_ps) { - LOGPIU(LOGL_ERROR, "IuPS: Found no RNC to page for" - " LAC %d RAC %d (would have paged IMSI %s)\n", - lac, rac, imsi); - } - else { - LOGPIU(LOGL_ERROR, "IuCS: Found no RNC to page for" - " LAC %d (would have paged IMSI %s)\n", - lac, imsi); - } - } - - return pagings_sent; + return paged; } int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 02:16:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 02:16:04 +0000 Subject: osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-2 I still need to test this, will remove my -2 when done. Feel free to review in the meantime -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 02:18:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 02:18:21 +0000 Subject: [PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5381 to look at the new patch set (#3). iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than one LAC per OsmoHNBGW. iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page successfully in a setup with multiple LACs (read: multiple hNodeB) connected to an OsmoHNBGW. Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC shows up on a different RNC Id than before, move it over to the new RNC Id. Future patches should probably add: * timeouts of RNC Id / LAC,RAC validity, to remove unused entries. * VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed. * VTY/CTRL commands to remove RNC Id / LAC,RAC entries. Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 --- M src/iu_client.c 1 file changed, 127 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/3 diff --git a/src/iu_client.c b/src/iu_client.c index 3ee900c..25914cb 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -47,6 +47,15 @@ uint16_t rnc_id; }; +struct iu_lac_rac_entry { + struct llist_head entry; + + /* LAC: Location Area Code (for CS and PS) */ + uint16_t lac; + /* RAC: Routing Area Code (for PS only) */ + uint8_t rac; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -58,9 +67,10 @@ struct llist_head entry; uint16_t rnc_id; - uint16_t lac; /* Location Area Code (used for CS and PS) */ - uint8_t rac; /* Routing Area Code (used for PS only) */ struct osmo_sccp_addr sccp_addr; + + /* A list of struct iu_lac_rac_entry */ + struct llist_head lac_rac_list; }; void *talloc_iu_ctx; @@ -81,6 +91,9 @@ #define LOGPIU(level, fmt, args...) \ LOGP(iu_log_subsystem, level, fmt, ## args) + +#define LOGPIUC(level, fmt, args...) \ + LOGPC(iu_log_subsystem, level, fmt, ## args) static LLIST_HEAD(ue_conn_ctx_list); static LLIST_HEAD(rnc_list); @@ -119,53 +132,109 @@ return NULL; } -static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, uint8_t rac, - struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); + OSMO_ASSERT(rnc); + + INIT_LLIST_HEAD(&rnc->lac_rac_list); rnc->rnc_id = rnc_id; - rnc->lac = lac; - rnc->rac = rac; rnc->sccp_addr = *addr; llist_add(&rnc->entry, &rnc_list); - LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n", - rnc->rnc_id, rnc->lac, rnc->rac); + LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, osmo_sccp_addr_dump(addr)); return rnc; +} + +/* Find a match for the given LAC (and RAC). For CS, pass rac as 0. + * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no match is found, or to the + * match if a match is found. Return true if a match is found. */ +static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct iu_lac_rac_entry **lre, + uint16_t lac, uint8_t rac) +{ + struct ranap_iu_rnc *r; + struct iu_lac_rac_entry *e; + + if (rnc) + *rnc = NULL; + if (lre) + *lre = NULL; + + llist_for_each_entry(r, &rnc_list, entry) { + llist_for_each_entry(e, &r->lac_rac_list, entry) { + if (e->lac == lac && e->rac == rac) { + if (rnc) + *rnc = r; + if (lre) + *lre = e; + return true; + } + } + } + return false; +} + +static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id) +{ + struct ranap_iu_rnc *rnc; + llist_for_each_entry(rnc, &rnc_list, entry) { + if (rnc->rnc_id == rnc_id) + return rnc; + } + return NULL; +} + +static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +{ + char buf[256]; + osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); + return !strcmp(buf, osmo_sccp_addr_dump(b)); } static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac, uint8_t rac, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->rnc_id != rnc_id) - continue; + struct ranap_iu_rnc *old_rnc; + struct iu_lac_rac_entry *lre; - /* We have this RNC Id registered already. Make sure that the - * details match. */ + /* Make sure we know this rnc_id and that this SCCP address is in our records */ + rnc = iu_rnc_id_find(rnc_id); - /* TODO should a mismatch be an error? */ - if (rnc->lac != lac || rnc->rac != rac) - LOGPIU(LOGL_NOTICE, "RNC %d changes its details:" - " LAC=%d RAC=%d --> LAC=%d RAC=%d\n", - rnc->rnc_id, rnc->lac, rnc->rac, - lac, rac); - rnc->lac = lac; - rnc->rac = rac; + if (rnc) { + if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + LOGPIU(LOGL_NOTICE, "RNC %u changed its SCCP addr to %s (LAC=%u RAC=%u)\n", + rnc_id, osmo_sccp_addr_dump(addr), lac, rac); + rnc->sccp_addr = *addr; + } + } else + rnc = iu_rnc_alloc(rnc_id, addr); - if (addr && memcmp(&rnc->sccp_addr, addr, sizeof(*addr))) - LOGPIU(LOGL_NOTICE, "RNC %d on New SCCP Addr %s" - " (LAC=%d RAC=%d)\n", - rnc->rnc_id, osmo_sccp_addr_dump(addr), rnc->lac, rnc->rac); - rnc->sccp_addr = *addr; - return rnc; + /* Detect whether the LAC,RAC is already recorded in another RNC */ + iu_rnc_lac_rac_find(&old_rnc, &lre, lac, rac); + + if (old_rnc && old_rnc != rnc) { + /* LAC,RAC already exists in a different RNC */ + LOGPIU(LOGL_NOTICE, "LAC %u RAC %u moved from RNC %u %s", + lac, rac, old_rnc->rnc_id, osmo_sccp_addr_dump(&old_rnc->sccp_addr)); + LOGPIUC(LOGL_NOTICE, " to RNC %u %s\n", + rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); + + llist_del(&lre->entry); + llist_add(&lre->entry, &rnc->lac_rac_list); + } else if (!old_rnc) { + /* LAC,RAC not recorded yet */ + LOGPIU(LOGL_NOTICE, "RNC %u: new LAC %u RAC %u\n", rnc_id, lac, rac); + lre = talloc_zero(rnc, struct iu_lac_rac_entry); + lre->lac = lac; + lre->rac = rac; + llist_add(&lre->entry, &rnc->lac_rac_list); } + /* else, LAC,RAC already recorded with the current RNC. */ - /* Not found, make a new one. */ - return iu_rnc_alloc(rnc_id, lac, rac, addr); + return rnc; } /*********************************************************************** @@ -602,69 +671,46 @@ struct msgb *msg; msg = ranap_new_msg_paging_cmd(imsi, tmsi, is_ps? 1 : 0, paging_cause); msg->l2h = msg->data; - osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); - return 0; + return osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); } -static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi, +static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptmsi, uint16_t lac, uint8_t rac, bool is_ps) { struct ranap_iu_rnc *rnc; - int pagings_sent = 0; + int rc; + const char *log_msg; + int log_level; + int paged = 0; - if (tmsi_or_ptimsi) { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use %s %x)\n", - is_ps? "IuPS" : "IuCS", - imsi, - is_ps? "PTMSI" : "TMSI", - *tmsi_or_ptimsi); + iu_rnc_lac_rac_find(&rnc, NULL, lac, rac); + if (rnc) { + if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptmsi, is_ps, 0) == 0) { + log_msg = "Paging"; + log_level = LOGL_DEBUG; + paged = 1; + } else { + log_msg = "Paging failed"; + log_level = LOGL_ERROR; + } } else { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use IMSI)\n", - is_ps? "IuPS" : "IuCS", - imsi - ); + log_msg = "Found no RNC to Page"; + log_level = LOGL_ERROR; } - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->lac != lac) - continue; - if (is_ps && rnc->rac != rac) - continue; - /* Found a match! */ - if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0) - == 0) { - LOGPIU(LOGL_DEBUG, - "%s: Paged for IMSI %s on RNC %d, on SCCP addr %s\n", - is_ps? "IuPS" : "IuCS", - imsi, rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); - pagings_sent ++; - } - } + if (is_ps) + LOGPIU(log_level, "IuPS: %s on LAC %d RAC %d", log_msg, lac, rac); + else + LOGPIU(log_level, "IuCS: %s on LAC %d", log_msg, lac); + if (rnc) + LOGPIUC(log_level, " at SCCP-addr %s", osmo_sccp_addr_dump(&rnc->sccp_addr)); + if (tmsi_or_ptmsi) + LOGPIUC(log_level, ", for %s %08x\n", is_ps? "PTMSI" : "TMSI", *tmsi_or_ptmsi); + else + LOGPIUC(log_level, ", for IMSI %s\n", imsi); - /* Some logging... */ - if (pagings_sent > 0) { - LOGPIU(LOGL_DEBUG, - "%s: %d RNCs were paged for IMSI %s.\n", - is_ps? "IuPS" : "IuCS", - pagings_sent, imsi); - } - else { - if (is_ps) { - LOGPIU(LOGL_ERROR, "IuPS: Found no RNC to page for" - " LAC %d RAC %d (would have paged IMSI %s)\n", - lac, rac, imsi); - } - else { - LOGPIU(LOGL_ERROR, "IuCS: Found no RNC to page for" - " LAC %d (would have paged IMSI %s)\n", - lac, imsi); - } - } - - return pagings_sent; + return paged; } int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 02:20:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 02:20:21 +0000 Subject: [PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5381 to look at the new patch set (#4). iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than one LAC per OsmoHNBGW. iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page successfully in a setup with multiple LACs (read: multiple hNodeB) connected to an OsmoHNBGW. Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC shows up on a different RNC Id than before, move it over to the new RNC Id. Future patches should probably add: * timeouts of RNC Id / LAC,RAC validity, to remove unused entries. * VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed. * VTY/CTRL commands to remove RNC Id / LAC,RAC entries. Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 --- M src/iu_client.c 1 file changed, 127 insertions(+), 82 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/4 diff --git a/src/iu_client.c b/src/iu_client.c index 3ee900c..0724220 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -47,6 +47,15 @@ uint16_t rnc_id; }; +struct iu_lac_rac_entry { + struct llist_head entry; + + /* LAC: Location Area Code (for CS and PS) */ + uint16_t lac; + /* RAC: Routing Area Code (for PS only) */ + uint8_t rac; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -58,9 +67,10 @@ struct llist_head entry; uint16_t rnc_id; - uint16_t lac; /* Location Area Code (used for CS and PS) */ - uint8_t rac; /* Routing Area Code (used for PS only) */ struct osmo_sccp_addr sccp_addr; + + /* A list of struct iu_lac_rac_entry */ + struct llist_head lac_rac_list; }; void *talloc_iu_ctx; @@ -81,6 +91,9 @@ #define LOGPIU(level, fmt, args...) \ LOGP(iu_log_subsystem, level, fmt, ## args) + +#define LOGPIUC(level, fmt, args...) \ + LOGPC(iu_log_subsystem, level, fmt, ## args) static LLIST_HEAD(ue_conn_ctx_list); static LLIST_HEAD(rnc_list); @@ -119,53 +132,109 @@ return NULL; } -static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, uint8_t rac, - struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); + OSMO_ASSERT(rnc); + + INIT_LLIST_HEAD(&rnc->lac_rac_list); rnc->rnc_id = rnc_id; - rnc->lac = lac; - rnc->rac = rac; rnc->sccp_addr = *addr; llist_add(&rnc->entry, &rnc_list); - LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n", - rnc->rnc_id, rnc->lac, rnc->rac); + LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, osmo_sccp_addr_dump(addr)); return rnc; +} + +/* Find a match for the given LAC (and RAC). For CS, pass rac as 0. + * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no match is found, or to the + * match if a match is found. Return true if a match is found. */ +static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct iu_lac_rac_entry **lre, + uint16_t lac, uint8_t rac) +{ + struct ranap_iu_rnc *r; + struct iu_lac_rac_entry *e; + + if (rnc) + *rnc = NULL; + if (lre) + *lre = NULL; + + llist_for_each_entry(r, &rnc_list, entry) { + llist_for_each_entry(e, &r->lac_rac_list, entry) { + if (e->lac == lac && e->rac == rac) { + if (rnc) + *rnc = r; + if (lre) + *lre = e; + return true; + } + } + } + return false; +} + +static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id) +{ + struct ranap_iu_rnc *rnc; + llist_for_each_entry(rnc, &rnc_list, entry) { + if (rnc->rnc_id == rnc_id) + return rnc; + } + return NULL; +} + +static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +{ + char buf[256]; + osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); + return !strcmp(buf, osmo_sccp_addr_dump(b)); } static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac, uint8_t rac, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->rnc_id != rnc_id) - continue; + struct ranap_iu_rnc *old_rnc; + struct iu_lac_rac_entry *lre; - /* We have this RNC Id registered already. Make sure that the - * details match. */ + /* Make sure we know this rnc_id and that this SCCP address is in our records */ + rnc = iu_rnc_id_find(rnc_id); - /* TODO should a mismatch be an error? */ - if (rnc->lac != lac || rnc->rac != rac) - LOGPIU(LOGL_NOTICE, "RNC %d changes its details:" - " LAC=%d RAC=%d --> LAC=%d RAC=%d\n", - rnc->rnc_id, rnc->lac, rnc->rac, - lac, rac); - rnc->lac = lac; - rnc->rac = rac; + if (rnc) { + if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + LOGPIU(LOGL_NOTICE, "RNC %u changed its SCCP addr to %s (LAC=%u RAC=%u)\n", + rnc_id, osmo_sccp_addr_dump(addr), lac, rac); + rnc->sccp_addr = *addr; + } + } else + rnc = iu_rnc_alloc(rnc_id, addr); - if (addr && memcmp(&rnc->sccp_addr, addr, sizeof(*addr))) - LOGPIU(LOGL_NOTICE, "RNC %d on New SCCP Addr %s" - " (LAC=%d RAC=%d)\n", - rnc->rnc_id, osmo_sccp_addr_dump(addr), rnc->lac, rnc->rac); - rnc->sccp_addr = *addr; - return rnc; + /* Detect whether the LAC,RAC is already recorded in another RNC */ + iu_rnc_lac_rac_find(&old_rnc, &lre, lac, rac); + + if (old_rnc && old_rnc != rnc) { + /* LAC,RAC already exists in a different RNC */ + LOGPIU(LOGL_NOTICE, "LAC %u RAC %u moved from RNC %u %s", + lac, rac, old_rnc->rnc_id, osmo_sccp_addr_dump(&old_rnc->sccp_addr)); + LOGPIUC(LOGL_NOTICE, " to RNC %u %s\n", + rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); + + llist_del(&lre->entry); + llist_add(&lre->entry, &rnc->lac_rac_list); + } else if (!old_rnc) { + /* LAC,RAC not recorded yet */ + LOGPIU(LOGL_NOTICE, "RNC %u: new LAC %u RAC %u\n", rnc_id, lac, rac); + lre = talloc_zero(rnc, struct iu_lac_rac_entry); + lre->lac = lac; + lre->rac = rac; + llist_add(&lre->entry, &rnc->lac_rac_list); } + /* else, LAC,RAC already recorded with the current RNC. */ - /* Not found, make a new one. */ - return iu_rnc_alloc(rnc_id, lac, rac, addr); + return rnc; } /*********************************************************************** @@ -602,69 +671,45 @@ struct msgb *msg; msg = ranap_new_msg_paging_cmd(imsi, tmsi, is_ps? 1 : 0, paging_cause); msg->l2h = msg->data; - osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); - return 0; + return osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); } -static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi, +static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptmsi, uint16_t lac, uint8_t rac, bool is_ps) { struct ranap_iu_rnc *rnc; - int pagings_sent = 0; + int rc; + const char *log_msg; + int log_level; + int paged = 0; - if (tmsi_or_ptimsi) { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use %s %x)\n", - is_ps? "IuPS" : "IuCS", - imsi, - is_ps? "PTMSI" : "TMSI", - *tmsi_or_ptimsi); + iu_rnc_lac_rac_find(&rnc, NULL, lac, rac); + if (rnc) { + if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptmsi, is_ps, 0) == 0) { + log_msg = "Paging"; + log_level = LOGL_DEBUG; + paged = 1; + } else { + log_msg = "Paging failed"; + log_level = LOGL_ERROR; + } } else { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use IMSI)\n", - is_ps? "IuPS" : "IuCS", - imsi - ); + log_msg = "Found no RNC to Page"; + log_level = LOGL_ERROR; } - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->lac != lac) - continue; - if (is_ps && rnc->rac != rac) - continue; + if (is_ps) + LOGPIU(log_level, "IuPS: %s on LAC %d RAC %d", log_msg, lac, rac); + else + LOGPIU(log_level, "IuCS: %s on LAC %d", log_msg, lac); + if (rnc) + LOGPIUC(log_level, " at SCCP-addr %s", osmo_sccp_addr_dump(&rnc->sccp_addr)); + if (tmsi_or_ptmsi) + LOGPIUC(log_level, ", for %s %08x\n", is_ps? "PTMSI" : "TMSI", *tmsi_or_ptmsi); + else + LOGPIUC(log_level, ", for IMSI %s\n", imsi); - /* Found a match! */ - if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0) - == 0) { - LOGPIU(LOGL_DEBUG, - "%s: Paged for IMSI %s on RNC %d, on SCCP addr %s\n", - is_ps? "IuPS" : "IuCS", - imsi, rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); - pagings_sent ++; - } - } - - /* Some logging... */ - if (pagings_sent > 0) { - LOGPIU(LOGL_DEBUG, - "%s: %d RNCs were paged for IMSI %s.\n", - is_ps? "IuPS" : "IuCS", - pagings_sent, imsi); - } - else { - if (is_ps) { - LOGPIU(LOGL_ERROR, "IuPS: Found no RNC to page for" - " LAC %d RAC %d (would have paged IMSI %s)\n", - lac, rac, imsi); - } - else { - LOGPIU(LOGL_ERROR, "IuCS: Found no RNC to page for" - " LAC %d (would have paged IMSI %s)\n", - lac, imsi); - } - } - - return pagings_sent; + return paged; } int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 08:23:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 08:23:22 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: > > > are we sure there's no GSM timer number/name for this? > > > > not sure. I can try to have a look... > > So far all "Paging" chapters I have found talk merely of initiating > a Paging; closest match would be the 48.008 "3.1.10 Paging", which > doesn't mention any timeouts. I think the general assumption is that the MSC once sends a PAGING command to the BSC[s] and doesn't do any re-transmissions but rather relies on the BSC to take care of that. The question is how long the BSC will wait for any response from the BSC. I'll have a look. > The T3113 timer is mentioned for the > RR layer in 44.018 "3.3.2.1 Paging initiation by the network", but > I'm looking at the MSC, i.e. BSSMAP and IuCS. I feel like I'm > searching the needle in the hay stack. Sorry for that. > On another note, I personally find "paging timeout" much easier to > understand than "T1234"... The "problem" is that the existing literature on network configuration/optimziation will always refer to the timer numbers. Us inventing our own names is fine, as long was we also use the official number somewhere so people can find it easily. -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 08:37:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 08:37:39 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: It seems there is no number, 23.018 and other related specs simply call it the "paging response timer". -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 08:38:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 08:38:36 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5463/3/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: Line 113: "paging timeout (default|<1-65535>)", let's alsocall it 'paging response-timer' to align with the spec language. -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 11:16:35 2017 From: gerrit-no-reply at lists.osmocom.org (Muhammad Awais Aslam) Date: Tue, 19 Dec 2017 11:16:35 +0000 Subject: [PATCH] osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and parti... Message-ID: Review at https://gerrit.osmocom.org/5490 bsic decoding of neighbour cells in dedicated mode and partially success in synchronized handover Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 --- M src/host/layer23/src/common/l1ctl.c M src/host/layer23/src/common/l1ctl_lapdm_glue.c M src/host/layer23/src/common/logging.c M src/host/layer23/src/common/main.c M src/host/layer23/src/common/sap_interface.c M src/host/layer23/src/common/sim.c M src/host/layer23/src/common/sysinfo.c M src/host/layer23/src/misc/app_cbch_sniff.c M src/host/layer23/src/misc/app_ccch_scan.c M src/host/layer23/src/misc/rslms.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/gsm480_ss.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/gsm48_mm.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/main.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c M src/target/firmware/Makefile M src/target/firmware/Makefile.mtk M src/target/firmware/include/layer1/async.h M src/target/firmware/include/layer1/mframe_sched.h M src/target/firmware/include/layer1/prim.h M src/target/firmware/include/layer1/sync.h M src/target/firmware/include/layer1/tpu_window.h M src/target/firmware/layer1/afc.c M src/target/firmware/layer1/l23_api.c M src/target/firmware/layer1/mframe_sched.c M src/target/firmware/layer1/prim_fbsb.c A src/target/firmware/layer1/prim_fbsbSynchUsingDedModeDSPTasksInIdleCopy.c A src/target/firmware/layer1/prim_fbsbcurr.c M src/target/firmware/layer1/prim_pm.c M src/target/firmware/layer1/prim_rach.c A src/target/firmware/layer1/prim_rach_tmp.c M src/target/firmware/layer1/prim_rx_nb.c M src/target/firmware/layer1/prim_tch.c M src/target/firmware/layer1/prim_tx_nb.c M src/target/firmware/layer1/sync.c A src/target/firmware/layer1/tmpfbsb.c A src/target/firmware/layer1/tmpfbsbWorking.c M src/target/firmware/layer1/tpu_window.c A src/target/firmware/prim_fbsbwithFB1.c A src/target/firmware/prim_fbsbwithTotal.c 50 files changed, 9,690 insertions(+), 718 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/90/5490/1 -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Muhammad Awais Aslam From gerrit-no-reply at lists.osmocom.org Tue Dec 19 11:58:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 11:58:27 +0000 Subject: libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Patch Set 4: (2 comments) https://gerrit.osmocom.org/#/c/4893/4/src/osmo_ss7.c File src/osmo_ss7.c: Line 426: /*! \brief bind all xUA servers belonging to an SS7 Instance don't add new \brief, we use AUTOBRIEF (see Doxyfile). Just make sure the first sentence ends in a '.' Line 1792: osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, to keep the public API backwards compatible, you should rather introduce osmo_ss7_xua_server_create2(), keeping osmo_ss7_xua_server_create() behavior identical but deprecating it (call osmo_ss7_xua_server_create2() and then open the link on it). The advantage is that we can migrate dependent code at any time without breaking anything until we do. (but... we don't need any more patches in osmo-msc and osmo-bsc, right? because the vty changes are in here?) -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 12:07:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 12:07:38 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 13: (2 comments) https://gerrit.osmocom.org/#/c/4980/13/src/libmsc/iucs.c File src/libmsc/iucs.c: Line 224: LOGP(DIUCS, LOGL_DEBUG, (here's another candidate for a common LOGPFOO() context macro ... probably also applies for the rest of this file; so I'd pass this patch without one and change over to a proper macro separately) https://gerrit.osmocom.org/#/c/4980/13/src/libmsc/iucs_ranap.c File src/libmsc/iucs_ranap.c: Line 53: printf("transportLayerAddress present!\n"); -1: drop the printf, but I know you're working on that FIXME at the moment, so waiting for the next patch set. -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 13 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 12:13:33 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 12:13:33 +0000 Subject: [PATCH] openbsc[master]: Fix tests after rate_ctr change Message-ID: Review at https://gerrit.osmocom.org/5491 Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * free bts struct after each test This is a backport of 4ab7268a902af24fcd4870148b709fed4fbf900c from OsmoBSC. Change-Id: Ic5fab86bca617cabcd59484066975e17ab2320b6 Related: OS#2757 --- M openbsc/tests/channel/channel_test.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 3 files changed, 73 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/91/5491/1 diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index cf19aab..049786b 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -59,28 +59,23 @@ } -void test_request_chan(void) +void test_request_chan(struct gsm_network *net) { - struct gsm_network *network; struct gsm_bts *bts; printf("Testing the gsm_subscriber chan logic\n"); - /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); + bts = gsm_bts_alloc(net, 0); bts->location_area_code = 23; - s_conn.network = network; + s_conn.network = net; /* Create a dummy subscriber */ struct gsm_subscriber *subscr = subscr_alloc(); subscr->lac = 23; - subscr->group = network->subscr_group; + subscr->group = net->subscr_group; OSMO_ASSERT(subscr->group); - OSMO_ASSERT(subscr->group->net == network); + OSMO_ASSERT(subscr->group->net == net); /* Ask for a channel... */ struct subscr_request *sr; @@ -93,20 +88,15 @@ } -void test_bts_debug_print(void) +void test_bts_debug_print(struct gsm_network *net) { - struct gsm_network *network; struct gsm_bts *bts; struct gsm_bts_trx *trx; printf("Testing the lchan printing:"); - /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - if (!network) - exit(1); /* Add a BTS with some reasonanbly non-zero id */ - bts = gsm_bts_alloc(network, 45); + bts = gsm_bts_alloc(net, 45); /* Add a second TRX to test on multiple TRXs */ gsm_bts_trx_alloc(bts); @@ -154,11 +144,18 @@ int main(int argc, char **argv) { + struct gsm_network *network; + osmo_init_logging(&log_info); - test_request_chan(); + /* Create a dummy network */ + network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!network) + return EXIT_FAILURE; + + test_request_chan(network); test_dyn_ts_subslots(); - test_bts_debug_print(); + test_bts_debug_print(network); return EXIT_SUCCESS; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 3882f05..6f48599 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -145,30 +145,36 @@ } } -static inline void test_si2q_segfault(void) +static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, const char *msg) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); - - if (!network) + struct gsm_bts *bts = gsm_bts_alloc(net, 0); + if (!bts) { + printf("BTS allocation failure in %s()\n", msg); exit(1); - bts = gsm_bts_alloc(network, 0); + } + printf("BTS allocation OK in %s()\n", msg); + + bts->network = net; + + return bts; +} + +static inline void test_si2q_segfault(struct gsm_network *net) +{ + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); _bts_uarfcn_add(bts, 10564, 319, 0); _bts_uarfcn_add(bts, 10612, 319, 0); gen(bts, __func__); + + talloc_free(bts); } -static inline void test_si2q_mu(void) +static inline void test_si2q_mu(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Test SI2quater multiple UARFCNs:\n"); - - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); _bts_uarfcn_add(bts, 10564, 318, 0); _bts_uarfcn_add(bts, 10612, 319, 0); @@ -177,18 +183,14 @@ _bts_uarfcn_add(bts, 10613, 64, 0); _bts_uarfcn_add(bts, 10613, 164, 0); _bts_uarfcn_add(bts, 10613, 14, 0); + + talloc_free(bts); } -static inline void test_si2q_u(void) +static inline void test_si2q_u(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); /* first generate invalid SI as no UARFCN added */ gen(bts, __func__); @@ -205,18 +207,14 @@ _bts_uarfcn_add(bts, 1982, 223, 1); _bts_uarfcn_add(bts, 1982, 14, 0); _bts_uarfcn_add(bts, 1982, 88, 0); + + talloc_free(bts); } -static inline void test_si2q_e(void) +static inline void test_si2q_e(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -238,18 +236,14 @@ add_earfcn_b(bts, 1965, OSMO_EARFCN_MEAS_INVALID); add_earfcn_b(bts, 1967, 4); add_earfcn_b(bts, 1982, 3); + + talloc_free(bts); } -static inline void test_si2q_long(void) +static inline void test_si2q_long(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -286,6 +280,8 @@ _bts_uarfcn_add(bts, 1976, 224, 1); _bts_uarfcn_add(bts, 1976, 225, 1); _bts_uarfcn_add(bts, 1976, 226, 1); + + talloc_free(bts); } static void test_mi_functionality(void) @@ -671,10 +667,10 @@ OSMO_ASSERT(res == 1); } -static void test_si_ba_ind(void) +static void test_si_ba_ind(struct gsm_network *net) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - struct gsm_bts *bts = gsm_bts_alloc(network, 0); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); const struct gsm48_system_information_type_2bis *si2bis = @@ -690,7 +686,6 @@ int rc; - bts->network = network; bts->c0->arfcn = 23; printf("Testing if BA-IND is set as expected in SI2xxx and SI5xxx\n"); @@ -734,8 +729,16 @@ int main(int argc, char **argv) { + struct gsm_network *net; + osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); + + net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!net) { + printf("Network init failure.\n"); + return EXIT_FAILURE; + } test_location_area_identifier(); test_mi_functionality(); @@ -746,13 +749,13 @@ test_range_encoding(); test_gsm411_rp_ref_wrap(); - test_si2q_segfault(); - test_si2q_e(); - test_si2q_u(); - test_si2q_mu(); - test_si2q_long(); + test_si2q_segfault(net); + test_si2q_e(net); + test_si2q_u(net); + test_si2q_mu(net); + test_si2q_long(net); - test_si_ba_ind(); + test_si_ba_ind(net); printf("Done.\n"); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 4fff78f..1039883 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -62,6 +62,7 @@ Allocated reference: 255 Allocated reference: 0 Allocated reference: 1 +BTS allocation OK in test_si2q_segfault() Test SI2quater UARFCN (same scrambling code and diversity): generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -69,6 +70,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 e8 0a 7f 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 2 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 e8 0a 7f 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_e() Testing SYSINFO_TYPE_2quater EARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -92,6 +94,7 @@ added EARFCN 1982 - generating SI2quater for 7 EARFCNs and 0 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e4 1e fa c2 80 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_u() Testing SYSINFO_TYPE_2quater UARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -117,6 +120,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 50 1c 3b 31 fa dd 88 85 7b c4 1c 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 11 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 58 1c 3b 25 7a ea 08 91 fb c4 1f b0 2b 2b 2b +BTS allocation OK in test_si2q_mu() Test SI2quater multiple UARFCNs: generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7c 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -134,6 +138,7 @@ generating SI2quater for 0 EARFCNs and 7 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 25 52 ea 10 81 ce a9 74 08 1f fa 54 ba 82 52 03 2b 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 25 52 e8 30 81 d3 7f fd b2 86 54 a2 02 9f 03 2b 2b 2b +BTS allocation OK in test_si2q_long() Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation: generating SI2quater for 17 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 0c 1a 10 99 66 0f 04 83 c1 1c bb 2b 03 2b 2b @@ -201,6 +206,7 @@ generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si_ba_ind() Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5491 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5fab86bca617cabcd59484066975e17ab2320b6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 19 12:23:37 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 12:23:37 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 3: > > osmo_interact_vty.py --gen-xml-ref > > That's cool, didn't know about it. Is there example use somewhere > in osmo*? I thought I had one somewhere, but it appears not actually ... I wanted to change the osmo-gsm-manuals README over to this, but it appears I haven't done it. I thought the py scripts / cmdline help had examples, but again appears I forgot to write that. Here are two quick examples: osmo_interact_vty.py -r 'osmo-hlr -c /n/s/cn_test/nitb/osmo-hlr.cfg -l /tmp/hlr.db' -p 4258 --gen-xml-ref and if the app is already running just osmo_interact_vty.py -p 4258 --gen-xml-ref > Also, is there equivalent counterpart for osmotestvty.py? There are osmo_verify_transcript_vty.py (and also osmo_verify_transcript_ctrl.py) which allow writing VTY/CTRL tests basically from a live session's screen dump. See for example osmo-hlr/tests/*.vty and *.ctrl. There are some more complex tests especially in OsmoBSC, which start/stop programs and do stuff that is not simply a VTY transcript, but it is possible to import osmo_interact_vty.py and use that API to write the same kind of complex tests. Personally, I think I will mostly do transcript tests from now on, because it is infinitely less effort than writing py code around it. Note that the verify_transcript_* also allow updating your current transcript file with any changed output the program may exhibit, after which you can git diff them, which makes updating the tests to new behavior quite convenient... (I am dreaming about offering a combined transcript type that offers issuing CTRL and VTY commands in the same transcript, but not sure if that will happen any time soon.) And, anything to say about this question?: "I am still asking myself why you want to make the py2 scripts py3 compatible in the first place, and would welcome if you could answer this question I've raised a couple times now." -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 12:24:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 12:24:40 +0000 Subject: osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and parti... In-Reply-To: References: Message-ID: Patch Set 1: That's really huge. Could you perhaps split it into several smaller commits with more detailed description? This would be much easier to review and merge. -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Muhammad Awais Aslam Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 12:28:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 12:28:24 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 3: > why you want to make the py2 scripts py3 compatible Because it's 1) easy, 2) testable 3) makes them future proof when python 2 is retired. It doesn't make sense for the scripts which are obsoleted by other code but for that we should first properly deprecate them: document and actually use the replacement, put deprecation notice into readme etc. -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:12:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:12:47 +0000 Subject: [PATCH] python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... Message-ID: Review at https://gerrit.osmocom.org/5492 fix osmo_interact_* and osmo_verify_transcript_* after dir split After I30cdf0f85b2a60a235960911c9827f4129da40db, * the osmo_interact_{vty,ctrl}.py can no longer import osmo_interact_common, since it was moved to scripts/ in error. * the osmo_verify_{vty,ctrl} scripts can no longer import osmo_interact_{vty,ctrl}, since it is also in scripts/. Notably, the osmo_interact_{vty,ctrl}.py also served as scripts while being modules at the same time, which is not good. Fix these issues by adding a new osmopy/osmo_interact/ submodule with osmopy/osmo_interact/common.py, /vty.py and /ctrl.py as modules, and add in scripts thin wrappers that invoke the modules' main(). Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 --- M osmopy/__init__.py A osmopy/osmo_interact/__init__.py R osmopy/osmo_interact/common.py A osmopy/osmo_interact/ctrl.py A osmopy/osmo_interact/vty.py M scripts/osmo_interact_ctrl.py M scripts/osmo_interact_vty.py M scripts/osmo_verify_transcript_ctrl.py M scripts/osmo_verify_transcript_vty.py 9 files changed, 320 insertions(+), 314 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/5492/1 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 6150ea4..35ee9d6 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python __version__ = '0.0.5' -__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact'] diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py new file mode 100644 index 0000000..4fc4fac --- /dev/null +++ b/osmopy/osmo_interact/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python +__all__ = ['common', 'vty', 'ctrl'] diff --git a/scripts/osmo_interact_common.py b/osmopy/osmo_interact/common.py similarity index 97% rename from scripts/osmo_interact_common.py rename to osmopy/osmo_interact/common.py index 5efc22d..f7070ae 100644 --- a/scripts/osmo_interact_common.py +++ b/osmopy/osmo_interact/common.py @@ -24,6 +24,11 @@ osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits. ''' +# Our setup.py currently wants everything to be parsable by both py2 and py3. +# IMHO that is not a good idea, but until that changes, let's just keep this +# py2 legacy shim in here so we can syntax-check this py3 module with py2. +from __future__ import print_function + import argparse import sys import os diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py new file mode 100755 index 0000000..b752351 --- /dev/null +++ b/osmopy/osmo_interact/ctrl.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run CTRL commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_ctrl.py. +''' + +import re + +from .common import * +from osmopy.osmo_ipa import Ctrl, IPA + +class InteractCtrl(Interact): + next_id = 1 + keep_ids = True + re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') + + class CtrlStep(Interact.StepBase): + + @staticmethod + def is_next_step(line, interact_instance): + m = InteractCtrl.re_command.match(line) + if not m: + return None + next_step = InteractCtrl.CtrlStep() + + set_get = m.group(1) + cmd_id = m.group(2) + var_val = m.group(3) + if not interact_instance.keep_ids: + cmd_id = interact_instance.next_id + interact_instance.next_id += 1 + next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) + + return next_step + + def __init__(self, port, host, verbose=False, update=False, keep_ids=True): + if not update: + keep_ids = True + self.keep_ids = keep_ids + super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) + + def connect(self): + self.next_id = 1 + super().connect() + + def send(self, data): + data = Ctrl().add_header(data) + return self.socket.send(data) == len(data) + + def receive(self): + responses = [] + data = self.socket.recv(4096) + while (len(data)>0): + (response_with_header, data) = IPA().split_combined(data) + response = Ctrl().rem_header(response_with_header) + responses.append(response.decode('utf-8')) + return responses + + def command(self, command): + assert self.send(command) + res = self.receive() + split_responses = [] + for r in res: + split_responses.extend(r.splitlines()) + sys.stdout.flush() + sys.stderr.flush() + return split_responses + +def main_interact_ctrl(): + parser = common_parser() + parser_add_run_args(parser) + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, verbose=False, update=False, + keep_ids=True) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + + +def main_verify_transcript_ctrl(): + parser = common_parser() + parser_add_verify_args(parser) + parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', + help='With --update, default is to overwrite the command IDs' + ' so that they are consecutive numbers starting from 1.' + ' With --keep-ids, do not change these command IDs.') + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py new file mode 100755 index 0000000..f34e87e --- /dev/null +++ b/osmopy/osmo_interact/vty.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run VTY commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_vty.py. +''' + +import re + +from .common import * + +class InteractVty(Interact): + + class VtyStep(Interact.StepBase): + expect_node = None # e.g. '(config-net)' + expect_prompt_char = None # '>' or '#' + + def __init__(self, prompt): + super().__init__() + self.prompt = prompt + + def verify_interact_state(self, interact_instance): + if interact_instance.update: + return + if interact_instance.this_node != self.expect_node: + raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' + % (self.expect_node, interact_instance.this_node)) + if interact_instance.this_prompt_char != self.expect_prompt_char: + raise Exception('Mismatch: expected VTY prompt character %r, got %r' + % (self.expect_prompt_char, interact_instance.this_prompt_char)) + + @staticmethod + def is_next_step(line, interact_instance): + m = interact_instance.re_prompt.match(line) + if not m: + return None + next_step = InteractVty.VtyStep(interact_instance.prompt) + next_step.expect_node = m.group(1) + next_step.expect_prompt_char = m.group(2) + next_step.command = m.group(3) + return next_step + + def command_str(self, interact_instance=None): + if interact_instance is None: + node = self.expect_node + prompt_char = self.expect_prompt_char + else: + node = interact_instance.last_node + prompt_char = interact_instance.last_prompt_char + if node: + node = '(%s)' % node + node = node or '' + return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) + + def __init__(self, prompt, port, host, verbose, update): + self.prompt = prompt + super().__init__(InteractVty.VtyStep, port, host, verbose, update) + + def connect(self): + self.this_node = None + self.this_prompt_char = '>' # slight cheat for initial prompt char + self.last_node = None + self.last_prompt_char = None + + super().connect() + # receive the first welcome message and discard + data = self.socket.recv(4096) + if not self.prompt: + b = data + b = b[b.rfind(b'\n') + 1:] + while b and (b[0] < ord('A') or b[0] > ord('z')): + b = b[1:] + prompt_str = b.decode('utf-8') + if '>' in prompt_str: + self.prompt = prompt_str[:prompt_str.find('>')] + if not self.prompt: + raise Exception('Could not find application name; needed to decode prompts.' + ' Initial data was: %r' % data) + self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) + + def _command(self, command_str, timeout=10): + self.socket.send(command_str.encode()) + + waited_since = time.time() + received_lines = [] + last_line = '' + + while True: + new_data = self.socket.recv(4096).decode('utf-8') + + last_line = "%s%s" % (last_line, new_data) + + if last_line: + lines = last_line.splitlines() + received_lines.extend(lines[:-1]) + last_line = lines[-1] + + match = self.re_prompt.match(last_line) + if not match: + if time.time() - waited_since > timeout: + raise IOError("Failed to read data (did the app crash?)") + time.sleep(.1) + continue + + self.last_node = self.this_node + self.last_prompt_char = self.this_prompt_char + self.this_node = match.group(1) or None + self.this_prompt_char = match.group(2) + break + + # expecting to have received the command we sent as echo, remove it + clean_command_str = command_str.strip() + if clean_command_str.endswith('?'): + clean_command_str = clean_command_str[:-1] + if received_lines and received_lines[0] == clean_command_str: + received_lines = received_lines[1:] + return received_lines + + def command(self, command_str, timeout=10): + command_str = command_str or '\r' + if command_str[-1] not in '?\r\t': + command_str = command_str + '\r' + + received_lines = self._command(command_str, timeout) + + # send escape to cancel the '?' command line + if command_str[-1] == '?': + self._command('\x03', timeout) + + return received_lines + +def parser_add_vty_args(parser): + parser.add_argument('-n', '--prompt-name', dest='prompt', + help="Name used in application's telnet VTY prompt." + " If omitted, will attempt to determine the name from" + " the initial VTY prompt.") + return parser + +def main_interact_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_run_args(parser) + parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', + help="Equivalent to '-c \"show online-help\" -O -'," + " can be used to generate the VTY reference file as" + " required by osmo-gsm-manuals.git.") + args = parser.parse_args() + + if args.gen_xml: + if args.cmd_str: + raise Exception('It does not make sense to pass both --command and' + ' --gen-xml-ref.') + args.cmd_str = 'show online-help' + + interact = InteractVty(args.prompt, args.port, args.host, + verbose=False, update=False) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + +def main_verify_transcript_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_verify_args(parser) + args = parser.parse_args() + + interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py index 9b1a20b..eb88800 100755 --- a/scripts/osmo_interact_ctrl.py +++ b/scripts/osmo_interact_ctrl.py @@ -18,83 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_ctrl.py. -''' +from osmopy.osmo_interact.ctrl import main_interact_ctrl -import re - -from osmopy.osmo_interact_common import * -from osmopy.osmo_ipa import Ctrl, IPA - -class InteractCtrl(Interact): - next_id = 1 - keep_ids = True - re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') - - class CtrlStep(Interact.StepBase): - - @staticmethod - def is_next_step(line, interact_instance): - m = InteractCtrl.re_command.match(line) - if not m: - return None - next_step = InteractCtrl.CtrlStep() - - set_get = m.group(1) - cmd_id = m.group(2) - var_val = m.group(3) - if not interact_instance.keep_ids: - cmd_id = interact_instance.next_id - interact_instance.next_id += 1 - next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) - - return next_step - - def __init__(self, port, host, verbose=False, update=False, keep_ids=True): - if not update: - keep_ids = True - self.keep_ids = keep_ids - super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) - - def connect(self): - self.next_id = 1 - super().connect() - - def send(self, data): - data = Ctrl().add_header(data) - return self.socket.send(data) == len(data) - - def receive(self): - responses = [] - data = self.socket.recv(4096) - while (len(data)>0): - (response_with_header, data) = IPA().split_combined(data) - response = Ctrl().rem_header(response_with_header) - responses.append(response.decode('utf-8')) - return responses - - def command(self, command): - assert self.send(command) - res = self.receive() - split_responses = [] - for r in res: - split_responses.extend(r.splitlines()) - sys.stdout.flush() - sys.stderr.flush() - return split_responses - -if __name__ == '__main__': - parser = common_parser() - parser_add_run_args(parser) - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, verbose=False, update=False, - keep_ids=True) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_vty.py b/scripts/osmo_interact_vty.py index b57cd8c..b47b46c 100755 --- a/scripts/osmo_interact_vty.py +++ b/scripts/osmo_interact_vty.py @@ -18,163 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_vty.py. -''' +from osmopy.osmo_interact.vty import main_interact_vty -import re - -from osmopy.osmo_interact_common import * - -class InteractVty(Interact): - - class VtyStep(Interact.StepBase): - expect_node = None # e.g. '(config-net)' - expect_prompt_char = None # '>' or '#' - - def __init__(self, prompt): - super().__init__() - self.prompt = prompt - - def verify_interact_state(self, interact_instance): - if interact_instance.update: - return - if interact_instance.this_node != self.expect_node: - raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' - % (self.expect_node, interact_instance.this_node)) - if interact_instance.this_prompt_char != self.expect_prompt_char: - raise Exception('Mismatch: expected VTY prompt character %r, got %r' - % (self.expect_prompt_char, interact_instance.this_prompt_char)) - - @staticmethod - def is_next_step(line, interact_instance): - m = interact_instance.re_prompt.match(line) - if not m: - return None - next_step = InteractVty.VtyStep(interact_instance.prompt) - next_step.expect_node = m.group(1) - next_step.expect_prompt_char = m.group(2) - next_step.command = m.group(3) - return next_step - - def command_str(self, interact_instance=None): - if interact_instance is None: - node = self.expect_node - prompt_char = self.expect_prompt_char - else: - node = interact_instance.last_node - prompt_char = interact_instance.last_prompt_char - if node: - node = '(%s)' % node - node = node or '' - return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) - - def __init__(self, prompt, port, host, verbose, update): - self.prompt = prompt - super().__init__(InteractVty.VtyStep, port, host, verbose, update) - - def connect(self): - self.this_node = None - self.this_prompt_char = '>' # slight cheat for initial prompt char - self.last_node = None - self.last_prompt_char = None - - super().connect() - # receive the first welcome message and discard - data = self.socket.recv(4096) - if not self.prompt: - b = data - b = b[b.rfind(b'\n') + 1:] - while b and (b[0] < ord('A') or b[0] > ord('z')): - b = b[1:] - prompt_str = b.decode('utf-8') - if '>' in prompt_str: - self.prompt = prompt_str[:prompt_str.find('>')] - if not self.prompt: - raise Exception('Could not find application name; needed to decode prompts.' - ' Initial data was: %r' % data) - self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) - - def _command(self, command_str, timeout=10): - self.socket.send(command_str.encode()) - - waited_since = time.time() - received_lines = [] - last_line = '' - - while True: - new_data = self.socket.recv(4096).decode('utf-8') - - last_line = "%s%s" % (last_line, new_data) - - if last_line: - lines = last_line.splitlines() - received_lines.extend(lines[:-1]) - last_line = lines[-1] - - match = self.re_prompt.match(last_line) - if not match: - if time.time() - waited_since > timeout: - raise IOError("Failed to read data (did the app crash?)") - time.sleep(.1) - continue - - self.last_node = self.this_node - self.last_prompt_char = self.this_prompt_char - self.this_node = match.group(1) or None - self.this_prompt_char = match.group(2) - break - - # expecting to have received the command we sent as echo, remove it - clean_command_str = command_str.strip() - if clean_command_str.endswith('?'): - clean_command_str = clean_command_str[:-1] - if received_lines and received_lines[0] == clean_command_str: - received_lines = received_lines[1:] - return received_lines - - def command(self, command_str, timeout=10): - command_str = command_str or '\r' - if command_str[-1] not in '?\r\t': - command_str = command_str + '\r' - - received_lines = self._command(command_str, timeout) - - # send escape to cancel the '?' command line - if command_str[-1] == '?': - self._command('\x03', timeout) - - return received_lines - -def parser_add_vty_args(parser): - parser.add_argument('-n', '--prompt-name', dest='prompt', - help="Name used in application's telnet VTY prompt." - " If omitted, will attempt to determine the name from" - " the initial VTY prompt.") - return parser - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_run_args(parser) - parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', - help="Equivalent to '-c \"show online-help\" -O -'," - " can be used to generate the VTY reference file as" - " required by osmo-gsm-manuals.git.") - args = parser.parse_args() - - if args.gen_xml: - if args.cmd_str: - raise Exception('It does not make sense to pass both --command and' - ' --gen-xml-ref.') - args.cmd_str = 'show online-help' - - interact = InteractVty(args.prompt, args.port, args.host, - verbose=False, update=False) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py index 3afbc62..b24fbfa 100755 --- a/scripts/osmo_verify_transcript_ctrl.py +++ b/scripts/osmo_verify_transcript_ctrl.py @@ -18,41 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL test transcripts against a given application. +from osmopy.osmo_interact.ctrl import main_verify_transcript_ctrl -A CTRL transcript contains CTRL commands and their expected results. -It looks like: - -" -SET 1 var val -SET_REPLY 1 var OK -GET 2 var -GET_REPLY 2 var val -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the CTRL port. - -This module can either be run directly to run or update a given CTRL transcript, -or it can be imported as a module to run more complex setups. -''' - -from osmopy.osmo_interact_ctrl import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_verify_args(parser) - parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', - help='With --update, default is to overwrite the command IDs' - ' so that they are consecutive numbers starting from 1.' - ' With --keep-ids, do not change these command IDs.') - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py index e70c36c..2695e86 100755 --- a/scripts/osmo_verify_transcript_vty.py +++ b/scripts/osmo_verify_transcript_vty.py @@ -18,50 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY test transcripts against a given application. +from osmopy.osmo_interact.vty import main_verify_transcript_vty -A VTY transcript contains VTY commands and their expected results. -It looks like: - -" -OsmoHLR> enable - -OsmoHLR# subscriber show imsi 123456789023000 -% No subscriber for imsi = '123456789023000' -OsmoHLR# subscriber show msisdn 12345 -% No subscriber for msisdn = '12345' - -OsmoHLR# subscriber create imsi 123456789023000 -% Created subscriber 123456789023000 - ID: 1 - IMSI: 123456789023000 - MSISDN: none - No auth data -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the VTY telnet port, -- the application name as printed in the VTY prompt. - -This module can either be run directly to run or update a given VTY transcript, -or it can be imported as a module to run more complex setups. -''' - -import re - -from osmopy.osmo_interact_vty import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_verify_args(parser) - args = parser.parse_args() - - interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:12:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:12:47 +0000 Subject: [PATCH] python/osmo-python-tests[master]: scripts: add symlink to osmopy Message-ID: Review at https://gerrit.osmocom.org/5493 scripts: add symlink to osmopy To allow running the scripts from within the scripts/ dir without having to install osmopy on the system first, place a symlink to the osmopy module dir. This allows testing modifications without having to run setup.py all the time. Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c --- A scripts/osmopy 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/93/5493/1 diff --git a/scripts/osmopy b/scripts/osmopy new file mode 120000 index 0000000..2ba06a1 --- /dev/null +++ b/scripts/osmopy @@ -0,0 +1 @@ +../osmopy/ \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/5493 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:12:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:12:47 +0000 Subject: [PATCH] python/osmo-python-tests[master]: add cmdline doc to osmo_interact_* and osmo_verify_* Message-ID: Review at https://gerrit.osmocom.org/5494 add cmdline doc to osmo_interact_* and osmo_verify_* The tools are so far badly under-documented. Alleviate that by comprehensive description and examples shown by -h option output. Hint at that from the README. Change-Id: I94dcad257558b917cb54fc877122594cd164f496 --- M osmopy/osmo_interact/common.py M osmopy/osmo_interact/ctrl.py M osmopy/osmo_interact/vty.py 3 files changed, 137 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/94/5494/1 diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py index f7070ae..31f44a8 100644 --- a/osmopy/osmo_interact/common.py +++ b/osmopy/osmo_interact/common.py @@ -19,9 +19,9 @@ # along with this program. If not, see . ''' -Common code for osmo_interact_vty.py and osmo_interact_ctrl.py. +Common code for VTY and CTRL interface interaction and transcript verification. This implements all of application interaction, piping and verification. -osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits. +vty.py and ctrl.py plug VTY and CTRL interface specific bits. ''' # Our setup.py currently wants everything to be parsable by both py2 and py3. @@ -370,8 +370,9 @@ return passed -def common_parser(): - parser = argparse.ArgumentParser() +def common_parser(doc=None): + parser = argparse.ArgumentParser(description=doc, + formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('-r', '--run', dest='run_app_str', help='command to run to launch application to test,' ' including command line arguments. If omitted, no' diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py index b752351..85e7554 100755 --- a/osmopy/osmo_interact/ctrl.py +++ b/osmopy/osmo_interact/ctrl.py @@ -87,7 +87,30 @@ return split_responses def main_interact_ctrl(): - parser = common_parser() + ''' +Run CTRL commands against a given application by stdin/stdout piping. + +Optionally, this can launch and tear down the application with -r. + +For example, to start a session that allows typing CTRL commands on stdin: + + osmo_interact_ctrl.py -p 4259 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' + +Where 4259 is OsmoHLR's CTRL port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_ctrl.py -p 4259 + +See also osmo_verify_transcript_vty.py, which allows verifying and updating +complete CTRL session transcripts, in essence to write CTRL tests from a screen +dump of a CTRL session. + +A VTY equivalent is osmo_interact_vty.py. +''' + parser = common_parser(__doc__) parser_add_run_args(parser) args = parser.parse_args() @@ -99,7 +122,44 @@ def main_verify_transcript_ctrl(): - parser = common_parser() + ''' +A CTRL transcript contains CTRL commands and their expected results. +It looks like: + +" +SET 1 var val +SET_REPLY 1 var OK + +GET 2 var +GET_REPLY 2 var val +" + +Optionally, this can launch and tear down the application with -r. + +For example, if above transcript example is in file test.ctrl, you can verify +that OsmoHLR still shows this behavior by: + + osmo_interact_ctrl.py -p 4259 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' \\ + test.ctrl + +Where 4259 is OsmoHLR's CTRL port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_ctrl.py -p 4259 test.ctrl + +If osmo-hlr has changed its behavior, e.g. some reply changed, the transcript +can be automatically updated, which overwrites the file, like: + + osmo_interact_ctrl.py -p 4259 -u test.ctrl + +See also osmo_interact_ctrl.py, which allows piping CTRL commands to stdin. + +A VTY equivalent is osmo_verify_transcript_vty.py. +''' + parser = common_parser(__doc__) parser_add_verify_args(parser) parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', help='With --update, default is to overwrite the command IDs' diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py index f34e87e..4704c09 100755 --- a/osmopy/osmo_interact/vty.py +++ b/osmopy/osmo_interact/vty.py @@ -156,7 +156,30 @@ return parser def main_interact_vty(): - parser = common_parser() + ''' +Run VTY commands against a given application by stdin/stdout piping. + +Optionally, this can launch and tear down the application with -r. + +For example, to extract the VTY reference XML file from osmo-hlr: + + osmo_interact_vty.py -p 4258 --gen-xml-ref \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' + +Where 4258 is OsmoHLR's VTY port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_vty.py -p 4258 --gen-xml-ref + +See also osmo_verify_transcript_vty.py, which allows verifying and updating +complete VTY session transcripts, in essence to write VTY tests from a screen +dump of a VTY session. + +A Control interface equivalent is osmo_interact_ctrl.py. +''' + parser = common_parser(__doc__) parser_add_vty_args(parser) parser_add_run_args(parser) parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', @@ -178,7 +201,52 @@ args.cmd_files, interact) def main_verify_transcript_vty(): - parser = common_parser() + ''' +A VTY transcript contains VTY commands and their expected results. +It looks like a screen dump of a live VTY session: + +" +OsmoHLR> enable + +OsmoHLR# subscriber show imsi 123456789023000 +% No subscriber for imsi = '123456789023000' +OsmoHLR# subscriber show msisdn 12345 +% No subscriber for msisdn = '12345' + +OsmoHLR# subscriber create imsi 123456789023000 +% Created subscriber 123456789023000 + ID: 1 + IMSI: 123456789023000 + MSISDN: none + No auth data +" + +Optionally, this can launch and tear down the application with -r. + +For example, if above transcript example is in file test.vty, you can verify +that OsmoHLR still shows this behavior by: + + osmo_interact_vty.py -p 4258 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' \\ + test.vty + +Where 4258 is OsmoHLR's VTY port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_vty.py -p 4258 test.vty + +If osmo-hlr has changed its behavior, e.g. some error message changed, the +transcript can be automatically updated, which overwrites the file, like: + + osmo_interact_vty.py -p 4258 -u test.vty + +See also osmo_interact_vty.py, which allows piping VTY commands to stdin. + +A Control interface equivalent is osmo_verify_transcript_ctrl.py. +''' + parser = common_parser(__doc__) parser_add_vty_args(parser) parser_add_verify_args(parser) args = parser.parse_args() -- To view, visit https://gerrit.osmocom.org/5494 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94dcad257558b917cb54fc877122594cd164f496 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:12:47 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:12:47 +0000 Subject: [PATCH] python/osmo-python-tests[master]: README: mention osmo_interact_* and osmo_verify_transcript_* Message-ID: Review at https://gerrit.osmocom.org/5495 README: mention osmo_interact_* and osmo_verify_transcript_* Move the libs/scripts that they (possibly) replace below the new additions and mention that they are superseded. Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 --- M README 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/95/5495/1 diff --git a/README b/README index 25be782..9694aba 100644 --- a/README +++ b/README @@ -7,10 +7,14 @@ Use There are currently following scripts in this package: -osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs -osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_interact_vty.py - pipe stdin/stdout to a VTY session +osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port +osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps +osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files +osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X +osmotestvty.py - test vty operations, superseded by osmo_verify_transcript_vty.py Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,9 +28,10 @@ cd /openbsc/openbsc && osmodumpdoc.py Libraries: -osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework +osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL ports +osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty obscvty.py may be of general use. osmoutil.py probably isn't. -- To view, visit https://gerrit.osmocom.org/5495 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:12:48 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:12:48 +0000 Subject: [PATCH] python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib Message-ID: Review at https://gerrit.osmocom.org/5496 README: mention twisted_ipa.py in scripts section, not as lib Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 --- M README 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/96/5496/1 diff --git a/README b/README index 9694aba..e85c1c4 100644 --- a/README +++ b/README @@ -13,6 +13,7 @@ osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X osmotestvty.py - test vty operations, superseded by osmo_verify_transcript_vty.py @@ -30,7 +31,6 @@ Libraries: osmopy/osmoutil.py - code that's shared between the scripts osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python -twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL ports osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty -- To view, visit https://gerrit.osmocom.org/5496 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:18:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 14:18:58 +0000 Subject: python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/5492/1/osmopy/__init__.py File osmopy/__init__.py: Line 2: __version__ = '0.0.5' Please bump the version to avoid confusion https://gerrit.osmocom.org/#/c/5492/1/osmopy/osmo_interact/ctrl.py File osmopy/osmo_interact/ctrl.py: Line 101: def main_verify_transcript_ctrl(): Why this is here and not in actual script? https://gerrit.osmocom.org/#/c/5492/1/scripts/osmo_interact_ctrl.py File scripts/osmo_interact_ctrl.py: Line 23: main_interact_ctrl() Why not just use the function body directly? Is it used someplace else as well? -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:52:42 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:52:42 +0000 Subject: [PATCH] osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change Message-ID: Review at https://gerrit.osmocom.org/5497 fix test_subscriber_errors.ctrl after libosmocore change libosmocore Ie35a02555b76913bb12734a76fc40fde7ffb244d "ctrl: on parse errors, return a detailed message to sender" the test_subscriber_errors.ctrl test fails. Adjust the expected error message. Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f --- M tests/test_subscriber_errors.ctrl 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/97/5497/1 diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index 2f64fdb..55c7480 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -97,9 +97,9 @@ ERROR 43 Value failed verification. SET 44 subscriber.by-imsi-901990000000001.ps-enabled -ERROR err Command parser error. +ERROR 44 SET incomplete SET 45 subscriber.by-imsi-901990000000001.cs-enabled -ERROR err Command parser error. +ERROR 45 SET incomplete GET 46 subscriber.by-imsi-1234567890123456.ps-enabled ERROR 46 Invalid value part of 'by-xxx-value' selector. -- To view, visit https://gerrit.osmocom.org/5497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:54:07 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:54:07 +0000 Subject: osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 14:54:09 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 14:54:09 +0000 Subject: [MERGED] osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix test_subscriber_errors.ctrl after libosmocore change ...................................................................... fix test_subscriber_errors.ctrl after libosmocore change libosmocore Ie35a02555b76913bb12734a76fc40fde7ffb244d "ctrl: on parse errors, return a detailed message to sender" the test_subscriber_errors.ctrl test fails. Adjust the expected error message. Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f --- M tests/test_subscriber_errors.ctrl 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index 2f64fdb..55c7480 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -97,9 +97,9 @@ ERROR 43 Value failed verification. SET 44 subscriber.by-imsi-901990000000001.ps-enabled -ERROR err Command parser error. +ERROR 44 SET incomplete SET 45 subscriber.by-imsi-901990000000001.cs-enabled -ERROR err Command parser error. +ERROR 45 SET incomplete GET 46 subscriber.by-imsi-1234567890123456.ps-enabled ERROR 46 Invalid value part of 'by-xxx-value' selector. -- To view, visit https://gerrit.osmocom.org/5497 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 15:11:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 15:11:17 +0000 Subject: python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5492/1/osmopy/osmo_interact/ctrl.py File osmopy/osmo_interact/ctrl.py: Line 101: def main_verify_transcript_ctrl(): > Why this is here and not in actual script? personal preference. that code was so alone in that file way over there in ../scripts/ -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 15:11:35 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 15:11:35 +0000 Subject: [PATCH] python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Hello Max, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5492 to look at the new patch set (#2). fix osmo_interact_* and osmo_verify_transcript_* after dir split After I30cdf0f85b2a60a235960911c9827f4129da40db, * the osmo_interact_{vty,ctrl}.py can no longer import osmo_interact_common, since it was moved to scripts/ in error. * the osmo_verify_{vty,ctrl} scripts can no longer import osmo_interact_{vty,ctrl}, since it is also in scripts/. Notably, the osmo_interact_{vty,ctrl}.py also served as scripts while being modules at the same time, which is not good. Fix these issues by adding a new osmopy/osmo_interact/ submodule with osmopy/osmo_interact/common.py, /vty.py and /ctrl.py as modules, and add in scripts thin wrappers that invoke the modules' main(). Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 --- M osmopy/__init__.py A osmopy/osmo_interact/__init__.py R osmopy/osmo_interact/common.py A osmopy/osmo_interact/ctrl.py A osmopy/osmo_interact/vty.py M scripts/osmo_interact_ctrl.py M scripts/osmo_interact_vty.py M scripts/osmo_verify_transcript_ctrl.py M scripts/osmo_verify_transcript_vty.py 9 files changed, 321 insertions(+), 315 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/92/5492/2 diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 6150ea4..b1b0651 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.5' +__version__ = '0.0.6' -__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact'] diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py new file mode 100644 index 0000000..4fc4fac --- /dev/null +++ b/osmopy/osmo_interact/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python +__all__ = ['common', 'vty', 'ctrl'] diff --git a/scripts/osmo_interact_common.py b/osmopy/osmo_interact/common.py similarity index 97% rename from scripts/osmo_interact_common.py rename to osmopy/osmo_interact/common.py index 5efc22d..f7070ae 100644 --- a/scripts/osmo_interact_common.py +++ b/osmopy/osmo_interact/common.py @@ -24,6 +24,11 @@ osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits. ''' +# Our setup.py currently wants everything to be parsable by both py2 and py3. +# IMHO that is not a good idea, but until that changes, let's just keep this +# py2 legacy shim in here so we can syntax-check this py3 module with py2. +from __future__ import print_function + import argparse import sys import os diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py new file mode 100755 index 0000000..b752351 --- /dev/null +++ b/osmopy/osmo_interact/ctrl.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run CTRL commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_ctrl.py. +''' + +import re + +from .common import * +from osmopy.osmo_ipa import Ctrl, IPA + +class InteractCtrl(Interact): + next_id = 1 + keep_ids = True + re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') + + class CtrlStep(Interact.StepBase): + + @staticmethod + def is_next_step(line, interact_instance): + m = InteractCtrl.re_command.match(line) + if not m: + return None + next_step = InteractCtrl.CtrlStep() + + set_get = m.group(1) + cmd_id = m.group(2) + var_val = m.group(3) + if not interact_instance.keep_ids: + cmd_id = interact_instance.next_id + interact_instance.next_id += 1 + next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) + + return next_step + + def __init__(self, port, host, verbose=False, update=False, keep_ids=True): + if not update: + keep_ids = True + self.keep_ids = keep_ids + super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) + + def connect(self): + self.next_id = 1 + super().connect() + + def send(self, data): + data = Ctrl().add_header(data) + return self.socket.send(data) == len(data) + + def receive(self): + responses = [] + data = self.socket.recv(4096) + while (len(data)>0): + (response_with_header, data) = IPA().split_combined(data) + response = Ctrl().rem_header(response_with_header) + responses.append(response.decode('utf-8')) + return responses + + def command(self, command): + assert self.send(command) + res = self.receive() + split_responses = [] + for r in res: + split_responses.extend(r.splitlines()) + sys.stdout.flush() + sys.stderr.flush() + return split_responses + +def main_interact_ctrl(): + parser = common_parser() + parser_add_run_args(parser) + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, verbose=False, update=False, + keep_ids=True) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + + +def main_verify_transcript_ctrl(): + parser = common_parser() + parser_add_verify_args(parser) + parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', + help='With --update, default is to overwrite the command IDs' + ' so that they are consecutive numbers starting from 1.' + ' With --keep-ids, do not change these command IDs.') + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py new file mode 100755 index 0000000..f34e87e --- /dev/null +++ b/osmopy/osmo_interact/vty.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run VTY commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_vty.py. +''' + +import re + +from .common import * + +class InteractVty(Interact): + + class VtyStep(Interact.StepBase): + expect_node = None # e.g. '(config-net)' + expect_prompt_char = None # '>' or '#' + + def __init__(self, prompt): + super().__init__() + self.prompt = prompt + + def verify_interact_state(self, interact_instance): + if interact_instance.update: + return + if interact_instance.this_node != self.expect_node: + raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' + % (self.expect_node, interact_instance.this_node)) + if interact_instance.this_prompt_char != self.expect_prompt_char: + raise Exception('Mismatch: expected VTY prompt character %r, got %r' + % (self.expect_prompt_char, interact_instance.this_prompt_char)) + + @staticmethod + def is_next_step(line, interact_instance): + m = interact_instance.re_prompt.match(line) + if not m: + return None + next_step = InteractVty.VtyStep(interact_instance.prompt) + next_step.expect_node = m.group(1) + next_step.expect_prompt_char = m.group(2) + next_step.command = m.group(3) + return next_step + + def command_str(self, interact_instance=None): + if interact_instance is None: + node = self.expect_node + prompt_char = self.expect_prompt_char + else: + node = interact_instance.last_node + prompt_char = interact_instance.last_prompt_char + if node: + node = '(%s)' % node + node = node or '' + return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) + + def __init__(self, prompt, port, host, verbose, update): + self.prompt = prompt + super().__init__(InteractVty.VtyStep, port, host, verbose, update) + + def connect(self): + self.this_node = None + self.this_prompt_char = '>' # slight cheat for initial prompt char + self.last_node = None + self.last_prompt_char = None + + super().connect() + # receive the first welcome message and discard + data = self.socket.recv(4096) + if not self.prompt: + b = data + b = b[b.rfind(b'\n') + 1:] + while b and (b[0] < ord('A') or b[0] > ord('z')): + b = b[1:] + prompt_str = b.decode('utf-8') + if '>' in prompt_str: + self.prompt = prompt_str[:prompt_str.find('>')] + if not self.prompt: + raise Exception('Could not find application name; needed to decode prompts.' + ' Initial data was: %r' % data) + self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) + + def _command(self, command_str, timeout=10): + self.socket.send(command_str.encode()) + + waited_since = time.time() + received_lines = [] + last_line = '' + + while True: + new_data = self.socket.recv(4096).decode('utf-8') + + last_line = "%s%s" % (last_line, new_data) + + if last_line: + lines = last_line.splitlines() + received_lines.extend(lines[:-1]) + last_line = lines[-1] + + match = self.re_prompt.match(last_line) + if not match: + if time.time() - waited_since > timeout: + raise IOError("Failed to read data (did the app crash?)") + time.sleep(.1) + continue + + self.last_node = self.this_node + self.last_prompt_char = self.this_prompt_char + self.this_node = match.group(1) or None + self.this_prompt_char = match.group(2) + break + + # expecting to have received the command we sent as echo, remove it + clean_command_str = command_str.strip() + if clean_command_str.endswith('?'): + clean_command_str = clean_command_str[:-1] + if received_lines and received_lines[0] == clean_command_str: + received_lines = received_lines[1:] + return received_lines + + def command(self, command_str, timeout=10): + command_str = command_str or '\r' + if command_str[-1] not in '?\r\t': + command_str = command_str + '\r' + + received_lines = self._command(command_str, timeout) + + # send escape to cancel the '?' command line + if command_str[-1] == '?': + self._command('\x03', timeout) + + return received_lines + +def parser_add_vty_args(parser): + parser.add_argument('-n', '--prompt-name', dest='prompt', + help="Name used in application's telnet VTY prompt." + " If omitted, will attempt to determine the name from" + " the initial VTY prompt.") + return parser + +def main_interact_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_run_args(parser) + parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', + help="Equivalent to '-c \"show online-help\" -O -'," + " can be used to generate the VTY reference file as" + " required by osmo-gsm-manuals.git.") + args = parser.parse_args() + + if args.gen_xml: + if args.cmd_str: + raise Exception('It does not make sense to pass both --command and' + ' --gen-xml-ref.') + args.cmd_str = 'show online-help' + + interact = InteractVty(args.prompt, args.port, args.host, + verbose=False, update=False) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + +def main_verify_transcript_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_verify_args(parser) + args = parser.parse_args() + + interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py index 9b1a20b..eb88800 100755 --- a/scripts/osmo_interact_ctrl.py +++ b/scripts/osmo_interact_ctrl.py @@ -18,83 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_ctrl.py. -''' +from osmopy.osmo_interact.ctrl import main_interact_ctrl -import re - -from osmopy.osmo_interact_common import * -from osmopy.osmo_ipa import Ctrl, IPA - -class InteractCtrl(Interact): - next_id = 1 - keep_ids = True - re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') - - class CtrlStep(Interact.StepBase): - - @staticmethod - def is_next_step(line, interact_instance): - m = InteractCtrl.re_command.match(line) - if not m: - return None - next_step = InteractCtrl.CtrlStep() - - set_get = m.group(1) - cmd_id = m.group(2) - var_val = m.group(3) - if not interact_instance.keep_ids: - cmd_id = interact_instance.next_id - interact_instance.next_id += 1 - next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) - - return next_step - - def __init__(self, port, host, verbose=False, update=False, keep_ids=True): - if not update: - keep_ids = True - self.keep_ids = keep_ids - super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) - - def connect(self): - self.next_id = 1 - super().connect() - - def send(self, data): - data = Ctrl().add_header(data) - return self.socket.send(data) == len(data) - - def receive(self): - responses = [] - data = self.socket.recv(4096) - while (len(data)>0): - (response_with_header, data) = IPA().split_combined(data) - response = Ctrl().rem_header(response_with_header) - responses.append(response.decode('utf-8')) - return responses - - def command(self, command): - assert self.send(command) - res = self.receive() - split_responses = [] - for r in res: - split_responses.extend(r.splitlines()) - sys.stdout.flush() - sys.stderr.flush() - return split_responses - -if __name__ == '__main__': - parser = common_parser() - parser_add_run_args(parser) - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, verbose=False, update=False, - keep_ids=True) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_vty.py b/scripts/osmo_interact_vty.py index b57cd8c..b47b46c 100755 --- a/scripts/osmo_interact_vty.py +++ b/scripts/osmo_interact_vty.py @@ -18,163 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_vty.py. -''' +from osmopy.osmo_interact.vty import main_interact_vty -import re - -from osmopy.osmo_interact_common import * - -class InteractVty(Interact): - - class VtyStep(Interact.StepBase): - expect_node = None # e.g. '(config-net)' - expect_prompt_char = None # '>' or '#' - - def __init__(self, prompt): - super().__init__() - self.prompt = prompt - - def verify_interact_state(self, interact_instance): - if interact_instance.update: - return - if interact_instance.this_node != self.expect_node: - raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' - % (self.expect_node, interact_instance.this_node)) - if interact_instance.this_prompt_char != self.expect_prompt_char: - raise Exception('Mismatch: expected VTY prompt character %r, got %r' - % (self.expect_prompt_char, interact_instance.this_prompt_char)) - - @staticmethod - def is_next_step(line, interact_instance): - m = interact_instance.re_prompt.match(line) - if not m: - return None - next_step = InteractVty.VtyStep(interact_instance.prompt) - next_step.expect_node = m.group(1) - next_step.expect_prompt_char = m.group(2) - next_step.command = m.group(3) - return next_step - - def command_str(self, interact_instance=None): - if interact_instance is None: - node = self.expect_node - prompt_char = self.expect_prompt_char - else: - node = interact_instance.last_node - prompt_char = interact_instance.last_prompt_char - if node: - node = '(%s)' % node - node = node or '' - return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) - - def __init__(self, prompt, port, host, verbose, update): - self.prompt = prompt - super().__init__(InteractVty.VtyStep, port, host, verbose, update) - - def connect(self): - self.this_node = None - self.this_prompt_char = '>' # slight cheat for initial prompt char - self.last_node = None - self.last_prompt_char = None - - super().connect() - # receive the first welcome message and discard - data = self.socket.recv(4096) - if not self.prompt: - b = data - b = b[b.rfind(b'\n') + 1:] - while b and (b[0] < ord('A') or b[0] > ord('z')): - b = b[1:] - prompt_str = b.decode('utf-8') - if '>' in prompt_str: - self.prompt = prompt_str[:prompt_str.find('>')] - if not self.prompt: - raise Exception('Could not find application name; needed to decode prompts.' - ' Initial data was: %r' % data) - self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) - - def _command(self, command_str, timeout=10): - self.socket.send(command_str.encode()) - - waited_since = time.time() - received_lines = [] - last_line = '' - - while True: - new_data = self.socket.recv(4096).decode('utf-8') - - last_line = "%s%s" % (last_line, new_data) - - if last_line: - lines = last_line.splitlines() - received_lines.extend(lines[:-1]) - last_line = lines[-1] - - match = self.re_prompt.match(last_line) - if not match: - if time.time() - waited_since > timeout: - raise IOError("Failed to read data (did the app crash?)") - time.sleep(.1) - continue - - self.last_node = self.this_node - self.last_prompt_char = self.this_prompt_char - self.this_node = match.group(1) or None - self.this_prompt_char = match.group(2) - break - - # expecting to have received the command we sent as echo, remove it - clean_command_str = command_str.strip() - if clean_command_str.endswith('?'): - clean_command_str = clean_command_str[:-1] - if received_lines and received_lines[0] == clean_command_str: - received_lines = received_lines[1:] - return received_lines - - def command(self, command_str, timeout=10): - command_str = command_str or '\r' - if command_str[-1] not in '?\r\t': - command_str = command_str + '\r' - - received_lines = self._command(command_str, timeout) - - # send escape to cancel the '?' command line - if command_str[-1] == '?': - self._command('\x03', timeout) - - return received_lines - -def parser_add_vty_args(parser): - parser.add_argument('-n', '--prompt-name', dest='prompt', - help="Name used in application's telnet VTY prompt." - " If omitted, will attempt to determine the name from" - " the initial VTY prompt.") - return parser - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_run_args(parser) - parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', - help="Equivalent to '-c \"show online-help\" -O -'," - " can be used to generate the VTY reference file as" - " required by osmo-gsm-manuals.git.") - args = parser.parse_args() - - if args.gen_xml: - if args.cmd_str: - raise Exception('It does not make sense to pass both --command and' - ' --gen-xml-ref.') - args.cmd_str = 'show online-help' - - interact = InteractVty(args.prompt, args.port, args.host, - verbose=False, update=False) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py index 3afbc62..b24fbfa 100755 --- a/scripts/osmo_verify_transcript_ctrl.py +++ b/scripts/osmo_verify_transcript_ctrl.py @@ -18,41 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL test transcripts against a given application. +from osmopy.osmo_interact.ctrl import main_verify_transcript_ctrl -A CTRL transcript contains CTRL commands and their expected results. -It looks like: - -" -SET 1 var val -SET_REPLY 1 var OK -GET 2 var -GET_REPLY 2 var val -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the CTRL port. - -This module can either be run directly to run or update a given CTRL transcript, -or it can be imported as a module to run more complex setups. -''' - -from osmopy.osmo_interact_ctrl import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_verify_args(parser) - parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', - help='With --update, default is to overwrite the command IDs' - ' so that they are consecutive numbers starting from 1.' - ' With --keep-ids, do not change these command IDs.') - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py index e70c36c..2695e86 100755 --- a/scripts/osmo_verify_transcript_vty.py +++ b/scripts/osmo_verify_transcript_vty.py @@ -18,50 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY test transcripts against a given application. +from osmopy.osmo_interact.vty import main_verify_transcript_vty -A VTY transcript contains VTY commands and their expected results. -It looks like: - -" -OsmoHLR> enable - -OsmoHLR# subscriber show imsi 123456789023000 -% No subscriber for imsi = '123456789023000' -OsmoHLR# subscriber show msisdn 12345 -% No subscriber for msisdn = '12345' - -OsmoHLR# subscriber create imsi 123456789023000 -% Created subscriber 123456789023000 - ID: 1 - IMSI: 123456789023000 - MSISDN: none - No auth data -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the VTY telnet port, -- the application name as printed in the VTY prompt. - -This module can either be run directly to run or update a given VTY transcript, -or it can be imported as a module to run more complex setups. -''' - -import re - -from osmopy.osmo_interact_vty import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_verify_args(parser) - args = parser.parse_args() - - interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 15:13:18 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 15:13:18 +0000 Subject: python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/5492/2/osmopy/osmo_interact/ctrl.py File osmopy/osmo_interact/ctrl.py: Line 1: #!/usr/bin/env python3 (this is actually mostly a file rename from scripts/osmo_interact_ctrl.py, no idea why gerrit doesn't pick up the rename.) https://gerrit.osmocom.org/#/c/5492/2/osmopy/osmo_interact/vty.py File osmopy/osmo_interact/vty.py: Line 1: #!/usr/bin/env python3 (this is actually mostly a file rename from scripts/osmo_interact_vty.py, no idea why gerrit doesn't pick up the rename.) -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:35:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:35:08 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#5). Update ctrl command parsing for python3 * make parse() return command id in addition to variable name and value * introduce parse_kv() wrapper which ignores that id and use it instead of old parse() * make parse() compatible with python3 where we got bytes, not string from the socket so we have to decode it properly before using split() * expand test_py3.py with simply asyn server which verifies that osmo_ctrl.py works properly Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M contrib/jenkins.sh M osmopy/osmo_ipa.py M scripts/osmo_ctrl.py M scripts/twisted_ipa.py M tests/test_py3.py 5 files changed, 84 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/5 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index cce89f2..36f3336 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -12,7 +12,7 @@ rm -rf ./build python3 ./setup.py install -python3 tests/test_py3.py + python3 -m compileall osmopy python3 -m compileall scripts/osmo_ctrl.py python3 -m compileall scripts/osmo_interact_common.py @@ -23,7 +23,7 @@ python3 -m compileall scripts/soap.py python3 -m compileall scripts/twisted_ipa.py -cd scripts -./osmo_ctrl.py --help +# Run async server which tests scripts/osmo_ctrl.py interaction +python3 tests/test_py3.py # TODO: add more tests diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..afabf67 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,23 +231,33 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data): + """ + Parse Ctrl string returning (id, var, value) tuple + var could be None in case of ERROR message + value could be None in case of GET message + both could be None in case of TRAP with non-zero id + """ + data = self.rem_header(raw_data).decode('utf-8') + (s, i, v) = data.split(' ', 2) + if s == self.CTRL_ERR: + return i, None, v + if s == self.CTRL_GET: + return i, v, None + if s == self.CTRL_GET + '_' + self.CTRL_REP: + return i, v, None + (s, i, var, val) = data.split(' ', 3) + if s == self.CTRL_TRAP and i != '0': + return i, None, None + return i, var, val + + def parse_kv(self, raw_data): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) + (i, var, val) = self.parse(raw_data) return var, val def trap(self, var, val): @@ -265,11 +275,19 @@ return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) + def reply(self, op_id, var, val=None): + """ + Make SET/GET command reply: returns assembled message + """ + if val is not None: + return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, self.CTRL_REP, op_id, var, val)) + return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, op_id, var)) + def verify(self, reply, r, var, val=None): """ Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value """ - (k, v) = self.parse(reply) + (k, v) = self.parse_kv(reply) if k != var or (val is not None and v != val): return False, v return True, v diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 8c0608f..ac20050 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -40,8 +40,8 @@ def do_set_get(sck, var, value = None): (r, c) = Ctrl().cmd(var, value) sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + ret = sck.recv(4096) + return (Ctrl().rem_header(ret),) + Ctrl().verify(ret, r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..533bfae 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse_kv(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) diff --git a/tests/test_py3.py b/tests/test_py3.py index cac2f93..e109c63 100644 --- a/tests/test_py3.py +++ b/tests/test_py3.py @@ -1,7 +1,49 @@ #!/usr/bin/env python3 -# just import a smoke test for osmopy +# just a smoke test for osmopy -import osmopy +import asyncio +from osmopy.osmo_ipa import Ctrl +from osmopy import __version__ -print('[Python3] Smoke test PASSED.') +class CtrlProtocol(asyncio.Protocol): + def connection_made(self, transport): + peername = transport.get_extra_info('peername') + print('Connection from {}'.format(peername)) + self.transport = transport + + def data_received(self, data): + (i, v, k) = Ctrl().parse(data) + if not k: + print('Ctrl GET received: %s' % v) + else: + print('Ctrl SET received: %s :: %s' % (v, k)) + + message = Ctrl().reply(i, v, k) + self.transport.write(message) + + self.transport.close() + # quit the loop gracefully + print('Closing the loop...') + loop.stop() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + + # Each client connection will create a new protocol instance + server = loop.run_until_complete(loop.create_server(CtrlProtocol, '127.0.0.1', 4249)) + + print('Serving on {}...'.format(server.sockets[0].getsockname())) + + # Async client running in the subprocess plugged to the same event loop + loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d' 'localhost'), loop = loop)) + + loop.run_forever() + + # Cleanup after loop is finished + server.close() + loop.run_until_complete(server.wait_closed()) + loop.close() + + print('[Python3] Smoke test PASSED for v%s' % __version__) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:35:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:35:08 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#7). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M contrib/jenkins.sh A scripts/osmo_rate_ctr2csv.py M setup.py 4 files changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/7 diff --git a/README b/README index 25be782..5b02bfa 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ osmotestconfig.py - test that apps start/write with example configs osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 36f3336..126f66b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -15,6 +15,7 @@ python3 -m compileall osmopy python3 -m compileall scripts/osmo_ctrl.py +python3 -m compileall scripts/osmo_rate_ctr2csv.py python3 -m compileall scripts/osmo_interact_common.py python3 -m compileall scripts/osmo_interact_ctrl.py python3 -m compileall scripts/osmo_interact_vty.py diff --git a/scripts/osmo_rate_ctr2csv.py b/scripts/osmo_rate_ctr2csv.py new file mode 100644 index 0000000..1e3fc9f --- /dev/null +++ b/scripts/osmo_rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse_kv(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index bab9c38..494f63f 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", + "scripts/osmo_rate_ctr2csv.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 7 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:35:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:35:08 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Ignore compilation byproducts In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5483 to look at the new patch set (#3). Ignore compilation byproducts Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 --- M .gitignore 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/83/5483/3 diff --git a/.gitignore b/.gitignore index 766f495..095d598 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ osmopython.egg-info/ +*.pyc +build/ +dist/ -- To view, visit https://gerrit.osmocom.org/5483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:35:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:35:08 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5038 to look at the new patch set (#4). Improve python3 compatibility Use proper print() function to make scripts compatible with both python 2 and 3. This paves the way to deprecating python 2 support altogether. Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M contrib/jenkins.sh M scripts/osmodumpdoc.py M scripts/osmotestconfig.py M scripts/osmotestvty.py M setup.py 5 files changed, 33 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 126f66b..749f57a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -19,6 +19,9 @@ python3 -m compileall scripts/osmo_interact_common.py python3 -m compileall scripts/osmo_interact_ctrl.py python3 -m compileall scripts/osmo_interact_vty.py +python3 -m compileall scripts/osmodumpdoc.py +python3 -m compileall scripts/osmotestvty.py +python3 -m compileall scripts/osmotestconfig.py python3 -m compileall scripts/osmo_verify_transcript_ctrl.py python3 -m compileall scripts/osmo_verify_transcript_vty.py python3 -m compileall scripts/soap.py diff --git a/scripts/osmodumpdoc.py b/scripts/osmodumpdoc.py index 2464b05..d71edc8 100644 --- a/scripts/osmodumpdoc.py +++ b/scripts/osmodumpdoc.py @@ -4,7 +4,7 @@ # Fixes may need to be applied to both. """Start the process and dump the documentation to the doc dir.""" - +from __future__ import print_function import subprocess import time import os @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py index 2132c43..f227504 100644 --- a/scripts/osmotestconfig.py +++ b/scripts/osmotestconfig.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import os.path import time @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/scripts/osmotestvty.py b/scripts/osmotestvty.py index e513c05..55017a5 100644 --- a/scripts/osmotestvty.py +++ b/scripts/osmotestvty.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import time import unittest @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/setup.py b/setup.py index 494f63f..e1bdafe 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,10 @@ scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["scripts/osmo_interact_vty.py", + scripts = ["scripts/osmodumpdoc.py", + "scripts/osmotestconfig.py", + "scripts/osmotestvty.py", + "scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", "scripts/osmo_rate_ctr2csv.py", -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:37:36 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:37:36 +0000 Subject: python/osmo-python-tests[master]: scripts: add symlink to osmopy In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5493 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:44:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 16:44:00 +0000 Subject: python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5496 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:56:41 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 19 Dec 2017 16:56:41 +0000 Subject: [PATCH] osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass Message-ID: Review at https://gerrit.osmocom.org/5498 iu: iu_helpers: add functions to decode ip/port from rab-ass add ranap_transp_assoc_decode() to decode the port information from an RANAP_IuTransportAssociation_t field. add ranap_transp_layer_addr_decode() to decode the ip-address from an RANAP_TransportLayerAddress_t field. Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 --- M include/osmocom/ranap/iu_helpers.h M src/iu_helpers.c 2 files changed, 52 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/98/5498/1 diff --git a/include/osmocom/ranap/iu_helpers.h b/include/osmocom/ranap/iu_helpers.h index 109b6da..56791b8 100644 --- a/include/osmocom/ranap/iu_helpers.h +++ b/include/osmocom/ranap/iu_helpers.h @@ -3,5 +3,10 @@ #include #include +#include +#include + int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len); int ranap_imsi_encode(uint8_t *out, size_t out_len, const char *in); +int ranap_transp_assoc_decode(uint16_t *port, RANAP_IuTransportAssociation_t *transp_assoc); +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, RANAP_TransportLayerAddress_t *trasp_layer_addr); diff --git a/src/iu_helpers.c b/src/iu_helpers.c index 2f44e93..f038da2 100644 --- a/src/iu_helpers.c +++ b/src/iu_helpers.c @@ -20,8 +20,11 @@ #include #include - +#include +#include "asn1helpers.h" #include +#include +#include /* decode a BCD-string as used inside ASN.1 encoded Iu interface protocols */ int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len) @@ -70,3 +73,46 @@ } return i; } + +/* decode a network port as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_assoc_decode(uint16_t *port, RANAP_IuTransportAssociation_t * transp_assoc) +{ + uint32_t result; + + if (!transp_assoc) + return -EINVAL; + + result = asn1bitstr_to_u32((BIT_STRING_t *) & transp_assoc->choice.bindingID); + + /* The lower 16 bits should be zero, otherwise the decoding may + * have yielded some odd result */ + if (result & 0xFFFF) + return -EINVAL; + + *port = (uint16_t) ((result >> 16) & 0xFFFF); + + if (*port == 0) + return -EINVAL; + + return 0; +} + +/* decode a network address as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, RANAP_TransportLayerAddress_t * trasp_layer_addr) +{ + unsigned char *buf; + int len; + + buf = trasp_layer_addr->buf; + len = trasp_layer_addr->size; + + if (addr_len > INET_ADDRSTRLEN) + return -EINVAL; + + if (buf[0] == 0x35 && len > 7) + snprintf(addr, addr_len, "%u.%u.%u.%u", buf[3], buf[4], buf[5], buf[6]); + else if (len > 3) + snprintf(addr, addr_len, "%u.%u.%u.%u", buf[0], buf[1], buf[2], buf[3]); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/5498 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:56:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 19 Dec 2017 16:56:42 +0000 Subject: [PATCH] osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes Message-ID: Review at https://gerrit.osmocom.org/5499 ranap_msg_factory: check IE encoder return codes in many functions, the returncode (rc) from the IE encoder functions is not checked. Add a return code check and log error message (like it is already done in the functions which already check the return code) Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae --- M src/ranap_msg_factory.c 1 file changed, 35 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/99/5499/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index fe7e325..9611794 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -185,6 +185,10 @@ /* ies -> dt */ rc = ranap_encode_directtransferies(&dt, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding direct transfer IEs: %d\n", rc); + return NULL; + } /* dt -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_DirectTransfer, @@ -245,6 +249,10 @@ /* ies -> out */ rc = ranap_encode_securitymodecommandies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode command IEs: %d\n", rc); + return NULL; + } /* release dynamic allocations attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_IntegrityProtectionInformation, &ies.integrityProtectionInformation); @@ -282,6 +290,10 @@ /* ies -> out */ rc = ranap_encode_securitymodecompleteies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode complete IEs: %d\n", rc); + return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_SecurityModeControl, @@ -317,6 +329,11 @@ /* ies -> out */ rc = ranap_encode_commonid_ies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding common id IEs: %d\n", rc); + return NULL; + } + /* release dynamic allocations attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); if (rc < 0) @@ -349,8 +366,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecommandies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release command IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_Release, @@ -377,8 +396,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecompleteies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release complete IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_Iu_Release, @@ -434,6 +455,11 @@ /* ies -> out */ rc = ranap_encode_pagingies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding paging IEs: %d\n", rc); + return NULL; + } + /* release dynamic allocation attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_TemporaryUE_ID, &ies.temporaryUE_ID); @@ -879,8 +905,10 @@ memcpy(&ies.cause, cause, sizeof(ies.cause)); rc = ranap_encode_iu_releaserequesties(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); return NULL; + } /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_ReleaseRequest, @@ -915,8 +943,11 @@ /* encoe the list IEs into the output */ rc = ranap_encode_rab_releaserequesties(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); return NULL; + } + /* 'out' has been generated, we can release the input */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseList, &ies.raB_ReleaseList); -- To view, visit https://gerrit.osmocom.org/5499 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 19 16:56:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 19 Dec 2017 16:56:42 +0000 Subject: [PATCH] osmo-iuh[master]: ranap_msg_factory: remove unusued variable Message-ID: Review at https://gerrit.osmocom.org/5500 ranap_msg_factory: remove unusued variable remove variable i in ranap_new_msg_sec_mod_compl() as it is not used (compiler warning) Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f --- M src/ranap_msg_factory.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/00/5500/1 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 9611794..0de4ea1 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -279,7 +279,7 @@ RANAP_SecurityModeCompleteIEs_t ies; RANAP_SecurityModeComplete_t out; struct msgb *msg; - int i, rc; + int rc; memset(&ies, 0, sizeof(ies)); memset(&out, 0, sizeof(out)); -- To view, visit https://gerrit.osmocom.org/5500 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:05:54 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 19 Dec 2017 17:05:54 +0000 Subject: [PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4980 to look at the new patch set (#14). mgcp: use osmo-mgw to switch rtp streams in the current implementation we still use osmo-bsc_mgcp, which has many problems and is also obsoleted by osmo-mgw. integrate osmo-mgw and re-implement the current switching using an osmo fsm. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Depends: osmo-iuh I3c1a0455c5f25cae41ee19229d6daf299e023062 Closes: OS#2605 Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 --- M include/osmocom/msc/Makefile.am M include/osmocom/msc/gsm_data.h M include/osmocom/msc/iucs.h M include/osmocom/msc/msc_ifaces.h A include/osmocom/msc/msc_mgcp.h M src/libmsc/Makefile.am M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c M src/libmsc/gsm_04_08.c M src/libmsc/iucs.c M src/libmsc/iucs_ranap.c M src/libmsc/msc_ifaces.c A src/libmsc/msc_mgcp.c M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c 15 files changed, 1,317 insertions(+), 325 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/14 diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 1419e8e..052d830 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ mncc.h \ mncc_int.h \ msc_ifaces.h \ + msc_mgcp.h \ network_listen.h \ oap_client.h \ openbscdefines.h \ diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 696cef1..9106421 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -196,9 +196,17 @@ struct gsm_encr encr; struct { + struct mgcp_ctx *mgcp_ctx; unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; + + uint16_t local_port_ran; + char local_addr_ran[INET_ADDRSTRLEN]; + uint16_t remote_port_ran; + char remote_addr_ran[INET_ADDRSTRLEN]; + uint16_t local_port_cn; + char local_addr_cn[INET_ADDRSTRLEN]; + uint16_t remote_port_cn; + char remote_addr_cn[INET_ADDRSTRLEN]; } rtp; /* which Iu-CS connection, if any. */ diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h index b7d6064..a48a316 100644 --- a/include/osmocom/msc/iucs.h +++ b/include/osmocom/msc/iucs.h @@ -1,7 +1,10 @@ #pragma once +#include + int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint16_t *lac); struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network, struct ranap_ue_conn_ctx *ue); +int iu_rab_act_cs(struct gsm_trans *trans); diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h index 0592c07..ca25e9d 100644 --- a/include/osmocom/msc/msc_ifaces.h +++ b/include/osmocom/msc/msc_ifaces.h @@ -37,7 +37,3 @@ enum gsm48_reject_value value); int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h new file mode 100644 index 0000000..2fd44ef --- /dev/null +++ b/include/osmocom/msc/msc_mgcp.h @@ -0,0 +1,56 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include +#include + +/* MGCP state handler context. This context information stores all information + * to handle the direction of the RTP streams via MGCP. There is one instance + * of this context struct per subscriber connection. + * (see also struct gsm_subscriber_connection) */ +struct mgcp_ctx { + /* FSM instance, which handles the connection switching procedure */ + struct osmo_fsm_inst *fsm; + + /* RTP endpoint number. This number number identifies the endpoint + * on the MGW on which the RAN and CN connection is created. This + * endpoint number is assigned and released automatically. */ + uint16_t rtp_endpoint; + + /* Set to true, when the context information is no longer needed */ + bool free_ctx; + + /* RTP connection identifiers */ + char conn_id_ran[MGCP_CONN_ID_LENGTH]; + char conn_id_cn[MGCP_CONN_ID_LENGTH]; + + /* Copy of the pointer and the data with context information + * needed to process the AoIP and MGCP requests (system data) */ + struct mgcp_client *mgcp; + struct gsm_trans *trans; + mgcp_trans_id_t mgw_pending_trans; +}; + +int msc_mgcp_call_assignment(struct gsm_trans *trans); +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr); +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); +int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..2901df6 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -41,6 +41,7 @@ mncc_builtin.c \ mncc_sock.c \ msc_ifaces.c \ + msc_mgcp.c \ rrlp.c \ silent_call.c \ sms_queue.c \ diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index bdfef87..5973234 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -408,8 +409,21 @@ /* Package RTP-Address data */ memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); rtp_addr_in.sin_family = AF_INET; - rtp_addr_in.sin_port = osmo_htons(conn->rtp.port_subscr); - rtp_addr_in.sin_addr.s_addr = osmo_htonl(mgcp_client_remote_addr_n(gsm_network->mgw.client)); + rtp_addr_in.sin_port = osmo_htons(conn->rtp.local_port_ran); + rtp_addr_in.sin_addr.s_addr = inet_addr(conn->rtp.local_addr_ran); + + if (rtp_addr_in.sin_addr.s_addr == INADDR_NONE) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Address -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (rtp_addr_in.sin_port == 0) { + LOGP(DMSC, LOGL_ERROR, + "(subscriber:%s) Invalid RTP-Port -- assignment not sent!\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } memset(&rtp_addr, 0, sizeof(rtp_addr)); memcpy(&rtp_addr, &rtp_addr_in, sizeof(rtp_addr_in)); diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 922dca9..d0b24eb 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -596,11 +597,7 @@ * transport address element */ if (rtp_addr.ss_family == AF_INET) { rtp_addr_in = (struct sockaddr_in *)&rtp_addr; - conn->rtp.port_subscr = osmo_ntohs(rtp_addr_in->sin_port); - /* FIXME: We also get the IP-Address of the remote (e.g. BTS) - * end with the response. Currently we just ignore that address. - * Instead we expect that our local MGCP gateway and the code - * controlling it, magically knows the IP of the remote end. */ + msc_mgcp_ass_complete(conn, osmo_ntohs(rtp_addr_in->sin_port), inet_ntoa(rtp_addr_in->sin_addr)); } else { LOGP(DMSC, LOGL_ERROR, "Unsopported addressing scheme. (supports only IPV4)\n"); goto fail; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d71b48b..4ce768c 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #ifdef BUILD_IU @@ -78,6 +79,7 @@ #include #include +#include #include @@ -1328,8 +1330,8 @@ { gsm48_stop_cc_timer(trans); - /* Make sure call also gets released on the mgcp side */ - msc_call_release(trans); + /* Initiate the teardown of the related connections on the MGW */ + msc_mgcp_call_release(trans); /* send release to L4, if callref still exists */ if (trans->callref) { @@ -1390,6 +1392,7 @@ { struct gsm_trans *trans1 = trans_find_by_callref(net, bridge->callref[0]); struct gsm_trans *trans2 = trans_find_by_callref(net, bridge->callref[1]); + int rc; if (!trans1 || !trans2) return -EIO; @@ -1400,7 +1403,18 @@ /* Which subscriber do we want to track trans1 or trans2? */ log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub); - return msc_call_bridge(trans1, trans2); + /* Bridge RTP streams */ + rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn, + trans2->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + rc = msc_mgcp_call_complete(trans2, trans1->conn->rtp.local_port_cn, + trans1->conn->rtp.local_addr_cn); + if (rc) + return -EINVAL; + + return 0; } static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg) @@ -1743,7 +1757,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -1785,7 +1799,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2669,8 +2683,23 @@ * (0 if unknown) */ msg_type = GSM_TCHF_FRAME; - uint32_t addr = mgcp_client_remote_addr_n(net->mgw.client); - uint16_t port = trans->conn->rtp.port_cn; + uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn); + uint16_t port = trans->conn->rtp.local_port_cn; + + LOGP(DMNCC, LOGL_ERROR, "RTP create for non-existing trans\n"); + + if (addr == INADDR_NONE) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid IP-Address\n", + vlr_subscr_name(trans->vsub)); + return; + } + if (port == 0) { + LOGP(DMNCC, LOGL_ERROR, + "(subscriber:%s) external MNCC is signalling invalid Port\n", + vlr_subscr_name(trans->vsub)); + return; + } /* FIXME: This has to be set to some meaningful value, * before the MSC-Split, this value was pulled from @@ -2710,15 +2739,15 @@ trans->conn->mncc_rtp_bridge = 1; - /* When we call msc_call_assignment() we will trigger, depending + /* When we call msc_mgcp_call_assignment() we will trigger, depending * on the RAN type the call assignment on the A or Iu interface. - * msc_call_assignment() also takes care about sending the CRCX + * msc_mgcp_call_assignment() also takes care about sending the CRCX * command to the MGCP-GW. The CRCX will return the port number, * where the PBX (e.g. Asterisk) will send its RTP stream to. We * have to return this port number back to the MNCC by sending * it back with the TCH_RTP_CREATE message. To make sure that * this message is sent AFTER the response to CRCX from the - * MGCP-GW has arrived, we need will instruct msc_call_assignment() + * MGCP-GW has arrived, we need will instruct msc_mgcp_call_assignment() * to take care of this by setting trans->tch_rtp_create to true. * This will make sure that gsm48_tch_rtp_create() (below) is * called as soon as the local port number has become known. */ @@ -2726,7 +2755,7 @@ /* Assign call (if not done yet) */ if (trans->assignment_done == false) { - rc = msc_call_assignment(trans); + rc = msc_mgcp_call_assignment(trans); trans->assignment_done = true; } else @@ -2753,6 +2782,7 @@ { struct gsm_trans *trans; struct gsm_mncc_rtp *rtp = arg; + struct in_addr addr; /* Find callref */ trans = trans_find_by_callref(net, rtp->callref); @@ -2768,8 +2798,8 @@ return 0; } - msc_call_connect(trans, rtp->port, rtp->ip); - return 0; + addr.s_addr = osmo_htonl(rtp->ip); + return msc_mgcp_call_complete(trans, rtp->port, inet_ntoa(addr)); } static struct downstate { diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index c89e412..7bb45b2 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -30,8 +30,22 @@ #include #include +#include #include #include +#include + +#include "../../bscconfig.h" + +#ifdef BUILD_IU +#include +extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, + uint32_t rtp_ip, + uint16_t rtp_port, + bool use_x213_nsap); +#else +#include +#endif /* BUILD_IU */ /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */ static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network, @@ -187,3 +201,53 @@ return rc; } + +int iu_rab_act_cs(struct gsm_trans *trans) +{ + struct gsm_subscriber_connection *conn; + struct msgb *msg; + bool use_x213_nsap; + uint32_t conn_id; + struct ranap_ue_conn_ctx *uectx; + uint8_t rab_id; + uint32_t rtp_ip; + uint16_t rtp_port; + + conn = trans->conn; + uectx = conn->iu.ue_ctx; + rab_id = conn->iu.rab_id; + rtp_ip = osmo_htonl(inet_addr(conn->rtp.local_addr_ran)); + rtp_port = conn->rtp.local_port_ran; + conn_id = uectx->conn_id; + + if (rtp_ip == INADDR_NONE) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP IP-Address\n", + conn_id, rab_id); + return -EINVAL; + } + if (rtp_port == 0) { + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, invalid RTP Port\n", + conn_id, rab_id); + return -EINVAL; + } + + use_x213_nsap = + (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); + + LOGP(DIUCS, LOGL_DEBUG, + "Assigning RAB: conn_id=%u, rab_id=%d, rtp=%x:%u, use_x213_nsap=%d\n", + conn_id, rab_id, rtp_ip, rtp_port, use_x213_nsap); + + msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, + use_x213_nsap); + msg->l2h = msg->data; + + if (ranap_iu_rab_act(uectx, msg)) + LOGP(DIUCS, LOGL_ERROR, + "Failed to send RAB Assignment: conn_id=%d rab_id=%d rtp=%x:%u\n", + conn_id, rab_id, rtp_ip, rtp_port); + return 0; +} + diff --git a/src/libmsc/iucs_ranap.c b/src/libmsc/iucs_ranap.c index abf1812..57cd50e 100644 --- a/src/libmsc/iucs_ranap.c +++ b/src/libmsc/iucs_ranap.c @@ -28,6 +28,8 @@ #include #include +#include +#include #include #include @@ -36,22 +38,54 @@ #include #include #include +#include + +#include /* To continue authorization after a Security Mode Complete */ int gsm0408_authorize(struct gsm_subscriber_connection *conn); -static int iucs_rx_rab_assign(struct gsm_subscriber_connection *conn, - RANAP_RAB_SetupOrModifiedItemIEs_t *setup_ies) +static int iucs_rx_rab_assign(struct gsm_subscriber_connection *conn, RANAP_RAB_SetupOrModifiedItemIEs_t * setup_ies) { uint8_t rab_id; RANAP_RAB_SetupOrModifiedItem_t *item = &setup_ies->raB_SetupOrModifiedItem; + RANAP_TransportLayerAddress_t *transp_layer_addr; + RANAP_IuTransportAssociation_t *transp_assoc; + uint16_t port = 0; + int rc; + char addr[INET_ADDRSTRLEN]; rab_id = item->rAB_ID.buf[0]; LOGP(DIUCS, LOGL_NOTICE, - "Received RAB assignment event for %s rab_id=%hhd\n", - vlr_subscr_name(conn->vsub), rab_id); + "Received RAB assignment event for %s rab_id=%hhd\n", vlr_subscr_name(conn->vsub), rab_id); + if (item->iuTransportAssociation && item->transportLayerAddress) { + transp_layer_addr = item->transportLayerAddress; + transp_assoc = item->iuTransportAssociation; + + rc = ranap_transp_assoc_decode(&port, transp_assoc); + if (rc != 0) { + LOGP(DIUCS, LOGL_ERROR, + "Unable to decode RTP port in RAB assignment (%s rab_id=%hhd)\n", + vlr_subscr_name(conn->vsub), rab_id); + return 0; + } + + rc = ranap_transp_layer_addr_decode(addr, sizeof(addr), transp_layer_addr); + if (rc != 0) { + LOGP(DIUCS, LOGL_ERROR, + "Unable to decode IP-Address in RAB assignment (%s rab_id=%hhd)\n", + vlr_subscr_name(conn->vsub), rab_id); + return 0; + } + + return msc_mgcp_ass_complete(conn, port, addr); + } + + LOGP(DIUCS, LOGL_ERROR, + "RAB assignment lacks RTP connection information. (%s rab_id=%hhd)\n", + vlr_subscr_name(conn->vsub), rab_id); return 0; } diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c index e29fe0e..437d75c 100644 --- a/src/libmsc/msc_ifaces.c +++ b/src/libmsc/msc_ifaces.c @@ -29,15 +29,12 @@ #include #include #include +#include #include "../../bscconfig.h" #ifdef BUILD_IU #include -extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, - uint32_t rtp_ip, - uint16_t rtp_port, - bool use_x213_nsap); #else #include #endif /* BUILD_IU */ @@ -140,287 +137,4 @@ DEBUGP(DIUCS, "%s: tx CommonID %s\n", vlr_subscr_name(conn->vsub), conn->vsub->imsi); return ranap_iu_tx_common_id(conn->iu.ue_ctx, conn->vsub->imsi); -} - -static int iu_rab_act_cs(struct ranap_ue_conn_ctx *uectx, uint8_t rab_id, - uint32_t rtp_ip, uint16_t rtp_port) -{ -#ifdef BUILD_IU - struct msgb *msg; - bool use_x213_nsap; - uint32_t conn_id = uectx->conn_id; - - use_x213_nsap = (uectx->rab_assign_addr_enc == RANAP_NSAP_ADDR_ENC_X213); - - LOGP(DIUCS, LOGL_DEBUG, "Assigning RAB: conn_id=%u, rab_id=%d," - " rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip, - rtp_port, use_x213_nsap); - - msg = ranap_new_msg_rab_assign_voice(rab_id, rtp_ip, rtp_port, - use_x213_nsap); - msg->l2h = msg->data; - - if (ranap_iu_rab_act(uectx, msg)) - LOGP(DIUCS, LOGL_ERROR, "Failed to send RAB Assignment:" - " conn_id=%d rab_id=%d rtp=%x:%u\n", - conn_id, rab_id, rtp_ip, rtp_port); - return 0; -#else - LOGP(DMSC, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); - return -ENOTSUP; -#endif -} - -static void mgcp_response_rab_act_cs_crcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_subscriber_connection *conn = trans->conn; - uint32_t rtp_ip; - int rc; - - if (r->head.response_code != 200) { - LOGP(DMGCP, LOGL_ERROR, - "MGCPGW response yields error: %d %s\n", - r->head.response_code, r->head.comment); - goto rab_act_cs_error; - } - - rc = mgcp_response_parse_params(r); - if (rc) { - LOGP(DMGCP, LOGL_ERROR, - "Cannot parse MGCP response, for %s\n", - vlr_subscr_name(trans->vsub)); - goto rab_act_cs_error; - } - - conn->rtp.port_cn = r->audio_port; - - rtp_ip = mgcp_client_remote_addr_n(conn->network->mgw.client); - - if (trans->conn->via_ran == RAN_UTRAN_IU) { - /* Assign a voice channel via RANAP on 3G */ - if (iu_rab_act_cs(conn->iu.ue_ctx, conn->iu.rab_id, rtp_ip, conn->rtp.port_subscr)) - goto rab_act_cs_error; - } else if (trans->conn->via_ran == RAN_GERAN_A) { - /* Assign a voice channel via A on 2G */ - if (a_iface_tx_assignment(trans)) - goto rab_act_cs_error; - } else - goto rab_act_cs_error; - - /* Respond back to MNCC (if requested) */ - if (trans->tch_rtp_create) { - if (gsm48_tch_rtp_create(trans)) - goto rab_act_cs_error; - } - return; - -rab_act_cs_error: - /* FIXME abort call, invalidate conn, ... */ - LOGP(DMSC, LOGL_ERROR, "%s: failure during assignment\n", - vlr_subscr_name(trans->vsub)); - return; -} - -int msc_call_assignment(struct gsm_trans *trans) -{ - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - uint16_t bts_base; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - -#ifdef BUILD_IU - /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ - static uint8_t next_iu_rab_id = 1; - if (conn->via_ran == RAN_UTRAN_IU) - conn->iu.rab_id = next_iu_rab_id ++; -#endif - - conn->rtp.mgcp_rtp_endpoint = - mgcp_client_next_endpoint(conn->network->mgw.client); - - /* This will calculate the port we assign to the BTS via AoIP - * assignment command (or rab-assignment on 3G) The BTS will send - * its RTP traffic to that port on the MGCPGW side. The MGCPGW only - * gets the endpoint ID via the CRCX. It will do the same calculation - * on his side too to get knowledge of the rtp port. */ - bts_base = mgcp_client_conf_actual(mgcp)->bts_base; - conn->rtp.port_subscr = bts_base + 2 * conn->rtp.mgcp_rtp_endpoint; - - /* Establish the RTP stream first as looping back to the originator. - * The MDCX will patch through to the counterpart. TODO: play a ring - * tone instead. */ - msg = mgcp_msg_crcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint, MGCP_CONN_LOOPBACK); - return mgcp_client_tx(mgcp, msg, mgcp_response_rab_act_cs_crcx, trans); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv); - -static void mgcp_bridge(struct gsm_trans *from, struct gsm_trans *to, - enum bridge_state state, - enum mgcp_connection_mode mode) -{ - struct gsm_subscriber_connection *conn1 = from->conn; - struct gsm_subscriber_connection *conn2 = to->conn; - struct mgcp_client *mgcp = conn1->network->mgw.client; - const char *ip; - struct msgb *msg; - - OSMO_ASSERT(mgcp); - - from->bridge.peer = to; - from->bridge.state = state; - - /* Loop back to the same MGCP GW */ - ip = mgcp_client_remote_addr_str(mgcp); - - msg = mgcp_msg_mdcx(mgcp, - conn1->rtp.mgcp_rtp_endpoint, - ip, conn2->rtp.port_cn, - mode); - if (mgcp_client_tx(mgcp, msg, mgcp_response_bridge_mdcx, from)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(from->vsub)); -} - -static void mgcp_response_bridge_mdcx(struct mgcp_response *r, void *priv) -{ - struct gsm_trans *trans = priv; - struct gsm_trans *peer = trans->bridge.peer; - - switch (trans->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - trans->bridge.state = BRIDGE_STATE_LOOPBACK_ESTABLISHED; - - switch (peer->bridge.state) { - case BRIDGE_STATE_LOOPBACK_PENDING: - /* Wait until the other is done as well. */ - return; - case BRIDGE_STATE_LOOPBACK_ESTABLISHED: - /* Now that both are in loopback, switch both to - * forwarding. */ - mgcp_bridge(trans, peer, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - mgcp_bridge(peer, trans, BRIDGE_STATE_BRIDGE_PENDING, - MGCP_CONN_RECV_SEND); - break; - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } - break; - - case BRIDGE_STATE_BRIDGE_PENDING: - trans->bridge.state = BRIDGE_STATE_BRIDGE_ESTABLISHED; - break; - - default: - LOGP(DMGCP, LOGL_ERROR, - "Unexpected bridge state: %d for %s\n", - trans->bridge.state, vlr_subscr_name(trans->vsub)); - break; - } -} - -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip) -{ - /* With this function we inform the MGCP-GW where (ip/port) it - * has to send its outgoing voic traffic. The receiving end will - * usually be a PBX (e.g. Asterisk). The IP-Address we tell, will - * not only be used to direct the traffic, it will also be used - * as a filter to make sure only RTP packets from the right - * remote end will reach the BSS. This is also the reason why - * inbound audio will not work until this step is performed */ - - /* NOTE: This function is used when msc_call_bridge(), is not - * applicable. This is usually the case when an external MNCC - * is in use */ - - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - struct msgb *msg; - - if (!trans) - return -EINVAL; - if (!trans->conn) - return -EINVAL; - if (!trans->conn->network) - return -EINVAL; - if (!trans->conn->network->mgw.client) - return -EINVAL; - - mgcp = trans->conn->network->mgw.client; - - struct in_addr ip_addr; - ip_addr.s_addr = ntohl(ip); - - conn = trans->conn; - - msg = mgcp_msg_mdcx(mgcp, - conn->rtp.mgcp_rtp_endpoint, - inet_ntoa(ip_addr), port, MGCP_CONN_RECV_SEND); - if (mgcp_client_tx(mgcp, msg, NULL, trans)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send MDCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - return 0; -} - -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2) -{ - if (!trans1) - return -EINVAL; - if (!trans2) - return -EINVAL; - - /* First setup as loopback and configure the counterparts' endpoints, - * so that when transmission starts the originating addresses are - * already known to be valid. The mgcp callback will continue. */ - mgcp_bridge(trans1, trans2, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - mgcp_bridge(trans2, trans1, BRIDGE_STATE_LOOPBACK_PENDING, - MGCP_CONN_LOOPBACK); - - return 0; -} - -void msc_call_release(struct gsm_trans *trans) -{ - struct msgb *msg; - struct gsm_subscriber_connection *conn; - struct mgcp_client *mgcp; - - if (!trans) - return; - if (!trans->conn) - return; - if (!trans->conn->network) - return; - - conn = trans->conn; - mgcp = conn->network->mgw.client; - - /* Send DLCX */ - msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint, - conn->rtp.mgcp_rtp_endpoint); - if (mgcp_client_tx(mgcp, msg, NULL, NULL)) - LOGP(DMGCP, LOGL_ERROR, - "Failed to send DLCX message for %s\n", - vlr_subscr_name(trans->vsub)); - - /* Release endpoint id */ - mgcp_client_release_endpoint(conn->rtp.mgcp_rtp_endpoint, mgcp); } diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c new file mode 100644 index 0000000..394771e --- /dev/null +++ b/src/libmsc/msc_mgcp.c @@ -0,0 +1,1074 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../bscconfig.h" + +#define S(x) (1 << (x)) + +#define CONN_ID_RAN 1 +#define CONN_ID_CN 2 + +#define MGCP_MGW_TIMEOUT 4 /* in seconds */ +#define MGCP_MGW_TIMEOUT_TIMER_NR 1 +#define MGCP_RAN_TIMEOUT 10 /* in seconds */ +#define MGCP_RAN_TIMEOUT_TIMER_NR 2 +#define MGCP_REL_TIMEOUT 60 /* in seconds */ +#define MGCP_REL_TIMEOUT_TIMER_NR 3 +#define MGCP_ASS_TIMEOUT 10 /* in seconds */ +#define MGCP_ASS_TIMEOUT_TIMER_NR 4 + +#define MGCP_ENDPOINT_FORMAT "%x at mgw" + +/* Some internal cause codes to indicate fault condition inside the FSM */ +enum msc_mgcp_cause_code { + MGCP_ERR_MGW_FAIL, + MGCP_ERR_MGW_INVAL_RESP, + MGCP_ERR_MGW_TX_FAIL, + MGCP_ERR_UNEXP_TEARDOWN, + MGCP_ERR_UNSUPP_ADDR_FMT, + MGCP_ERR_RAN_TIMEOUT, + MGCP_ERR_ASS_TIMEOUT, + MGCP_ERR_NOMEM, + MGCP_ERR_ASSGMNT_FAIL +}; + +/* Human readable respresentation of the faul codes, will be displayed by + * handle_error() */ +static const struct value_string msc_mgcp_cause_codes_names[] = { + {MGCP_ERR_MGW_FAIL, "operation failed on MGW"}, + {MGCP_ERR_MGW_INVAL_RESP, "invalid / unparseable response from MGW"}, + {MGCP_ERR_MGW_TX_FAIL, "failed to transmit MGCP message to MGW"}, + {MGCP_ERR_UNEXP_TEARDOWN, "unexpected connection teardown"}, + {MGCP_ERR_UNSUPP_ADDR_FMT, "unsupported network address format used (RAN)"}, + {MGCP_ERR_RAN_TIMEOUT, "call could not be completed in time (RAN)"}, + {MGCP_ERR_ASS_TIMEOUT, "assignment could not be completed in time (RAN)"}, + {MGCP_ERR_NOMEM, "out of memory"}, + {MGCP_ERR_ASSGMNT_FAIL, "assignment failure (RAN)"}, + {0, NULL} +}; + +enum fsm_msc_mgcp_states { + ST_CRCX_RAN, + ST_CRCX_CN, + ST_CRCX_COMPL, + ST_MDCX_CN, + ST_MDCX_CN_COMPL, + ST_MDCX_RAN, + ST_MDCX_RAN_COMPL, + ST_CALL, + ST_HALT, +}; + +enum msc_mgcp_fsm_evt { + /* Initial event: start off the state machine */ + EV_INIT, + + /* External event: Notify that the Assignment is complete and we + * may now forward IP/Port of the remote call leg to the MGW */ + EV_ASSIGN, + + /* External event: Notify that the Call is complete and that the + * two half open connections on the MGW should now be connected */ + EV_CONNECT, + + /* External event: Notify that the call is over and the connections + * on the mgw shall be removed */ + EV_TEARDOWN, + + /* Internal event: An error occurred that requires a controlled + * teardown of the RTP connections */ + EV_TEARDOWN_ERROR, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the RAN side */ + EV_CRCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its CRCX response for + * the CN side */ + EV_CRCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the RAN side */ + EV_MDCX_RAN_RESP, + + /* Internal event: The mgcp_gw has sent its MDCX response for + * the CN side */ + EV_MDCX_CN_RESP, + + /* Internal event: The mgcp_gw has sent its DLCX response for + * the RAN and CN side */ + EV_DLCX_ALL_RESP, +}; + +/* A general error handler function. On error we still have an interest to + * remove a half open connection (if possible). This function will execute + * a controlled jump to the DLCX phase. From there, the FSM will then just + * continue like the call were ended normally */ +static void handle_error(struct mgcp_ctx *mgcp_ctx, enum msc_mgcp_cause_code cause) +{ + struct osmo_fsm_inst *fi; + + OSMO_ASSERT(mgcp_ctx); + fi = mgcp_ctx->fsm; + OSMO_ASSERT(fi); + + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "%s -- graceful shutdown...\n", + get_value_string(msc_mgcp_cause_codes_names, cause)); + + /* Set the VM into the state where it waits for the call end */ + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); + + /* Simulate the call end by sending a teardown event, so that + * the FSM proceeds directly with the DLCX */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx); +} + +/* Timer callback to shut down in case of connectivity problems */ +static int fsm_timeout_cb(struct osmo_fsm_inst *fi) +{ + struct mgcp_ctx *mgcp_ctx = fi->priv; + struct mgcp_client *mgcp; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { + /* We were unable to communicate with the MGW, unfortunately + * there is no meaningful action we can take now other than + * giving up. */ + + /* At least release the occupied endpoint ID */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); + } else if (fi->T == MGCP_RAN_TIMEOUT_TIMER_NR) { + /* If the logic that controls the RAN is unable to negotiate a + * connection, we presumably still have a working connection to + * the MGW, we will try to shut down gracefully. */ + handle_error(mgcp_ctx, MGCP_ERR_RAN_TIMEOUT); + } else if (fi->T == MGCP_REL_TIMEOUT_TIMER_NR) { + /* Under normal conditions, the MSC logic should always command + * to release the call at some point. However, the release may + * be missing due to errors in the MSC logic and we may have + * reached ST_HALT because of cascading errors and timeouts. In + * this and only in this case we will allow ST_HALT to free all + * context information on its own authority. */ + mgcp_ctx->free_ctx = true; + + /* Initiate self destruction of the FSM */ + osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); + osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); + } else if (fi->T == MGCP_ASS_TIMEOUT_TIMER_NR) { + /* There may be rare cases in which the MSC is unable to + * complete the call assignment */ + handle_error(mgcp_ctx, MGCP_ERR_ASS_TIMEOUT); + } else { + /* Ther must not be any unsolicited timers in this FSM. If so, + * we have serious problem. */ + OSMO_ASSERT(false); + } + + return 0; +} + +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_RAN: Send CRCX for RAN side to MGW */ +static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + mgcp_ctx->rtp_endpoint = mgcp_client_next_endpoint(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/RAN: creating connection for the RAN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_CN, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for RAN associated CRCX */ +static void mgw_crcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_ran, r->head.conn_id, sizeof(mgcp_ctx->conn_id_ran)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/RAN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_ran); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/RAN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_ran = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_ran, r->audio_ip, sizeof(conn->rtp.local_addr_ran)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_RAN_RESP, mgcp_ctx); +} + +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CRCX_CN: check MGW response and send CRCX for CN side to MGW */ +static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + switch (event) { + case EV_CRCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_CRCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_mode = MGCP_CONN_LOOPBACK + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_crcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_CRCX_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_crcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + int rc; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "CRCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* memorize connection identifier */ + osmo_strlcpy(mgcp_ctx->conn_id_cn, r->head.conn_id, sizeof(mgcp_ctx->conn_id_cn)); + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with CI: %s\n", mgcp_ctx->conn_id_cn); + + rc = mgcp_response_parse_params(r); + if (rc) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/CN: Cannot parse response\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/CN: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); + + conn->rtp.local_port_cn = r->audio_port; + osmo_strlcpy(conn->rtp.local_addr_cn, r->audio_ip, sizeof(conn->rtp.local_addr_cn)); + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_CRCX_COMPL: check MGW response, start assignment */ +static void fsm_crcx_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CRCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Forward assignment request to A/RANAP */ + if (conn->via_ran == RAN_UTRAN_IU) { +#ifdef BUILD_IU + /* Assign a voice channel via RANAP on 3G */ + if (iu_rab_act_cs(trans)) + goto error; +#else + LOGPFSML(fi, LOGL_ERROR, "Cannot send Iu RAB Assignment: built without Iu support\n"); + goto error; +#endif + } else if (conn->via_ran == RAN_GERAN_A) { + /* Assign a voice channel via A on 2G */ + if (a_iface_tx_assignment(trans)) + goto error; + } else { + /* Unset or unimplemented new RAN type */ + LOGPFSML(fi, LOGL_ERROR, "Unknown RAN type: %d\n", conn->via_ran); + return; + } + + /* Respond back to MNCC (if requested) */ + if (trans->tch_rtp_create) { + if (gsm48_tch_rtp_create(trans)) + goto error; + } + + /* Note: When we reach this point then the situation is basically that + * we have two sides connected, both are in loopback. The local ports + * of the side pointing towards the BSS should be already communicated + * and we are waiting now for the BSS to return with the assignment + * complete command. */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN, MGCP_RAN_TIMEOUT, MGCP_RAN_TIMEOUT_TIMER_NR); + return; + +error: + handle_error(mgcp_ctx, MGCP_ERR_ASSGMNT_FAIL); +} + +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_CN: send MDCX for RAN side to MGW */ +static void fsm_mdcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_CONNECT: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_cn, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_cn, + .audio_port = conn->rtp.remote_port_cn + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_cn_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_CN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_cn_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/CN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_CN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_CN_COMPL: wait for mgw response, move on with the MDCX + * for the RAN side if we already have valid IP/Port data for the RAN sided + * RTP stream. */ +static void fsm_mdcx_cn_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct gsm_subscriber_connection *conn; + struct gsm_trans *trans; + + OSMO_ASSERT(mgcp_ctx); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_MDCX_CN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + /* Enter MDCX phase, but we must be sure that the Assigmnet on the A or + * IuCS interface is complete (IP-Address and Port are valid) */ + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN, MGCP_ASS_TIMEOUT, MGCP_ASS_TIMEOUT_TIMER_NR); + + /* If we already have a valid remote port and IP-Address from the RAN side + * call leg, the assignment has been completed before we got here, so we + * may move on immediately */ + if (conn->rtp.remote_port_ran != 0 || strlen(conn->rtp.remote_addr_ran) > 0) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); +} + +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_MDCX_RAN: wait for assignment completion, send MDCX for CN side to MGW */ +static void fsm_mdcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + struct mgcp_client *mgcp; + struct gsm_trans *trans; + struct gsm_subscriber_connection *conn; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + trans = mgcp_ctx->trans; + OSMO_ASSERT(trans); + conn = trans->conn; + OSMO_ASSERT(conn); + + switch (event) { + case EV_ASSIGN: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, + "MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", + mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_MDCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID | + MGCP_MSG_PRESENCE_CONN_MODE | MGCP_MSG_PRESENCE_AUDIO_IP | + MGCP_MSG_PRESENCE_AUDIO_PORT), + .call_id = mgcp_ctx->rtp_endpoint, + .conn_id = mgcp_ctx->conn_id_ran, + .conn_mode = MGCP_CONN_RECV_SEND, + .audio_ip = conn->rtp.remote_addr_ran, + .audio_port = conn->rtp.remote_port_ran + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_ran_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_MDCX_RAN_COMPL, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_mdcx_ran_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "MDCX/RAN: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_MDCX_RAN_RESP, mgcp_ctx); +} + +/* Callback for ST_MDCX_RAN_COMPL: check MGW response */ +static void fsm_mdcx_ran_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + OSMO_ASSERT(mgcp_ctx); + + switch (event) { + case EV_MDCX_RAN_RESP: + break; + default: + handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); + return; + } + + LOGPFSML(fi, LOGL_DEBUG, "call active, waiting for teardown...\n"); + osmo_fsm_inst_state_chg(fi, ST_CALL, 0, 0); +} + +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv); + +/* Callback for ST_CALL: call is active, send DLCX for both sides on teardown */ +static void fsm_call_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + + struct mgcp_ctx *mgcp_ctx = (struct mgcp_ctx *)data; + struct mgcp_client *mgcp; + struct mgcp_msg mgcp_msg; + struct msgb *msg; + int rc; + + OSMO_ASSERT(mgcp_ctx); + mgcp = mgcp_ctx->mgcp; + OSMO_ASSERT(mgcp); + + LOGPFSML(fi, LOGL_DEBUG, + "DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); + + /* We now relase the endpoint back to the pool in order to allow + * other connections to use this endpoint */ + mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + + /* Generate MGCP message string */ + mgcp_msg = (struct mgcp_msg) { + .verb = MGCP_VERB_DLCX, + .presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID), + .call_id = mgcp_ctx->rtp_endpoint + }; + if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >= + MGCP_ENDPOINT_MAXLEN) { + handle_error(mgcp_ctx, MGCP_ERR_NOMEM); + return; + } + msg = mgcp_msg_gen(mgcp, &mgcp_msg); + OSMO_ASSERT(msg); + + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); + rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_all_resp_cb, mgcp_ctx); + if (rc < 0) { + handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR); +} + +/* Callback for MGCP-Client: handle response for CN associated CRCX */ +static void mgw_dlcx_all_resp_cb(struct mgcp_response *r, void *priv) +{ + struct mgcp_ctx *mgcp_ctx = priv; + + OSMO_ASSERT(mgcp_ctx); + + if (r->head.response_code != 200) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, + "DLCX: response yields error: %d %s\n", r->head.response_code, r->head.comment); + handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL); + return; + } + + /* Notify the FSM that we got the response. */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_DLCX_ALL_RESP, mgcp_ctx); +} + +/* Callback for ST_HALT: Terminate the state machine */ +static void fsm_halt_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct mgcp_ctx *mgcp_ctx = data; + + OSMO_ASSERT(mgcp_ctx); + + LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); + + /* NOTE: We must not free the context information now, we have to + * wait until msc_mgcp_call_release() is called. Then we are sure + * that the logic controlling us is fully aware that the context + * information is freed. If we would free early now the controlling + * logic might mistakenly think that the context info is still alive, + * so lets keep the context info until we are explicitly asked for + * throwing it away. */ + if (mgcp_ctx->free_ctx) { + osmo_fsm_inst_free(mgcp_ctx->fsm); + talloc_free(mgcp_ctx); + return; + } + + osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); +} + +static struct osmo_fsm_state fsm_msc_mgcp_states[] = { + + /* Startup state machine, send CRCX for RAN side. */ + [ST_CRCX_RAN] = { + .in_event_mask = S(EV_INIT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_RAN), + .action = fsm_crcx_ran_cb, + }, + /* When the response to the RAN CRCX is received, then proceed with + sending the CRCX for CN side */ + [ST_CRCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_CRCX_COMPL), + .name = OSMO_STRINGIFY(ST_CRCX_CN), + .action = fsm_crcx_cn_cb, + }, + /* Complete the CRCX phase by starting the assignment. Depending on the + * RAT (Radio Access Technology) , this will either trigger an + * Assignment Request on the A-Interface or an RAB-Assignment on the + * IU-interface */ + [ST_CRCX_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CRCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN), + .name = OSMO_STRINGIFY(ST_CRCX_COMPL), + .action = fsm_crcx_compl, + }, + /* Wait for MSC to complete the assignment request, when complete, we + * will enter the MDCX phase by sending an MDCX for the CN side to the + * MGW */ + [ST_MDCX_CN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_CONNECT), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_CN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_CN), + .action = fsm_mdcx_cn_cb, + }, + /* We arrive in this state when the MDCX phase for the CN side as + * completed we will check the IP/Port of the RAN connection. If we + * this data is valid we may continue with the MDCX phase for the RAN + * side. If not we wait until the assinment completes on the A or on + * the IuCS interface. The completion of the assigmnet will fill in the + * port and IP-Address of the RAN side and way may continue then. */ + [ST_MDCX_CN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_MDCX_CN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN), + .name = OSMO_STRINGIFY(ST_MDCX_CN_COMPL), + .action = fsm_mdcx_cn_compl_cb, + }, + /* When the response for the CN MDCX is received, send the MDCX for the + * RAN side to the MGW */ + [ST_MDCX_RAN] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_ASSIGN), + .out_state_mask = S(ST_HALT) | S(ST_CALL) | S(ST_MDCX_RAN_COMPL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN), + .action = fsm_mdcx_ran_cb, + }, + /* The ran side MDCX phase is complete when the response is received + * from the MGW. The is then active and we change to ST_CALL and wait + * there until the call ends. */ + [ST_MDCX_RAN_COMPL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_MDCX_RAN_RESP), + .out_state_mask = S(ST_HALT) | S(ST_CALL), + .name = OSMO_STRINGIFY(ST_MDCX_RAN_COMPL), + .action = fsm_mdcx_ran_compl_cb, + }, + /* We are now in the active call phase, wait until the call is done + * and send a DLCX then to remove all connections from the MGW */ + [ST_CALL] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_CALL), + .action = fsm_call_cb, + }, + /* When the MGW confirms that the connections are terminated, then halt + * the state machine. */ + [ST_HALT] = { + .in_event_mask = S(EV_TEARDOWN) | S(EV_TEARDOWN_ERROR) | S(EV_DLCX_ALL_RESP), + .out_state_mask = S(ST_HALT), + .name = OSMO_STRINGIFY(ST_HALT), + .action = fsm_halt_cb, + }, +}; + +/* State machine definition */ +static struct osmo_fsm fsm_msc_mgcp = { + .name = "MGW", + .states = fsm_msc_mgcp_states, + .num_states = ARRAY_SIZE(fsm_msc_mgcp_states), + .log_subsys = DMGCP, + .timer_cb = fsm_timeout_cb, +}; + +/* Notify that a new call begins. This will create a connection for the + * RAN and the CN on the MGW. + * Parameter: + * trans: transaction context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_assignment(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + char name[32]; + static bool fsm_registered = false; + struct gsm_subscriber_connection *conn; + struct mgcp_client *mgcp; + + OSMO_ASSERT(trans); + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call assignment failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + mgcp = conn->network->mgw.client; + OSMO_ASSERT(mgcp); + + if (conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) double assignment detected, dropping...\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + +#ifdef BUILD_IU + /* FIXME: HACK. where to scope the RAB Id? At the conn / subscriber / ranap_ue_conn_ctx? */ + static uint8_t next_iu_rab_id = 1; + if (conn->via_ran == RAN_UTRAN_IU) + conn->iu.rab_id = next_iu_rab_id++; +#endif + + if (snprintf(name, sizeof(name), "MGW_%i", trans->transaction_id) >= sizeof(name)) + return -EINVAL; + + /* Register the fsm description (if not already done) */ + if (fsm_registered == false) { + osmo_fsm_register(&fsm_msc_mgcp); + fsm_registered = true; + } + + /* Allocate and configure a new fsm instance */ + mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx); + OSMO_ASSERT(mgcp_ctx); + + mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); + OSMO_ASSERT(mgcp_ctx->fsm); + mgcp_ctx->fsm->priv = mgcp_ctx; + mgcp_ctx->mgcp = mgcp; + mgcp_ctx->trans = trans; + + /* start state machine */ + OSMO_ASSERT(mgcp_ctx->fsm->state == ST_CRCX_RAN); + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_INIT, mgcp_ctx); + + conn->rtp.mgcp_ctx = mgcp_ctx; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call assignment initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Inform the FSM that the assignment (RAN connection) is now complete. + * Parameter: + * conn: subscriber connection context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + if (!conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, assignment completion failed\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, assignmnet completion failed.\n", + vlr_subscr_name(conn->vsub)); + return -EINVAL; + } + + /* Memorize port and IP-Address of the remote RAN call leg. We need this + * information at latest when we enter the MDCX phase for the RAN side. */ + conn->rtp.remote_port_ran = port; + osmo_strlcpy(conn->rtp.remote_addr_ran, addr, sizeof(conn->rtp.remote_addr_ran)); + + /* Note: We only dispatch the event if we are really waiting for the + * assignment, if we are not yet waiting, there is no need to loudly + * broadcast an event that the all other states do not understand anyway */ + if (mgcp_ctx->fsm->state == ST_MDCX_RAN) + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_ASSIGN, mgcp_ctx); + + return 0; +} + +/* Make the connection of a previously assigned call complete + * Parameter: + * trans: transaction context. + * port: port number of the remote leg. + * addr: IP-address of the remote leg. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr) +{ + struct mgcp_ctx *mgcp_ctx; + struct gsm_subscriber_connection *conn; + + OSMO_ASSERT(trans); + OSMO_ASSERT(addr); + + if (port == 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid remote call leg port, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!addr || strlen(addr) <= 0) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) missing remote call leg address, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call completion failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* The FSM should already have passed all CRCX phases and be ready to move + * on with the MDCX phases. */ + if (mgcp_ctx->fsm->state != ST_MDCX_CN) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid call state, call completion failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + conn = trans->conn; + osmo_strlcpy(conn->rtp.remote_addr_cn, addr, sizeof(conn->rtp.remote_addr_cn)); + conn->rtp.remote_port_cn = port; + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CONNECT, mgcp_ctx); + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call completion initiated\n", + vlr_subscr_name(conn->vsub)); + + return 0; +} + +/* Release ongoing call. + * Parameter: + * trans: connection context. + * Returns -EINVAL on error, 0 on success. */ +int msc_mgcp_call_release(struct gsm_trans *trans) +{ + struct mgcp_ctx *mgcp_ctx; + + if (!trans->conn) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + if (!trans->conn->rtp.mgcp_ctx->fsm) { + LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", + vlr_subscr_name(trans->vsub)); + return -EINVAL; + } + + mgcp_ctx = trans->conn->rtp.mgcp_ctx; + + /* Inform the FSM that as soon as it reaches ST_HALT it may free + * all context information immediately */ + mgcp_ctx->free_ctx = true; + + /* Initaite teardown, regardless of which state we are currently + * in */ + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN, mgcp_ctx); + + /* Prevent any further operation that is triggered from outside by + * overwriting the context pointer with NULL. The FSM will now + * take care for a graceful shutdown and when done it will free + * all related context information */ + trans->conn->rtp.mgcp_ctx = NULL; + + LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", + vlr_subscr_name(trans->vsub)); + + return 0; +} diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..ac45b23 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -31,8 +31,8 @@ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ -Wl,--wrap=RAND_bytes \ - -Wl,--wrap=msc_call_assignment \ - -Wl,--wrap=msc_call_release \ + -Wl,--wrap=msc_mgcp_call_release \ + -Wl,--wrap=msc_mgcp_call_assignment \ $(NULL) LDADD = \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index dd7196c..a6f6c69 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -556,18 +556,18 @@ return 0; } -/* override, requires '-Wl,--wrap=msc_call_assignment' */ -int __real_msc_call_assignment(struct gsm_trans *trans); -int __wrap_msc_call_assignment(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_assignment' */ +int __real_msc_mgcp_call_assignment(struct gsm_trans *trans); +int __wrap_msc_mgcp_call_assignment(struct gsm_trans *trans) { log("MS <--Call Assignment-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); return 0; } -/* override, requires '-Wl,--wrap=msc_call_release' */ -void __real_msc_call_release(struct gsm_trans *trans); -void __wrap_msc_call_release(struct gsm_trans *trans) +/* override, requires '-Wl,--wrap=msc_mgcp_call_release' */ +void __real_msc_mgcp_call_release(struct gsm_trans *trans); +void __wrap_msc_mgcp_call_release(struct gsm_trans *trans) { log("MS <--Call Release-- MSC: subscr=%s callref=0x%x", vlr_subscr_name(trans->vsub), trans->callref); -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 14 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:09:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 17:09:08 +0000 Subject: [PATCH] osmo-bsc[master]: Remove unneeded .py scripts Message-ID: Review at https://gerrit.osmocom.org/5501 Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not BSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1 --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/bsc_control.py D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 9 files changed, 2 insertions(+), 983 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/01/5501/1 diff --git a/Makefile.am b/Makefile.am index 690deae..2f0a786 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) BUILT_SOURCES = $(top_srcdir)/.version diff --git a/configure.ac b/configure.ac index b7dd016..bdcf026 100644 --- a/configure.ac +++ b/configure.ac @@ -167,5 +167,4 @@ tests/bssap/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/bsc_control.py b/contrib/bsc_control.py deleted file mode 100755 index c1b09ce..0000000 --- a/contrib/bsc_control.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/python -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -from optparse import OptionParser -from ipa import Ctrl -import socket - -verbose = False - -def connect(host, port): - if verbose: - print "Connecting to host %s:%i" % (host, port) - - sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sck.setblocking(1) - sck.connect((host, port)) - return sck - -def do_set_get(sck, var, value = None): - (r, c) = Ctrl().cmd(var, value) - sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) - -def set_var(sck, var, val): - (a, _, _) = do_set_get(sck, var, val) - return a - -def get_var(sck, var): - (_, _, v) = do_set_get(sck, var) - return v - -def _leftovers(sck, fl): - """ - Read outstanding data if any according to flags - """ - try: - data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): - return False - if len(data) != 0: - tail = data - while True: - (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) - if len(tail) == 0: - break - return True - return False - -if __name__ == '__main__': - parser = OptionParser("Usage: %prog [options] var [value]") - parser.add_option("-d", "--host", dest="host", - help="connect to HOST", metavar="HOST") - parser.add_option("-p", "--port", dest="port", type="int", - help="use PORT", metavar="PORT", default=4249) - parser.add_option("-g", "--get", action="store_true", - dest="cmd_get", help="perform GET operation") - parser.add_option("-s", "--set", action="store_true", - dest="cmd_set", help="perform SET operation") - parser.add_option("-v", "--verbose", action="store_true", - dest="verbose", help="be verbose", default=False) - parser.add_option("-m", "--monitor", action="store_true", - dest="monitor", help="monitor the connection for traps", default=False) - - (options, args) = parser.parse_args() - - verbose = options.verbose - - if options.cmd_set and options.cmd_get: - parser.error("Get and set options are mutually exclusive!") - - if not (options.cmd_get or options.cmd_set or options.monitor): - parser.error("One of -m, -g, or -s must be set") - - if not (options.host): - parser.error("Destination host and port required!") - - sock = connect(options.host, options.port) - - if options.cmd_set: - if len(args) < 2: - parser.error("Set requires var and value arguments") - _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) - - if options.cmd_get: - if len(args) != 1: - parser.error("Get requires the var argument") - _leftovers(sock, socket.MSG_DONTWAIT) - (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a - - if options.monitor: - while True: - if not _leftovers(sock, 0): - print "Connection is gone." - break - sock.close() diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index ccc6758..4f5df39 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 8aa3dda..387ea70 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/5501 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:14 +0000 Subject: [PATCH] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc Message-ID: Review at https://gerrit.osmocom.org/5502 remove libosmo-sccp dependency for osmo-bsc libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d --- M include/osmocom/bsc/osmo_bsc.h M src/libfilter/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_msc.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c M tests/bsc/Makefile.am 9 files changed, 6 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/02/5502/1 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 8a5cd30..0fd29b7 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -15,7 +15,6 @@ BSC_CON_NO_MEM, }; -struct sccp_connection; struct bsc_msc_data; struct bsc_msc_connection; @@ -47,10 +46,7 @@ int send_ping; /* SCCP connection realted */ - struct sccp_connection *sccp; struct bsc_msc_data *msc; - struct osmo_timer_list sccp_it_timeout; - struct osmo_timer_list sccp_cc_timeout; struct llist_head sccp_queue; unsigned int sccp_queue_size; diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am index 6d3db0b..41a75bd 100644 --- a/src/libfilter/Makefile.am +++ b/src/libfilter/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 4acbe56..7978852 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -11,7 +11,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -45,7 +44,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index c388f5b..152b818 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -29,7 +29,6 @@ #include #include -#include #include #define return_when_not_connected(conn) \ @@ -296,13 +295,11 @@ resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci); if (!resp) { LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n"); - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); return BSC_API_CONN_POL_REJECT; } if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) { - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); msgb_free(resp); return BSC_API_CONN_POL_REJECT; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 829f207..e4c8fc5 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -43,7 +43,6 @@ #include -#include #include #define _GNU_SOURCE @@ -233,9 +232,6 @@ /* seed the PRNG */ srand(time(NULL)); - - /* initialize SCCP */ - sccp_set_log_area(DSCCP); /* Read the config */ rc = bsc_network_configure(config_file); diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 0e5777e..46be2e6 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -34,8 +34,6 @@ #include -#include - #include #include diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index a18d4f3..7669b67 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -511,7 +510,8 @@ /* If unset, use default local SCCP address */ if (!msc->a.bsc_addr.presence) - osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); + osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, @@ -524,7 +524,7 @@ if (!msc->a.msc_addr.presence) osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), - SCCP_SSN_BSSAP); + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index a87b20f..f01e6f7 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -28,7 +28,6 @@ #include #include -#include #include @@ -663,14 +662,14 @@ static void enforce_standard_ssn(struct vty *vty, struct osmo_sccp_addr *addr) { if (addr->presence & OSMO_SCCP_ADDR_T_SSN) { - if (addr->ssn != SCCP_SSN_BSSAP) + if (addr->ssn != OSMO_SCCP_SSN_BSSAP) vty_out(vty, "setting an SSN (%u) different from the standard (%u) is not allowd, will use standard SSN for address: %s%s", - addr->ssn, SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); + addr->ssn, OSMO_SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); } addr->presence |= OSMO_SCCP_ADDR_T_SSN; - addr->ssn = SCCP_SSN_BSSAP; + addr->ssn = OSMO_SCCP_SSN_BSSAP; } DEFUN(cfg_msc_cs7_bsc_addr, diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 96f87f5..ebeb1ed 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -37,7 +36,6 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOLEGACYMGCP_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5502 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:15 +0000 Subject: [PATCH] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment Message-ID: Review at https://gerrit.osmocom.org/5503 osmo_bsc_bssap.c: Spelling fixes in comment Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/5503/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4fd43aa..aea3994 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -385,7 +385,7 @@ * a cipher we will have to send cipher mode reject to the MSC, * otherwise we will have to pick something that we and the MS * is supporting. Currently we are doing it in a rather static - * way by picking one ecnryption or no encrytpion. + * way by picking one encryption or no encryption. */ static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int payload_length) @@ -613,7 +613,7 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - /* Forward the assingment request to lower layers */ + /* Forward the assignment request to lower layers */ if (aoip) { /* Store network side RTP connection information, we will * process this address later after we have established an RTP @@ -626,7 +626,7 @@ /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP - * endpoints, calling gsm0808_assign_req(), rsponding to + * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); if (!conn->mgcp_ctx) { -- To view, visit https://gerrit.osmocom.org/5503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:15 +0000 Subject: [PATCH] osmo-bsc[master]: more remove Message-ID: Review at https://gerrit.osmocom.org/5504 more remove Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/5504/1 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 0fd29b7..13072c2 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -48,9 +48,6 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; - struct llist_head sccp_queue; - unsigned int sccp_queue_size; - struct gsm_subscriber_connection *conn; uint8_t new_subscriber; -- To view, visit https://gerrit.osmocom.org/5504 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:15 +0000 Subject: [PATCH] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' Message-ID: Review at https://gerrit.osmocom.org/5505 osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/5505/1 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 13072c2..131007b 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -19,8 +19,10 @@ struct bsc_msc_connection; struct osmo_bsc_sccp_con { + /* list_head anchoring us to gsm_network.subscr_conns */ struct llist_head entry; + /* flag to prevent multiple simultaneous ciphering commands */ int ciphering_handled; /* for audio handling */ @@ -48,9 +50,12 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; + /* back-pointer to subscriber connection */ struct gsm_subscriber_connection *conn; + /* state related to welcome USSD */ uint8_t new_subscriber; + /* state related to osmo_bsc_filter.c */ struct bsc_filter_state filter_state; /* Sigtran connection ID */ -- To view, visit https://gerrit.osmocom.org/5505 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:15 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure Message-ID: Review at https://gerrit.osmocom.org/5506 osmo-bsc: Move user plane/voice related bits into sub-structure This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 --- M include/osmocom/bsc/osmo_bsc.h M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_ctrl.c M src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c 7 files changed, 43 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/5506/1 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 131007b..485c836 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -26,23 +26,23 @@ int ciphering_handled; /* for audio handling */ - uint16_t cic; - uint32_t rtp_ip; - int rtp_port; + struct { + uint16_t cic; + uint32_t rtp_ip; + int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment request) */ + struct sockaddr_storage aoip_rtp_addr_remote; - /* RTP address of the remote end (assigned by MSC through assignment - * request) */ - struct sockaddr_storage aoip_rtp_addr_remote; + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; - /* Local RTP address (reported back to the MSC by us with the - * assignment complete message) */ - struct sockaddr_storage aoip_rtp_addr_local; - - /* storage to keep states of the MGCP connection handler, the - * handler is created when an assignment request is received - * and is terminated when the assignment complete message is - * sent */ - struct mgcp_ctx *mgcp_ctx; + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + } user_plane; /* for advanced ping/pong */ int send_ping; diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index 152b818..a2a8630 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) { + if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 0c11b85..82367f0 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -57,17 +57,17 @@ /* we can ask it to connect now */ LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n", - con->sccp_con->rtp_port, lchan->abis_ip.conn_id); + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.conn_id); /* If AoIP is in use, the rtp_ip, which has been communicated * via the A interface as connect_ip */ - if(con->sccp_con->rtp_ip) - rtp_ip = con->sccp_con->rtp_ip; + if(con->sccp_con->user_plane.rtp_ip) + rtp_ip = con->sccp_con->user_plane.rtp_ip; else rtp_ip = ntohl(INADDR_ANY); rc = rsl_ipacc_mdcx(lchan, rtp_ip, - con->sccp_con->rtp_port, + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.rtp_payload2); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc); @@ -84,13 +84,13 @@ * inform the logic that controls the MGW about the new * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); - mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { + mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); + } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); + mgcp_ass_complete(con->sccp_con->user_plane.mgcp_ctx, lchan); } break; } diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index aea3994..6f2d0f4 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -361,13 +361,13 @@ return -1; } - if (conn->mgcp_ctx) { + if (conn->user_plane.mgcp_ctx) { /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with * the MGCP-GW. For this an mgcp_ctx should be created that * contains the FSM and some system data. When the connection * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() * calls osmo_bsc_sigtran_send(). */ - mgcp_clear_complete(conn->mgcp_ctx, resp); + mgcp_clear_complete(conn->user_plane.mgcp_ctx, resp); } else { /* NOTE: This is the SCCP-Lite case, since we do not handle * the MGCP-GW switching ourselves, we may skip everything @@ -535,11 +535,9 @@ /* Detect if a CIC code is present, if so, we use the classic ip.access * method to calculate the RTP port */ if (TLVP_PRESENT(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)) { - conn->cic = - osmo_load16be(TLVP_VAL - (&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); - timeslot = conn->cic & 0x1f; - multiplex = (conn->cic & ~0x1f) >> 5; + conn->user_plane.cic = osmo_load16be(TLVP_VAL(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); + timeslot = conn->user_plane.cic & 0x1f; + multiplex = (conn->user_plane.cic & ~0x1f) >> 5; } else if (TLVP_PRESENT(&tp, GSM0808_IE_AOIP_TRASP_ADDR)) { /* Decode AoIP transport address element */ data = TLVP_VAL(&tp, GSM0808_IE_AOIP_TRASP_ADDR); @@ -621,15 +619,16 @@ * reasons, functional wise it would not matter when exactly * the network side RTP connection is made, as long it is made * before we return with the assignment complete message. */ - memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + memcpy(&conn->user_plane.aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ - conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); - if (!conn->mgcp_ctx) { + conn->user_plane.mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, + conn, chan_mode, full_rate); + if (!conn->user_plane.mgcp_ctx) { LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); goto reject; } @@ -641,8 +640,8 @@ * (the MSC does that for us). We set conn->rtp_ip to 0 and check * on this later. By this we know that we have to behave accordingly * to sccp-lite. */ - conn->rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); - conn->rtp_ip = 0; + conn->user_plane.rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); + conn->user_plane.rtp_ip = 0; return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } @@ -849,7 +848,7 @@ lchan->abis_ip.ass_compl.chosen_channel, lchan->abis_ip.ass_compl.encr_alg_id, lchan->abis_ip.ass_compl.speech_mode, - &conn->sccp_con->aoip_rtp_addr_local, + &conn->sccp_con->user_plane.aoip_rtp_addr_local, &sc, NULL); diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 6330892..8c9dfe7 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -552,7 +552,7 @@ if (!conn->sccp_con) continue; - if (conn->sccp_con->cic != cic) + if (conn->sccp_con->user_plane.cic != cic) continue; /* diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f5efa95..ebd13d6 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -231,8 +231,8 @@ /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ - conn->rtp_port = r->audio_port; - conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->user_plane.rtp_port = r->audio_port; + conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -428,7 +428,7 @@ * identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ - if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + if (conn->user_plane.aoip_rtp_addr_remote.ss_family != AF_INET) { LOGPFSML(fi, LOGL_ERROR, "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); @@ -436,7 +436,7 @@ return; } - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); @@ -512,7 +512,7 @@ r->audio_ip, r->audio_port); /* Store address */ - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_local; sin->sin_family = AF_INET; sin->sin_addr.s_addr = inet_addr(r->audio_ip); sin->sin_port = osmo_ntohs(r->audio_port); diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 7669b67..67f8703 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -385,8 +385,8 @@ } /* Remove mgcp context if existant */ - if (conn->mgcp_ctx) - mgcp_free_ctx(conn->mgcp_ctx); + if (conn->user_plane.mgcp_ctx) + mgcp_free_ctx(conn->user_plane.mgcp_ctx); llist_del(&conn->entry); talloc_free(conn); -- To view, visit https://gerrit.osmocom.org/5506 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:16 +0000 Subject: [PATCH] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection Message-ID: Review at https://gerrit.osmocom.org/5507 gsm_data.h: Document all fields of gsm_subscriber_connection Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/5507/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 1cedef0..2e97055 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -75,20 +75,26 @@ /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - /* bsc structures */ - struct osmo_bsc_sccp_con *sccp_con; /* BSC */ + /* SCCP connection associatd with this subscriber_connection */ + struct osmo_bsc_sccp_con *sccp_con; /* back pointers */ struct gsm_network *network; - struct gsm_lchan *lchan; /* BSC */ - struct gsm_lchan *ho_lchan; /* BSC */ - struct gsm_bts *bts; /* BSC */ + /* the primary / currently active lchan to the BTS/subscriber */ + struct gsm_lchan *lchan; + /* the future/allocated but not yet used lchan during HANDOVER */ + struct gsm_lchan *ho_lchan; + /* a short-hand pointer to the BTS currently serving the subscriber, + * points to gsm_subscriber_connection.lchan->ts->trx->bts */ + struct gsm_bts *bts; - /* for assignment handling */ - struct osmo_timer_list T10; /* BSC */ - struct gsm_lchan *secondary_lchan; /* BSC */ + /* timer for assignment handling */ + struct osmo_timer_list T10; + /* the future allocated but not yet used lchan during ASSIGNMENT */ + struct gsm_lchan *secondary_lchan; + /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; uint16_t lac; -- To view, visit https://gerrit.osmocom.org/5507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:16 +0000 Subject: [PATCH] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect... Message-ID: Review at https://gerrit.osmocom.org/5508 remove unused 'lac' member of 'struct gsm_subscriber_connection' This field was used in write-pnly mode, i.e. set but never read. Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/08/5508/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 2e97055..3cc3794 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -96,8 +96,6 @@ /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; - - uint16_t lac; }; diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 6ff1688..9ec51af 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -261,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; -- To view, visit https://gerrit.osmocom.org/5508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:16 +0000 Subject: [PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures Message-ID: Review at https://gerrit.osmocom.org/5509 bsc_test.c: Use proper network/bts/lchan structures don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce --- M tests/bsc/bsc_test.c 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/1 diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 1d7baa1..420ef73 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -121,22 +122,20 @@ { int i; - struct gsm_network *net; - struct gsm_bts *bts; + struct gsm_network *net = bsc_network_init(NULL, 1, 1); + struct gsm_bts *bts = gsm_bts_alloc(net, 0); struct osmo_bsc_sccp_con *sccp_con; struct bsc_msc_data *msc; struct gsm_subscriber_connection *conn; - net = talloc_zero(NULL, struct gsm_network); - bts = talloc_zero(net, struct gsm_bts); sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con); msc = talloc_zero(net, struct bsc_msc_data); conn = talloc_zero(net, struct gsm_subscriber_connection); bts->network = net; sccp_con->msc = msc; - conn->bts = bts; conn->sccp_con = sccp_con; + conn->lchan = &bts->c0->ts[1].lchan[0]; /* start testing with proper messages */ printf("Testing BTS<->MSC message scan.\n"); -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:17 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() Message-ID: Review at https://gerrit.osmocom.org/5510 cosmetic: Hide all accesses to conn->bts behind conn_get_bts() This is a new inline function that hides all accesses to conn->bts. A follow-up patch will then point this to conn->lchan->ts->trx->bts to get rid of the bts field. Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/bsc_vty.c M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_sigtran.c 8 files changed, 29 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/10/5510/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3cc3794..45fbcd2 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -98,6 +98,10 @@ struct gsm_classmark classmark; }; +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + return conn->bts; +} + #include "gsm_data_shared.h" diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 9ec51af..bd55dfc 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -214,7 +214,7 @@ chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H; - new_lchan = lchan_alloc(conn->bts, chan_type, 0); + new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0); if (!new_lchan) { LOGP(DMSC, LOGL_NOTICE, "No free channel.\n"); @@ -451,7 +451,7 @@ conn->lchan = conn->secondary_lchan; conn->secondary_lchan = NULL; - if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) rsl_ipacc_crcx(conn->lchan); api->assign_compl(conn, gh->data[0], diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 7612eda..6d01109 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -1378,7 +1378,7 @@ /* Find the connection/lchan that we want to handover */ llist_for_each_entry(conn, &net->subscr_conns, entry) { - if (conn->bts->nr == bts_nr && + if (conn_get_bts(conn)->nr == bts_nr && conn->lchan->ts->trx->nr == trx_nr && conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) { vty_out(vty, "starting handover for lchan %s...%s", diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index a2a8630..1caaeee 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -115,7 +115,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_initial(gh, msgb_l3len(msg), &req, @@ -136,7 +136,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = conn->sccp_con->msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_data(gh, msgb_l3len(msg), &req, @@ -228,7 +228,7 @@ if (!msc) { LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n"); bsc_send_ussd_no_srv(conn, msg, - conn->bts->network->bsc_data->ussd_no_msc_txt); + conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt); return -1; } @@ -287,8 +287,8 @@ network_code = get_network_code_for_msc(conn->sccp_con->msc); country_code = get_country_code_for_msc(conn->sccp_con->msc); - lac = get_lac_for_msc(conn->sccp_con->msc, conn->bts); - ci = get_ci_for_msc(conn->sccp_con->msc, conn->bts); + lac = get_lac_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); + ci = get_ci_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); bsc_scan_bts_msg(conn, msg); @@ -383,7 +383,7 @@ /* * Check if the connection should be moved... */ - llist_for_each_entry(msc, &conn->bts->network->bsc_data->mscs, entry) { + llist_for_each_entry(msc, &conn_get_bts(conn)->network->bsc_data->mscs, entry) { if (msc->type != MSC_CON_TYPE_LOCAL) continue; if (!msc->local_pref) @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 82367f0..433dc6c 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -85,7 +85,7 @@ * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { + } else if (is_ipaccess_bts(conn_get_bts(con)) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f2d0f4..e3ae000 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -432,7 +432,7 @@ goto reject; } - network = conn->conn->bts->network; + network = conn_get_bts(conn->conn)->network; data = TLVP_VAL(&tp, GSM0808_IE_ENCRYPTION_INFORMATION); enc_bits_msc = data[0]; enc_key = &data[1]; diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 17dddf8..56c0a9c 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -35,19 +35,20 @@ struct gsm48_loc_upd_req *lu; struct gsm48_loc_area_id lai; struct gsm_network *net; + struct gsm_bts *bts = conn_get_bts(conn); if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu)) { LOGP(DMSC, LOGL_ERROR, "LU too small to look at: %u\n", msgb_l3len(msg)); return; } - net = conn->bts->network; + net = bts->network; gh = msgb_l3(msg); lu = (struct gsm48_loc_upd_req *) gh->data; gsm48_generate_lai(&lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) { LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n"); @@ -105,7 +106,7 @@ return -1; } - paging_request_stop(&conn->network->bts_list, conn->bts, subscr, conn, + paging_request_stop(&conn->network->bts_list, conn_get_bts(conn), subscr, conn, msg); bsc_subscr_put(subscr); return 0; @@ -136,7 +137,7 @@ struct bsc_subscr *subscr; int is_emerg = 0; - bsc = conn->bts->network->bsc_data; + bsc = conn->network->bsc_data; if (msgb_l3len(msg) < sizeof(*gh)) { LOGP(DMSC, LOGL_ERROR, "There is no GSM48 header here.\n"); @@ -185,7 +186,7 @@ return NULL; } - pag_msc = paging_get_msc(conn->bts, subscr); + pag_msc = paging_get_msc(conn_get_bts(conn), subscr); bsc_subscr_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { @@ -260,7 +261,7 @@ { struct tlv_parsed tp; int parse_res; - struct gsm_bts *bts = conn->bts; + struct gsm_bts *bts = conn_get_bts(conn); int tzunits; uint8_t tzbsd = 0; uint8_t dst = 0; @@ -337,6 +338,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct bsc_msc_data *msc; + struct gsm_bts *bts = conn_get_bts(conn); struct gsm_network *net; struct gsm48_loc_area_id *lai; struct gsm48_hdr *gh; @@ -357,7 +359,7 @@ return 0; mtype = gsm48_hdr_msg_type(gh); - net = conn->bts->network; + net = bts->network; msc = conn->sccp_con->msc; if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) { @@ -367,7 +369,7 @@ lai = (struct gsm48_loc_area_id *) &gh->data[0]; gsm48_generate_lai(lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); } } diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 67f8703..19a36da 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -244,6 +244,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_bsc_sccp_con *bsc_con; + struct gsm_bts *bts = conn_get_bts(conn); int conn_id; OSMO_ASSERT(conn); @@ -259,12 +260,12 @@ return BSC_CON_REJECT_NO_LINK; } - if (!bsc_grace_allow_new_connection(conn->bts->network, conn->bts)) { + if (!bsc_grace_allow_new_connection(bts->network, bts)) { LOGP(DMSC, LOGL_NOTICE, "BSC in grace period. No new connections.\n"); return BSC_CON_REJECT_RF_GRACE; } - bsc_con = talloc_zero(conn->bts, struct osmo_bsc_sccp_con); + bsc_con = talloc_zero(bts, struct osmo_bsc_sccp_con); if (!bsc_con) { LOGP(DMSC, LOGL_ERROR, "Failed to allocate new SIGTRAN connection.\n"); return BSC_CON_NO_MEM; -- To view, visit https://gerrit.osmocom.org/5510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:11:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:11:17 +0000 Subject: [PATCH] osmo-bsc[master]: remove obsolete gsm_subscriber_connection.bts member Message-ID: Review at https://gerrit.osmocom.org/5511 remove obsolete gsm_subscriber_connection.bts member This member was merely a cache for conn->lchan->ts->trx->bts, so let's avoid having to keep copies of the same data (which needs to be kept up to date). Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/handover_logic.c 3 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/5511/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 45fbcd2..05260c6 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -85,9 +85,6 @@ struct gsm_lchan *lchan; /* the future/allocated but not yet used lchan during HANDOVER */ struct gsm_lchan *ho_lchan; - /* a short-hand pointer to the BTS currently serving the subscriber, - * points to gsm_subscriber_connection.lchan->ts->trx->bts */ - struct gsm_bts *bts; /* timer for assignment handling */ struct osmo_timer_list T10; @@ -98,13 +95,14 @@ struct gsm_classmark classmark; }; -static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { - return conn->bts; -} - #include "gsm_data_shared.h" +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + OSMO_ASSERT(conn->lchan); + return conn->lchan->ts->trx->bts; +} + enum { BTS_CTR_CHREQ_TOTAL, BTS_CTR_CHREQ_NO_CHANNEL, diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index bd55dfc..e015a02 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -260,7 +260,6 @@ conn->network = net; conn->lchan = lchan; - conn->bts = lchan->ts->trx->bts; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; @@ -747,7 +746,6 @@ conn->lchan = NULL; conn->secondary_lchan = NULL; conn->ho_lchan = NULL; - conn->bts = NULL; osmo_timer_del(&conn->T10); diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index a30cd09..5ad1392 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -277,7 +277,6 @@ new_lchan->conn->ho_lchan = NULL; new_lchan->conn->lchan = new_lchan; - new_lchan->conn->bts = new_lchan->ts->trx->bts; ho->old_lchan->conn = NULL; lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END); -- To view, visit https://gerrit.osmocom.org/5511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:26 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 17:13:26 +0000 Subject: [PATCH] osmo-sgsn[master]: Remove unneeded .py scripts Message-ID: Review at https://gerrit.osmocom.org/5512 Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not SGSN-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c --- M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 7 files changed, 2 insertions(+), 862 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/12/5512/1 diff --git a/configure.ac b/configure.ac index 8f279fd..2de31cc 100644 --- a/configure.ac +++ b/configure.ac @@ -197,5 +197,4 @@ tests/v42bis/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index e9d73ff..57ef82e 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index eeb151c..afe1cfd 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/5512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: more remove In-Reply-To: References: Message-ID: more remove Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/5504/2 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 0fd29b7..13072c2 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -48,9 +48,6 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; - struct llist_head sccp_queue; - unsigned int sccp_queue_size; - struct gsm_subscriber_connection *conn; uint8_t new_subscriber; -- To view, visit https://gerrit.osmocom.org/5504 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5505 to look at the new patch set (#2). osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/5505/2 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 13072c2..131007b 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -19,8 +19,10 @@ struct bsc_msc_connection; struct osmo_bsc_sccp_con { + /* list_head anchoring us to gsm_network.subscr_conns */ struct llist_head entry; + /* flag to prevent multiple simultaneous ciphering commands */ int ciphering_handled; /* for audio handling */ @@ -48,9 +50,12 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; + /* back-pointer to subscriber connection */ struct gsm_subscriber_connection *conn; + /* state related to welcome USSD */ uint8_t new_subscriber; + /* state related to osmo_bsc_filter.c */ struct bsc_filter_state filter_state; /* Sigtran connection ID */ -- To view, visit https://gerrit.osmocom.org/5505 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure In-Reply-To: References: Message-ID: osmo-bsc: Move user plane/voice related bits into sub-structure This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 --- M include/osmocom/bsc/osmo_bsc.h M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_ctrl.c M src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c 7 files changed, 43 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/5506/2 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 131007b..485c836 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -26,23 +26,23 @@ int ciphering_handled; /* for audio handling */ - uint16_t cic; - uint32_t rtp_ip; - int rtp_port; + struct { + uint16_t cic; + uint32_t rtp_ip; + int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment request) */ + struct sockaddr_storage aoip_rtp_addr_remote; - /* RTP address of the remote end (assigned by MSC through assignment - * request) */ - struct sockaddr_storage aoip_rtp_addr_remote; + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; - /* Local RTP address (reported back to the MSC by us with the - * assignment complete message) */ - struct sockaddr_storage aoip_rtp_addr_local; - - /* storage to keep states of the MGCP connection handler, the - * handler is created when an assignment request is received - * and is terminated when the assignment complete message is - * sent */ - struct mgcp_ctx *mgcp_ctx; + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + } user_plane; /* for advanced ping/pong */ int send_ping; diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index 152b818..a2a8630 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) { + if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 0c11b85..82367f0 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -57,17 +57,17 @@ /* we can ask it to connect now */ LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n", - con->sccp_con->rtp_port, lchan->abis_ip.conn_id); + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.conn_id); /* If AoIP is in use, the rtp_ip, which has been communicated * via the A interface as connect_ip */ - if(con->sccp_con->rtp_ip) - rtp_ip = con->sccp_con->rtp_ip; + if(con->sccp_con->user_plane.rtp_ip) + rtp_ip = con->sccp_con->user_plane.rtp_ip; else rtp_ip = ntohl(INADDR_ANY); rc = rsl_ipacc_mdcx(lchan, rtp_ip, - con->sccp_con->rtp_port, + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.rtp_payload2); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc); @@ -84,13 +84,13 @@ * inform the logic that controls the MGW about the new * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); - mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { + mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); + } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); + mgcp_ass_complete(con->sccp_con->user_plane.mgcp_ctx, lchan); } break; } diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index aea3994..6f2d0f4 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -361,13 +361,13 @@ return -1; } - if (conn->mgcp_ctx) { + if (conn->user_plane.mgcp_ctx) { /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with * the MGCP-GW. For this an mgcp_ctx should be created that * contains the FSM and some system data. When the connection * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() * calls osmo_bsc_sigtran_send(). */ - mgcp_clear_complete(conn->mgcp_ctx, resp); + mgcp_clear_complete(conn->user_plane.mgcp_ctx, resp); } else { /* NOTE: This is the SCCP-Lite case, since we do not handle * the MGCP-GW switching ourselves, we may skip everything @@ -535,11 +535,9 @@ /* Detect if a CIC code is present, if so, we use the classic ip.access * method to calculate the RTP port */ if (TLVP_PRESENT(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)) { - conn->cic = - osmo_load16be(TLVP_VAL - (&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); - timeslot = conn->cic & 0x1f; - multiplex = (conn->cic & ~0x1f) >> 5; + conn->user_plane.cic = osmo_load16be(TLVP_VAL(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); + timeslot = conn->user_plane.cic & 0x1f; + multiplex = (conn->user_plane.cic & ~0x1f) >> 5; } else if (TLVP_PRESENT(&tp, GSM0808_IE_AOIP_TRASP_ADDR)) { /* Decode AoIP transport address element */ data = TLVP_VAL(&tp, GSM0808_IE_AOIP_TRASP_ADDR); @@ -621,15 +619,16 @@ * reasons, functional wise it would not matter when exactly * the network side RTP connection is made, as long it is made * before we return with the assignment complete message. */ - memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + memcpy(&conn->user_plane.aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ - conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); - if (!conn->mgcp_ctx) { + conn->user_plane.mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, + conn, chan_mode, full_rate); + if (!conn->user_plane.mgcp_ctx) { LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); goto reject; } @@ -641,8 +640,8 @@ * (the MSC does that for us). We set conn->rtp_ip to 0 and check * on this later. By this we know that we have to behave accordingly * to sccp-lite. */ - conn->rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); - conn->rtp_ip = 0; + conn->user_plane.rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); + conn->user_plane.rtp_ip = 0; return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } @@ -849,7 +848,7 @@ lchan->abis_ip.ass_compl.chosen_channel, lchan->abis_ip.ass_compl.encr_alg_id, lchan->abis_ip.ass_compl.speech_mode, - &conn->sccp_con->aoip_rtp_addr_local, + &conn->sccp_con->user_plane.aoip_rtp_addr_local, &sc, NULL); diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 6330892..8c9dfe7 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -552,7 +552,7 @@ if (!conn->sccp_con) continue; - if (conn->sccp_con->cic != cic) + if (conn->sccp_con->user_plane.cic != cic) continue; /* diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f5efa95..ebd13d6 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -231,8 +231,8 @@ /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ - conn->rtp_port = r->audio_port; - conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->user_plane.rtp_port = r->audio_port; + conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -428,7 +428,7 @@ * identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ - if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + if (conn->user_plane.aoip_rtp_addr_remote.ss_family != AF_INET) { LOGPFSML(fi, LOGL_ERROR, "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); @@ -436,7 +436,7 @@ return; } - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); @@ -512,7 +512,7 @@ r->audio_ip, r->audio_port); /* Store address */ - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_local; sin->sin_family = AF_INET; sin->sin_addr.s_addr = inet_addr(r->audio_ip); sin->sin_port = osmo_ntohs(r->audio_port); diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 7669b67..67f8703 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -385,8 +385,8 @@ } /* Remove mgcp context if existant */ - if (conn->mgcp_ctx) - mgcp_free_ctx(conn->mgcp_ctx); + if (conn->user_plane.mgcp_ctx) + mgcp_free_ctx(conn->user_plane.mgcp_ctx); llist_del(&conn->entry); talloc_free(conn); -- To view, visit https://gerrit.osmocom.org/5506 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: Remove dead code left over from NITB split In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5475 to look at the new patch set (#3). Remove dead code left over from NITB split There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 --- M configure.ac M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/auth.h M include/osmocom/bsc/bss.h M include/osmocom/bsc/chan_alloc.h M include/osmocom/bsc/common_bsc.h M include/osmocom/bsc/common_cs.h D include/osmocom/bsc/crc24.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/gsm_subscriber.h M include/osmocom/bsc/ipaccess.h D include/osmocom/bsc/mncc.h D include/osmocom/bsc/mncc_int.h D include/osmocom/bsc/msc_ifaces.h D include/osmocom/bsc/rtp_proxy.h M include/osmocom/bsc/signal.h D include/osmocom/bsc/silent_call.h D include/osmocom/bsc/smpp.h D include/osmocom/bsc/sms_queue.h D include/osmocom/bsc/transaction.h D include/osmocom/bsc/trau_mux.h D include/osmocom/bsc/trau_upqueue.h M src/Makefile.am M src/ipaccess/Makefile.am M src/ipaccess/ipaccess-config.c M src/libbsc/abis_rsl.c M src/libbsc/bsc_api.c M src/libbsc/bsc_init.c M src/libbsc/chan_alloc.c M src/libbsc/e1_config.c M src/libbsc/gsm_04_08_utils.c M src/libbsc/handover_logic.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/Makefile.am M src/libcommon/common_vty.c D src/libcommon/gsm_subscriber_base.c M src/libcommon/talloc_ctx.c D src/libtrau/Makefile.am D src/libtrau/rtp_proxy.c D src/libtrau/trau_mux.c D src/libtrau/trau_upqueue.c M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_filter.c M src/utils/Makefile.am M src/utils/bs11_config.c M tests/Makefile.am M tests/abis/Makefile.am M tests/bsc-nat-trie/Makefile.am M tests/bsc-nat/Makefile.am M tests/bsc/Makefile.am M tests/bsc/bsc_test.c M tests/bssap/Makefile.am M tests/bssap/bssap_test.c M tests/channel/channel_test.c M tests/gsm0408/Makefile.am M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/Makefile.am M tests/subscr/Makefile.am M tests/testsuite.at D tests/trau/Makefile.am D tests/trau/trau_test.c D tests/trau/trau_test.ok 68 files changed, 30 insertions(+), 2,489 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/3 diff --git a/configure.ac b/configure.ac index b7dd016..540d2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ include/osmocom/Makefile include/osmocom/bsc/Makefile src/Makefile - src/libtrau/Makefile src/libbsc/Makefile src/libcommon/Makefile src/libfilter/Makefile @@ -161,7 +160,6 @@ tests/bsc-nat/Makefile tests/bsc-nat-trie/Makefile tests/abis/Makefile - tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile tests/bssap/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..1b86f9a 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,7 +4,6 @@ abis_om2000.h \ abis_rsl.h \ arfcn_range_encode.h \ - auth.h \ bsc_msc.h \ bsc_msg_filter.h \ bsc_nat.h \ @@ -18,7 +17,6 @@ common.h \ common_bsc.h \ common_cs.h \ - crc24.h \ ctrl.h \ debug.h \ e1_config.h \ @@ -26,16 +24,12 @@ gsm_04_80.h \ gsm_data.h \ gsm_data_shared.h \ - gsm_subscriber.h \ handover.h \ handover_decision.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ misdn.h \ - mncc.h \ - mncc_int.h \ - msc_ifaces.h \ nat_rewrite_trie.h \ network_listen.h \ openbscdefines.h \ @@ -52,15 +46,9 @@ rest_octets.h \ rrlp.h \ rs232.h \ - rtp_proxy.h \ signal.h \ - silent_call.h \ - sms_queue.h \ socket.h \ system_information.h \ - transaction.h \ - trau_mux.h \ - trau_upqueue.h \ ussd.h \ vty.h \ bsc_api.h \ diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h deleted file mode 100644 index b314bbf..0000000 --- a/include/osmocom/bsc/auth.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _AUTH_H -#define _AUTH_H - -#include - -struct gsm_auth_tuple; - -enum auth_action { - AUTH_ERROR = -1, /* Internal error */ - AUTH_NOT_AVAIL = 0, /* No auth tuple available */ - AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ - AUTH_DO_CIPH = 2, /* Only ciphering */ - AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ -}; - -extern const struct value_string auth_action_names[]; -static inline const char *auth_action_str(enum auth_action a) -{ - return get_value_string(auth_action_names, a); -} - -#endif /* _AUTH_H */ diff --git a/include/osmocom/bsc/bss.h b/include/osmocom/bsc/bss.h index b12487d..9891f5f 100644 --- a/include/osmocom/bsc/bss.h +++ b/include/osmocom/bsc/bss.h @@ -6,7 +6,7 @@ struct msgb; /* start and stop network */ -extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_alloc(void); extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 320fa94..62d0286 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -24,9 +24,6 @@ struct gsm_subscriber_connection; -/* Find an allocated channel for a specified subscriber */ -struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub); - /* Allocate a logical channel (SDCCH, TCH, ...) */ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger); diff --git a/include/osmocom/bsc/common_bsc.h b/include/osmocom/bsc/common_bsc.h index 08394e9..32e5097 100644 --- a/include/osmocom/bsc/common_bsc.h +++ b/include/osmocom/bsc/common_bsc.h @@ -5,5 +5,4 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); diff --git a/include/osmocom/bsc/common_cs.h b/include/osmocom/bsc/common_cs.h index 09a4b02..c2e8515 100644 --- a/include/osmocom/bsc/common_cs.h +++ b/include/osmocom/bsc/common_cs.h @@ -6,8 +6,6 @@ struct msgb; struct gsm_network; -typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); - struct vty; #define MAX_A5_KEY_LEN (128/8) @@ -20,8 +18,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); int common_cs_vty_init(struct gsm_network *network, int (* config_write_net )(struct vty *)); diff --git a/include/osmocom/bsc/crc24.h b/include/osmocom/bsc/crc24.h deleted file mode 100644 index 756638c..0000000 --- a/include/osmocom/bsc/crc24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CRC24_H -#define _CRC24_H - -#include - -#define INIT_CRC24 0xffffff - -uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); - -#endif diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cbb809b..3268426 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,11 +24,9 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; struct vlr_instance; -struct vlr_subscr; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -107,34 +105,8 @@ /* global linked list of subscriber_connections */ struct llist_head entry; - /* usage count. If this drops to zero, we start the release - * towards A/Iu */ - uint32_t use_count; - - /* The MS has opened the conn with a CM Service Request, and we shall - * keep it open for an actual request (or until timeout). */ - bool received_cm_service_request; - /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - - /* libmsc/libvlr subscriber information (if available) */ - struct vlr_subscr *vsub; - - /* LU expiration handling */ - uint8_t expire_timer_stopped; - /* SMS helpers for libmsc */ - uint8_t next_rp_ref; - - struct osmo_fsm_inst *conn_fsm; - - /* Are we part of a special "silent" call */ - int silent_call; - - /* MNCC rtp bridge markers */ - int mncc_rtp_bridge; - int mncc_rtp_create_pending; - int mncc_rtp_connect_pending; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; /* BSC */ @@ -142,7 +114,6 @@ /* back pointers */ struct gsm_network *network; - bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -150,9 +121,6 @@ /* for assignment handling */ struct osmo_timer_list T10; /* BSC */ struct gsm_lchan *secondary_lchan; /* BSC */ - - /* connected via 2G or 3G? */ - enum ran_type via_ran; struct gsm_classmark classmark; @@ -336,10 +304,6 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_counter *active_calls; - /* layer 4 */ - struct mncc_sock_state *mncc_state; - mncc_recv_cb_t mncc_recv; - struct llist_head upqueue; /* * TODO: Move the trans_list into the subscriber connection and * create a pending list for MT transactions. These exist before @@ -380,8 +344,6 @@ /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - - struct gsm_sms_queue *sms_queue; /* control interface */ struct ctrl_handle *ctrl; @@ -451,7 +413,6 @@ struct gsm_sms { unsigned long long id; - struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index e762c24..9bbcabd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -33,7 +33,6 @@ struct osmo_bsc_data; struct osmo_bsc_sccp_con; -struct gsm_sms_queue; /* RRLP mode of operation */ enum rrlp_mode { diff --git a/include/osmocom/bsc/gsm_subscriber.h b/include/osmocom/bsc/gsm_subscriber.h deleted file mode 100644 index ca66d47..0000000 --- a/include/osmocom/bsc/gsm_subscriber.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _GSM_SUBSCR_H -#define _GSM_SUBSCR_H - -#include - -#include -#include - -#include - -#define GSM_NAME_LENGTH 160 - -#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ -#define GSM_MIN_EXTEN 20000 -#define GSM_MAX_EXTEN 49999 - -#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 -/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ - -#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 - -enum gsm_subscriber_field { - GSM_SUBSCRIBER_IMSI, - GSM_SUBSCRIBER_TMSI, - GSM_SUBSCRIBER_EXTENSION, - GSM_SUBSCRIBER_ID, -}; - -enum gsm_subscriber_update_reason { - GSM_SUBSCRIBER_UPDATE_ATTACHED, - GSM_SUBSCRIBER_UPDATE_DETACHED, - GSM_SUBSCRIBER_UPDATE_EQUIPMENT, -}; - -/* - * Struct for pending channel requests. This is managed in the - * llist_head requests of each subscriber. The reference counting - * should work in such a way that a subscriber with a pending request - * remains in memory. - */ -struct subscr_request { - struct llist_head entry; - - /* human readable label to be able to log pending request kinds */ - const char *label; - - /* the callback data */ - gsm_cbfn *cbfn; - void *param; -}; - -int subscr_update(struct vlr_subscr *vsub, int reason); - -/* - * Paging handling with authentication - */ -struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub, - gsm_cbfn *cbfn, void *param, - const char *label); - -void subscr_remove_request(struct subscr_request *req); -int subscr_rx_paging_response(struct msgb *msg, - struct gsm_subscriber_connection *conn); - -int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, - struct msgb *msg, void *data, void *param); - -#endif /* _GSM_SUBSCR_H */ diff --git a/include/osmocom/bsc/ipaccess.h b/include/osmocom/bsc/ipaccess.h index 82e89c2..3d0f612 100644 --- a/include/osmocom/bsc/ipaccess.h +++ b/include/osmocom/bsc/ipaccess.h @@ -2,11 +2,13 @@ #define _IPACCESS_H #include -#include "gsm_subscriber.h" #include #include #include +struct gsm_bts; +struct gsm_bts_trx; + struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; diff --git a/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h deleted file mode 100644 index 881e041..0000000 --- a/include/osmocom/bsc/mncc.h +++ /dev/null @@ -1,215 +0,0 @@ -/* GSM Mobile Radio Interface Layer 3 messages on the A-bis interface - * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */ - -/* (C) 2008-2009 by Harald Welte - * (C) 2008, 2009 by Holger Hans Peter Freyther - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#ifndef _MNCC_H -#define _MNCC_H - -#include -#include - -#include - -struct gsm_network; -struct msgb; - - -/* One end of a call */ -struct gsm_call { - struct llist_head entry; - - /* network handle */ - void *net; - - /* the 'local' transaction */ - uint32_t callref; - /* the 'remote' transaction */ - uint32_t remote_ref; -}; - -#define MNCC_SETUP_REQ 0x0101 -#define MNCC_SETUP_IND 0x0102 -#define MNCC_SETUP_RSP 0x0103 -#define MNCC_SETUP_CNF 0x0104 -#define MNCC_SETUP_COMPL_REQ 0x0105 -#define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ -#define MNCC_CALL_CONF_IND 0x0107 -#define MNCC_CALL_PROC_REQ 0x0108 -#define MNCC_PROGRESS_REQ 0x0109 -#define MNCC_ALERT_REQ 0x010a -#define MNCC_ALERT_IND 0x010b -#define MNCC_NOTIFY_REQ 0x010c -#define MNCC_NOTIFY_IND 0x010d -#define MNCC_DISC_REQ 0x010e -#define MNCC_DISC_IND 0x010f -#define MNCC_REL_REQ 0x0110 -#define MNCC_REL_IND 0x0111 -#define MNCC_REL_CNF 0x0112 -#define MNCC_FACILITY_REQ 0x0113 -#define MNCC_FACILITY_IND 0x0114 -#define MNCC_START_DTMF_IND 0x0115 -#define MNCC_START_DTMF_RSP 0x0116 -#define MNCC_START_DTMF_REJ 0x0117 -#define MNCC_STOP_DTMF_IND 0x0118 -#define MNCC_STOP_DTMF_RSP 0x0119 -#define MNCC_MODIFY_REQ 0x011a -#define MNCC_MODIFY_IND 0x011b -#define MNCC_MODIFY_RSP 0x011c -#define MNCC_MODIFY_CNF 0x011d -#define MNCC_MODIFY_REJ 0x011e -#define MNCC_HOLD_IND 0x011f -#define MNCC_HOLD_CNF 0x0120 -#define MNCC_HOLD_REJ 0x0121 -#define MNCC_RETRIEVE_IND 0x0122 -#define MNCC_RETRIEVE_CNF 0x0123 -#define MNCC_RETRIEVE_REJ 0x0124 -#define MNCC_USERINFO_REQ 0x0125 -#define MNCC_USERINFO_IND 0x0126 -#define MNCC_REJ_REQ 0x0127 -#define MNCC_REJ_IND 0x0128 - -#define MNCC_BRIDGE 0x0200 -#define MNCC_FRAME_RECV 0x0201 -#define MNCC_FRAME_DROP 0x0202 -#define MNCC_LCHAN_MODIFY 0x0203 -#define MNCC_RTP_CREATE 0x0204 -#define MNCC_RTP_CONNECT 0x0205 -#define MNCC_RTP_FREE 0x0206 - -#define GSM_TCHF_FRAME 0x0300 -#define GSM_TCHF_FRAME_EFR 0x0301 -#define GSM_TCHH_FRAME 0x0302 -#define GSM_TCH_FRAME_AMR 0x0303 -#define GSM_BAD_FRAME 0x03ff - -#define MNCC_SOCKET_HELLO 0x0400 - -#define GSM_MAX_FACILITY 128 -#define GSM_MAX_SSVERSION 128 -#define GSM_MAX_USERUSER 128 - -#define MNCC_F_BEARER_CAP 0x0001 -#define MNCC_F_CALLED 0x0002 -#define MNCC_F_CALLING 0x0004 -#define MNCC_F_REDIRECTING 0x0008 -#define MNCC_F_CONNECTED 0x0010 -#define MNCC_F_CAUSE 0x0020 -#define MNCC_F_USERUSER 0x0040 -#define MNCC_F_PROGRESS 0x0080 -#define MNCC_F_EMERGENCY 0x0100 -#define MNCC_F_FACILITY 0x0200 -#define MNCC_F_SSVERSION 0x0400 -#define MNCC_F_CCCAP 0x0800 -#define MNCC_F_KEYPAD 0x1000 -#define MNCC_F_SIGNAL 0x2000 - -struct gsm_mncc { - /* context based information */ - uint32_t msg_type; - uint32_t callref; - - /* which fields are present */ - uint32_t fields; - - /* data derived informations (MNCC_F_ based) */ - struct gsm_mncc_bearer_cap bearer_cap; - struct gsm_mncc_number called; - struct gsm_mncc_number calling; - struct gsm_mncc_number redirecting; - struct gsm_mncc_number connected; - struct gsm_mncc_cause cause; - struct gsm_mncc_progress progress; - struct gsm_mncc_useruser useruser; - struct gsm_mncc_facility facility; - struct gsm_mncc_cccap cccap; - struct gsm_mncc_ssversion ssversion; - struct { - int sup; - int inv; - } clir; - int signal; - - /* data derived information, not MNCC_F based */ - int keypad; - int more; - int notify; /* 0..127 */ - int emergency; - char imsi[16]; -}; - -struct gsm_data_frame { - uint32_t msg_type; - uint32_t callref; - unsigned char data[0]; -}; - -#define MNCC_SOCK_VERSION 5 -struct gsm_mncc_hello { - uint32_t msg_type; - uint32_t version; - - /* send the sizes of the structs */ - uint32_t mncc_size; - uint32_t data_frame_size; - - /* send some offsets */ - uint32_t called_offset; - uint32_t signal_offset; - uint32_t emergency_offset; -}; - -struct gsm_mncc_rtp { - uint32_t msg_type; - uint32_t callref; - uint32_t ip; - uint16_t port; - uint32_t payload_type; - uint32_t payload_msg_type; -}; - -struct gsm_mncc_bridge { - uint32_t msg_type; - uint32_t callref[2]; -}; - -const char *get_mncc_name(int value); -void mncc_set_cause(struct gsm_mncc *data, int loc, int val); -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_builtin */ -int int_mncc_recv(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_sock */ -int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg); - -int mncc_sock_init(struct gsm_network *net, const char *sock_path); - -#define mncc_is_data_frame(msg_type) \ - (msg_type == GSM_TCHF_FRAME \ - || msg_type == GSM_TCHF_FRAME_EFR \ - || msg_type == GSM_TCHH_FRAME \ - || msg_type == GSM_TCH_FRAME_AMR \ - || msg_type == GSM_BAD_FRAME) - - -#endif diff --git a/include/osmocom/bsc/mncc_int.h b/include/osmocom/bsc/mncc_int.h deleted file mode 100644 index 213ce14..0000000 --- a/include/osmocom/bsc/mncc_int.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MNCC_INT_H -#define _MNCC_INT_H - -#include - -struct mncc_int { - uint8_t def_codec[2]; -}; - -extern struct mncc_int mncc_int; - -uint8_t mncc_codec_for_mode(int lchan_type); - -#endif diff --git a/include/osmocom/bsc/msc_ifaces.h b/include/osmocom/bsc/msc_ifaces.h deleted file mode 100644 index dadb828..0000000 --- a/include/osmocom/bsc/msc_ifaces.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -/* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, - * i.e. in the direction towards the mobile device (MS aka UE). - * - * 2G will use the A-interface, - * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). - * - * To allow linking parts of the MSC code without having to include entire - * infrastructures of external libraries, the core transmitting and receiving - * functions are left unimplemented. For example, a unit test does not need to - * link against external ASN1 libraries if it is never going to encode actual - * outgoing messages. It is up to each building scope to implement real world - * functions or to plug mere dummy implementations. - * - * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call - * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not - * yet implemented]. When you try to link against libmsc, you will find that - * the compiler complains about an undefined reference to iu_tx(). If you, - * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is - * available. A unit test may instead simply implement a dummy iu_tx() function - * and not link against osmo-iuh, see tests/libiudummy/. - */ - -/* Each main linkage must implement this function (see comment above). */ -extern int iu_tx(struct msgb *msg, uint8_t sapi); - -int msc_tx_dtap(struct gsm_subscriber_connection *conn, - struct msgb *msg); - -int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); -int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, - enum gsm48_reject_value value); - -int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h deleted file mode 100644 index 918420c..0000000 --- a/include/osmocom/bsc/rtp_proxy.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RTP_PROXY_H -#define _RTP_PROXY_H - -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - - -#include - -#include -#include - -#include - -#define RTP_PT_GSM_FULL 3 -#define RTP_PT_GSM_HALF 96 -#define RTP_PT_GSM_EFR 97 -#define RTP_PT_AMR 98 -#define RTP_LEN_GSM_FULL 33 -#define RTP_LEN_GSM_HALF 15 -#define RTP_LEN_GSM_EFR 31 -#define RTP_GSM_DURATION 160 - -enum rtp_rx_action { - RTP_NONE, - RTP_PROXY, - RTP_RECV_UPSTREAM, -}; - -enum rtp_tx_action { - RTP_SEND_NONE, - RTP_SEND_DOWNSTREAM, -}; - -struct rtp_sub_socket { - struct sockaddr_in sin_local; - struct sockaddr_in sin_remote; - - struct osmo_fd bfd; - /* linked list of to-be-transmitted msgb's */ - struct llist_head tx_queue; -}; - -struct rtp_socket { - struct llist_head list; - - struct rtp_sub_socket rtp; - struct rtp_sub_socket rtcp; - - /* what should we do on receive? */ - enum rtp_rx_action rx_action; - union { - struct { - struct rtp_socket *other_sock; - } proxy; - struct { - struct gsm_network *net; - uint32_t callref; - } receive; - }; - enum rtp_tx_action tx_action; - struct { - uint16_t sequence; - uint32_t timestamp; - uint32_t ssrc; - struct timeval last_tv; - } transmit; -}; - -struct rtp_socket *rtp_socket_create(void); -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip); -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port); -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other); -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref); -int rtp_socket_free(struct rtp_socket *rs); -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame); - -#endif /* _RTP_PROXY_H */ diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index feab246..58d9acf 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -34,34 +34,21 @@ */ enum signal_subsystems { SS_PAGING, - SS_SMS, SS_ABISIP, SS_NM, SS_LCHAN, - SS_SUBSCR, - SS_SCALL, SS_CHALLOC, SS_IPAC_NWL, SS_RF, SS_MSC, SS_HO, SS_CCCH, - SS_SGSN, }; /* SS_PAGING signals */ enum signal_paging { S_PAGING_SUCCEEDED, S_PAGING_EXPIRED, -}; - -/* SS_SMS signals */ -enum signal_sms { - S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */ - S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */ - S_SMS_SMMA, /* A MS tells us it has more space available */ - S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */ - S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */ }; /* SS_ABISIP signals */ @@ -108,20 +95,6 @@ S_CHALLOC_FREED, /* lchan has been successfully freed */ }; -/* SS_SUBSCR signals */ -enum signal_subscr { - S_SUBSCR_ATTACHED, - S_SUBSCR_DETACHED, - S_SUBSCR_IDENTITY, /* we've received some identity information */ -}; - -/* SS_SCALL signals */ -enum signal_scall { - S_SCALL_SUCCESS, - S_SCALL_EXPIRED, - S_SCALL_DETACHED, -}; - /* SS_IPAC_NWL signals */ enum signal_ipaccess { S_IPAC_NWL_COMPLETE, @@ -136,21 +109,6 @@ S_RF_OFF, S_RF_ON, S_RF_GRACE, -}; - -struct paging_signal_data { - struct vlr_subscr *vsub; - struct gsm_bts *bts; - - int paging_result; - - /* NULL in case the paging didn't work */ - struct gsm_subscriber_connection *conn; -}; - -struct scall_signal_data { - struct gsm_subscriber_connection *conn; - void *data; }; struct ipacc_ack_signal_data { @@ -197,15 +155,6 @@ struct gsm_network *net; }; -struct sms_signal_data { - /* The transaction where this occured */ - struct gsm_trans *trans; - /* Can be NULL for SMMA */ - struct gsm_sms *sms; - /* int paging result. Only the ones with > 0 */ - int paging_result; -}; - struct lchan_signal_data { /* The lchan the signal happened on */ struct gsm_lchan *lchan; @@ -237,24 +186,6 @@ uint16_t rach_slot_count; uint16_t rach_busy_count; uint16_t rach_access_count; -}; - -/* GPRS SGSN signals SS_SGSN */ -enum signal_sgsn { - S_SGSN_ATTACH, - S_SGSN_DETACH, - S_SGSN_UPDATE, - S_SGSN_PDP_ACT, - S_SGSN_PDP_DEACT, - S_SGSN_PDP_TERMINATE, - S_SGSN_PDP_FREE, - S_SGSN_MM_FREE, -}; - -struct sgsn_mm_ctx; -struct sgsn_signal_data { - struct sgsn_mm_ctx *mm; - struct sgsn_pdp_ctx *pdp; /* non-NULL for PDP_ACT, PDP_DEACT, PDP_FREE */ }; #endif diff --git a/include/osmocom/bsc/silent_call.h b/include/osmocom/bsc/silent_call.h deleted file mode 100644 index 5fec77b..0000000 --- a/include/osmocom/bsc/silent_call.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _SILENT_CALL_H -#define _SILENT_CALL_H - -struct gsm_subscriber_connection; - -extern int gsm_silent_call_start(struct vlr_subscr *vsub, - void *data, int type); -extern int gsm_silent_call_stop(struct vlr_subscr *vsub); - -#if 0 -extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); -extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); -#endif - -#endif /* _SILENT_CALL_H */ diff --git a/include/osmocom/bsc/smpp.h b/include/osmocom/bsc/smpp.h deleted file mode 100644 index bcdac8f..0000000 --- a/include/osmocom/bsc/smpp.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -int smpp_openbsc_alloc_init(void *ctx); -int smpp_openbsc_start(struct gsm_network *net); diff --git a/include/osmocom/bsc/sms_queue.h b/include/osmocom/bsc/sms_queue.h deleted file mode 100644 index 2a8bd58..0000000 --- a/include/osmocom/bsc/sms_queue.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SMS_QUEUE_H -#define SMS_QUEUE_H - -struct gsm_network; -struct gsm_sms_queue; -struct vty; - -int sms_queue_start(struct gsm_network *, int in_flight); -int sms_queue_trigger(struct gsm_sms_queue *); - -/* vty helper functions */ -int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty); -int sms_queue_set_max_pending(struct gsm_sms_queue *, int max); -int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail); -int sms_queue_clear(struct gsm_sms_queue *); - -#endif diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h deleted file mode 100644 index 5465548..0000000 --- a/include/osmocom/bsc/transaction.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _TRANSACT_H -#define _TRANSACT_H - -#include -#include -#include -#include -#include -#include - -enum bridge_state { - BRIDGE_STATE_NONE, - BRIDGE_STATE_LOOPBACK_PENDING, - BRIDGE_STATE_LOOPBACK_ESTABLISHED, - BRIDGE_STATE_BRIDGE_PENDING, - BRIDGE_STATE_BRIDGE_ESTABLISHED, -}; - -/* One transaction */ -struct gsm_trans { - /* Entry in list of all transactions */ - struct llist_head entry; - - /* Back pointer to the network struct */ - struct gsm_network *net; - - /* The protocol within which we live */ - uint8_t protocol; - - /* The current transaction ID */ - uint8_t transaction_id; - - /* To whom we belong, unique identifier of remote MM entity */ - struct vlr_subscr *vsub; - - /* The associated connection we are using to transmit messages */ - struct gsm_subscriber_connection *conn; - - /* reference from MNCC or other application */ - uint32_t callref; - - /* if traffic channel receive was requested */ - int tch_recv; - - /* is thats one paging? */ - struct subscr_request *paging_request; - - /* bearer capabilities (rate and codec) */ - struct gsm_mncc_bearer_cap bearer_cap; - - /* status of the assignment, true when done */ - bool assignment_done; - - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - - union { - struct { - - /* current call state */ - int state; - - /* current timer and message queue */ - int Tcurrent; /* current CC timer */ - int T308_second; /* used to send release again */ - struct osmo_timer_list timer; - struct gsm_mncc msg; /* stores setup/disconnect/release message */ - } cc; - struct { - struct gsm411_smc_inst smc_inst; - struct gsm411_smr_inst smr_inst; - - struct gsm_sms *sms; - } sms; - }; - - struct { - struct gsm_trans *peer; - enum bridge_state state; - } bridge; -}; - - - -struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn, - uint8_t proto, uint8_t trans_id); -struct gsm_trans *trans_find_by_callref(struct gsm_network *net, - uint32_t callref); - -struct gsm_trans *trans_alloc(struct gsm_network *net, - struct vlr_subscr *vsub, - uint8_t protocol, uint8_t trans_id, - uint32_t callref); -void trans_free(struct gsm_trans *trans); - -int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub, - uint8_t protocol, uint8_t ti_flag); -struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn); -void trans_conn_closed(struct gsm_subscriber_connection *conn); - -#endif diff --git a/include/osmocom/bsc/trau_mux.h b/include/osmocom/bsc/trau_mux.h deleted file mode 100644 index eeceff5..0000000 --- a/include/osmocom/bsc/trau_mux.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1 - * timeslot on which E1 interface) should be directly muxed to which other - * sub-slot. Entries in the mux map are always bi-directional. - * - * The idea of all this is to directly switch voice channels in the BSC - * from one phone to another. We do this right now since we don't support - * any external interface for voice channels, and in the future as an - * optimization to routing them externally. - */ - -#include -#include -#include - -struct decoded_trau_frame; - -/* map a TRAU mux map entry */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst); -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst); - -/* unmap a TRAU mux map entry */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref); - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits); - -/* add a trau receiver */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref); - -/* send trau from application */ -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame); - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan); - -/* callback invoked if we receive TRAU frames */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv); - -/* TRAU frame transcoding */ -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf); -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf); -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data); -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data); diff --git a/include/osmocom/bsc/trau_upqueue.h b/include/osmocom/bsc/trau_upqueue.h deleted file mode 100644 index ecc7658..0000000 --- a/include/osmocom/bsc/trau_upqueue.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _TRAU_UPQUEUE_H -#define _TRAU_UPQUEUE_H - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -#endif /* _TRAU_UPQUEUE_H */ - diff --git a/src/Makefile.am b/src/Makefile.am index 454bf26..637272d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,6 @@ libcommon \ libcommon-cs \ libbsc \ - libtrau \ libfilter \ $(NULL) diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am index 4dfe247..b3b2b8c 100644 --- a/src/ipaccess/Makefile.am +++ b/src/ipaccess/Makefile.am @@ -30,7 +30,6 @@ abisip_find_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -49,7 +48,6 @@ ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -60,7 +58,6 @@ ipaccess_proxy_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index c68e3ea..957a5bb 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -978,7 +978,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) exit(1); diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ef7a6fb..980b3e6 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,6 +48,11 @@ #define RSL_ALLOC_SIZE 1024 #define RSL_ALLOC_HEADROOM 128 + +#define RTP_PT_GSM_FULL 3 +#define RTP_PT_GSM_HALF 96 +#define RTP_PT_GSM_EFR 97 +#define RTP_PT_AMR 98 enum sacch_deact { SACCH_NONE, @@ -159,9 +162,6 @@ if (rc < 0) LOGP(DRSL, LOGL_ERROR, "%s %smismatching chan_nr=0x%02x\n", gsm_ts_and_pchan_name(lchan->ts), log_name, chan_nr); - - if (lchan->conn) - log_set_context(LOG_CTX_VLR_SUBSCR, lchan->conn->vsub); return lchan; } @@ -2420,20 +2420,6 @@ msg->dst = lchan->ts->trx->rsl_link; return abis_rsl_sendmsg(msg); -} - -/* tell BTS to connect RTP stream to our local RTP socket */ -int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan) -{ - struct rtp_socket *rs = lchan->abis_ip.rtp_socket; - int rc; - - rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), - ntohs(rs->rtp.sin_local.sin_port), - /* FIXME: use RTP payload of bound socket, not BTS*/ - lchan->abis_ip.rtp_payload2); - - return rc; } int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 845b1b7..6ff1688 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -24,13 +24,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include @@ -263,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->via_ran = RAN_GERAN_A; conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); @@ -277,11 +274,6 @@ if (conn->network->bsc_api->conn_cleanup) conn->network->bsc_api->conn_cleanup(conn); - - if (conn->vsub) { - LOGP(DNM, LOGL_ERROR, "conn->vsub should have been cleared.\n"); - conn->vsub = NULL; - } if (conn->ho_lchan) { LOGP(DNM, LOGL_ERROR, "The ho_lchan should have been cleared.\n"); @@ -452,10 +444,6 @@ msgb_l3len(msg) - sizeof(*gh)); return; } - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(conn->bts)) - switch_trau_mux(conn->lchan, conn->secondary_lchan); /* swap channels */ osmo_timer_del(&conn->T10); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 2fb3842..34dfd36 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -529,10 +529,10 @@ return 0; } -int bsc_network_alloc(mncc_recv_cb_t mncc_recv) +int bsc_network_alloc(void) { /* initialize our data structures */ - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) return -ENOMEM; diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 4b2531e..ad24a1e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -25,12 +25,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -392,13 +390,6 @@ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, &sig); } - if (lchan->abis_ip.rtp_socket) { - LOGP(DRLL, LOGL_ERROR, "%s RTP Proxy Socket remained open.\n", - gsm_lchan_name(lchan)); - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } - /* stop the timer */ osmo_timer_del(&lchan->T3101); @@ -449,11 +440,6 @@ lchan->type = GSM_LCHAN_NONE; rsl_lchan_set_state(lchan, LCHAN_S_NONE); - - if (lchan->abis_ip.rtp_socket) { - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } } /* Drive the release process of the lchan */ diff --git a/src/libbsc/e1_config.c b/src/libbsc/e1_config.c index 3656315..90e29d3 100644 --- a/src/libbsc/e1_config.c +++ b/src/libbsc/e1_config.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ { struct gsm_e1_subslot *e1_link = &ts->e1_link; struct e1inp_line *line; - struct e1inp_ts *e1_ts; DEBUGP(DLMI, "e1_reconfig_ts(%u,%u,%u)\n", ts->trx->bts->nr, ts->trx->nr, ts->nr); @@ -61,12 +58,6 @@ "non-existing E1 line %u\n", ts->nr, ts->trx->nr, ts->trx->bts->nr, e1_link->e1_nr); return -ENOMEM; - } - - if (ts_is_tch(ts)) { - e1_ts = &line->ts[e1_link->e1_ts-1]; - e1inp_ts_config_trau(e1_ts, line, subch_cb); - subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); } return 0; diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..414fd6d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 7b9dece..a30cd09 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -32,13 +32,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include @@ -270,10 +267,6 @@ rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); osmo_timer_del(&ho->T3103); - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(new_lchan->conn->bts)) - switch_trau_mux(ho->old_lchan, new_lchan); /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..59a8d5c 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -24,12 +24,11 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; - net = gsm_network_init(ctx, country_code, network_code, mncc_recv); + net = gsm_network_init(ctx, country_code, network_code); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 2ac2612..b410b17 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -39,8 +38,7 @@ */ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; @@ -55,15 +53,12 @@ net->t3212 = 5; INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); net->active_calls = osmo_counter_alloc("msc.active_calls"); - - net->mncc_recv = mncc_recv; net->dyn_ts_allow_tch_f = true; @@ -127,17 +122,4 @@ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2; return gsm48_extract_mi(classmark2_lv, length - classmark_offset, mi_string, mi_type); -} - -uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) -{ - const uint8_t rp_msg_ref = *next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - *next_rp_ref += 1; - - return rp_msg_ref; } diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 74b1a93..beb936b 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -28,7 +28,6 @@ #include #include -#include struct cmd_node net_node = { GSMNET_NODE, diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..ec997b7 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -25,5 +25,4 @@ gsm_data_shared.c \ socket.c \ talloc_ctx.c \ - gsm_subscriber_base.c \ $(NULL) diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c index d4d5fb5..82327d1 100644 --- a/src/libcommon/common_vty.c +++ b/src/libcommon/common_vty.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c deleted file mode 100644 index a746c24..0000000 --- a/src/libcommon/gsm_subscriber_base.c +++ /dev/null @@ -1,37 +0,0 @@ -/* The concept of a subscriber as seen by the BSC */ - -/* (C) 2008 by Harald Welte - * (C) 2009-2010 by Holger Hans Peter Freyther - * (C) 2010 by On-Waves - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -LLIST_HEAD(active_subscribers); -void *tall_subscr_ctx; - diff --git a/src/libcommon/talloc_ctx.c b/src/libcommon/talloc_ctx.c index c8e9cd3..9f64d75 100644 --- a/src/libcommon/talloc_ctx.c +++ b/src/libcommon/talloc_ctx.c @@ -32,8 +32,6 @@ extern void *tall_sigh_ctx; extern void *tall_tqe_ctx; extern void *tall_trans_ctx; -extern void *tall_map_ctx; -extern void *tall_upq_ctx; extern void *tall_ctr_ctx; void talloc_ctx_init(void *ctx_root) @@ -49,7 +47,5 @@ tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); - tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); - tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); } diff --git a/src/libtrau/Makefile.am b/src/libtrau/Makefile.am deleted file mode 100644 index 46becd6..0000000 --- a/src/libtrau/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - -I$(top_builddir) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMONETIF_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -noinst_LIBRARIES = \ - libtrau.a \ - $(NULL) - -libtrau_a_SOURCES = \ - rtp_proxy.c \ - trau_mux.c \ - trau_upqueue.c \ - $(NULL) diff --git a/src/libtrau/rtp_proxy.c b/src/libtrau/rtp_proxy.c deleted file mode 100644 index 5b1ca79..0000000 --- a/src/libtrau/rtp_proxy.c +++ /dev/null @@ -1,764 +0,0 @@ -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009-2013 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include /* gettimeofday() */ -#include /* get..() */ -#include /* clock() */ -#include /* uname() */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* attempt to determine byte order */ -#include -#include - -static LLIST_HEAD(rtp_sockets); - -/* should we mangle the CNAME inside SDES of RTCP packets? We disable - * this by default, as it seems to be not needed */ -static int mangle_rtcp_cname = 0; - -enum rtp_bfd_priv { - RTP_PRIV_NONE, - RTP_PRIV_RTP, - RTP_PRIV_RTCP -}; - -#define RTP_ALLOC_SIZE 1500 - -#define RTCP_TYPE_SDES 202 - -#define RTCP_IE_CNAME 1 - - -#define RTP_VERSION 2 - -/* 33 for FR, all other codecs have smaller size */ -#define MAX_RTP_PAYLOAD_LEN 33 - -/* decode an rtp frame and create a new buffer with payload */ -static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data) -{ - struct msgb *new_msg; - struct gsm_data_frame *frame; - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; - struct rtp_x_hdr *rtpxh; - uint8_t *payload, *payload_out; - int payload_len; - int msg_type; - int x_len; - - if (msg->len < 12) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", - msg->len); - return -EINVAL; - } - if (rtph->version != RTP_VERSION) { - DEBUGPC(DLMUX, "received RTP version %d not supported.\n", - rtph->version); - return -EINVAL; - } - payload = msg->data + sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); - payload_len = msg->len - sizeof(struct rtp_hdr) - (rtph->csrc_count << 2); - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); - return -EINVAL; - } - if (rtph->extension) { - if (payload_len < sizeof(struct rtp_x_hdr)) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "extension header\n"); - return -EINVAL; - } - rtpxh = (struct rtp_x_hdr *)payload; - x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short, " - "extension header exceeds frame length\n"); - return -EINVAL; - } - } - if (rtph->padding) { - if (payload_len < 1) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "padding length\n"); - return -EINVAL; - } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); - return -EINVAL; - } - } - - switch (rtph->payload_type) { - case RTP_PT_GSM_FULL: - msg_type = GSM_TCHF_FRAME; - if (payload_len != RTP_LEN_GSM_FULL) { - DEBUGPC(DLMUX, "received RTP full rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_FULL, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_EFR: - msg_type = GSM_TCHF_FRAME_EFR; - if (payload_len != RTP_LEN_GSM_EFR) { - DEBUGPC(DLMUX, "received RTP extended full rate frame " - "with payload length != %d (len = %d)\n", - RTP_LEN_GSM_EFR, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_HALF: - msg_type = GSM_TCHH_FRAME; - if (payload_len != RTP_LEN_GSM_HALF) { - DEBUGPC(DLMUX, "received RTP half rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_HALF, payload_len); - return -EINVAL; - } - break; - case RTP_PT_AMR: - msg_type = GSM_TCH_FRAME_AMR; - break; - default: - DEBUGPC(DLMUX, "received RTP frame with unknown payload " - "type %d\n", rtph->payload_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN || - (rtph->payload_type == RTP_PT_AMR && - payload_len > MAX_RTP_PAYLOAD_LEN - 1)) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - /* always allocate for the maximum possible size to avoid - * fragmentation */ - new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); - - if (!new_msg) - return -ENOMEM; - frame = (struct gsm_data_frame *) msgb_put(new_msg, sizeof(struct gsm_data_frame)); - frame->msg_type = msg_type; - frame->callref = callref; - if (rtph->payload_type == RTP_PT_AMR) { - /* for FR/HR/EFR the length is implicit. In AMR, we - * need to make it explicit by using the first byte of - * the data[] buffer as length byte */ - uint8_t *data0 = msgb_put(new_msg, 1); - *data0 = payload_len; - } - payload_out = msgb_put(new_msg, payload_len); - memcpy(payload_out, payload, payload_len); - - *data = new_msg; - return 0; -} - -/*! \brief encode and send a rtp frame - * \param[in] rs RTP socket through which we shall send - * \param[in] frame GSM RTP frame to be sent - */ -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame) -{ - struct rtp_sub_socket *rss = &rs->rtp; - struct msgb *msg; - struct rtp_hdr *rtph; - uint8_t *payload; - int payload_type; - int payload_len; - int duration; /* in samples */ - int is_bfi = 0; - - if (rs->tx_action != RTP_SEND_DOWNSTREAM) { - /* initialize sequences */ - rs->tx_action = RTP_SEND_DOWNSTREAM; - rs->transmit.ssrc = rand(); - rs->transmit.sequence = random(); - rs->transmit.timestamp = random(); - } - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - payload_type = RTP_PT_GSM_FULL; - payload_len = RTP_LEN_GSM_FULL; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHF_FRAME_EFR: - payload_type = RTP_PT_GSM_EFR; - payload_len = RTP_LEN_GSM_EFR; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHH_FRAME: - payload_type = RTP_PT_GSM_HALF; - payload_len = RTP_LEN_GSM_HALF; - duration = RTP_GSM_DURATION; - break; - case GSM_TCH_FRAME_AMR: - payload_type = RTP_PT_AMR; - payload_len = frame->data[0]; - duration = RTP_GSM_DURATION; - break; - case GSM_BAD_FRAME: - payload_type = 0; - payload_len = 0; - duration = RTP_GSM_DURATION; - is_bfi = 1; - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - if (is_bfi) { - /* In case of a bad frame, just count and drop packet. */ - rs->transmit.timestamp += duration; - rs->transmit.sequence++; - return 0; - } - - msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM"); - if (!msg) - return -ENOMEM; - rtph = (struct rtp_hdr *) msgb_put(msg, sizeof(struct rtp_hdr)); - rtph->version = RTP_VERSION; - rtph->padding = 0; - rtph->extension = 0; - rtph->csrc_count = 0; - rtph->marker = 0; - rtph->payload_type = payload_type; - rtph->sequence = htons(rs->transmit.sequence++); - rtph->timestamp = htonl(rs->transmit.timestamp); - rs->transmit.timestamp += duration; - rtph->ssrc = htonl(rs->transmit.ssrc); - - payload = msgb_put(msg, payload_len); - if (frame->msg_type == GSM_TCH_FRAME_AMR) - memcpy(payload, frame->data + 1, payload_len); - else - memcpy(payload, frame->data, payload_len); - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - - return 0; -} - -/* iterate over all chunks in one RTCP message, look for CNAME IEs and - * replace all of those with 'new_cname' */ -static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh, - uint16_t *rtcp_len, const char *new_cname) -{ - uint8_t *rtcp_end; - uint8_t *cur = (uint8_t *) rh; - uint8_t tag, len = 0; - - rtcp_end = cur + *rtcp_len; - /* move cur to end of RTP header */ - cur += sizeof(*rh); - - /* iterate over Chunks */ - while (cur+4 < rtcp_end) { - /* skip four bytes SSRC/CSRC */ - cur += 4; - - /* iterate over IE's inside the chunk */ - while (cur+1 < rtcp_end) { - tag = *cur++; - if (tag == 0) { - /* end of chunk, skip additional zero */ - while ((*cur++ == 0) && (cur < rtcp_end)) { } - break; - } - len = *cur++; - - if (tag == RTCP_IE_CNAME) { - /* we've found the CNAME, lets mangle it */ - if (len < strlen(new_cname)) { - /* we need to make more space */ - int increase = strlen(new_cname) - len; - - msgb_push(msg, increase); - memmove(cur+len+increase, cur+len, - rtcp_end - (cur+len)); - /* FIXME: we have to respect RTCP - * padding/alignment rules! */ - len += increase; - *(cur-1) += increase; - rtcp_end += increase; - *rtcp_len += increase; - } - /* copy new CNAME into message */ - memcpy(cur, new_cname, strlen(new_cname)); - /* FIXME: zero the padding in case new CNAME - * is smaller than old one !!! */ - } - cur += len; - } - } - - return 0; -} - -static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs) -{ - struct rtp_sub_socket *rss = &rs->rtcp; - struct rtcp_hdr *rtph; - uint16_t old_len; - int rc; - - if (!mangle_rtcp_cname) - return 0; - - printf("RTCP\n"); - /* iterate over list of RTCP messages */ - rtph = (struct rtcp_hdr *)msg->data; - while ((void *)rtph + sizeof(*rtph) <= (void *)msg->data + msg->len) { - old_len = (ntohs(rtph->length) + 1) * 4; - if ((void *)rtph + old_len > (void *)msg->data + msg->len) { - DEBUGPC(DLMUX, "received RTCP packet too short for " - "length element\n"); - return -EINVAL; - } - if (rtph->type == RTCP_TYPE_SDES) { - char new_cname[255]; - osmo_strlcpy(new_cname, - inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, - new_cname); - if (rc < 0) - return rc; - } - rtph = (void *)rtph + old_len; - } - - return 0; -} - -/* read from incoming RTP/RTCP socket */ -static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - int rc; - struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP"); - struct msgb *new_msg; - struct rtp_sub_socket *other_rss; - - if (!msg) - return -ENOMEM; - - rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } else if (rc < 0) { - /* Ignore "connection refused". this happens, If we open the - * socket faster than the remote side. */ - if (errno == ECONNREFUSED) - goto out_free; - DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " - "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } - - msgb_put(msg, rc); - - switch (rs->rx_action) { - case RTP_PROXY: - if (!rs->proxy.other_sock) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTP) - other_rss = &rs->proxy.other_sock->rtp; - else if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - other_rss = &rs->proxy.other_sock->rtcp; - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - } else { - rc = -EINVAL; - goto out_free; - } - msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; - break; - - case RTP_RECV_UPSTREAM: - if (!rs->receive.callref || !rs->receive.net) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - if (!mangle_rtcp_cname) { - msgb_free(msg); - break; - } - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - break; - } - if (rss->bfd.priv_nr != RTP_PRIV_RTP) { - rc = -EINVAL; - goto out_free; - } - rc = rtp_decode(msg, rs->receive.callref, &new_msg); - if (rc < 0) - goto out_free; - msgb_free(msg); - trau_tx_to_mncc(rs->receive.net, new_msg); - break; - - case RTP_NONE: /* if socket exists, but disabled by app */ - msgb_free(msg); - break; - } - - return 0; - -out_free: - msgb_free(msg); - return rc; -} - -/* \brief write from tx_queue to RTP/RTCP socket */ -static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - struct msgb *msg; - int written; - - msg = msgb_dequeue(&rss->tx_queue); - if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; - return 0; - } - - written = write(rss->bfd.fd, msg->data, msg->len); - if (written < msg->len) { - LOGP(DLMIB, LOGL_ERROR, "short write"); - msgb_free(msg); - return -EIO; - } - - msgb_free(msg); - - return 0; -} - - -/*! \brief callback for the select.c:bfd_* layer */ -static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags) -{ - struct rtp_socket *rs = bfd->data; - struct rtp_sub_socket *rss; - - switch (bfd->priv_nr) { - case RTP_PRIV_RTP: - rss = &rs->rtp; - break; - case RTP_PRIV_RTCP: - rss = &rs->rtcp; - break; - default: - return -EINVAL; - } - - if (flags & BSC_FD_READ) - rtp_socket_read(rs, rss); - - if (flags & BSC_FD_WRITE) - rtp_socket_write(rs, rss); - - return 0; -} - -/*! \brief initialize one rtp sub-socket */ -static void init_rss(struct rtp_sub_socket *rss, - struct rtp_socket *rs, int fd, int priv_nr) -{ - /* initialize bfd */ - rss->bfd.fd = fd; - rss->bfd.data = rs; - rss->bfd.priv_nr = priv_nr; - rss->bfd.cb = rtp_bfd_cb; -} - -/*! \brief create a new RTP/RTCP socket and bind it */ -struct rtp_socket *rtp_socket_create(void) -{ - int rc; - struct rtp_socket *rs; - - DEBUGP(DLMUX, "rtp_socket_create(): "); - - rs = talloc_zero(tall_bsc_ctx, struct rtp_socket); - if (!rs) - return NULL; - - INIT_LLIST_HEAD(&rs->rtp.tx_queue); - INIT_LLIST_HEAD(&rs->rtcp.tx_queue); - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_free; - - init_rss(&rs->rtp, rs, rc, RTP_PRIV_RTP); - rc = osmo_fd_register(&rs->rtp.bfd); - if (rc < 0) - goto out_rtp_socket; - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_rtp_bfd; - - init_rss(&rs->rtcp, rs, rc, RTP_PRIV_RTCP); - rc = osmo_fd_register(&rs->rtcp.bfd); - if (rc < 0) - goto out_rtcp_socket; - - DEBUGPC(DLMUX, "success\n"); - - rc = rtp_socket_bind(rs, INADDR_ANY); - if (rc < 0) - goto out_rtcp_bfd; - - return rs; - -out_rtcp_bfd: - osmo_fd_unregister(&rs->rtcp.bfd); -out_rtcp_socket: - close(rs->rtcp.bfd.fd); -out_rtp_bfd: - osmo_fd_unregister(&rs->rtp.bfd); -out_rtp_socket: - close(rs->rtp.bfd.fd); -out_free: - talloc_free(rs); - DEBUGPC(DLMUX, "failed\n"); - return NULL; -} - -static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip, - uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_local.sin_family = AF_INET; - rss->sin_local.sin_addr.s_addr = htonl(ip); - rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; - - rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - sizeof(rss->sin_local)); - if (rc < 0) - return rc; - - /* retrieve the address we actually bound to, in case we - * passed INADDR_ANY as IP address */ - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -#define RTP_PORT_BASE 30000 -static unsigned int next_udp_port = RTP_PORT_BASE; - -/*! \brief bind a RTP socket to a specific local address - * \param[in] rs RTP socket to be bound - * \param[in] ip local IP address to which socket is to be bound - */ -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip) -{ - int rc = -EIO; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_bind(rs=%p, IP=%s): ", rs, - inet_ntoa(ia)); - - /* try to bind to a consecutive pair of ports */ - for (next_udp_port = next_udp_port % 0xffff; - next_udp_port < 0xffff; next_udp_port += 2) { - rc = rtp_sub_socket_bind(&rs->rtp, ip, next_udp_port); - if (rc != 0) - continue; - - rc = rtp_sub_socket_bind(&rs->rtcp, ip, next_udp_port+1); - if (rc == 0) - break; - } - if (rc < 0) { - DEBUGPC(DLMUX, "failed\n"); - return rc; - } - - ia.s_addr = rs->rtp.sin_local.sin_addr.s_addr; - DEBUGPC(DLMUX, "BOUND_IP=%s, BOUND_PORT=%u\n", - inet_ntoa(ia), ntohs(rs->rtp.sin_local.sin_port)); - return ntohs(rs->rtp.sin_local.sin_port); -} - -static int rtp_sub_socket_connect(struct rtp_sub_socket *rss, - uint32_t ip, uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_remote.sin_family = AF_INET; - rss->sin_remote.sin_addr.s_addr = htonl(ip); - rss->sin_remote.sin_port = htons(port); - - rc = connect(rss->bfd.fd, (struct sockaddr *) &rss->sin_remote, - sizeof(rss->sin_remote)); - if (rc < 0) - return rc; - - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -/*! \brief 'connect' a RTP socket to a remote peer - * \param[in] rs RTP socket to be connected - * \param[in] ip remote IP address to which to connect - * \param[in] port remote UDP port number to which to connect - */ -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port) -{ - int rc; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_connect(rs=%p, ip=%s, port=%u)\n", - rs, inet_ntoa(ia), port); - - rc = rtp_sub_socket_connect(&rs->rtp, ip, port); - if (rc < 0) - return rc; - - return rtp_sub_socket_connect(&rs->rtcp, ip, port+1); -} - -/*! \brief bind two RTP/RTCP sockets together in the proxy - * \param[in] this First RTP socket - * \param[in] other Second RTP socket - */ -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n", - this, other); - - this->rx_action = RTP_PROXY; - this->proxy.other_sock = other; - - other->rx_action = RTP_PROXY; - other->proxy.other_sock = this; - - return 0; -} - -/*! \brief bind RTP/RTCP socket to application, disabling proxy - * \param[in] this RTP socket - * \param[in] net gsm_network argument to trau_tx_to_mncc() - * \param[in] callref callref argument to trau_tx_to_mncc() - */ -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, - uint32_t callref) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n", - this, callref); - - if (callref) { - this->rx_action = RTP_RECV_UPSTREAM; - this->receive.net = net; - this->receive.callref = callref; - } else - this->rx_action = RTP_NONE; - - return 0; -} - -static void free_tx_queue(struct rtp_sub_socket *rss) -{ - struct msgb *msg; - - while ((msg = msgb_dequeue(&rss->tx_queue))) - msgb_free(msg); -} - -/*! \brief Free/release a previously allocated RTP socket - * \param[in[] rs RTP/RTCP socket to be released - */ -int rtp_socket_free(struct rtp_socket *rs) -{ - DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs); - - /* make sure we don't leave references dangling to us */ - if (rs->rx_action == RTP_PROXY && - rs->proxy.other_sock) - rs->proxy.other_sock->proxy.other_sock = NULL; - - osmo_fd_unregister(&rs->rtp.bfd); - close(rs->rtp.bfd.fd); - free_tx_queue(&rs->rtp); - - osmo_fd_unregister(&rs->rtcp.bfd); - close(rs->rtcp.bfd.fd); - free_tx_queue(&rs->rtcp); - - talloc_free(rs); - - return 0; -} diff --git a/src/libtrau/trau_mux.c b/src/libtrau/trau_mux.c deleted file mode 100644 index e570b93..0000000 --- a/src/libtrau/trau_mux.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* this corresponds to the bit-lengths of the individual codec - * parameters as indicated in Table 1.1 of TS 06.10 */ -static const uint8_t gsm_fr_map[] = { - 6, 6, 5, 5, 4, 4, 3, 3, - 7, 2, 2, 6, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 7, 2, 2, 6, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 7, 2, 2, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 7, 2, 2, 6, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3 -}; - - -/* - * EFR TRAU parity - * - * g(x) = x^3 + x^1 + 1 - */ -static const struct osmo_crc8gen_code gsm0860_efr_crc3 = { - .bits = 3, - .poly = 0x3, - .init = 0x0, - .remainder = 0x7, -}; - -/* EFR parity bits */ -static inline void efr_parity_bits_1(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 0, 22); - memcpy(check_bits + 22 , d_bits + 24, 3); - check_bits[25] = d_bits[28]; -} - -static inline void efr_parity_bits_2(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 42, 10); - memcpy(check_bits + 10 , d_bits + 90, 2); -} - -static inline void efr_parity_bits_3(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 98, 5); - check_bits[5] = d_bits[104]; - memcpy(check_bits + 6 , d_bits + 143, 2); -} - -static inline void efr_parity_bits_4(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 151, 10); - memcpy(check_bits + 10 , d_bits + 199, 2); -} - -static inline void efr_parity_bits_5(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 207, 5); - check_bits[5] = d_bits[213]; - memcpy(check_bits + 6 , d_bits + 252, 2); -} - -struct map_entry { - struct llist_head list; - struct gsm_e1_subslot src, dst; -}; - -struct upqueue_entry { - struct llist_head list; - struct gsm_network *net; - struct gsm_e1_subslot src; - uint32_t callref; -}; - -static LLIST_HEAD(ss_map); -static LLIST_HEAD(ss_upqueue); - -void *tall_map_ctx, *tall_upq_ctx; - -/* map one particular subslot to another subslot */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst) -{ - struct map_entry *me; - - me = talloc(tall_map_ctx, struct map_entry); - if (!me) { - LOGP(DLMIB, LOGL_FATAL, "Out of memory\n"); - return -ENOMEM; - } - - DEBUGP(DCC, "Setting up TRAU mux map between (e1=%u,ts=%u,ss=%u) " - "and (e1=%u,ts=%u,ss=%u)\n", - src->e1_nr, src->e1_ts, src->e1_ts_ss, - dst->e1_nr, dst->e1_ts, dst->e1_ts_ss); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src, 0); - trau_mux_unmap(dst, 0); - - memcpy(&me->src, src, sizeof(me->src)); - memcpy(&me->dst, dst, sizeof(me->dst)); - llist_add(&me->list, &ss_map); - - return 0; -} - -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst) -{ - struct gsm_e1_subslot *src_ss, *dst_ss; - - src_ss = &src->ts->e1_link; - dst_ss = &dst->ts->e1_link; - - return trau_mux_map(src_ss, dst_ss); -} - - -/* unmap one particular subslot from another subslot */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref) -{ - struct map_entry *me, *me2; - struct upqueue_entry *ue, *ue2; - - if (ss) - llist_for_each_entry_safe(me, me2, &ss_map, list) { - if (!memcmp(&me->src, ss, sizeof(*ss)) || - !memcmp(&me->dst, ss, sizeof(*ss))) { - llist_del(&me->list); - return 0; - } - } - llist_for_each_entry_safe(ue, ue2, &ss_upqueue, list) { - if (ue->callref == callref) { - llist_del(&ue->list); - return 0; - } - if (ss && !memcmp(&ue->src, ss, sizeof(*ss))) { - llist_del(&ue->list); - return 0; - } - } - return -ENOENT; -} - -/* look-up an enty in the TRAU mux map */ -static struct gsm_e1_subslot * -lookup_trau_mux_map(const struct gsm_e1_subslot *src) -{ - struct map_entry *me; - - llist_for_each_entry(me, &ss_map, list) { - if (!memcmp(&me->src, src, sizeof(*src))) - return &me->dst; - if (!memcmp(&me->dst, src, sizeof(*src))) - return &me->src; - } - return NULL; -} - -/* look-up an enty in the TRAU upqueue */ -struct upqueue_entry * -lookup_trau_upqueue(const struct gsm_e1_subslot *src) -{ - struct upqueue_entry *ue; - - llist_for_each_entry(ue, &ss_upqueue, list) { - if (!memcmp(&ue->src, src, sizeof(*src))) - return ue; - } - return NULL; -} - -static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, k, l, o; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 33, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - data = frame->data; - data[0] = 0xd << 4; - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts output bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset input bits */ - while (i < 260) { - data[j/8] |= (tf->d_bits[k+o] << (7-(j%8))); - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } - if (tf->c_bits[11]) /* BFI */ - frame->msg_type = GSM_BAD_FRAME; - else - frame->msg_type = GSM_TCHF_FRAME; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 33); - - return msg; -} - -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, rc; - ubit_t check_bits[26]; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 31, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - frame->msg_type = GSM_TCHF_FRAME_EFR; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 31); - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - - data = frame->data; - data[0] = 0xc << 4; - /* reassemble d-bits */ - for (i = 1, j = 4; i < 39; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_1(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - if (rc) - goto bad_frame; - for (i = 42, j = 42; i < 95; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_2(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - if (rc) - goto bad_frame; - for (i = 98, j = 95; i < 148; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_3(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - if (rc) - goto bad_frame; - for (i = 151, j = 145; i < 204; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_4(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - if (rc) - goto bad_frame; - for (i = 207, j = 198; i < 257; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_5(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); - if (rc) - goto bad_frame; - - return msg; - -bad_frame: - frame->msg_type = GSM_BAD_FRAME; - - return msg; -} - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits) -{ - struct decoded_trau_frame tf; - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss); - struct subch_mux *mx; - struct upqueue_entry *ue; - int rc; - - /* decode TRAU, change it to downlink, re-encode */ - rc = decode_trau_frame(&tf, trau_bits); - if (rc) - return rc; - - if (!dst_e1_ss) { - struct msgb *msg = NULL; - /* frame shall be sent to upqueue */ - if (!(ue = lookup_trau_upqueue(src_e1_ss))) - return -EINVAL; - if (!ue->callref) - return -EINVAL; - if (!memcmp(tf.c_bits, c_bits_check_fr, 5)) - msg = trau_decode_fr(ue->callref, &tf); - else if (!memcmp(tf.c_bits, c_bits_check_efr, 5)) - msg = trau_decode_efr(ue->callref, &tf); - else { - DEBUGPC(DLMUX, "illegal trau (C1-C5) %s\n", - osmo_hexdump(tf.c_bits, 5)); - DEBUGPC(DLMUX, "test trau (C1-C5) %s\n", - osmo_hexdump(c_bits_check_efr, 5)); - return -EINVAL; - } - if (!msg) - return -ENOMEM; - trau_tx_to_mncc(ue->net, msg); - - return 0; - } - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - trau_frame_up2down(&tf); - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* callback when a TRAU frame was received */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, - void *_priv) -{ - struct e1inp_ts *e1i_ts = _priv; - struct gsm_e1_subslot src_ss; - - src_ss.e1_nr = e1i_ts->line->num; - src_ss.e1_ts = e1i_ts->num; - src_ss.e1_ts_ss = ch; - - return trau_mux_input(&src_ss, data, len); -} - -/* add receiver instance for lchan and callref */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref) -{ - struct gsm_e1_subslot *src_ss; - struct upqueue_entry *ue; - - ue = talloc(tall_upq_ctx, struct upqueue_entry); - if (!ue) - return -ENOMEM; - - src_ss = &lchan->ts->e1_link; - - DEBUGP(DCC, "Setting up TRAU receiver (e1=%u,ts=%u,ss=%u) " - "and (callref 0x%x)\n", - src_ss->e1_nr, src_ss->e1_ts, src_ss->e1_ts_ss, - callref); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src_ss, callref); - - memcpy(&ue->src, src_ss, sizeof(ue->src)); - ue->net = lchan->ts->trx->bts->network; - ue->callref = callref; - llist_add(&ue->list, &ss_upqueue); - - return 0; -} - -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j, k, l, o; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 1; - tf->c_bits[3] = 0; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts input bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset output bits */ - while (i < 260) { - tf->d_bits[k+o] = (data[j/8] >> (7-(j%8))) & 1; - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } -} - -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j; - ubit_t check_bits[26]; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 0; - tf->c_bits[3] = 1; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - tf->d_bits[0] = 1; - for (i = 1, j = 4; i < 39; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_1(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - for (i = 42, j = 42; i < 95; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_2(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - for (i = 98, j = 95; i < 148; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_3(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - for (i = 151, j = 145; i < 204; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_4(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - for (i = 207, j = 198; i < 257; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_5(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); -} - -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame) -{ - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link; - struct subch_mux *mx; - struct decoded_trau_frame tf; - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - trau_encode_fr(&tf, frame->data); - break; - case GSM_TCHF_FRAME_EFR: - trau_encode_efr(&tf, frame->data); - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan) -{ - struct gsm_network *net = old_lchan->ts->trx->bts->network; - struct gsm_trans *trans; - - /* look up transaction with TCH frame receive enabled */ - llist_for_each_entry(trans, &net->trans_list, entry) { - if (trans->conn && trans->conn->lchan == old_lchan && trans->tch_recv) { - /* switch */ - trau_recv_lchan(new_lchan, trans->callref); - } - } - - return 0; -} diff --git a/src/libtrau/trau_upqueue.c b/src/libtrau/trau_upqueue.c deleted file mode 100644 index c1c0003..0000000 --- a/src/libtrau/trau_upqueue.c +++ /dev/null @@ -1,27 +0,0 @@ -/* trau_upqueue.c - Pass msgb's up the chain */ - -/* (C) 2010 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 7db698c..4acbe56 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -40,12 +40,10 @@ osmo_bsc_ctrl.c \ $(NULL) -# once again since TRAU uses CC symbol :( osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 2b71b85..17dddf8 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5d25701..829f207 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -201,7 +201,7 @@ osmo_stats_init(tall_bsc_ctx); /* Allocate global gsm_network struct */ - rc = bsc_network_alloc(NULL); + rc = bsc_network_alloc(); if (rc) { fprintf(stderr, "Allocation failed. exiting.\n"); exit(1); diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index dd20ddb..1bee68e 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -42,7 +42,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc_nat/bsc_filter.c b/src/osmo-bsc_nat/bsc_filter.c index 8d4a680..77ef583 100644 --- a/src/osmo-bsc_nat/bsc_filter.c +++ b/src/osmo-bsc_nat/bsc_filter.c @@ -20,6 +20,8 @@ * */ +#include + #include #include #include diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index d3f6d62..78d4965 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -49,7 +49,6 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 6487df2..c72a23a 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..9207434 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc6248..137321c 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897..d20bd0a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a9..7f6730e 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4a..96f87f5 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018..1d7baa1 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9ea..77309c9 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c1..579cae2 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e..7957b14 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include #include #include -#include void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22..c5ae061 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 72a1772..77cd1e8 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -147,7 +147,7 @@ static inline void test_si2q_segfault(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); if (!network) @@ -162,7 +162,7 @@ static inline void test_si2q_mu(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Test SI2quater multiple UARFCNs:\n"); if (!network) @@ -181,7 +181,7 @@ static inline void test_si2q_u(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); if (!network) @@ -209,7 +209,7 @@ static inline void test_si2q_e(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(NULL, 1, 1); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); if (!network) @@ -242,7 +242,7 @@ static inline void test_si2q_long(void) { struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); if (!network) @@ -649,7 +649,7 @@ static void test_si_ba_ind(void) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1); struct gsm_bts *bts = gsm_bts_alloc(network, 0); const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b49518..336ccaf 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bc..b743063 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e1..6ef3f29 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c184..0000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5e..0000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef71230..0000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5507 to look at the new patch set (#2). gsm_data.h: Document all fields of gsm_subscriber_connection Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/5507/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 1cedef0..2e97055 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -75,20 +75,26 @@ /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - /* bsc structures */ - struct osmo_bsc_sccp_con *sccp_con; /* BSC */ + /* SCCP connection associatd with this subscriber_connection */ + struct osmo_bsc_sccp_con *sccp_con; /* back pointers */ struct gsm_network *network; - struct gsm_lchan *lchan; /* BSC */ - struct gsm_lchan *ho_lchan; /* BSC */ - struct gsm_bts *bts; /* BSC */ + /* the primary / currently active lchan to the BTS/subscriber */ + struct gsm_lchan *lchan; + /* the future/allocated but not yet used lchan during HANDOVER */ + struct gsm_lchan *ho_lchan; + /* a short-hand pointer to the BTS currently serving the subscriber, + * points to gsm_subscriber_connection.lchan->ts->trx->bts */ + struct gsm_bts *bts; - /* for assignment handling */ - struct osmo_timer_list T10; /* BSC */ - struct gsm_lchan *secondary_lchan; /* BSC */ + /* timer for assignment handling */ + struct osmo_timer_list T10; + /* the future allocated but not yet used lchan during ASSIGNMENT */ + struct gsm_lchan *secondary_lchan; + /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; uint16_t lac; -- To view, visit https://gerrit.osmocom.org/5507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: Remove unused RRLP options/codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5476 to look at the new patch set (#3). Remove unused RRLP options/codec RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/rrlp.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/gsm_data.c 8 files changed, 0 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/5476/3 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 64c3abd..6ad5e59 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -12,7 +12,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1b86f9a..b067fc2 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -44,7 +44,6 @@ pcu_if.h \ pcuif_proto.h \ rest_octets.h \ - rrlp.h \ rs232.h \ signal.h \ socket.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3268426..0f8bcb9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -332,11 +332,6 @@ /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; - /* Radio Resource Location Protocol (TS 04.31) */ - struct { - enum rrlp_mode mode; - } rrlp; - enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ @@ -519,9 +514,6 @@ enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); const char *gsm_auth_policy_name(enum gsm_auth_policy policy); - -enum rrlp_mode rrlp_mode_parse(const char *arg); -const char *rrlp_mode_name(enum rrlp_mode mode); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 9bbcabd..5d9b570 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -34,14 +34,6 @@ struct osmo_bsc_sccp_con; -/* RRLP mode of operation */ -enum rrlp_mode { - RRLP_MODE_NONE, - RRLP_MODE_MS_BASED, - RRLP_MODE_MS_PREF, - RRLP_MODE_ASS_PREF, -}; - /* Channel Request reason */ enum gsm_chreq_reason_t { GSM_CHREQ_REASON_EMERG, diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h deleted file mode 100644 index c89402a..0000000 --- a/include/osmocom/bsc/rrlp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RRLP_H -#define _RRLP_H - -void on_dso_load_rrlp(void); - -#endif /* _RRLP_H */ - diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 9500645..6fa8e04 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -180,8 +180,6 @@ VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", @@ -817,8 +815,6 @@ vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index beb936b..8f6e4ef 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -133,22 +133,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, - "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", - "Radio Resource Location Protocol\n" - "Set the Radio Resource Location Protocol Mode\n" - "Don't send RRLP request\n" - "Request MS-based location\n" - "Request any location, prefer MS-based\n" - "Request any location, prefer MS-assisted\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, "mm info (0|1)", "Mobility Management\n" @@ -282,7 +266,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..514708b 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -138,24 +138,6 @@ return get_value_string(auth_policy_names, policy); } -static const struct value_string rrlp_mode_names[] = { - { RRLP_MODE_NONE, "none" }, - { RRLP_MODE_MS_BASED, "ms-based" }, - { RRLP_MODE_MS_PREF, "ms-preferred" }, - { RRLP_MODE_ASS_PREF, "ass-preferred" }, - { 0, NULL } -}; - -enum rrlp_mode rrlp_mode_parse(const char *arg) -{ - return get_string_value(rrlp_mode_names, arg); -} - -const char *rrlp_mode_name(enum rrlp_mode mode) -{ - return get_value_string(rrlp_mode_names, mode); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, -- To view, visit https://gerrit.osmocom.org/5476 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect... In-Reply-To: References: Message-ID: remove unused 'lac' member of 'struct gsm_subscriber_connection' This field was used in write-pnly mode, i.e. set but never read. Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/08/5508/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 2e97055..3cc3794 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -96,8 +96,6 @@ /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; - - uint16_t lac; }; diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 6ff1688..9ec51af 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -261,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; -- To view, visit https://gerrit.osmocom.org/5508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus vty config for LU reject cause In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5477 to look at the new patch set (#3). Remove bogus vty config for LU reject cause The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs_vty.c 4 files changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/5477/3 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0f8bcb9..8e4dc04 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -280,7 +280,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm48_reject_value reject_cause; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 6fa8e04..a73c6a4 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -172,8 +172,6 @@ vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, " Location updating reject cause: %u%s", - net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, @@ -810,8 +808,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " location updating reject cause %u%s", - gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index 59a8d5c..30de0cc 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -42,7 +42,6 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->num_bts = 0; - net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; net->T3103 = GSM_T3103_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 8f6e4ef..2732ebf 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -102,22 +102,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_reject_cause, - cfg_net_reject_cause_cmd, - "location updating reject cause <2-111>", - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Cause Value as Per GSM TS 04.08\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->reject_cause = atoi(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -264,7 +248,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5477 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures In-Reply-To: References: Message-ID: bsc_test.c: Use proper network/bts/lchan structures don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce --- M tests/bsc/bsc_test.c 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/2 diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 1d7baa1..420ef73 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -121,22 +122,20 @@ { int i; - struct gsm_network *net; - struct gsm_bts *bts; + struct gsm_network *net = bsc_network_init(NULL, 1, 1); + struct gsm_bts *bts = gsm_bts_alloc(net, 0); struct osmo_bsc_sccp_con *sccp_con; struct bsc_msc_data *msc; struct gsm_subscriber_connection *conn; - net = talloc_zero(NULL, struct gsm_network); - bts = talloc_zero(net, struct gsm_bts); sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con); msc = talloc_zero(net, struct bsc_msc_data); conn = talloc_zero(net, struct gsm_subscriber_connection); bts->network = net; sccp_con->msc = msc; - conn->bts = bts; conn->sccp_con = sccp_con; + conn->lchan = &bts->c0->ts[1].lchan[0]; /* start testing with proper messages */ printf("Testing BTS<->MSC message scan.\n"); -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5478 to look at the new patch set (#3). Remove bogus MM INFO configuration The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_ctrl_commands.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 5 files changed, 0 insertions(+), 91 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/3 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 8e4dc04..7a1b62d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -278,8 +278,6 @@ /* global parameters */ uint16_t country_code; uint16_t network_code; - char *name_long; - char *name_short; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c index 2d6fcb6..41d2361 100644 --- a/src/libbsc/bsc_ctrl_commands.c +++ b/src/libbsc/bsc_ctrl_commands.c @@ -30,45 +30,8 @@ #include #include -#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \ - CTRL_HELPER_GET_STRING(cmdname, dtype, element) \ - CTRL_HELPER_SET_STRING(cmdname, dtype, element) \ -static struct ctrl_cmd_element cmd_##cmdname = { \ - .name = cmdstr, \ - .get = get_##cmdname, \ - .set = set_##cmdname, \ - .verify = verify_vty_description_string, \ -} - -/** - * Check that there are no newlines or comments or other things - * that could make the VTY configuration unparsable. - */ -static int verify_vty_description_string(struct ctrl_cmd *cmd, - const char *value, void *data) -{ - int i; - const size_t len = strlen(value); - - for (i = 0; i < len; ++i) { - switch(value[i]) { - case '#': - case '\n': - case '\r': - cmd->reply = "String includes illegal character"; - return -1; - default: - break; - } - } - - return 0; -} - CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999); CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999); -CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); -CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -452,8 +415,6 @@ int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 34dfd36..c5a75aa 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -536,9 +536,6 @@ if (!bsc_gsmnet) return -ENOMEM; - bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); - bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); - return 0; } diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index a73c6a4..7612eda 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -167,18 +167,12 @@ vty_out(vty, "BSC is on Country Code %u, Network Code %u " "and has %u BTS%s", net->country_code, net->network_code, net->num_bts, VTY_NEWLINE); - vty_out(vty, " Long network name: '%s'%s", - net->name_long, VTY_NEWLINE); - vty_out(vty, " Short network name: '%s'%s", - net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, - VTY_NEWLINE); - vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", VTY_NEWLINE); @@ -806,12 +800,9 @@ vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); - vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); - vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 2732ebf..35c13dd 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -80,28 +80,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_name_short, - cfg_net_name_short_cmd, - "short name NAME", - "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_long, - cfg_net_name_long_cmd, - "long name NAME", - "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -113,19 +91,6 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->a5_encryption = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, - "mm info (0|1)", - "Mobility Management\n" - "Send MM INFO after LOC UPD ACCEPT\n" - "Disable\n" "Enable\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->send_mm_info = atoi(argv[0]); return CMD_SUCCESS; } @@ -246,10 +211,7 @@ install_node(&net_node, config_write_net); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); - install_element(GSMNET_NODE, &cfg_net_name_short_cmd); - install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5478 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() In-Reply-To: References: Message-ID: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() This is a new inline function that hides all accesses to conn->bts. A follow-up patch will then point this to conn->lchan->ts->trx->bts to get rid of the bts field. Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/bsc_vty.c M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_sigtran.c 8 files changed, 29 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/10/5510/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3cc3794..45fbcd2 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -98,6 +98,10 @@ struct gsm_classmark classmark; }; +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + return conn->bts; +} + #include "gsm_data_shared.h" diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 9ec51af..bd55dfc 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -214,7 +214,7 @@ chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H; - new_lchan = lchan_alloc(conn->bts, chan_type, 0); + new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0); if (!new_lchan) { LOGP(DMSC, LOGL_NOTICE, "No free channel.\n"); @@ -451,7 +451,7 @@ conn->lchan = conn->secondary_lchan; conn->secondary_lchan = NULL; - if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) rsl_ipacc_crcx(conn->lchan); api->assign_compl(conn, gh->data[0], diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 7612eda..6d01109 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -1378,7 +1378,7 @@ /* Find the connection/lchan that we want to handover */ llist_for_each_entry(conn, &net->subscr_conns, entry) { - if (conn->bts->nr == bts_nr && + if (conn_get_bts(conn)->nr == bts_nr && conn->lchan->ts->trx->nr == trx_nr && conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) { vty_out(vty, "starting handover for lchan %s...%s", diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index a2a8630..1caaeee 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -115,7 +115,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_initial(gh, msgb_l3len(msg), &req, @@ -136,7 +136,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = conn->sccp_con->msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_data(gh, msgb_l3len(msg), &req, @@ -228,7 +228,7 @@ if (!msc) { LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n"); bsc_send_ussd_no_srv(conn, msg, - conn->bts->network->bsc_data->ussd_no_msc_txt); + conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt); return -1; } @@ -287,8 +287,8 @@ network_code = get_network_code_for_msc(conn->sccp_con->msc); country_code = get_country_code_for_msc(conn->sccp_con->msc); - lac = get_lac_for_msc(conn->sccp_con->msc, conn->bts); - ci = get_ci_for_msc(conn->sccp_con->msc, conn->bts); + lac = get_lac_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); + ci = get_ci_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); bsc_scan_bts_msg(conn, msg); @@ -383,7 +383,7 @@ /* * Check if the connection should be moved... */ - llist_for_each_entry(msc, &conn->bts->network->bsc_data->mscs, entry) { + llist_for_each_entry(msc, &conn_get_bts(conn)->network->bsc_data->mscs, entry) { if (msc->type != MSC_CON_TYPE_LOCAL) continue; if (!msc->local_pref) @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 82367f0..433dc6c 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -85,7 +85,7 @@ * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { + } else if (is_ipaccess_bts(conn_get_bts(con)) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f2d0f4..e3ae000 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -432,7 +432,7 @@ goto reject; } - network = conn->conn->bts->network; + network = conn_get_bts(conn->conn)->network; data = TLVP_VAL(&tp, GSM0808_IE_ENCRYPTION_INFORMATION); enc_bits_msc = data[0]; enc_key = &data[1]; diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 17dddf8..56c0a9c 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -35,19 +35,20 @@ struct gsm48_loc_upd_req *lu; struct gsm48_loc_area_id lai; struct gsm_network *net; + struct gsm_bts *bts = conn_get_bts(conn); if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu)) { LOGP(DMSC, LOGL_ERROR, "LU too small to look at: %u\n", msgb_l3len(msg)); return; } - net = conn->bts->network; + net = bts->network; gh = msgb_l3(msg); lu = (struct gsm48_loc_upd_req *) gh->data; gsm48_generate_lai(&lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) { LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n"); @@ -105,7 +106,7 @@ return -1; } - paging_request_stop(&conn->network->bts_list, conn->bts, subscr, conn, + paging_request_stop(&conn->network->bts_list, conn_get_bts(conn), subscr, conn, msg); bsc_subscr_put(subscr); return 0; @@ -136,7 +137,7 @@ struct bsc_subscr *subscr; int is_emerg = 0; - bsc = conn->bts->network->bsc_data; + bsc = conn->network->bsc_data; if (msgb_l3len(msg) < sizeof(*gh)) { LOGP(DMSC, LOGL_ERROR, "There is no GSM48 header here.\n"); @@ -185,7 +186,7 @@ return NULL; } - pag_msc = paging_get_msc(conn->bts, subscr); + pag_msc = paging_get_msc(conn_get_bts(conn), subscr); bsc_subscr_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { @@ -260,7 +261,7 @@ { struct tlv_parsed tp; int parse_res; - struct gsm_bts *bts = conn->bts; + struct gsm_bts *bts = conn_get_bts(conn); int tzunits; uint8_t tzbsd = 0; uint8_t dst = 0; @@ -337,6 +338,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct bsc_msc_data *msc; + struct gsm_bts *bts = conn_get_bts(conn); struct gsm_network *net; struct gsm48_loc_area_id *lai; struct gsm48_hdr *gh; @@ -357,7 +359,7 @@ return 0; mtype = gsm48_hdr_msg_type(gh); - net = conn->bts->network; + net = bts->network; msc = conn->sccp_con->msc; if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) { @@ -367,7 +369,7 @@ lai = (struct gsm48_loc_area_id *) &gh->data[0]; gsm48_generate_lai(lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); } } diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 67f8703..19a36da 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -244,6 +244,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_bsc_sccp_con *bsc_con; + struct gsm_bts *bts = conn_get_bts(conn); int conn_id; OSMO_ASSERT(conn); @@ -259,12 +260,12 @@ return BSC_CON_REJECT_NO_LINK; } - if (!bsc_grace_allow_new_connection(conn->bts->network, conn->bts)) { + if (!bsc_grace_allow_new_connection(bts->network, bts)) { LOGP(DMSC, LOGL_NOTICE, "BSC in grace period. No new connections.\n"); return BSC_CON_REJECT_RF_GRACE; } - bsc_con = talloc_zero(conn->bts, struct osmo_bsc_sccp_con); + bsc_con = talloc_zero(bts, struct osmo_bsc_sccp_con); if (!bsc_con) { LOGP(DMSC, LOGL_ERROR, "Failed to allocate new SIGTRAN connection.\n"); return BSC_CON_NO_MEM; -- To view, visit https://gerrit.osmocom.org/5510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: Remove some more dead code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5479 to look at the new patch set (#3). Remove some more dead code Change-Id: I919bffe88babd90227c89abd4434322965c32ebb --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon-cs/common_cs.c M src/libcommon/gsm_data.c 4 files changed, 0 insertions(+), 163 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/5479/3 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7a1b62d..1cedef0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,9 +24,7 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct gsm_subscriber_group; struct bsc_subscr; -struct vlr_instance; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -40,26 +38,11 @@ #define EARFCN_QRXLV_INVALID 32 #define EARFCN_THRESH_LOW_INVALID 32 -enum gsm_security_event { - GSM_SECURITY_NOAVAIL, - GSM_SECURITY_AUTH_FAILED, - GSM_SECURITY_SUCCEEDED, - GSM_SECURITY_ALREADY, -}; - struct msgb; typedef int gsm_cbfn(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param); - -/* - * A dummy to keep a connection up for at least - * a couple of seconds to work around MSC issues. - */ -struct gsm_anchor_operation { - struct osmo_timer_list timeout; -}; /* Maximum number of neighbor cells whose average we track */ #define MAX_NEIGH_MEAS 10 @@ -75,16 +58,6 @@ uint8_t last_seen_nr; }; -enum ran_type { - RAN_UNKNOWN, - RAN_GERAN_A, /* 2G / A-interface */ - RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */ -}; - -extern const struct value_string ran_type_names[]; -static inline const char *ran_type_name(enum ran_type val) -{ return get_value_string(ran_type_names, val); } - struct gsm_classmark { bool classmark1_set; struct gsm48_classmark1 classmark1; @@ -92,12 +65,6 @@ uint8_t classmark2[3]; uint8_t classmark3_len; uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */ -}; - -enum integrity_protection_state { - INTEGRITY_PROTECTION_NONE = 0, - INTEGRITY_PROTECTION_IK = 1, - INTEGRITY_PROTECTION_IK_CK = 2, }; /* active radio connection of a mobile subscriber */ @@ -125,29 +92,6 @@ struct gsm_classmark classmark; uint16_t lac; - struct gsm_encr encr; - - struct { - unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; - } rtp; - - struct { - /* A pointer to the SCCP user that handles - * the SCCP connections for this subscriber - * connection */ - struct osmo_sccp_user *scu; - - /* The address of the BSC that is associated - * with this subscriber connection */ - struct osmo_sccp_addr bsc_addr; - - /* The connection identifier that is used - * to reference the SCCP connection that is - * associated with this subscriber connection */ - int conn_id; - } a; }; @@ -241,13 +185,6 @@ bsc_ctr_description, }; -enum gsm_auth_policy { - GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ - GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ - GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ - GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ -}; - #define GSM_T3101_DEFAULT 3 /* s */ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ @@ -280,7 +217,6 @@ uint16_t network_code; int a5_encryption; int neci; - int send_mm_info; struct { int active; /* Window RXLEV averaging */ @@ -299,7 +235,6 @@ } handover; struct rate_ctr_group *bsc_ctrs; - struct osmo_counter *active_calls; /* * TODO: Move the trans_list into the subscriber connection and @@ -361,12 +296,6 @@ * pointer is NULL to indicate absence of a bsc_subscribers list. */ struct llist_head *bsc_subscribers; - /* MSC: GSUP server address of the HLR */ - const char *gsup_server_addr_str; - uint16_t gsup_server_port; - - struct vlr_instance *vlr; - /* Periodic location update default value */ uint8_t t3212; @@ -374,65 +303,6 @@ struct mgcp_client_conf *conf; struct mgcp_client *client; } mgw; - - struct { - /* CS7 instance id number (set via VTY) */ - uint32_t cs7_instance; - /* A list with the context information about - * all BSCs we have connections with */ - struct llist_head bscs; - struct osmo_sccp_instance *sccp; - } a; -}; - -struct osmo_esme; - -enum gsm_sms_source_id { - SMS_SOURCE_UNKNOWN = 0, - SMS_SOURCE_MS, /* received from MS */ - SMS_SOURCE_VTY, /* received from VTY */ - SMS_SOURCE_SMPP, /* received via SMPP */ -}; - -#define SMS_HDR_SIZE 128 -#define SMS_TEXT_SIZE 256 - -struct gsm_sms_addr { - uint8_t ton; - uint8_t npi; - char addr[21+1]; -}; - -struct gsm_sms { - unsigned long long id; - struct gsm_sms_addr src, dst; - enum gsm_sms_source_id source; - - struct { - uint8_t transaction_id; - uint32_t msg_ref; - } gsm411; - - struct { - struct osmo_esme *esme; - uint32_t sequence_nr; - int transaction_mode; - char msg_id[16]; - } smpp; - - unsigned long validity_minutes; - time_t created; - bool is_report; - uint8_t reply_path_req; - uint8_t status_rep_req; - uint8_t ud_hdr_ind; - uint8_t protocol_id; - uint8_t data_coding_scheme; - uint8_t msg_ref; - uint8_t user_data_len; - uint8_t user_data[SMS_TEXT_SIZE]; - - char text[SMS_TEXT_SIZE]; }; extern void talloc_ctx_init(void *ctx_root); @@ -508,9 +378,6 @@ return 0; } - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); -const char *gsm_auth_policy_name(enum gsm_auth_policy policy); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 5d9b570..db854fd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -83,7 +83,6 @@ }; struct gsm_lchan; -struct gsm_mncc; struct osmo_rtp_socket; struct rtp_socket; struct bsc_api; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index b410b17..39df45e 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -58,11 +58,7 @@ net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); - net->active_calls = osmo_counter_alloc("msc.active_calls"); - net->dyn_ts_allow_tch_f = true; - - INIT_LLIST_HEAD(&net->a.bscs); return net; } diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 514708b..87d954a 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -120,24 +120,6 @@ return NULL; } -static const struct value_string auth_policy_names[] = { - { GSM_AUTH_POLICY_CLOSED, "closed" }, - { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, - { GSM_AUTH_POLICY_TOKEN, "token" }, - { GSM_AUTH_POLICY_REGEXP, "regexp" }, - { 0, NULL } -}; - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg) -{ - return get_string_value(auth_policy_names, arg); -} - -const char *gsm_auth_policy_name(enum gsm_auth_policy policy) -{ - return get_value_string(auth_policy_names, policy); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, @@ -433,10 +415,3 @@ rev_lev = (cm->classmark2[0] >> 5) & 0x3; return rev_lev >= 2; } - -const struct value_string ran_type_names[] = { - OSMO_VALUE_STRING(RAN_UNKNOWN), - OSMO_VALUE_STRING(RAN_GERAN_A), - OSMO_VALUE_STRING(RAN_UTRAN_IU), - { 0, NULL } -}; -- To view, visit https://gerrit.osmocom.org/5479 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I919bffe88babd90227c89abd4434322965c32ebb Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: remove obsolete gsm_subscriber_connection.bts member In-Reply-To: References: Message-ID: remove obsolete gsm_subscriber_connection.bts member This member was merely a cache for conn->lchan->ts->trx->bts, so let's avoid having to keep copies of the same data (which needs to be kept up to date). Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/handover_logic.c 3 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/5511/2 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 45fbcd2..05260c6 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -85,9 +85,6 @@ struct gsm_lchan *lchan; /* the future/allocated but not yet used lchan during HANDOVER */ struct gsm_lchan *ho_lchan; - /* a short-hand pointer to the BTS currently serving the subscriber, - * points to gsm_subscriber_connection.lchan->ts->trx->bts */ - struct gsm_bts *bts; /* timer for assignment handling */ struct osmo_timer_list T10; @@ -98,13 +95,14 @@ struct gsm_classmark classmark; }; -static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { - return conn->bts; -} - #include "gsm_data_shared.h" +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + OSMO_ASSERT(conn->lchan); + return conn->lchan->ts->trx->bts; +} + enum { BTS_CTR_CHREQ_TOTAL, BTS_CTR_CHREQ_NO_CHANNEL, diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index bd55dfc..e015a02 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -260,7 +260,6 @@ conn->network = net; conn->lchan = lchan; - conn->bts = lchan->ts->trx->bts; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; @@ -747,7 +746,6 @@ conn->lchan = NULL; conn->secondary_lchan = NULL; conn->ho_lchan = NULL; - conn->bts = NULL; osmo_timer_del(&conn->T10); diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index a30cd09..5ad1392 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -277,7 +277,6 @@ new_lchan->conn->ho_lchan = NULL; new_lchan->conn->lchan = new_lchan; - new_lchan->conn->bts = new_lchan->ts->trx->bts; ho->old_lchan->conn = NULL; lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END); -- To view, visit https://gerrit.osmocom.org/5511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc In-Reply-To: References: Message-ID: remove libosmo-sccp dependency for osmo-bsc libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d --- M include/osmocom/bsc/osmo_bsc.h M src/libfilter/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_msc.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c M tests/bsc/Makefile.am 9 files changed, 6 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/02/5502/2 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 8a5cd30..0fd29b7 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -15,7 +15,6 @@ BSC_CON_NO_MEM, }; -struct sccp_connection; struct bsc_msc_data; struct bsc_msc_connection; @@ -47,10 +46,7 @@ int send_ping; /* SCCP connection realted */ - struct sccp_connection *sccp; struct bsc_msc_data *msc; - struct osmo_timer_list sccp_it_timeout; - struct osmo_timer_list sccp_cc_timeout; struct llist_head sccp_queue; unsigned int sccp_queue_size; diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am index 6d3db0b..41a75bd 100644 --- a/src/libfilter/Makefile.am +++ b/src/libfilter/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 4acbe56..7978852 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -11,7 +11,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -45,7 +44,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index c388f5b..152b818 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -29,7 +29,6 @@ #include #include -#include #include #define return_when_not_connected(conn) \ @@ -296,13 +295,11 @@ resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci); if (!resp) { LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n"); - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); return BSC_API_CONN_POL_REJECT; } if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) { - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); msgb_free(resp); return BSC_API_CONN_POL_REJECT; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 829f207..e4c8fc5 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -43,7 +43,6 @@ #include -#include #include #define _GNU_SOURCE @@ -233,9 +232,6 @@ /* seed the PRNG */ srand(time(NULL)); - - /* initialize SCCP */ - sccp_set_log_area(DSCCP); /* Read the config */ rc = bsc_network_configure(config_file); diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 0e5777e..46be2e6 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -34,8 +34,6 @@ #include -#include - #include #include diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index a18d4f3..7669b67 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -511,7 +510,8 @@ /* If unset, use default local SCCP address */ if (!msc->a.bsc_addr.presence) - osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); + osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, @@ -524,7 +524,7 @@ if (!msc->a.msc_addr.presence) osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), - SCCP_SSN_BSSAP); + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index a87b20f..f01e6f7 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -28,7 +28,6 @@ #include #include -#include #include @@ -663,14 +662,14 @@ static void enforce_standard_ssn(struct vty *vty, struct osmo_sccp_addr *addr) { if (addr->presence & OSMO_SCCP_ADDR_T_SSN) { - if (addr->ssn != SCCP_SSN_BSSAP) + if (addr->ssn != OSMO_SCCP_SSN_BSSAP) vty_out(vty, "setting an SSN (%u) different from the standard (%u) is not allowd, will use standard SSN for address: %s%s", - addr->ssn, SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); + addr->ssn, OSMO_SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); } addr->presence |= OSMO_SCCP_ADDR_T_SSN; - addr->ssn = SCCP_SSN_BSSAP; + addr->ssn = OSMO_SCCP_SSN_BSSAP; } DEFUN(cfg_msc_cs7_bsc_addr, diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 96f87f5..ebeb1ed 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -37,7 +36,6 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOLEGACYMGCP_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5502 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:13:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:13:42 +0000 Subject: [PATCH] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment In-Reply-To: References: Message-ID: osmo_bsc_bssap.c: Spelling fixes in comment Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/5503/2 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4fd43aa..aea3994 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -385,7 +385,7 @@ * a cipher we will have to send cipher mode reject to the MSC, * otherwise we will have to pick something that we and the MS * is supporting. Currently we are doing it in a rather static - * way by picking one ecnryption or no encrytpion. + * way by picking one encryption or no encryption. */ static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int payload_length) @@ -613,7 +613,7 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - /* Forward the assingment request to lower layers */ + /* Forward the assignment request to lower layers */ if (aoip) { /* Store network side RTP connection information, we will * process this address later after we have established an RTP @@ -626,7 +626,7 @@ /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP - * endpoints, calling gsm0808_assign_req(), rsponding to + * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); if (!conn->mgcp_ctx) { -- To view, visit https://gerrit.osmocom.org/5503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:16:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 17:16:05 +0000 Subject: python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Patch Set 2: How to reproduce the issues you mention in commit log? -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:21:24 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 19 Dec 2017 17:21:24 +0000 Subject: [PATCH] osmo-sgsn[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5512 to look at the new patch set (#2). Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not SGSN-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 8 files changed, 2 insertions(+), 863 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/12/5512/2 diff --git a/Makefile.am b/Makefile.am index d57b66d..38fdcba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) pkgconfigdir = $(libdir)/pkgconfig diff --git a/configure.ac b/configure.ac index 8f279fd..2de31cc 100644 --- a/configure.ac +++ b/configure.ac @@ -197,5 +197,4 @@ tests/v42bis/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index e9d73ff..57ef82e 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index eeb151c..afe1cfd 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/5512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:19 +0000 Subject: [PATCH] osmo-bsc[master]: Remove dead code left over from NITB split In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5475 to look at the new patch set (#4). Remove dead code left over from NITB split There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 --- M configure.ac M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/auth.h M include/osmocom/bsc/bss.h M include/osmocom/bsc/chan_alloc.h M include/osmocom/bsc/common_bsc.h M include/osmocom/bsc/common_cs.h D include/osmocom/bsc/crc24.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/gsm_subscriber.h M include/osmocom/bsc/ipaccess.h D include/osmocom/bsc/mncc.h D include/osmocom/bsc/mncc_int.h D include/osmocom/bsc/msc_ifaces.h D include/osmocom/bsc/rtp_proxy.h M include/osmocom/bsc/signal.h D include/osmocom/bsc/silent_call.h D include/osmocom/bsc/smpp.h D include/osmocom/bsc/sms_queue.h D include/osmocom/bsc/transaction.h D include/osmocom/bsc/trau_mux.h D include/osmocom/bsc/trau_upqueue.h M src/Makefile.am M src/ipaccess/Makefile.am M src/ipaccess/ipaccess-config.c M src/libbsc/abis_rsl.c M src/libbsc/bsc_api.c M src/libbsc/bsc_init.c M src/libbsc/chan_alloc.c M src/libbsc/e1_config.c M src/libbsc/gsm_04_08_utils.c M src/libbsc/handover_logic.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/Makefile.am M src/libcommon/common_vty.c D src/libcommon/gsm_subscriber_base.c M src/libcommon/talloc_ctx.c D src/libtrau/Makefile.am D src/libtrau/rtp_proxy.c D src/libtrau/trau_mux.c D src/libtrau/trau_upqueue.c M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_filter.c M src/utils/Makefile.am M src/utils/bs11_config.c M tests/Makefile.am M tests/abis/Makefile.am M tests/bsc-nat-trie/Makefile.am M tests/bsc-nat/Makefile.am M tests/bsc/Makefile.am M tests/bsc/bsc_test.c M tests/bssap/Makefile.am M tests/bssap/bssap_test.c M tests/channel/channel_test.c M tests/gsm0408/Makefile.am M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/Makefile.am M tests/subscr/Makefile.am M tests/testsuite.at D tests/trau/Makefile.am D tests/trau/trau_test.c D tests/trau/trau_test.ok 68 files changed, 25 insertions(+), 2,484 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/4 diff --git a/configure.ac b/configure.ac index b7dd016..540d2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ include/osmocom/Makefile include/osmocom/bsc/Makefile src/Makefile - src/libtrau/Makefile src/libbsc/Makefile src/libcommon/Makefile src/libfilter/Makefile @@ -161,7 +160,6 @@ tests/bsc-nat/Makefile tests/bsc-nat-trie/Makefile tests/abis/Makefile - tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile tests/bssap/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..1b86f9a 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,7 +4,6 @@ abis_om2000.h \ abis_rsl.h \ arfcn_range_encode.h \ - auth.h \ bsc_msc.h \ bsc_msg_filter.h \ bsc_nat.h \ @@ -18,7 +17,6 @@ common.h \ common_bsc.h \ common_cs.h \ - crc24.h \ ctrl.h \ debug.h \ e1_config.h \ @@ -26,16 +24,12 @@ gsm_04_80.h \ gsm_data.h \ gsm_data_shared.h \ - gsm_subscriber.h \ handover.h \ handover_decision.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ misdn.h \ - mncc.h \ - mncc_int.h \ - msc_ifaces.h \ nat_rewrite_trie.h \ network_listen.h \ openbscdefines.h \ @@ -52,15 +46,9 @@ rest_octets.h \ rrlp.h \ rs232.h \ - rtp_proxy.h \ signal.h \ - silent_call.h \ - sms_queue.h \ socket.h \ system_information.h \ - transaction.h \ - trau_mux.h \ - trau_upqueue.h \ ussd.h \ vty.h \ bsc_api.h \ diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h deleted file mode 100644 index b314bbf..0000000 --- a/include/osmocom/bsc/auth.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _AUTH_H -#define _AUTH_H - -#include - -struct gsm_auth_tuple; - -enum auth_action { - AUTH_ERROR = -1, /* Internal error */ - AUTH_NOT_AVAIL = 0, /* No auth tuple available */ - AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ - AUTH_DO_CIPH = 2, /* Only ciphering */ - AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ -}; - -extern const struct value_string auth_action_names[]; -static inline const char *auth_action_str(enum auth_action a) -{ - return get_value_string(auth_action_names, a); -} - -#endif /* _AUTH_H */ diff --git a/include/osmocom/bsc/bss.h b/include/osmocom/bsc/bss.h index b12487d..9891f5f 100644 --- a/include/osmocom/bsc/bss.h +++ b/include/osmocom/bsc/bss.h @@ -6,7 +6,7 @@ struct msgb; /* start and stop network */ -extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_alloc(void); extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 320fa94..62d0286 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -24,9 +24,6 @@ struct gsm_subscriber_connection; -/* Find an allocated channel for a specified subscriber */ -struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub); - /* Allocate a logical channel (SDCCH, TCH, ...) */ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger); diff --git a/include/osmocom/bsc/common_bsc.h b/include/osmocom/bsc/common_bsc.h index 08394e9..32e5097 100644 --- a/include/osmocom/bsc/common_bsc.h +++ b/include/osmocom/bsc/common_bsc.h @@ -5,5 +5,4 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); diff --git a/include/osmocom/bsc/common_cs.h b/include/osmocom/bsc/common_cs.h index 09a4b02..c2e8515 100644 --- a/include/osmocom/bsc/common_cs.h +++ b/include/osmocom/bsc/common_cs.h @@ -6,8 +6,6 @@ struct msgb; struct gsm_network; -typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); - struct vty; #define MAX_A5_KEY_LEN (128/8) @@ -20,8 +18,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); int common_cs_vty_init(struct gsm_network *network, int (* config_write_net )(struct vty *)); diff --git a/include/osmocom/bsc/crc24.h b/include/osmocom/bsc/crc24.h deleted file mode 100644 index 756638c..0000000 --- a/include/osmocom/bsc/crc24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CRC24_H -#define _CRC24_H - -#include - -#define INIT_CRC24 0xffffff - -uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); - -#endif diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cbb809b..3268426 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,11 +24,9 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; struct vlr_instance; -struct vlr_subscr; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -107,34 +105,8 @@ /* global linked list of subscriber_connections */ struct llist_head entry; - /* usage count. If this drops to zero, we start the release - * towards A/Iu */ - uint32_t use_count; - - /* The MS has opened the conn with a CM Service Request, and we shall - * keep it open for an actual request (or until timeout). */ - bool received_cm_service_request; - /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - - /* libmsc/libvlr subscriber information (if available) */ - struct vlr_subscr *vsub; - - /* LU expiration handling */ - uint8_t expire_timer_stopped; - /* SMS helpers for libmsc */ - uint8_t next_rp_ref; - - struct osmo_fsm_inst *conn_fsm; - - /* Are we part of a special "silent" call */ - int silent_call; - - /* MNCC rtp bridge markers */ - int mncc_rtp_bridge; - int mncc_rtp_create_pending; - int mncc_rtp_connect_pending; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; /* BSC */ @@ -142,7 +114,6 @@ /* back pointers */ struct gsm_network *network; - bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -150,9 +121,6 @@ /* for assignment handling */ struct osmo_timer_list T10; /* BSC */ struct gsm_lchan *secondary_lchan; /* BSC */ - - /* connected via 2G or 3G? */ - enum ran_type via_ran; struct gsm_classmark classmark; @@ -336,10 +304,6 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_counter *active_calls; - /* layer 4 */ - struct mncc_sock_state *mncc_state; - mncc_recv_cb_t mncc_recv; - struct llist_head upqueue; /* * TODO: Move the trans_list into the subscriber connection and * create a pending list for MT transactions. These exist before @@ -380,8 +344,6 @@ /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - - struct gsm_sms_queue *sms_queue; /* control interface */ struct ctrl_handle *ctrl; @@ -451,7 +413,6 @@ struct gsm_sms { unsigned long long id; - struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index e762c24..9bbcabd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -33,7 +33,6 @@ struct osmo_bsc_data; struct osmo_bsc_sccp_con; -struct gsm_sms_queue; /* RRLP mode of operation */ enum rrlp_mode { diff --git a/include/osmocom/bsc/gsm_subscriber.h b/include/osmocom/bsc/gsm_subscriber.h deleted file mode 100644 index ca66d47..0000000 --- a/include/osmocom/bsc/gsm_subscriber.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _GSM_SUBSCR_H -#define _GSM_SUBSCR_H - -#include - -#include -#include - -#include - -#define GSM_NAME_LENGTH 160 - -#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ -#define GSM_MIN_EXTEN 20000 -#define GSM_MAX_EXTEN 49999 - -#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 -/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ - -#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 - -enum gsm_subscriber_field { - GSM_SUBSCRIBER_IMSI, - GSM_SUBSCRIBER_TMSI, - GSM_SUBSCRIBER_EXTENSION, - GSM_SUBSCRIBER_ID, -}; - -enum gsm_subscriber_update_reason { - GSM_SUBSCRIBER_UPDATE_ATTACHED, - GSM_SUBSCRIBER_UPDATE_DETACHED, - GSM_SUBSCRIBER_UPDATE_EQUIPMENT, -}; - -/* - * Struct for pending channel requests. This is managed in the - * llist_head requests of each subscriber. The reference counting - * should work in such a way that a subscriber with a pending request - * remains in memory. - */ -struct subscr_request { - struct llist_head entry; - - /* human readable label to be able to log pending request kinds */ - const char *label; - - /* the callback data */ - gsm_cbfn *cbfn; - void *param; -}; - -int subscr_update(struct vlr_subscr *vsub, int reason); - -/* - * Paging handling with authentication - */ -struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub, - gsm_cbfn *cbfn, void *param, - const char *label); - -void subscr_remove_request(struct subscr_request *req); -int subscr_rx_paging_response(struct msgb *msg, - struct gsm_subscriber_connection *conn); - -int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, - struct msgb *msg, void *data, void *param); - -#endif /* _GSM_SUBSCR_H */ diff --git a/include/osmocom/bsc/ipaccess.h b/include/osmocom/bsc/ipaccess.h index 82e89c2..3d0f612 100644 --- a/include/osmocom/bsc/ipaccess.h +++ b/include/osmocom/bsc/ipaccess.h @@ -2,11 +2,13 @@ #define _IPACCESS_H #include -#include "gsm_subscriber.h" #include #include #include +struct gsm_bts; +struct gsm_bts_trx; + struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; diff --git a/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h deleted file mode 100644 index 881e041..0000000 --- a/include/osmocom/bsc/mncc.h +++ /dev/null @@ -1,215 +0,0 @@ -/* GSM Mobile Radio Interface Layer 3 messages on the A-bis interface - * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */ - -/* (C) 2008-2009 by Harald Welte - * (C) 2008, 2009 by Holger Hans Peter Freyther - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#ifndef _MNCC_H -#define _MNCC_H - -#include -#include - -#include - -struct gsm_network; -struct msgb; - - -/* One end of a call */ -struct gsm_call { - struct llist_head entry; - - /* network handle */ - void *net; - - /* the 'local' transaction */ - uint32_t callref; - /* the 'remote' transaction */ - uint32_t remote_ref; -}; - -#define MNCC_SETUP_REQ 0x0101 -#define MNCC_SETUP_IND 0x0102 -#define MNCC_SETUP_RSP 0x0103 -#define MNCC_SETUP_CNF 0x0104 -#define MNCC_SETUP_COMPL_REQ 0x0105 -#define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ -#define MNCC_CALL_CONF_IND 0x0107 -#define MNCC_CALL_PROC_REQ 0x0108 -#define MNCC_PROGRESS_REQ 0x0109 -#define MNCC_ALERT_REQ 0x010a -#define MNCC_ALERT_IND 0x010b -#define MNCC_NOTIFY_REQ 0x010c -#define MNCC_NOTIFY_IND 0x010d -#define MNCC_DISC_REQ 0x010e -#define MNCC_DISC_IND 0x010f -#define MNCC_REL_REQ 0x0110 -#define MNCC_REL_IND 0x0111 -#define MNCC_REL_CNF 0x0112 -#define MNCC_FACILITY_REQ 0x0113 -#define MNCC_FACILITY_IND 0x0114 -#define MNCC_START_DTMF_IND 0x0115 -#define MNCC_START_DTMF_RSP 0x0116 -#define MNCC_START_DTMF_REJ 0x0117 -#define MNCC_STOP_DTMF_IND 0x0118 -#define MNCC_STOP_DTMF_RSP 0x0119 -#define MNCC_MODIFY_REQ 0x011a -#define MNCC_MODIFY_IND 0x011b -#define MNCC_MODIFY_RSP 0x011c -#define MNCC_MODIFY_CNF 0x011d -#define MNCC_MODIFY_REJ 0x011e -#define MNCC_HOLD_IND 0x011f -#define MNCC_HOLD_CNF 0x0120 -#define MNCC_HOLD_REJ 0x0121 -#define MNCC_RETRIEVE_IND 0x0122 -#define MNCC_RETRIEVE_CNF 0x0123 -#define MNCC_RETRIEVE_REJ 0x0124 -#define MNCC_USERINFO_REQ 0x0125 -#define MNCC_USERINFO_IND 0x0126 -#define MNCC_REJ_REQ 0x0127 -#define MNCC_REJ_IND 0x0128 - -#define MNCC_BRIDGE 0x0200 -#define MNCC_FRAME_RECV 0x0201 -#define MNCC_FRAME_DROP 0x0202 -#define MNCC_LCHAN_MODIFY 0x0203 -#define MNCC_RTP_CREATE 0x0204 -#define MNCC_RTP_CONNECT 0x0205 -#define MNCC_RTP_FREE 0x0206 - -#define GSM_TCHF_FRAME 0x0300 -#define GSM_TCHF_FRAME_EFR 0x0301 -#define GSM_TCHH_FRAME 0x0302 -#define GSM_TCH_FRAME_AMR 0x0303 -#define GSM_BAD_FRAME 0x03ff - -#define MNCC_SOCKET_HELLO 0x0400 - -#define GSM_MAX_FACILITY 128 -#define GSM_MAX_SSVERSION 128 -#define GSM_MAX_USERUSER 128 - -#define MNCC_F_BEARER_CAP 0x0001 -#define MNCC_F_CALLED 0x0002 -#define MNCC_F_CALLING 0x0004 -#define MNCC_F_REDIRECTING 0x0008 -#define MNCC_F_CONNECTED 0x0010 -#define MNCC_F_CAUSE 0x0020 -#define MNCC_F_USERUSER 0x0040 -#define MNCC_F_PROGRESS 0x0080 -#define MNCC_F_EMERGENCY 0x0100 -#define MNCC_F_FACILITY 0x0200 -#define MNCC_F_SSVERSION 0x0400 -#define MNCC_F_CCCAP 0x0800 -#define MNCC_F_KEYPAD 0x1000 -#define MNCC_F_SIGNAL 0x2000 - -struct gsm_mncc { - /* context based information */ - uint32_t msg_type; - uint32_t callref; - - /* which fields are present */ - uint32_t fields; - - /* data derived informations (MNCC_F_ based) */ - struct gsm_mncc_bearer_cap bearer_cap; - struct gsm_mncc_number called; - struct gsm_mncc_number calling; - struct gsm_mncc_number redirecting; - struct gsm_mncc_number connected; - struct gsm_mncc_cause cause; - struct gsm_mncc_progress progress; - struct gsm_mncc_useruser useruser; - struct gsm_mncc_facility facility; - struct gsm_mncc_cccap cccap; - struct gsm_mncc_ssversion ssversion; - struct { - int sup; - int inv; - } clir; - int signal; - - /* data derived information, not MNCC_F based */ - int keypad; - int more; - int notify; /* 0..127 */ - int emergency; - char imsi[16]; -}; - -struct gsm_data_frame { - uint32_t msg_type; - uint32_t callref; - unsigned char data[0]; -}; - -#define MNCC_SOCK_VERSION 5 -struct gsm_mncc_hello { - uint32_t msg_type; - uint32_t version; - - /* send the sizes of the structs */ - uint32_t mncc_size; - uint32_t data_frame_size; - - /* send some offsets */ - uint32_t called_offset; - uint32_t signal_offset; - uint32_t emergency_offset; -}; - -struct gsm_mncc_rtp { - uint32_t msg_type; - uint32_t callref; - uint32_t ip; - uint16_t port; - uint32_t payload_type; - uint32_t payload_msg_type; -}; - -struct gsm_mncc_bridge { - uint32_t msg_type; - uint32_t callref[2]; -}; - -const char *get_mncc_name(int value); -void mncc_set_cause(struct gsm_mncc *data, int loc, int val); -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_builtin */ -int int_mncc_recv(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_sock */ -int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg); - -int mncc_sock_init(struct gsm_network *net, const char *sock_path); - -#define mncc_is_data_frame(msg_type) \ - (msg_type == GSM_TCHF_FRAME \ - || msg_type == GSM_TCHF_FRAME_EFR \ - || msg_type == GSM_TCHH_FRAME \ - || msg_type == GSM_TCH_FRAME_AMR \ - || msg_type == GSM_BAD_FRAME) - - -#endif diff --git a/include/osmocom/bsc/mncc_int.h b/include/osmocom/bsc/mncc_int.h deleted file mode 100644 index 213ce14..0000000 --- a/include/osmocom/bsc/mncc_int.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MNCC_INT_H -#define _MNCC_INT_H - -#include - -struct mncc_int { - uint8_t def_codec[2]; -}; - -extern struct mncc_int mncc_int; - -uint8_t mncc_codec_for_mode(int lchan_type); - -#endif diff --git a/include/osmocom/bsc/msc_ifaces.h b/include/osmocom/bsc/msc_ifaces.h deleted file mode 100644 index dadb828..0000000 --- a/include/osmocom/bsc/msc_ifaces.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -/* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, - * i.e. in the direction towards the mobile device (MS aka UE). - * - * 2G will use the A-interface, - * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). - * - * To allow linking parts of the MSC code without having to include entire - * infrastructures of external libraries, the core transmitting and receiving - * functions are left unimplemented. For example, a unit test does not need to - * link against external ASN1 libraries if it is never going to encode actual - * outgoing messages. It is up to each building scope to implement real world - * functions or to plug mere dummy implementations. - * - * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call - * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not - * yet implemented]. When you try to link against libmsc, you will find that - * the compiler complains about an undefined reference to iu_tx(). If you, - * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is - * available. A unit test may instead simply implement a dummy iu_tx() function - * and not link against osmo-iuh, see tests/libiudummy/. - */ - -/* Each main linkage must implement this function (see comment above). */ -extern int iu_tx(struct msgb *msg, uint8_t sapi); - -int msc_tx_dtap(struct gsm_subscriber_connection *conn, - struct msgb *msg); - -int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); -int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, - enum gsm48_reject_value value); - -int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h deleted file mode 100644 index 918420c..0000000 --- a/include/osmocom/bsc/rtp_proxy.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RTP_PROXY_H -#define _RTP_PROXY_H - -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - - -#include - -#include -#include - -#include - -#define RTP_PT_GSM_FULL 3 -#define RTP_PT_GSM_HALF 96 -#define RTP_PT_GSM_EFR 97 -#define RTP_PT_AMR 98 -#define RTP_LEN_GSM_FULL 33 -#define RTP_LEN_GSM_HALF 15 -#define RTP_LEN_GSM_EFR 31 -#define RTP_GSM_DURATION 160 - -enum rtp_rx_action { - RTP_NONE, - RTP_PROXY, - RTP_RECV_UPSTREAM, -}; - -enum rtp_tx_action { - RTP_SEND_NONE, - RTP_SEND_DOWNSTREAM, -}; - -struct rtp_sub_socket { - struct sockaddr_in sin_local; - struct sockaddr_in sin_remote; - - struct osmo_fd bfd; - /* linked list of to-be-transmitted msgb's */ - struct llist_head tx_queue; -}; - -struct rtp_socket { - struct llist_head list; - - struct rtp_sub_socket rtp; - struct rtp_sub_socket rtcp; - - /* what should we do on receive? */ - enum rtp_rx_action rx_action; - union { - struct { - struct rtp_socket *other_sock; - } proxy; - struct { - struct gsm_network *net; - uint32_t callref; - } receive; - }; - enum rtp_tx_action tx_action; - struct { - uint16_t sequence; - uint32_t timestamp; - uint32_t ssrc; - struct timeval last_tv; - } transmit; -}; - -struct rtp_socket *rtp_socket_create(void); -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip); -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port); -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other); -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref); -int rtp_socket_free(struct rtp_socket *rs); -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame); - -#endif /* _RTP_PROXY_H */ diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index feab246..58d9acf 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -34,34 +34,21 @@ */ enum signal_subsystems { SS_PAGING, - SS_SMS, SS_ABISIP, SS_NM, SS_LCHAN, - SS_SUBSCR, - SS_SCALL, SS_CHALLOC, SS_IPAC_NWL, SS_RF, SS_MSC, SS_HO, SS_CCCH, - SS_SGSN, }; /* SS_PAGING signals */ enum signal_paging { S_PAGING_SUCCEEDED, S_PAGING_EXPIRED, -}; - -/* SS_SMS signals */ -enum signal_sms { - S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */ - S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */ - S_SMS_SMMA, /* A MS tells us it has more space available */ - S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */ - S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */ }; /* SS_ABISIP signals */ @@ -108,20 +95,6 @@ S_CHALLOC_FREED, /* lchan has been successfully freed */ }; -/* SS_SUBSCR signals */ -enum signal_subscr { - S_SUBSCR_ATTACHED, - S_SUBSCR_DETACHED, - S_SUBSCR_IDENTITY, /* we've received some identity information */ -}; - -/* SS_SCALL signals */ -enum signal_scall { - S_SCALL_SUCCESS, - S_SCALL_EXPIRED, - S_SCALL_DETACHED, -}; - /* SS_IPAC_NWL signals */ enum signal_ipaccess { S_IPAC_NWL_COMPLETE, @@ -136,21 +109,6 @@ S_RF_OFF, S_RF_ON, S_RF_GRACE, -}; - -struct paging_signal_data { - struct vlr_subscr *vsub; - struct gsm_bts *bts; - - int paging_result; - - /* NULL in case the paging didn't work */ - struct gsm_subscriber_connection *conn; -}; - -struct scall_signal_data { - struct gsm_subscriber_connection *conn; - void *data; }; struct ipacc_ack_signal_data { @@ -197,15 +155,6 @@ struct gsm_network *net; }; -struct sms_signal_data { - /* The transaction where this occured */ - struct gsm_trans *trans; - /* Can be NULL for SMMA */ - struct gsm_sms *sms; - /* int paging result. Only the ones with > 0 */ - int paging_result; -}; - struct lchan_signal_data { /* The lchan the signal happened on */ struct gsm_lchan *lchan; @@ -237,24 +186,6 @@ uint16_t rach_slot_count; uint16_t rach_busy_count; uint16_t rach_access_count; -}; - -/* GPRS SGSN signals SS_SGSN */ -enum signal_sgsn { - S_SGSN_ATTACH, - S_SGSN_DETACH, - S_SGSN_UPDATE, - S_SGSN_PDP_ACT, - S_SGSN_PDP_DEACT, - S_SGSN_PDP_TERMINATE, - S_SGSN_PDP_FREE, - S_SGSN_MM_FREE, -}; - -struct sgsn_mm_ctx; -struct sgsn_signal_data { - struct sgsn_mm_ctx *mm; - struct sgsn_pdp_ctx *pdp; /* non-NULL for PDP_ACT, PDP_DEACT, PDP_FREE */ }; #endif diff --git a/include/osmocom/bsc/silent_call.h b/include/osmocom/bsc/silent_call.h deleted file mode 100644 index 5fec77b..0000000 --- a/include/osmocom/bsc/silent_call.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _SILENT_CALL_H -#define _SILENT_CALL_H - -struct gsm_subscriber_connection; - -extern int gsm_silent_call_start(struct vlr_subscr *vsub, - void *data, int type); -extern int gsm_silent_call_stop(struct vlr_subscr *vsub); - -#if 0 -extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); -extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); -#endif - -#endif /* _SILENT_CALL_H */ diff --git a/include/osmocom/bsc/smpp.h b/include/osmocom/bsc/smpp.h deleted file mode 100644 index bcdac8f..0000000 --- a/include/osmocom/bsc/smpp.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -int smpp_openbsc_alloc_init(void *ctx); -int smpp_openbsc_start(struct gsm_network *net); diff --git a/include/osmocom/bsc/sms_queue.h b/include/osmocom/bsc/sms_queue.h deleted file mode 100644 index 2a8bd58..0000000 --- a/include/osmocom/bsc/sms_queue.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SMS_QUEUE_H -#define SMS_QUEUE_H - -struct gsm_network; -struct gsm_sms_queue; -struct vty; - -int sms_queue_start(struct gsm_network *, int in_flight); -int sms_queue_trigger(struct gsm_sms_queue *); - -/* vty helper functions */ -int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty); -int sms_queue_set_max_pending(struct gsm_sms_queue *, int max); -int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail); -int sms_queue_clear(struct gsm_sms_queue *); - -#endif diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h deleted file mode 100644 index 5465548..0000000 --- a/include/osmocom/bsc/transaction.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _TRANSACT_H -#define _TRANSACT_H - -#include -#include -#include -#include -#include -#include - -enum bridge_state { - BRIDGE_STATE_NONE, - BRIDGE_STATE_LOOPBACK_PENDING, - BRIDGE_STATE_LOOPBACK_ESTABLISHED, - BRIDGE_STATE_BRIDGE_PENDING, - BRIDGE_STATE_BRIDGE_ESTABLISHED, -}; - -/* One transaction */ -struct gsm_trans { - /* Entry in list of all transactions */ - struct llist_head entry; - - /* Back pointer to the network struct */ - struct gsm_network *net; - - /* The protocol within which we live */ - uint8_t protocol; - - /* The current transaction ID */ - uint8_t transaction_id; - - /* To whom we belong, unique identifier of remote MM entity */ - struct vlr_subscr *vsub; - - /* The associated connection we are using to transmit messages */ - struct gsm_subscriber_connection *conn; - - /* reference from MNCC or other application */ - uint32_t callref; - - /* if traffic channel receive was requested */ - int tch_recv; - - /* is thats one paging? */ - struct subscr_request *paging_request; - - /* bearer capabilities (rate and codec) */ - struct gsm_mncc_bearer_cap bearer_cap; - - /* status of the assignment, true when done */ - bool assignment_done; - - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - - union { - struct { - - /* current call state */ - int state; - - /* current timer and message queue */ - int Tcurrent; /* current CC timer */ - int T308_second; /* used to send release again */ - struct osmo_timer_list timer; - struct gsm_mncc msg; /* stores setup/disconnect/release message */ - } cc; - struct { - struct gsm411_smc_inst smc_inst; - struct gsm411_smr_inst smr_inst; - - struct gsm_sms *sms; - } sms; - }; - - struct { - struct gsm_trans *peer; - enum bridge_state state; - } bridge; -}; - - - -struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn, - uint8_t proto, uint8_t trans_id); -struct gsm_trans *trans_find_by_callref(struct gsm_network *net, - uint32_t callref); - -struct gsm_trans *trans_alloc(struct gsm_network *net, - struct vlr_subscr *vsub, - uint8_t protocol, uint8_t trans_id, - uint32_t callref); -void trans_free(struct gsm_trans *trans); - -int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub, - uint8_t protocol, uint8_t ti_flag); -struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn); -void trans_conn_closed(struct gsm_subscriber_connection *conn); - -#endif diff --git a/include/osmocom/bsc/trau_mux.h b/include/osmocom/bsc/trau_mux.h deleted file mode 100644 index eeceff5..0000000 --- a/include/osmocom/bsc/trau_mux.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1 - * timeslot on which E1 interface) should be directly muxed to which other - * sub-slot. Entries in the mux map are always bi-directional. - * - * The idea of all this is to directly switch voice channels in the BSC - * from one phone to another. We do this right now since we don't support - * any external interface for voice channels, and in the future as an - * optimization to routing them externally. - */ - -#include -#include -#include - -struct decoded_trau_frame; - -/* map a TRAU mux map entry */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst); -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst); - -/* unmap a TRAU mux map entry */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref); - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits); - -/* add a trau receiver */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref); - -/* send trau from application */ -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame); - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan); - -/* callback invoked if we receive TRAU frames */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv); - -/* TRAU frame transcoding */ -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf); -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf); -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data); -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data); diff --git a/include/osmocom/bsc/trau_upqueue.h b/include/osmocom/bsc/trau_upqueue.h deleted file mode 100644 index ecc7658..0000000 --- a/include/osmocom/bsc/trau_upqueue.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _TRAU_UPQUEUE_H -#define _TRAU_UPQUEUE_H - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -#endif /* _TRAU_UPQUEUE_H */ - diff --git a/src/Makefile.am b/src/Makefile.am index 454bf26..637272d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,6 @@ libcommon \ libcommon-cs \ libbsc \ - libtrau \ libfilter \ $(NULL) diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am index 4dfe247..b3b2b8c 100644 --- a/src/ipaccess/Makefile.am +++ b/src/ipaccess/Makefile.am @@ -30,7 +30,6 @@ abisip_find_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -49,7 +48,6 @@ ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -60,7 +58,6 @@ ipaccess_proxy_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index c68e3ea..957a5bb 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -978,7 +978,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) exit(1); diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ef7a6fb..980b3e6 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,6 +48,11 @@ #define RSL_ALLOC_SIZE 1024 #define RSL_ALLOC_HEADROOM 128 + +#define RTP_PT_GSM_FULL 3 +#define RTP_PT_GSM_HALF 96 +#define RTP_PT_GSM_EFR 97 +#define RTP_PT_AMR 98 enum sacch_deact { SACCH_NONE, @@ -159,9 +162,6 @@ if (rc < 0) LOGP(DRSL, LOGL_ERROR, "%s %smismatching chan_nr=0x%02x\n", gsm_ts_and_pchan_name(lchan->ts), log_name, chan_nr); - - if (lchan->conn) - log_set_context(LOG_CTX_VLR_SUBSCR, lchan->conn->vsub); return lchan; } @@ -2420,20 +2420,6 @@ msg->dst = lchan->ts->trx->rsl_link; return abis_rsl_sendmsg(msg); -} - -/* tell BTS to connect RTP stream to our local RTP socket */ -int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan) -{ - struct rtp_socket *rs = lchan->abis_ip.rtp_socket; - int rc; - - rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), - ntohs(rs->rtp.sin_local.sin_port), - /* FIXME: use RTP payload of bound socket, not BTS*/ - lchan->abis_ip.rtp_payload2); - - return rc; } int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 845b1b7..6ff1688 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -24,13 +24,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include @@ -263,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->via_ran = RAN_GERAN_A; conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); @@ -277,11 +274,6 @@ if (conn->network->bsc_api->conn_cleanup) conn->network->bsc_api->conn_cleanup(conn); - - if (conn->vsub) { - LOGP(DNM, LOGL_ERROR, "conn->vsub should have been cleared.\n"); - conn->vsub = NULL; - } if (conn->ho_lchan) { LOGP(DNM, LOGL_ERROR, "The ho_lchan should have been cleared.\n"); @@ -452,10 +444,6 @@ msgb_l3len(msg) - sizeof(*gh)); return; } - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(conn->bts)) - switch_trau_mux(conn->lchan, conn->secondary_lchan); /* swap channels */ osmo_timer_del(&conn->T10); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 2fb3842..34dfd36 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -529,10 +529,10 @@ return 0; } -int bsc_network_alloc(mncc_recv_cb_t mncc_recv) +int bsc_network_alloc(void) { /* initialize our data structures */ - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) return -ENOMEM; diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 4b2531e..ad24a1e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -25,12 +25,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -392,13 +390,6 @@ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, &sig); } - if (lchan->abis_ip.rtp_socket) { - LOGP(DRLL, LOGL_ERROR, "%s RTP Proxy Socket remained open.\n", - gsm_lchan_name(lchan)); - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } - /* stop the timer */ osmo_timer_del(&lchan->T3101); @@ -449,11 +440,6 @@ lchan->type = GSM_LCHAN_NONE; rsl_lchan_set_state(lchan, LCHAN_S_NONE); - - if (lchan->abis_ip.rtp_socket) { - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } } /* Drive the release process of the lchan */ diff --git a/src/libbsc/e1_config.c b/src/libbsc/e1_config.c index 3656315..90e29d3 100644 --- a/src/libbsc/e1_config.c +++ b/src/libbsc/e1_config.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ { struct gsm_e1_subslot *e1_link = &ts->e1_link; struct e1inp_line *line; - struct e1inp_ts *e1_ts; DEBUGP(DLMI, "e1_reconfig_ts(%u,%u,%u)\n", ts->trx->bts->nr, ts->trx->nr, ts->nr); @@ -61,12 +58,6 @@ "non-existing E1 line %u\n", ts->nr, ts->trx->nr, ts->trx->bts->nr, e1_link->e1_nr); return -ENOMEM; - } - - if (ts_is_tch(ts)) { - e1_ts = &line->ts[e1_link->e1_ts-1]; - e1inp_ts_config_trau(e1_ts, line, subch_cb); - subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); } return 0; diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..414fd6d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 7b9dece..a30cd09 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -32,13 +32,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include @@ -270,10 +267,6 @@ rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); osmo_timer_del(&ho->T3103); - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(new_lchan->conn->bts)) - switch_trau_mux(ho->old_lchan, new_lchan); /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..59a8d5c 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -24,12 +24,11 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; - net = gsm_network_init(ctx, country_code, network_code, mncc_recv); + net = gsm_network_init(ctx, country_code, network_code); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 2ac2612..b410b17 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -39,8 +38,7 @@ */ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; @@ -55,15 +53,12 @@ net->t3212 = 5; INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); net->active_calls = osmo_counter_alloc("msc.active_calls"); - - net->mncc_recv = mncc_recv; net->dyn_ts_allow_tch_f = true; @@ -127,17 +122,4 @@ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2; return gsm48_extract_mi(classmark2_lv, length - classmark_offset, mi_string, mi_type); -} - -uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) -{ - const uint8_t rp_msg_ref = *next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - *next_rp_ref += 1; - - return rp_msg_ref; } diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 74b1a93..beb936b 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -28,7 +28,6 @@ #include #include -#include struct cmd_node net_node = { GSMNET_NODE, diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..ec997b7 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -25,5 +25,4 @@ gsm_data_shared.c \ socket.c \ talloc_ctx.c \ - gsm_subscriber_base.c \ $(NULL) diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c index d4d5fb5..82327d1 100644 --- a/src/libcommon/common_vty.c +++ b/src/libcommon/common_vty.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c deleted file mode 100644 index a746c24..0000000 --- a/src/libcommon/gsm_subscriber_base.c +++ /dev/null @@ -1,37 +0,0 @@ -/* The concept of a subscriber as seen by the BSC */ - -/* (C) 2008 by Harald Welte - * (C) 2009-2010 by Holger Hans Peter Freyther - * (C) 2010 by On-Waves - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -LLIST_HEAD(active_subscribers); -void *tall_subscr_ctx; - diff --git a/src/libcommon/talloc_ctx.c b/src/libcommon/talloc_ctx.c index c8e9cd3..9f64d75 100644 --- a/src/libcommon/talloc_ctx.c +++ b/src/libcommon/talloc_ctx.c @@ -32,8 +32,6 @@ extern void *tall_sigh_ctx; extern void *tall_tqe_ctx; extern void *tall_trans_ctx; -extern void *tall_map_ctx; -extern void *tall_upq_ctx; extern void *tall_ctr_ctx; void talloc_ctx_init(void *ctx_root) @@ -49,7 +47,5 @@ tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); - tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); - tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); } diff --git a/src/libtrau/Makefile.am b/src/libtrau/Makefile.am deleted file mode 100644 index 46becd6..0000000 --- a/src/libtrau/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - -I$(top_builddir) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMONETIF_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -noinst_LIBRARIES = \ - libtrau.a \ - $(NULL) - -libtrau_a_SOURCES = \ - rtp_proxy.c \ - trau_mux.c \ - trau_upqueue.c \ - $(NULL) diff --git a/src/libtrau/rtp_proxy.c b/src/libtrau/rtp_proxy.c deleted file mode 100644 index 5b1ca79..0000000 --- a/src/libtrau/rtp_proxy.c +++ /dev/null @@ -1,764 +0,0 @@ -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009-2013 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include /* gettimeofday() */ -#include /* get..() */ -#include /* clock() */ -#include /* uname() */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* attempt to determine byte order */ -#include -#include - -static LLIST_HEAD(rtp_sockets); - -/* should we mangle the CNAME inside SDES of RTCP packets? We disable - * this by default, as it seems to be not needed */ -static int mangle_rtcp_cname = 0; - -enum rtp_bfd_priv { - RTP_PRIV_NONE, - RTP_PRIV_RTP, - RTP_PRIV_RTCP -}; - -#define RTP_ALLOC_SIZE 1500 - -#define RTCP_TYPE_SDES 202 - -#define RTCP_IE_CNAME 1 - - -#define RTP_VERSION 2 - -/* 33 for FR, all other codecs have smaller size */ -#define MAX_RTP_PAYLOAD_LEN 33 - -/* decode an rtp frame and create a new buffer with payload */ -static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data) -{ - struct msgb *new_msg; - struct gsm_data_frame *frame; - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; - struct rtp_x_hdr *rtpxh; - uint8_t *payload, *payload_out; - int payload_len; - int msg_type; - int x_len; - - if (msg->len < 12) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", - msg->len); - return -EINVAL; - } - if (rtph->version != RTP_VERSION) { - DEBUGPC(DLMUX, "received RTP version %d not supported.\n", - rtph->version); - return -EINVAL; - } - payload = msg->data + sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); - payload_len = msg->len - sizeof(struct rtp_hdr) - (rtph->csrc_count << 2); - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); - return -EINVAL; - } - if (rtph->extension) { - if (payload_len < sizeof(struct rtp_x_hdr)) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "extension header\n"); - return -EINVAL; - } - rtpxh = (struct rtp_x_hdr *)payload; - x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short, " - "extension header exceeds frame length\n"); - return -EINVAL; - } - } - if (rtph->padding) { - if (payload_len < 1) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "padding length\n"); - return -EINVAL; - } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); - return -EINVAL; - } - } - - switch (rtph->payload_type) { - case RTP_PT_GSM_FULL: - msg_type = GSM_TCHF_FRAME; - if (payload_len != RTP_LEN_GSM_FULL) { - DEBUGPC(DLMUX, "received RTP full rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_FULL, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_EFR: - msg_type = GSM_TCHF_FRAME_EFR; - if (payload_len != RTP_LEN_GSM_EFR) { - DEBUGPC(DLMUX, "received RTP extended full rate frame " - "with payload length != %d (len = %d)\n", - RTP_LEN_GSM_EFR, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_HALF: - msg_type = GSM_TCHH_FRAME; - if (payload_len != RTP_LEN_GSM_HALF) { - DEBUGPC(DLMUX, "received RTP half rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_HALF, payload_len); - return -EINVAL; - } - break; - case RTP_PT_AMR: - msg_type = GSM_TCH_FRAME_AMR; - break; - default: - DEBUGPC(DLMUX, "received RTP frame with unknown payload " - "type %d\n", rtph->payload_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN || - (rtph->payload_type == RTP_PT_AMR && - payload_len > MAX_RTP_PAYLOAD_LEN - 1)) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - /* always allocate for the maximum possible size to avoid - * fragmentation */ - new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); - - if (!new_msg) - return -ENOMEM; - frame = (struct gsm_data_frame *) msgb_put(new_msg, sizeof(struct gsm_data_frame)); - frame->msg_type = msg_type; - frame->callref = callref; - if (rtph->payload_type == RTP_PT_AMR) { - /* for FR/HR/EFR the length is implicit. In AMR, we - * need to make it explicit by using the first byte of - * the data[] buffer as length byte */ - uint8_t *data0 = msgb_put(new_msg, 1); - *data0 = payload_len; - } - payload_out = msgb_put(new_msg, payload_len); - memcpy(payload_out, payload, payload_len); - - *data = new_msg; - return 0; -} - -/*! \brief encode and send a rtp frame - * \param[in] rs RTP socket through which we shall send - * \param[in] frame GSM RTP frame to be sent - */ -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame) -{ - struct rtp_sub_socket *rss = &rs->rtp; - struct msgb *msg; - struct rtp_hdr *rtph; - uint8_t *payload; - int payload_type; - int payload_len; - int duration; /* in samples */ - int is_bfi = 0; - - if (rs->tx_action != RTP_SEND_DOWNSTREAM) { - /* initialize sequences */ - rs->tx_action = RTP_SEND_DOWNSTREAM; - rs->transmit.ssrc = rand(); - rs->transmit.sequence = random(); - rs->transmit.timestamp = random(); - } - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - payload_type = RTP_PT_GSM_FULL; - payload_len = RTP_LEN_GSM_FULL; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHF_FRAME_EFR: - payload_type = RTP_PT_GSM_EFR; - payload_len = RTP_LEN_GSM_EFR; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHH_FRAME: - payload_type = RTP_PT_GSM_HALF; - payload_len = RTP_LEN_GSM_HALF; - duration = RTP_GSM_DURATION; - break; - case GSM_TCH_FRAME_AMR: - payload_type = RTP_PT_AMR; - payload_len = frame->data[0]; - duration = RTP_GSM_DURATION; - break; - case GSM_BAD_FRAME: - payload_type = 0; - payload_len = 0; - duration = RTP_GSM_DURATION; - is_bfi = 1; - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - if (is_bfi) { - /* In case of a bad frame, just count and drop packet. */ - rs->transmit.timestamp += duration; - rs->transmit.sequence++; - return 0; - } - - msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM"); - if (!msg) - return -ENOMEM; - rtph = (struct rtp_hdr *) msgb_put(msg, sizeof(struct rtp_hdr)); - rtph->version = RTP_VERSION; - rtph->padding = 0; - rtph->extension = 0; - rtph->csrc_count = 0; - rtph->marker = 0; - rtph->payload_type = payload_type; - rtph->sequence = htons(rs->transmit.sequence++); - rtph->timestamp = htonl(rs->transmit.timestamp); - rs->transmit.timestamp += duration; - rtph->ssrc = htonl(rs->transmit.ssrc); - - payload = msgb_put(msg, payload_len); - if (frame->msg_type == GSM_TCH_FRAME_AMR) - memcpy(payload, frame->data + 1, payload_len); - else - memcpy(payload, frame->data, payload_len); - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - - return 0; -} - -/* iterate over all chunks in one RTCP message, look for CNAME IEs and - * replace all of those with 'new_cname' */ -static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh, - uint16_t *rtcp_len, const char *new_cname) -{ - uint8_t *rtcp_end; - uint8_t *cur = (uint8_t *) rh; - uint8_t tag, len = 0; - - rtcp_end = cur + *rtcp_len; - /* move cur to end of RTP header */ - cur += sizeof(*rh); - - /* iterate over Chunks */ - while (cur+4 < rtcp_end) { - /* skip four bytes SSRC/CSRC */ - cur += 4; - - /* iterate over IE's inside the chunk */ - while (cur+1 < rtcp_end) { - tag = *cur++; - if (tag == 0) { - /* end of chunk, skip additional zero */ - while ((*cur++ == 0) && (cur < rtcp_end)) { } - break; - } - len = *cur++; - - if (tag == RTCP_IE_CNAME) { - /* we've found the CNAME, lets mangle it */ - if (len < strlen(new_cname)) { - /* we need to make more space */ - int increase = strlen(new_cname) - len; - - msgb_push(msg, increase); - memmove(cur+len+increase, cur+len, - rtcp_end - (cur+len)); - /* FIXME: we have to respect RTCP - * padding/alignment rules! */ - len += increase; - *(cur-1) += increase; - rtcp_end += increase; - *rtcp_len += increase; - } - /* copy new CNAME into message */ - memcpy(cur, new_cname, strlen(new_cname)); - /* FIXME: zero the padding in case new CNAME - * is smaller than old one !!! */ - } - cur += len; - } - } - - return 0; -} - -static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs) -{ - struct rtp_sub_socket *rss = &rs->rtcp; - struct rtcp_hdr *rtph; - uint16_t old_len; - int rc; - - if (!mangle_rtcp_cname) - return 0; - - printf("RTCP\n"); - /* iterate over list of RTCP messages */ - rtph = (struct rtcp_hdr *)msg->data; - while ((void *)rtph + sizeof(*rtph) <= (void *)msg->data + msg->len) { - old_len = (ntohs(rtph->length) + 1) * 4; - if ((void *)rtph + old_len > (void *)msg->data + msg->len) { - DEBUGPC(DLMUX, "received RTCP packet too short for " - "length element\n"); - return -EINVAL; - } - if (rtph->type == RTCP_TYPE_SDES) { - char new_cname[255]; - osmo_strlcpy(new_cname, - inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, - new_cname); - if (rc < 0) - return rc; - } - rtph = (void *)rtph + old_len; - } - - return 0; -} - -/* read from incoming RTP/RTCP socket */ -static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - int rc; - struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP"); - struct msgb *new_msg; - struct rtp_sub_socket *other_rss; - - if (!msg) - return -ENOMEM; - - rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } else if (rc < 0) { - /* Ignore "connection refused". this happens, If we open the - * socket faster than the remote side. */ - if (errno == ECONNREFUSED) - goto out_free; - DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " - "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } - - msgb_put(msg, rc); - - switch (rs->rx_action) { - case RTP_PROXY: - if (!rs->proxy.other_sock) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTP) - other_rss = &rs->proxy.other_sock->rtp; - else if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - other_rss = &rs->proxy.other_sock->rtcp; - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - } else { - rc = -EINVAL; - goto out_free; - } - msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; - break; - - case RTP_RECV_UPSTREAM: - if (!rs->receive.callref || !rs->receive.net) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - if (!mangle_rtcp_cname) { - msgb_free(msg); - break; - } - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - break; - } - if (rss->bfd.priv_nr != RTP_PRIV_RTP) { - rc = -EINVAL; - goto out_free; - } - rc = rtp_decode(msg, rs->receive.callref, &new_msg); - if (rc < 0) - goto out_free; - msgb_free(msg); - trau_tx_to_mncc(rs->receive.net, new_msg); - break; - - case RTP_NONE: /* if socket exists, but disabled by app */ - msgb_free(msg); - break; - } - - return 0; - -out_free: - msgb_free(msg); - return rc; -} - -/* \brief write from tx_queue to RTP/RTCP socket */ -static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - struct msgb *msg; - int written; - - msg = msgb_dequeue(&rss->tx_queue); - if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; - return 0; - } - - written = write(rss->bfd.fd, msg->data, msg->len); - if (written < msg->len) { - LOGP(DLMIB, LOGL_ERROR, "short write"); - msgb_free(msg); - return -EIO; - } - - msgb_free(msg); - - return 0; -} - - -/*! \brief callback for the select.c:bfd_* layer */ -static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags) -{ - struct rtp_socket *rs = bfd->data; - struct rtp_sub_socket *rss; - - switch (bfd->priv_nr) { - case RTP_PRIV_RTP: - rss = &rs->rtp; - break; - case RTP_PRIV_RTCP: - rss = &rs->rtcp; - break; - default: - return -EINVAL; - } - - if (flags & BSC_FD_READ) - rtp_socket_read(rs, rss); - - if (flags & BSC_FD_WRITE) - rtp_socket_write(rs, rss); - - return 0; -} - -/*! \brief initialize one rtp sub-socket */ -static void init_rss(struct rtp_sub_socket *rss, - struct rtp_socket *rs, int fd, int priv_nr) -{ - /* initialize bfd */ - rss->bfd.fd = fd; - rss->bfd.data = rs; - rss->bfd.priv_nr = priv_nr; - rss->bfd.cb = rtp_bfd_cb; -} - -/*! \brief create a new RTP/RTCP socket and bind it */ -struct rtp_socket *rtp_socket_create(void) -{ - int rc; - struct rtp_socket *rs; - - DEBUGP(DLMUX, "rtp_socket_create(): "); - - rs = talloc_zero(tall_bsc_ctx, struct rtp_socket); - if (!rs) - return NULL; - - INIT_LLIST_HEAD(&rs->rtp.tx_queue); - INIT_LLIST_HEAD(&rs->rtcp.tx_queue); - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_free; - - init_rss(&rs->rtp, rs, rc, RTP_PRIV_RTP); - rc = osmo_fd_register(&rs->rtp.bfd); - if (rc < 0) - goto out_rtp_socket; - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_rtp_bfd; - - init_rss(&rs->rtcp, rs, rc, RTP_PRIV_RTCP); - rc = osmo_fd_register(&rs->rtcp.bfd); - if (rc < 0) - goto out_rtcp_socket; - - DEBUGPC(DLMUX, "success\n"); - - rc = rtp_socket_bind(rs, INADDR_ANY); - if (rc < 0) - goto out_rtcp_bfd; - - return rs; - -out_rtcp_bfd: - osmo_fd_unregister(&rs->rtcp.bfd); -out_rtcp_socket: - close(rs->rtcp.bfd.fd); -out_rtp_bfd: - osmo_fd_unregister(&rs->rtp.bfd); -out_rtp_socket: - close(rs->rtp.bfd.fd); -out_free: - talloc_free(rs); - DEBUGPC(DLMUX, "failed\n"); - return NULL; -} - -static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip, - uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_local.sin_family = AF_INET; - rss->sin_local.sin_addr.s_addr = htonl(ip); - rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; - - rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - sizeof(rss->sin_local)); - if (rc < 0) - return rc; - - /* retrieve the address we actually bound to, in case we - * passed INADDR_ANY as IP address */ - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -#define RTP_PORT_BASE 30000 -static unsigned int next_udp_port = RTP_PORT_BASE; - -/*! \brief bind a RTP socket to a specific local address - * \param[in] rs RTP socket to be bound - * \param[in] ip local IP address to which socket is to be bound - */ -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip) -{ - int rc = -EIO; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_bind(rs=%p, IP=%s): ", rs, - inet_ntoa(ia)); - - /* try to bind to a consecutive pair of ports */ - for (next_udp_port = next_udp_port % 0xffff; - next_udp_port < 0xffff; next_udp_port += 2) { - rc = rtp_sub_socket_bind(&rs->rtp, ip, next_udp_port); - if (rc != 0) - continue; - - rc = rtp_sub_socket_bind(&rs->rtcp, ip, next_udp_port+1); - if (rc == 0) - break; - } - if (rc < 0) { - DEBUGPC(DLMUX, "failed\n"); - return rc; - } - - ia.s_addr = rs->rtp.sin_local.sin_addr.s_addr; - DEBUGPC(DLMUX, "BOUND_IP=%s, BOUND_PORT=%u\n", - inet_ntoa(ia), ntohs(rs->rtp.sin_local.sin_port)); - return ntohs(rs->rtp.sin_local.sin_port); -} - -static int rtp_sub_socket_connect(struct rtp_sub_socket *rss, - uint32_t ip, uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_remote.sin_family = AF_INET; - rss->sin_remote.sin_addr.s_addr = htonl(ip); - rss->sin_remote.sin_port = htons(port); - - rc = connect(rss->bfd.fd, (struct sockaddr *) &rss->sin_remote, - sizeof(rss->sin_remote)); - if (rc < 0) - return rc; - - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -/*! \brief 'connect' a RTP socket to a remote peer - * \param[in] rs RTP socket to be connected - * \param[in] ip remote IP address to which to connect - * \param[in] port remote UDP port number to which to connect - */ -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port) -{ - int rc; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_connect(rs=%p, ip=%s, port=%u)\n", - rs, inet_ntoa(ia), port); - - rc = rtp_sub_socket_connect(&rs->rtp, ip, port); - if (rc < 0) - return rc; - - return rtp_sub_socket_connect(&rs->rtcp, ip, port+1); -} - -/*! \brief bind two RTP/RTCP sockets together in the proxy - * \param[in] this First RTP socket - * \param[in] other Second RTP socket - */ -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n", - this, other); - - this->rx_action = RTP_PROXY; - this->proxy.other_sock = other; - - other->rx_action = RTP_PROXY; - other->proxy.other_sock = this; - - return 0; -} - -/*! \brief bind RTP/RTCP socket to application, disabling proxy - * \param[in] this RTP socket - * \param[in] net gsm_network argument to trau_tx_to_mncc() - * \param[in] callref callref argument to trau_tx_to_mncc() - */ -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, - uint32_t callref) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n", - this, callref); - - if (callref) { - this->rx_action = RTP_RECV_UPSTREAM; - this->receive.net = net; - this->receive.callref = callref; - } else - this->rx_action = RTP_NONE; - - return 0; -} - -static void free_tx_queue(struct rtp_sub_socket *rss) -{ - struct msgb *msg; - - while ((msg = msgb_dequeue(&rss->tx_queue))) - msgb_free(msg); -} - -/*! \brief Free/release a previously allocated RTP socket - * \param[in[] rs RTP/RTCP socket to be released - */ -int rtp_socket_free(struct rtp_socket *rs) -{ - DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs); - - /* make sure we don't leave references dangling to us */ - if (rs->rx_action == RTP_PROXY && - rs->proxy.other_sock) - rs->proxy.other_sock->proxy.other_sock = NULL; - - osmo_fd_unregister(&rs->rtp.bfd); - close(rs->rtp.bfd.fd); - free_tx_queue(&rs->rtp); - - osmo_fd_unregister(&rs->rtcp.bfd); - close(rs->rtcp.bfd.fd); - free_tx_queue(&rs->rtcp); - - talloc_free(rs); - - return 0; -} diff --git a/src/libtrau/trau_mux.c b/src/libtrau/trau_mux.c deleted file mode 100644 index e570b93..0000000 --- a/src/libtrau/trau_mux.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* this corresponds to the bit-lengths of the individual codec - * parameters as indicated in Table 1.1 of TS 06.10 */ -static const uint8_t gsm_fr_map[] = { - 6, 6, 5, 5, 4, 4, 3, 3, - 7, 2, 2, 6, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 7, 2, 2, 6, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 7, 2, 2, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 7, 2, 2, 6, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3 -}; - - -/* - * EFR TRAU parity - * - * g(x) = x^3 + x^1 + 1 - */ -static const struct osmo_crc8gen_code gsm0860_efr_crc3 = { - .bits = 3, - .poly = 0x3, - .init = 0x0, - .remainder = 0x7, -}; - -/* EFR parity bits */ -static inline void efr_parity_bits_1(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 0, 22); - memcpy(check_bits + 22 , d_bits + 24, 3); - check_bits[25] = d_bits[28]; -} - -static inline void efr_parity_bits_2(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 42, 10); - memcpy(check_bits + 10 , d_bits + 90, 2); -} - -static inline void efr_parity_bits_3(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 98, 5); - check_bits[5] = d_bits[104]; - memcpy(check_bits + 6 , d_bits + 143, 2); -} - -static inline void efr_parity_bits_4(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 151, 10); - memcpy(check_bits + 10 , d_bits + 199, 2); -} - -static inline void efr_parity_bits_5(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 207, 5); - check_bits[5] = d_bits[213]; - memcpy(check_bits + 6 , d_bits + 252, 2); -} - -struct map_entry { - struct llist_head list; - struct gsm_e1_subslot src, dst; -}; - -struct upqueue_entry { - struct llist_head list; - struct gsm_network *net; - struct gsm_e1_subslot src; - uint32_t callref; -}; - -static LLIST_HEAD(ss_map); -static LLIST_HEAD(ss_upqueue); - -void *tall_map_ctx, *tall_upq_ctx; - -/* map one particular subslot to another subslot */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst) -{ - struct map_entry *me; - - me = talloc(tall_map_ctx, struct map_entry); - if (!me) { - LOGP(DLMIB, LOGL_FATAL, "Out of memory\n"); - return -ENOMEM; - } - - DEBUGP(DCC, "Setting up TRAU mux map between (e1=%u,ts=%u,ss=%u) " - "and (e1=%u,ts=%u,ss=%u)\n", - src->e1_nr, src->e1_ts, src->e1_ts_ss, - dst->e1_nr, dst->e1_ts, dst->e1_ts_ss); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src, 0); - trau_mux_unmap(dst, 0); - - memcpy(&me->src, src, sizeof(me->src)); - memcpy(&me->dst, dst, sizeof(me->dst)); - llist_add(&me->list, &ss_map); - - return 0; -} - -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst) -{ - struct gsm_e1_subslot *src_ss, *dst_ss; - - src_ss = &src->ts->e1_link; - dst_ss = &dst->ts->e1_link; - - return trau_mux_map(src_ss, dst_ss); -} - - -/* unmap one particular subslot from another subslot */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref) -{ - struct map_entry *me, *me2; - struct upqueue_entry *ue, *ue2; - - if (ss) - llist_for_each_entry_safe(me, me2, &ss_map, list) { - if (!memcmp(&me->src, ss, sizeof(*ss)) || - !memcmp(&me->dst, ss, sizeof(*ss))) { - llist_del(&me->list); - return 0; - } - } - llist_for_each_entry_safe(ue, ue2, &ss_upqueue, list) { - if (ue->callref == callref) { - llist_del(&ue->list); - return 0; - } - if (ss && !memcmp(&ue->src, ss, sizeof(*ss))) { - llist_del(&ue->list); - return 0; - } - } - return -ENOENT; -} - -/* look-up an enty in the TRAU mux map */ -static struct gsm_e1_subslot * -lookup_trau_mux_map(const struct gsm_e1_subslot *src) -{ - struct map_entry *me; - - llist_for_each_entry(me, &ss_map, list) { - if (!memcmp(&me->src, src, sizeof(*src))) - return &me->dst; - if (!memcmp(&me->dst, src, sizeof(*src))) - return &me->src; - } - return NULL; -} - -/* look-up an enty in the TRAU upqueue */ -struct upqueue_entry * -lookup_trau_upqueue(const struct gsm_e1_subslot *src) -{ - struct upqueue_entry *ue; - - llist_for_each_entry(ue, &ss_upqueue, list) { - if (!memcmp(&ue->src, src, sizeof(*src))) - return ue; - } - return NULL; -} - -static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, k, l, o; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 33, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - data = frame->data; - data[0] = 0xd << 4; - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts output bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset input bits */ - while (i < 260) { - data[j/8] |= (tf->d_bits[k+o] << (7-(j%8))); - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } - if (tf->c_bits[11]) /* BFI */ - frame->msg_type = GSM_BAD_FRAME; - else - frame->msg_type = GSM_TCHF_FRAME; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 33); - - return msg; -} - -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, rc; - ubit_t check_bits[26]; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 31, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - frame->msg_type = GSM_TCHF_FRAME_EFR; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 31); - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - - data = frame->data; - data[0] = 0xc << 4; - /* reassemble d-bits */ - for (i = 1, j = 4; i < 39; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_1(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - if (rc) - goto bad_frame; - for (i = 42, j = 42; i < 95; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_2(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - if (rc) - goto bad_frame; - for (i = 98, j = 95; i < 148; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_3(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - if (rc) - goto bad_frame; - for (i = 151, j = 145; i < 204; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_4(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - if (rc) - goto bad_frame; - for (i = 207, j = 198; i < 257; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_5(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); - if (rc) - goto bad_frame; - - return msg; - -bad_frame: - frame->msg_type = GSM_BAD_FRAME; - - return msg; -} - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits) -{ - struct decoded_trau_frame tf; - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss); - struct subch_mux *mx; - struct upqueue_entry *ue; - int rc; - - /* decode TRAU, change it to downlink, re-encode */ - rc = decode_trau_frame(&tf, trau_bits); - if (rc) - return rc; - - if (!dst_e1_ss) { - struct msgb *msg = NULL; - /* frame shall be sent to upqueue */ - if (!(ue = lookup_trau_upqueue(src_e1_ss))) - return -EINVAL; - if (!ue->callref) - return -EINVAL; - if (!memcmp(tf.c_bits, c_bits_check_fr, 5)) - msg = trau_decode_fr(ue->callref, &tf); - else if (!memcmp(tf.c_bits, c_bits_check_efr, 5)) - msg = trau_decode_efr(ue->callref, &tf); - else { - DEBUGPC(DLMUX, "illegal trau (C1-C5) %s\n", - osmo_hexdump(tf.c_bits, 5)); - DEBUGPC(DLMUX, "test trau (C1-C5) %s\n", - osmo_hexdump(c_bits_check_efr, 5)); - return -EINVAL; - } - if (!msg) - return -ENOMEM; - trau_tx_to_mncc(ue->net, msg); - - return 0; - } - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - trau_frame_up2down(&tf); - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* callback when a TRAU frame was received */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, - void *_priv) -{ - struct e1inp_ts *e1i_ts = _priv; - struct gsm_e1_subslot src_ss; - - src_ss.e1_nr = e1i_ts->line->num; - src_ss.e1_ts = e1i_ts->num; - src_ss.e1_ts_ss = ch; - - return trau_mux_input(&src_ss, data, len); -} - -/* add receiver instance for lchan and callref */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref) -{ - struct gsm_e1_subslot *src_ss; - struct upqueue_entry *ue; - - ue = talloc(tall_upq_ctx, struct upqueue_entry); - if (!ue) - return -ENOMEM; - - src_ss = &lchan->ts->e1_link; - - DEBUGP(DCC, "Setting up TRAU receiver (e1=%u,ts=%u,ss=%u) " - "and (callref 0x%x)\n", - src_ss->e1_nr, src_ss->e1_ts, src_ss->e1_ts_ss, - callref); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src_ss, callref); - - memcpy(&ue->src, src_ss, sizeof(ue->src)); - ue->net = lchan->ts->trx->bts->network; - ue->callref = callref; - llist_add(&ue->list, &ss_upqueue); - - return 0; -} - -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j, k, l, o; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 1; - tf->c_bits[3] = 0; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts input bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset output bits */ - while (i < 260) { - tf->d_bits[k+o] = (data[j/8] >> (7-(j%8))) & 1; - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } -} - -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j; - ubit_t check_bits[26]; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 0; - tf->c_bits[3] = 1; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - tf->d_bits[0] = 1; - for (i = 1, j = 4; i < 39; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_1(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - for (i = 42, j = 42; i < 95; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_2(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - for (i = 98, j = 95; i < 148; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_3(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - for (i = 151, j = 145; i < 204; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_4(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - for (i = 207, j = 198; i < 257; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_5(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); -} - -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame) -{ - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link; - struct subch_mux *mx; - struct decoded_trau_frame tf; - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - trau_encode_fr(&tf, frame->data); - break; - case GSM_TCHF_FRAME_EFR: - trau_encode_efr(&tf, frame->data); - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan) -{ - struct gsm_network *net = old_lchan->ts->trx->bts->network; - struct gsm_trans *trans; - - /* look up transaction with TCH frame receive enabled */ - llist_for_each_entry(trans, &net->trans_list, entry) { - if (trans->conn && trans->conn->lchan == old_lchan && trans->tch_recv) { - /* switch */ - trau_recv_lchan(new_lchan, trans->callref); - } - } - - return 0; -} diff --git a/src/libtrau/trau_upqueue.c b/src/libtrau/trau_upqueue.c deleted file mode 100644 index c1c0003..0000000 --- a/src/libtrau/trau_upqueue.c +++ /dev/null @@ -1,27 +0,0 @@ -/* trau_upqueue.c - Pass msgb's up the chain */ - -/* (C) 2010 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 7db698c..4acbe56 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -40,12 +40,10 @@ osmo_bsc_ctrl.c \ $(NULL) -# once again since TRAU uses CC symbol :( osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 2b71b85..17dddf8 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5d25701..829f207 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -201,7 +201,7 @@ osmo_stats_init(tall_bsc_ctx); /* Allocate global gsm_network struct */ - rc = bsc_network_alloc(NULL); + rc = bsc_network_alloc(); if (rc) { fprintf(stderr, "Allocation failed. exiting.\n"); exit(1); diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index dd20ddb..1bee68e 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -42,7 +42,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc_nat/bsc_filter.c b/src/osmo-bsc_nat/bsc_filter.c index 8d4a680..77ef583 100644 --- a/src/osmo-bsc_nat/bsc_filter.c +++ b/src/osmo-bsc_nat/bsc_filter.c @@ -20,6 +20,8 @@ * */ +#include + #include #include #include diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index d3f6d62..78d4965 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -49,7 +49,6 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 6487df2..c72a23a 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..9207434 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc6248..137321c 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897..d20bd0a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a9..7f6730e 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4a..96f87f5 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018..1d7baa1 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9ea..77309c9 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c1..579cae2 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e..7957b14 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include #include #include -#include void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22..c5ae061 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index d2085a9..784c3e9 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -715,7 +715,7 @@ osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); - net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + net = bsc_network_init(tall_bsc_ctx, 1, 1); if (!net) { printf("Network init failure.\n"); return EXIT_FAILURE; diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b49518..336ccaf 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bc..b743063 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e1..6ef3f29 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c184..0000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5e..0000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef71230..0000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:19 +0000 Subject: [PATCH] osmo-bsc[master]: Remove unused RRLP options/codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5476 to look at the new patch set (#4). Remove unused RRLP options/codec RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/rrlp.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/gsm_data.c 9 files changed, 0 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/5476/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 64c3abd..6ad5e59 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -12,7 +12,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 7697481..5031f2c 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -11,7 +11,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1b86f9a..b067fc2 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -44,7 +44,6 @@ pcu_if.h \ pcuif_proto.h \ rest_octets.h \ - rrlp.h \ rs232.h \ signal.h \ socket.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3268426..0f8bcb9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -332,11 +332,6 @@ /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; - /* Radio Resource Location Protocol (TS 04.31) */ - struct { - enum rrlp_mode mode; - } rrlp; - enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ @@ -519,9 +514,6 @@ enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); const char *gsm_auth_policy_name(enum gsm_auth_policy policy); - -enum rrlp_mode rrlp_mode_parse(const char *arg); -const char *rrlp_mode_name(enum rrlp_mode mode); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 9bbcabd..5d9b570 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -34,14 +34,6 @@ struct osmo_bsc_sccp_con; -/* RRLP mode of operation */ -enum rrlp_mode { - RRLP_MODE_NONE, - RRLP_MODE_MS_BASED, - RRLP_MODE_MS_PREF, - RRLP_MODE_ASS_PREF, -}; - /* Channel Request reason */ enum gsm_chreq_reason_t { GSM_CHREQ_REASON_EMERG, diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h deleted file mode 100644 index c89402a..0000000 --- a/include/osmocom/bsc/rrlp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RRLP_H -#define _RRLP_H - -void on_dso_load_rrlp(void); - -#endif /* _RRLP_H */ - diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 9500645..6fa8e04 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -180,8 +180,6 @@ VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", @@ -817,8 +815,6 @@ vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index beb936b..8f6e4ef 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -133,22 +133,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, - "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", - "Radio Resource Location Protocol\n" - "Set the Radio Resource Location Protocol Mode\n" - "Don't send RRLP request\n" - "Request MS-based location\n" - "Request any location, prefer MS-based\n" - "Request any location, prefer MS-assisted\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, "mm info (0|1)", "Mobility Management\n" @@ -282,7 +266,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..514708b 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -138,24 +138,6 @@ return get_value_string(auth_policy_names, policy); } -static const struct value_string rrlp_mode_names[] = { - { RRLP_MODE_NONE, "none" }, - { RRLP_MODE_MS_BASED, "ms-based" }, - { RRLP_MODE_MS_PREF, "ms-preferred" }, - { RRLP_MODE_ASS_PREF, "ass-preferred" }, - { 0, NULL } -}; - -enum rrlp_mode rrlp_mode_parse(const char *arg) -{ - return get_string_value(rrlp_mode_names, arg); -} - -const char *rrlp_mode_name(enum rrlp_mode mode) -{ - return get_value_string(rrlp_mode_names, mode); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, -- To view, visit https://gerrit.osmocom.org/5476 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:19 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus vty config for LU reject cause In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5477 to look at the new patch set (#4). Remove bogus vty config for LU reject cause The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs_vty.c 6 files changed, 0 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/5477/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 6ad5e59..c7ba689 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -8,7 +8,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 0 paging any use tch 0 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 5031f2c..341aa43 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -7,7 +7,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 0 paging any use tch 0 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0f8bcb9..8e4dc04 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -280,7 +280,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm48_reject_value reject_cause; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 6fa8e04..a73c6a4 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -172,8 +172,6 @@ vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, " Location updating reject cause: %u%s", - net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, @@ -810,8 +808,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " location updating reject cause %u%s", - gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index 59a8d5c..30de0cc 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -42,7 +42,6 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->num_bts = 0; - net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; net->T3103 = GSM_T3103_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 8f6e4ef..2732ebf 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -102,22 +102,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_reject_cause, - cfg_net_reject_cause_cmd, - "location updating reject cause <2-111>", - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Cause Value as Per GSM TS 04.08\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->reject_cause = atoi(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -264,7 +248,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5477 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:19 +0000 Subject: [PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5478 to look at the new patch set (#4). Remove bogus MM INFO configuration The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 --- M doc/examples/osmo-bsc/osmo-bsc-minimal.cfg M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_ctrl_commands.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 8 files changed, 0 insertions(+), 100 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg index c972e06..850e29c 100644 --- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg @@ -1,9 +1,6 @@ network network country code 901 mobile network code 70 - mm info 1 - short name OsmoBSC - long name OsmoBSC bts 0 type sysmobts band GSM-1800 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index c7ba689..17412f7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -6,12 +6,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC encryption a5 0 neci 0 paging any use tch 0 - mm info 0 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 341aa43..581d541 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -5,12 +5,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC encryption a5 0 neci 0 paging any use tch 0 - mm info 0 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 8e4dc04..7a1b62d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -278,8 +278,6 @@ /* global parameters */ uint16_t country_code; uint16_t network_code; - char *name_long; - char *name_short; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c index 2d6fcb6..41d2361 100644 --- a/src/libbsc/bsc_ctrl_commands.c +++ b/src/libbsc/bsc_ctrl_commands.c @@ -30,45 +30,8 @@ #include #include -#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \ - CTRL_HELPER_GET_STRING(cmdname, dtype, element) \ - CTRL_HELPER_SET_STRING(cmdname, dtype, element) \ -static struct ctrl_cmd_element cmd_##cmdname = { \ - .name = cmdstr, \ - .get = get_##cmdname, \ - .set = set_##cmdname, \ - .verify = verify_vty_description_string, \ -} - -/** - * Check that there are no newlines or comments or other things - * that could make the VTY configuration unparsable. - */ -static int verify_vty_description_string(struct ctrl_cmd *cmd, - const char *value, void *data) -{ - int i; - const size_t len = strlen(value); - - for (i = 0; i < len; ++i) { - switch(value[i]) { - case '#': - case '\n': - case '\r': - cmd->reply = "String includes illegal character"; - return -1; - default: - break; - } - } - - return 0; -} - CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999); CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999); -CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); -CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -452,8 +415,6 @@ int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 34dfd36..c5a75aa 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -536,9 +536,6 @@ if (!bsc_gsmnet) return -ENOMEM; - bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); - bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); - return 0; } diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index a73c6a4..7612eda 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -167,18 +167,12 @@ vty_out(vty, "BSC is on Country Code %u, Network Code %u " "and has %u BTS%s", net->country_code, net->network_code, net->num_bts, VTY_NEWLINE); - vty_out(vty, " Long network name: '%s'%s", - net->name_long, VTY_NEWLINE); - vty_out(vty, " Short network name: '%s'%s", - net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, - VTY_NEWLINE); - vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", VTY_NEWLINE); @@ -806,12 +800,9 @@ vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); - vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); - vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 2732ebf..35c13dd 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -80,28 +80,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_name_short, - cfg_net_name_short_cmd, - "short name NAME", - "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_long, - cfg_net_name_long_cmd, - "long name NAME", - "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -113,19 +91,6 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->a5_encryption = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, - "mm info (0|1)", - "Mobility Management\n" - "Send MM INFO after LOC UPD ACCEPT\n" - "Disable\n" "Enable\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->send_mm_info = atoi(argv[0]); return CMD_SUCCESS; } @@ -246,10 +211,7 @@ install_node(&net_node, config_write_net); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); - install_element(GSMNET_NODE, &cfg_net_name_short_cmd); - install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5478 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:35 +0000 Subject: osmo-sgsn[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:37 +0000 Subject: osmo-bsc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5501 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:38 +0000 Subject: [MERGED] osmo-bsc[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unneeded .py scripts ...................................................................... Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not BSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1 --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/bsc_control.py D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 9 files changed, 2 insertions(+), 983 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index 690deae..2f0a786 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) BUILT_SOURCES = $(top_srcdir)/.version diff --git a/configure.ac b/configure.ac index b7dd016..bdcf026 100644 --- a/configure.ac +++ b/configure.ac @@ -167,5 +167,4 @@ tests/bssap/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/bsc_control.py b/contrib/bsc_control.py deleted file mode 100755 index c1b09ce..0000000 --- a/contrib/bsc_control.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/python -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -from optparse import OptionParser -from ipa import Ctrl -import socket - -verbose = False - -def connect(host, port): - if verbose: - print "Connecting to host %s:%i" % (host, port) - - sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sck.setblocking(1) - sck.connect((host, port)) - return sck - -def do_set_get(sck, var, value = None): - (r, c) = Ctrl().cmd(var, value) - sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) - -def set_var(sck, var, val): - (a, _, _) = do_set_get(sck, var, val) - return a - -def get_var(sck, var): - (_, _, v) = do_set_get(sck, var) - return v - -def _leftovers(sck, fl): - """ - Read outstanding data if any according to flags - """ - try: - data = sck.recv(1024, fl) - except socket.error as (s_errno, strerror): - return False - if len(data) != 0: - tail = data - while True: - (head, tail) = Ctrl().split_combined(tail) - print "Got message:", Ctrl().rem_header(head) - if len(tail) == 0: - break - return True - return False - -if __name__ == '__main__': - parser = OptionParser("Usage: %prog [options] var [value]") - parser.add_option("-d", "--host", dest="host", - help="connect to HOST", metavar="HOST") - parser.add_option("-p", "--port", dest="port", type="int", - help="use PORT", metavar="PORT", default=4249) - parser.add_option("-g", "--get", action="store_true", - dest="cmd_get", help="perform GET operation") - parser.add_option("-s", "--set", action="store_true", - dest="cmd_set", help="perform SET operation") - parser.add_option("-v", "--verbose", action="store_true", - dest="verbose", help="be verbose", default=False) - parser.add_option("-m", "--monitor", action="store_true", - dest="monitor", help="monitor the connection for traps", default=False) - - (options, args) = parser.parse_args() - - verbose = options.verbose - - if options.cmd_set and options.cmd_get: - parser.error("Get and set options are mutually exclusive!") - - if not (options.cmd_get or options.cmd_set or options.monitor): - parser.error("One of -m, -g, or -s must be set") - - if not (options.host): - parser.error("Destination host and port required!") - - sock = connect(options.host, options.port) - - if options.cmd_set: - if len(args) < 2: - parser.error("Set requires var and value arguments") - _leftovers(sock, socket.MSG_DONTWAIT) - print "Got message:", set_var(sock, args[0], ' '.join(args[1:])) - - if options.cmd_get: - if len(args) != 1: - parser.error("Get requires the var argument") - _leftovers(sock, socket.MSG_DONTWAIT) - (a, _, _) = do_set_get(sock, args[0]) - print "Got message:", a - - if options.monitor: - while True: - if not _leftovers(sock, 0): - print "Connection is gone." - break - sock.close() diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index ccc6758..4f5df39 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 8aa3dda..387ea70 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/5501 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:40 +0000 Subject: [MERGED] osmo-sgsn[master]: Remove unneeded .py scripts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unneeded .py scripts ...................................................................... Remove unneeded .py scripts The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not SGSN-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c --- M Makefile.am M configure.ac D contrib/Makefile.am D contrib/ipa.py D contrib/soap.py D contrib/twisted_ipa.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 8 files changed, 2 insertions(+), 863 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile.am b/Makefile.am index d57b66d..38fdcba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ include \ src \ tests \ - contrib \ $(NULL) pkgconfigdir = $(libdir)/pkgconfig diff --git a/configure.ac b/configure.ac index 8f279fd..2de31cc 100644 --- a/configure.ac +++ b/configure.ac @@ -197,5 +197,4 @@ tests/v42bis/Makefile doc/Makefile doc/examples/Makefile - contrib/Makefile Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am deleted file mode 100644 index db6d0f5..0000000 --- a/contrib/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ipa.py diff --git a/contrib/ipa.py b/contrib/ipa.py deleted file mode 100755 index 71cbf45..0000000 --- a/contrib/ipa.py +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -import struct, random, sys - -class IPA(object): - """ - Stateless IPA protocol multiplexer: add/remove/parse (extended) header - """ - version = "0.0.5" - TCP_PORT_OML = 3002 - TCP_PORT_RSL = 3003 - # OpenBSC extensions: OSMO, MGCP_OLD - PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC) - # ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol - EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6) - # OpenBSC extension: SCCP_OLD - MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF) - _IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8) - CTRL_GET = 'GET' - CTRL_SET = 'SET' - CTRL_REP = 'REPLY' - CTRL_ERR = 'ERR' - CTRL_TRAP = 'TRAP' - - def _l(self, d, p): - """ - Reverse dictionary lookup: return key for a given value - """ - if p is None: - return 'UNKNOWN' - return list(d.keys())[list(d.values()).index(p)] - - def _tag(self, t, v): - """ - Create TAG as TLV data - """ - return struct.pack(">HB", len(v) + 1, t) + v - - def proto(self, p): - """ - Lookup protocol name - """ - return self._l(self.PROTO, p) - - def ext(self, p): - """ - Lookup protocol extension name - """ - return self._l(self.EXT, p) - - def msgt(self, p): - """ - Lookup message type name - """ - return self._l(self.MSGT, p) - - def idtag(self, p): - """ - Lookup ID tag name - """ - return self._l(self._IDTAG, p) - - def ext_name(self, proto, exten): - """ - Return proper extension byte name depending on the protocol used - """ - if self.PROTO['CCM'] == proto: - return self.msgt(exten) - if self.PROTO['OSMO'] == proto: - return self.ext(exten) - return None - - def add_header(self, data, proto, ext=None): - """ - Add IPA header (with extension if necessary), data must be represented as bytes - """ - if ext is None: - return struct.pack(">HB", len(data) + 1, proto) + data - return struct.pack(">HBB", len(data) + 1, proto, ext) + data - - def del_header(self, data): - """ - Strip IPA protocol header correctly removing extension if present - Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header - """ - if not len(data): - return None, None, None, None - (dlen, proto) = struct.unpack('>HB', data[:3]) - if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack - return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data - return dlen, proto, None, data[3:] # length, protocol, _, data - - def split_combined(self, data): - """ - Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message - """ - (length, _, _, _) = self.del_header(data) - return data[:(length + 3)], data[(length + 3):] - - def tag_serial(self, data): - """ - Make TAG for serial number - """ - return self._tag(self._IDTAG['SERNR'], data) - - def tag_name(self, data): - """ - Make TAG for unit name - """ - return self._tag(self._IDTAG['UNITNAME'], data) - - def tag_loc(self, data): - """ - Make TAG for location - """ - return self._tag(self._IDTAG['LOCATION'], data) - - def tag_type(self, data): - """ - Make TAG for unit type - """ - return self._tag(self._IDTAG['TYPE'], data) - - def tag_equip(self, data): - """ - Make TAG for equipment version - """ - return self._tag(self._IDTAG['EQUIPVERS'], data) - - def tag_sw(self, data): - """ - Make TAG for software version - """ - return self._tag(self._IDTAG['SWVERSION'], data) - - def tag_ip(self, data): - """ - Make TAG for IP address - """ - return self._tag(self._IDTAG['IPADDR'], data) - - def tag_mac(self, data): - """ - Make TAG for MAC address - """ - return self._tag(self._IDTAG['MACADDR'], data) - - def tag_unit(self, data): - """ - Make TAG for unit ID - """ - return self._tag(self._IDTAG['UNIT'], data) - - def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''): - """ - Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list - """ - return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial) - - def ping(self): - """ - Make PING message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING']) - - def pong(self): - """ - Make PONG message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG']) - - def id_ack(self): - """ - Make ID_ACK CCM message - """ - return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK']) - - def id_get(self): - """ - Make ID_GET CCM message - """ - return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET']) - - def id_resp(self, data): - """ - Make ID_RESP CCM message - """ - return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP']) - -class Ctrl(IPA): - """ - Osmocom CTRL protocol implemented on top of IPA multiplexer - """ - def __init__(self): - random.seed() - - def add_header(self, data): - """ - Add CTRL header - """ - return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL']) - - def rem_header(self, data): - """ - Remove CTRL header, check for appropriate protocol and extension - """ - (_, proto, ext, d) = super(Ctrl, self).del_header(data) - if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext: - return None - return d - - def parse(self, data, op=None): - """ - Parse Ctrl string returning (var, value) pair - var could be None in case of ERROR message - value could be None in case of GET message - """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) - return var, val - - def trap(self, var, val): - """ - Make TRAP message with given (vak, val) pair - """ - return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val)) - - def cmd(self, var, val=None): - """ - Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message - """ - r = random.randint(1, sys.maxsize) - if val is not None: - return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) - return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) - - def verify(self, reply, r, var, val=None): - """ - Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value - """ - (k, v) = self.parse(reply) - if k != var or (val is not None and v != val): - return False, v - return True, v - -if __name__ == '__main__': - print("IPA multiplexer v%s loaded." % IPA.version) diff --git a/contrib/soap.py b/contrib/soap.py deleted file mode 100755 index 4d0a023..0000000 --- a/contrib/soap.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "v0.7" # bump this on every non-trivial change - -from twisted.internet import defer, reactor -from twisted_ipa import CTRL, IPAFactory, __version__ as twisted_ipa_version -from ipa import Ctrl -from treq import post, collect -from suds.client import Client -from functools import partial -from distutils.version import StrictVersion as V # FIXME: use NormalizedVersion from PEP-386 when available -import argparse, datetime, signal, sys, os, logging, logging.handlers - -# we don't support older versions of TwistedIPA module -assert V(twisted_ipa_version) > V('0.4') - -# keys from OpenBSC openbsc/src/libbsc/bsc_rf_ctrl.c, values SOAP-specific -oper = { 'inoperational' : 0, 'operational' : 1 } -admin = { 'locked' : 0, 'unlocked' : 1 } -policy = { 'off' : 0, 'on' : 1, 'grace' : 2, 'unknown' : 3 } - -# keys from OpenBSC openbsc/src/libbsc/bsc_vty.c -fix = { 'invalid' : 0, 'fix2d' : 1, 'fix3d' : 1 } # SOAP server treats it as boolean but expects int - - -def handle_reply(p, f, log, r): - """ - Reply handler: takes function p to process raw SOAP server reply r, function f to run for each command and verbosity flag v - """ - repl = p(r) # result is expected to have both commands[] array and error string (could be None) - bsc_id = repl.commands[0].split()[0].split('.')[3] # we expect 1st command to have net.0.bsc.666.bts.2.trx.1 location prefix format - log.info("Received SOAP response for BSC %s with %d commands, error status: %s" % (bsc_id, len(repl.commands), repl.error)) - log.debug("BSC %s commands: %s" % (bsc_id, repl.commands)) - for t in repl.commands: # Process OpenBscCommands format from .wsdl - (_, m) = Ctrl().cmd(*t.split()) - f(m) - - -class Trap(CTRL): - """ - TRAP handler (agnostic to factory's client object) - """ - def ctrl_TRAP(self, data, op_id, v): - """ - Parse CTRL TRAP and dispatch to appropriate handler after normalization - """ - (l, r) = v.split() - loc = l.split('.') - t_type = loc[-1] - p = partial(lambda a, i: a[i] if len(a) > i else None, loc) # parse helper - method = getattr(self, 'handle_' + t_type.replace('-', ''), lambda: "Unhandled %s trap" % t_type) - method(p(1), p(3), p(5), p(7), r) # we expect net.0.bsc.666.bts.2.trx.1 format for trap prefix - - def ctrl_SET_REPLY(self, data, _, v): - """ - Debug log for replies to our commands - """ - self.factory.log.debug('SET REPLY %s' % v) - - def ctrl_ERROR(self, data, op_id, v): - """ - We want to know if smth went wrong - """ - self.factory.log.debug('CTRL ERROR [%s] %s' % (op_id, v)) - - def connectionMade(self): - """ - Logging wrapper, calling super() is necessary not to break reconnection logic - """ - self.factory.log.info("Connected to CTRL@%s:%d" % (self.factory.host, self.factory.port)) - super(CTRL, self).connectionMade() - - @defer.inlineCallbacks - def handle_locationstate(self, net, bsc, bts, trx, data): - """ - Handle location-state TRAP: parse trap content, build SOAP context and use treq's routines to post it while setting up async handlers - """ - (ts, fx, lat, lon, height, opr, adm, pol, mcc, mnc) = data.split(',') - tstamp = datetime.datetime.fromtimestamp(float(ts)).isoformat() - self.factory.log.debug('location-state@%s.%s.%s.%s (%s) [%s/%s] => %s' % (net, bsc, bts, trx, tstamp, mcc, mnc, data)) - ctx = self.factory.client.registerSiteLocation(bsc, float(lon), float(lat), fix.get(fx, 0), tstamp, oper.get(opr, 2), admin.get(adm, 2), policy.get(pol, 3)) - d = post(self.factory.location, ctx.envelope) - d.addCallback(collect, partial(handle_reply, ctx.process_reply, self.transport.write, self.factory.log)) # treq's collect helper is handy to get all reply content at once using closure on ctx - d.addErrback(lambda e, bsc: self.factory.log.critical("HTTP POST error %s while trying to register BSC %s" % (e, bsc)), bsc) # handle HTTP errors - # Ensure that we run only limited number of requests in parallel: - yield self.factory.semaphore.acquire() - yield d # we end up here only if semaphore is available which means it's ok to fire the request without exceeding the limit - self.factory.semaphore.release() - - def handle_notificationrejectionv1(self, net, bsc, bts, trx, data): - """ - Handle notification-rejection-v1 TRAP: just an example to show how more message types can be handled - """ - self.factory.log.debug('notification-rejection-v1 at bsc-id %s => %s' % (bsc, data)) - - -class TrapFactory(IPAFactory): - """ - Store SOAP client object so TRAP handler can use it for requests - """ - location = None - log = None - semaphore = None - client = None - host = None - port = None - def __init__(self, host, port, proto, semaphore, log, wsdl=None, location=None): - self.host = host # for logging only, - self.port = port # seems to be no way to get it from ReconnectingClientFactory - self.log = log - self.semaphore = semaphore - soap = Client(wsdl, location=location, nosend=True) # make async SOAP client - self.location = location.encode() if location else soap.wsdl.services[0].ports[0].location # necessary for dispatching HTTP POST via treq - self.client = soap.service - level = self.log.getEffectiveLevel() - self.log.setLevel(logging.WARNING) # we do not need excessive debug from lower levels - super(TrapFactory, self).__init__(proto, self.log) - self.log.setLevel(level) - self.log.debug("Using IPA %s, SUDS client: %s" % (Ctrl.version, soap)) - - -def reloader(path, script, log, dbg1, dbg2, signum, _): - """ - Signal handler: we have to use execl() because twisted's reactor is not restartable due to some bug in twisted implementation - """ - log.info("Received Signal %d - restarting..." % signum) - if signum == signal.SIGUSR1 and dbg1 not in sys.argv and dbg2 not in sys.argv: - sys.argv.append(dbg1) # enforce debug - if signum == signal.SIGUSR2 and (dbg1 in sys.argv or dbg2 in sys.argv): # disable debug - if dbg1 in sys.argv: - sys.argv.remove(dbg1) - if dbg2 in sys.argv: - sys.argv.remove(dbg2) - os.execl(path, script, *sys.argv[1:]) - - -if __name__ == '__main__': - p = argparse.ArgumentParser(description='Proxy between given SOAP service and Osmocom CTRL protocol.') - p.add_argument('-v', '--version', action='version', version=("%(prog)s " + __version__)) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface, defaults to 4250") - p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") - p.add_argument('-w', '--wsdl', required=True, help="WSDL URL for SOAP") - p.add_argument('-n', '--num', type=int, default=5, help="Max number of concurrent HTTP requests to SOAP server") - p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") - p.add_argument('-o', '--output', action='store_true', help="Log to STDOUT in addition to SYSLOG") - p.add_argument('-l', '--location', help="Override location found in WSDL file (don't use unless you know what you're doing)") - args = p.parse_args() - - log = logging.getLogger('CTRL2SOAP') - if args.debug: - log.setLevel(logging.DEBUG) - else: - log.setLevel(logging.INFO) - log.addHandler(logging.handlers.SysLogHandler('/dev/log')) - if args.output: - log.addHandler(logging.StreamHandler(sys.stdout)) - - reboot = partial(reloader, os.path.abspath(__file__), os.path.basename(__file__), log, '-d', '--debug') # keep in sync with add_argument() call above - signal.signal(signal.SIGHUP, reboot) - signal.signal(signal.SIGQUIT, reboot) - signal.signal(signal.SIGUSR1, reboot) # restart and enabled debug output - signal.signal(signal.SIGUSR2, reboot) # restart and disable debug output - - log.info("SOAP proxy %s starting with PID %d ..." % (__version__, os.getpid())) - reactor.connectTCP(args.ctrl, args.port, TrapFactory(args.ctrl, args.port, Trap, defer.DeferredSemaphore(args.num), log, args.wsdl, args.location)) - reactor.run() diff --git a/contrib/twisted_ipa.py b/contrib/twisted_ipa.py deleted file mode 100755 index e6d7b1a..0000000 --- a/contrib/twisted_ipa.py +++ /dev/null @@ -1,384 +0,0 @@ -#!/usr/bin/python3 -# -*- mode: python-mode; py-indent-tabs-mode: nil -*- -""" -/* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -""" - -__version__ = "0.6" # bump this on every non-trivial change - -from ipa import Ctrl, IPA -from twisted.internet.protocol import ReconnectingClientFactory -from twisted.internet import reactor -from twisted.protocols import basic -import argparse, logging - -class IPACommon(basic.Int16StringReceiver): - """ - Generic IPA protocol handler: include some routines for simpler subprotocols. - It's not intended as full implementation of all subprotocols, rather common ground and example code. - """ - def dbg(self, line): - """ - Debug print helper - """ - self.factory.log.debug(line) - - def osmo_CTRL(self, data): - """ - OSMO CTRL protocol - Placeholder, see corresponding derived class - """ - pass - - def osmo_MGCP(self, data): - """ - OSMO MGCP extension - """ - self.dbg('OSMO MGCP received %s' % data) - - def osmo_LAC(self, data): - """ - OSMO LAC extension - """ - self.dbg('OSMO LAC received %s' % data) - - def osmo_SMSC(self, data): - """ - OSMO SMSC extension - """ - self.dbg('OSMO SMSC received %s' % data) - - def osmo_ORC(self, data): - """ - OSMO ORC extension - """ - self.dbg('OSMO ORC received %s' % data) - - def osmo_GSUP(self, data): - """ - OSMO GSUP extension - """ - self.dbg('OSMO GSUP received %s' % data) - - def osmo_OAP(self, data): - """ - OSMO OAP extension - """ - self.dbg('OSMO OAP received %s' % data) - - def osmo_UNKNOWN(self, data): - """ - OSMO defaul extension handler - """ - self.dbg('OSMO unknown extension received %s' % data) - - def handle_RSL(self, data, proto, extension): - """ - RSL protocol handler - """ - self.dbg('IPA RSL received message with extension %s' % extension) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Placeholder, see corresponding derived class - """ - pass - - def handle_SCCP(self, data, proto, extension): - """ - SCCP protocol handler - """ - self.dbg('IPA SCCP received message with extension %s' % extension) - - def handle_OML(self, data, proto, extension): - """ - OML protocol handler - """ - self.dbg('IPA OML received message with extension %s' % extension) - - def handle_OSMO(self, data, proto, extension): - """ - Dispatcher point for OSMO subprotocols based on extension name, lambda default should never happen - """ - method = getattr(self, 'osmo_' + IPA().ext(extension), lambda: "extension dispatch failure") - method(data) - - def handle_MGCP(self, data, proto, extension): - """ - MGCP protocol handler - """ - self.dbg('IPA MGCP received message with attribute %s' % extension) - - def handle_UNKNOWN(self, data, proto, extension): - """ - Default protocol handler - """ - self.dbg('IPA received message for %s (%s) protocol with attribute %s' % (IPA().proto(proto), proto, extension)) - - def process_chunk(self, data): - """ - Generic message dispatcher for IPA (sub)protocols based on protocol name, lambda default should never happen - """ - (_, proto, extension, content) = IPA().del_header(data) - if content is not None: - self.dbg('IPA received %s::%s [%d/%d] %s' % (IPA().proto(proto), IPA().ext_name(proto, extension), len(data), len(content), content)) - method = getattr(self, 'handle_' + IPA().proto(proto), lambda: "protocol dispatch failure") - method(content, proto, extension) - - def dataReceived(self, data): - """ - Override for dataReceived from Int16StringReceiver because of inherently incompatible interpretation of length - If default handler is used than we would always get off-by-1 error (Int16StringReceiver use equivalent of l + 2) - """ - if len(data): - (head, tail) = IPA().split_combined(data) - self.process_chunk(head) - self.dataReceived(tail) - - def connectionMade(self): - """ - We have to resetDelay() here to drop internal state to default values to make reconnection logic work - Make sure to call this via super() if overriding to keep reconnection logic intact - """ - addr = self.transport.getPeer() - self.dbg('IPA connected to %s:%d peer' % (addr.host, addr.port)) - self.factory.resetDelay() - - -class CCM(IPACommon): - """ - Implementation of CCM protocol for IPA multiplex - """ - def ack(self): - self.transport.write(IPA().id_ack()) - - def ping(self): - self.transport.write(IPA().ping()) - - def pong(self): - self.transport.write(IPA().pong()) - - def handle_CCM(self, data, proto, msgt): - """ - CCM (IPA Connection Management) - Only basic logic necessary for tests is implemented (ping-pong, id ack etc) - """ - if msgt == IPA.MSGT['ID_GET']: - self.transport.getHandle().sendall(IPA().id_resp(self.factory.ccm_id)) - # if we call - # self.transport.write(IPA().id_resp(self.factory.test_id)) - # instead, than we would have to also call - # reactor.callLater(1, self.ack) - # instead of self.ack() - # otherwise the writes will be glued together - hence the necessity for ugly hack with 1s timeout - # Note: this still might work depending on the IPA implementation details on the other side - self.ack() - # schedule PING in 4s - reactor.callLater(4, self.ping) - if msgt == IPA.MSGT['PING']: - self.pong() - - -class CTRL(IPACommon): - """ - Implementation of Osmocom control protocol for IPA multiplex - """ - def ctrl_SET(self, data, op_id, v): - """ - Handle CTRL SET command - """ - self.dbg('CTRL SET [%s] %s' % (op_id, v)) - - def ctrl_SET_REPLY(self, data, op_id, v): - """ - Handle CTRL SET reply - """ - self.dbg('CTRL SET REPLY [%s] %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - Handle CTRL GET command - """ - self.dbg('CTRL GET [%s] %s' % (op_id, v)) - - def ctrl_GET_REPLY(self, data, op_id, v): - """ - Handle CTRL GET reply - """ - self.dbg('CTRL GET REPLY [%s] %s' % (op_id, v)) - - def ctrl_TRAP(self, data, op_id, v): - """ - Handle CTRL TRAP command - """ - self.dbg('CTRL TRAP [%s] %s' % (op_id, v)) - - def ctrl_ERROR(self, data, op_id, v): - """ - Handle CTRL ERROR reply - """ - self.dbg('CTRL ERROR [%s] %s' % (op_id, v)) - - def osmo_CTRL(self, data): - """ - OSMO CTRL message dispatcher, lambda default should never happen - For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example - """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) - (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) - method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") - method(data, op_id, v) - - -class IPAServer(CCM): - """ - Test implementation of IPA server - Demonstrate CCM opearation by overriding necessary bits from CCM - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CCM - Initiate CCM upon connection - """ - addr = self.transport.getPeer() - self.factory.log.info('IPA server: connection from %s:%d client' % (addr.host, addr.port)) - super(IPAServer, self).connectionMade() - self.transport.write(IPA().id_get()) - - -class CtrlServer(CTRL): - """ - Test implementation of CTRL server - Demonstarte CTRL handling by overriding simpler routines from CTRL - """ - def connectionMade(self): - """ - Keep reconnection logic working by calling routine from CTRL - Send TRAP upon connection - Note: we can't use sendString() because of it's incompatibility with IPA interpretation of length prefix - """ - addr = self.transport.getPeer() - self.factory.log.info('CTRL server: connection from %s:%d client' % (addr.host, addr.port)) - super(CtrlServer, self).connectionMade() - self.transport.write(Ctrl().trap('LOL', 'what')) - self.transport.write(Ctrl().trap('rulez', 'XXX')) - - def reply(self, r): - self.transport.write(Ctrl().add_header(r)) - - def ctrl_SET(self, data, op_id, v): - """ - CTRL SET command: always succeed - """ - self.dbg('SET [%s] %s' % (op_id, v)) - self.reply('SET_REPLY %s %s' % (op_id, v)) - - def ctrl_GET(self, data, op_id, v): - """ - CTRL GET command: always fail - """ - self.dbg('GET [%s] %s' % (op_id, v)) - self.reply('ERROR %s No variable found' % op_id) - - -class IPAFactory(ReconnectingClientFactory): - """ - Generic IPA Client Factory which can be used to store state for various subprotocols and manage connections - Note: so far we do not really need separate Factory for acting as a server due to protocol simplicity - """ - protocol = IPACommon - log = None - ccm_id = IPA().identity(unit=b'1515/0/1', mac=b'b0:0b:fa:ce:de:ad:be:ef', utype=b'sysmoBTS', name=b'StingRay', location=b'hell', sw=IPA.version.encode('utf-8')) - - def __init__(self, proto=None, log=None, ccm_id=None): - if proto: - self.protocol = proto - if ccm_id: - self.ccm_id = ccm_id - if log: - self.log = log - else: - self.log = logging.getLogger('IPAFactory') - self.log.setLevel(logging.CRITICAL) - self.log.addHandler(logging.NullHandler) - - def clientConnectionFailed(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection failed: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) - - def clientConnectionLost(self, connector, reason): - """ - Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method - """ - self.log.warning('IPAFactory connection lost: %s' % reason.getErrorMessage()) - ReconnectingClientFactory.clientConnectionLost(self, connector, reason) - - -if __name__ == '__main__': - p = argparse.ArgumentParser("Twisted IPA (module v%s) app" % IPA.version) - p.add_argument('-v', '--version', action='version', version="%(prog)s v" + __version__) - p.add_argument('-p', '--port', type=int, default=4250, help="Port to use for CTRL interface") - p.add_argument('-d', '--host', default='localhost', help="Adress to use for CTRL interface") - cs = p.add_mutually_exclusive_group() - cs.add_argument("-c", "--client", action='store_true', help="asume client role") - cs.add_argument("-s", "--server", action='store_true', help="asume server role") - ic = p.add_mutually_exclusive_group() - ic.add_argument("--ipa", action='store_true', help="use IPA protocol") - ic.add_argument("--ctrl", action='store_true', help="use CTRL protocol") - args = p.parse_args() - test = False - - log = logging.getLogger('TwistedIPA') - log.setLevel(logging.DEBUG) - log.addHandler(logging.StreamHandler(sys.stdout)) - - if args.ctrl: - if args.client: - # Start osmo-bsc to receive TRAP messages when osmo-bts-* connects to it - print('CTRL client, connecting to %s:%d' % (args.host, args.port)) - reactor.connectTCP(args.host, args.port, IPAFactory(CTRL, log)) - test = True - if args.server: - # Use bsc_control.py to issue set/get commands - print('CTRL server, listening on port %d' % args.port) - reactor.listenTCP(args.port, IPAFactory(CtrlServer, log)) - test = True - if args.ipa: - if args.client: - # Start osmo-nitb which would initiate A-bis/IP session - print('IPA client, connecting to %s ports %d and %d' % (args.host, IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.connectTCP(args.host, IPA.TCP_PORT_OML, IPAFactory(CCM, log)) - reactor.connectTCP(args.host, IPA.TCP_PORT_RSL, IPAFactory(CCM, log)) - test = True - if args.server: - # Start osmo-bts-* which would attempt to connect to us - print('IPA server, listening on ports %d and %d' % (IPA.TCP_PORT_OML, IPA.TCP_PORT_RSL)) - reactor.listenTCP(IPA.TCP_PORT_RSL, IPAFactory(IPAServer, log)) - reactor.listenTCP(IPA.TCP_PORT_OML, IPAFactory(IPAServer, log)) - test = True - if test: - reactor.run() - else: - print("Please specify which protocol in which role you'd like to test.") diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index e9d73ff..57ef82e 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -29,11 +29,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import Ctrl, IPA +from osmopy.osmo_ipa import Ctrl, IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index eeb151c..afe1cfd 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -23,11 +23,7 @@ import osmopy.obscvty as obscvty import osmopy.osmoutil as osmoutil - -# add $top_srcdir/contrib to find ipa.py -sys.path.append(os.path.join(sys.path[0], '..', 'contrib')) - -from ipa import IPA +from osmopy.osmo_ipa import IPA # to be able to find $top_srcdir/doc/... confpath = os.path.join(sys.path[0], '..') -- To view, visit https://gerrit.osmocom.org/5512 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:53 +0000 Subject: osmo-bsc[master]: Remove dead code left over from NITB split In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:33:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:33:59 +0000 Subject: osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:34:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:34:22 +0000 Subject: osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5502 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:34:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:34:56 +0000 Subject: osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5506 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:35:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:35:12 +0000 Subject: osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5505 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:35:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:35:20 +0000 Subject: osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:35:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:35:33 +0000 Subject: osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:35:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:35:44 +0000 Subject: osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:51:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:51:48 +0000 Subject: osmo-bsc[master]: Remove unused RRLP options/codec In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5476 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:51:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:51:52 +0000 Subject: osmo-bsc[master]: Remove bogus vty config for LU reject cause In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5477 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:52:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:52:27 +0000 Subject: osmo-bsc[master]: Remove bogus MM INFO configuration In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5478 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:02 +0000 Subject: osmo-bsc[master]: Remove some more dead code In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5479 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I919bffe88babd90227c89abd4434322965c32ebb Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:14 +0000 Subject: [MERGED] osmo-bsc[master]: Remove some more dead code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove some more dead code ...................................................................... Remove some more dead code Change-Id: I919bffe88babd90227c89abd4434322965c32ebb --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h M src/libcommon-cs/common_cs.c M src/libcommon/gsm_data.c 4 files changed, 0 insertions(+), 163 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 7a1b62d..1cedef0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,9 +24,7 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct gsm_subscriber_group; struct bsc_subscr; -struct vlr_instance; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -40,26 +38,11 @@ #define EARFCN_QRXLV_INVALID 32 #define EARFCN_THRESH_LOW_INVALID 32 -enum gsm_security_event { - GSM_SECURITY_NOAVAIL, - GSM_SECURITY_AUTH_FAILED, - GSM_SECURITY_SUCCEEDED, - GSM_SECURITY_ALREADY, -}; - struct msgb; typedef int gsm_cbfn(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param); - -/* - * A dummy to keep a connection up for at least - * a couple of seconds to work around MSC issues. - */ -struct gsm_anchor_operation { - struct osmo_timer_list timeout; -}; /* Maximum number of neighbor cells whose average we track */ #define MAX_NEIGH_MEAS 10 @@ -75,16 +58,6 @@ uint8_t last_seen_nr; }; -enum ran_type { - RAN_UNKNOWN, - RAN_GERAN_A, /* 2G / A-interface */ - RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */ -}; - -extern const struct value_string ran_type_names[]; -static inline const char *ran_type_name(enum ran_type val) -{ return get_value_string(ran_type_names, val); } - struct gsm_classmark { bool classmark1_set; struct gsm48_classmark1 classmark1; @@ -92,12 +65,6 @@ uint8_t classmark2[3]; uint8_t classmark3_len; uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */ -}; - -enum integrity_protection_state { - INTEGRITY_PROTECTION_NONE = 0, - INTEGRITY_PROTECTION_IK = 1, - INTEGRITY_PROTECTION_IK_CK = 2, }; /* active radio connection of a mobile subscriber */ @@ -125,29 +92,6 @@ struct gsm_classmark classmark; uint16_t lac; - struct gsm_encr encr; - - struct { - unsigned int mgcp_rtp_endpoint; - uint16_t port_subscr; - uint16_t port_cn; - } rtp; - - struct { - /* A pointer to the SCCP user that handles - * the SCCP connections for this subscriber - * connection */ - struct osmo_sccp_user *scu; - - /* The address of the BSC that is associated - * with this subscriber connection */ - struct osmo_sccp_addr bsc_addr; - - /* The connection identifier that is used - * to reference the SCCP connection that is - * associated with this subscriber connection */ - int conn_id; - } a; }; @@ -241,13 +185,6 @@ bsc_ctr_description, }; -enum gsm_auth_policy { - GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ - GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ - GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ - GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ -}; - #define GSM_T3101_DEFAULT 3 /* s */ #define GSM_T3103_DEFAULT 5 /* s */ #define GSM_T3105_DEFAULT 100 /* ms */ @@ -280,7 +217,6 @@ uint16_t network_code; int a5_encryption; int neci; - int send_mm_info; struct { int active; /* Window RXLEV averaging */ @@ -299,7 +235,6 @@ } handover; struct rate_ctr_group *bsc_ctrs; - struct osmo_counter *active_calls; /* * TODO: Move the trans_list into the subscriber connection and @@ -361,12 +296,6 @@ * pointer is NULL to indicate absence of a bsc_subscribers list. */ struct llist_head *bsc_subscribers; - /* MSC: GSUP server address of the HLR */ - const char *gsup_server_addr_str; - uint16_t gsup_server_port; - - struct vlr_instance *vlr; - /* Periodic location update default value */ uint8_t t3212; @@ -374,65 +303,6 @@ struct mgcp_client_conf *conf; struct mgcp_client *client; } mgw; - - struct { - /* CS7 instance id number (set via VTY) */ - uint32_t cs7_instance; - /* A list with the context information about - * all BSCs we have connections with */ - struct llist_head bscs; - struct osmo_sccp_instance *sccp; - } a; -}; - -struct osmo_esme; - -enum gsm_sms_source_id { - SMS_SOURCE_UNKNOWN = 0, - SMS_SOURCE_MS, /* received from MS */ - SMS_SOURCE_VTY, /* received from VTY */ - SMS_SOURCE_SMPP, /* received via SMPP */ -}; - -#define SMS_HDR_SIZE 128 -#define SMS_TEXT_SIZE 256 - -struct gsm_sms_addr { - uint8_t ton; - uint8_t npi; - char addr[21+1]; -}; - -struct gsm_sms { - unsigned long long id; - struct gsm_sms_addr src, dst; - enum gsm_sms_source_id source; - - struct { - uint8_t transaction_id; - uint32_t msg_ref; - } gsm411; - - struct { - struct osmo_esme *esme; - uint32_t sequence_nr; - int transaction_mode; - char msg_id[16]; - } smpp; - - unsigned long validity_minutes; - time_t created; - bool is_report; - uint8_t reply_path_req; - uint8_t status_rep_req; - uint8_t ud_hdr_ind; - uint8_t protocol_id; - uint8_t data_coding_scheme; - uint8_t msg_ref; - uint8_t user_data_len; - uint8_t user_data[SMS_TEXT_SIZE]; - - char text[SMS_TEXT_SIZE]; }; extern void talloc_ctx_init(void *ctx_root); @@ -508,9 +378,6 @@ return 0; } - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); -const char *gsm_auth_policy_name(enum gsm_auth_policy policy); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 5d9b570..db854fd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -83,7 +83,6 @@ }; struct gsm_lchan; -struct gsm_mncc; struct osmo_rtp_socket; struct rtp_socket; struct bsc_api; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index b410b17..39df45e 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -58,11 +58,7 @@ net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); - net->active_calls = osmo_counter_alloc("msc.active_calls"); - net->dyn_ts_allow_tch_f = true; - - INIT_LLIST_HEAD(&net->a.bscs); return net; } diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 514708b..87d954a 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -120,24 +120,6 @@ return NULL; } -static const struct value_string auth_policy_names[] = { - { GSM_AUTH_POLICY_CLOSED, "closed" }, - { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, - { GSM_AUTH_POLICY_TOKEN, "token" }, - { GSM_AUTH_POLICY_REGEXP, "regexp" }, - { 0, NULL } -}; - -enum gsm_auth_policy gsm_auth_policy_parse(const char *arg) -{ - return get_string_value(auth_policy_names, arg); -} - -const char *gsm_auth_policy_name(enum gsm_auth_policy policy) -{ - return get_value_string(auth_policy_names, policy); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, @@ -433,10 +415,3 @@ rev_lev = (cm->classmark2[0] >> 5) & 0x3; return rev_lev >= 2; } - -const struct value_string ran_type_names[] = { - OSMO_VALUE_STRING(RAN_UNKNOWN), - OSMO_VALUE_STRING(RAN_GERAN_A), - OSMO_VALUE_STRING(RAN_UTRAN_IU), - { 0, NULL } -}; -- To view, visit https://gerrit.osmocom.org/5479 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I919bffe88babd90227c89abd4434322965c32ebb Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:14 +0000 Subject: [MERGED] osmo-bsc[master]: Remove bogus MM INFO configuration In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove bogus MM INFO configuration ...................................................................... Remove bogus MM INFO configuration The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 --- M doc/examples/osmo-bsc/osmo-bsc-minimal.cfg M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_ctrl_commands.c M src/libbsc/bsc_init.c M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c 8 files changed, 0 insertions(+), 100 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg index c972e06..850e29c 100644 --- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg @@ -1,9 +1,6 @@ network network country code 901 mobile network code 70 - mm info 1 - short name OsmoBSC - long name OsmoBSC bts 0 type sysmobts band GSM-1800 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index c7ba689..17412f7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -6,12 +6,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC encryption a5 0 neci 0 paging any use tch 0 - mm info 0 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 341aa43..581d541 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -5,12 +5,9 @@ network network country code 1 mobile network code 1 - short name OsmoBSC - long name OsmoBSC encryption a5 0 neci 0 paging any use tch 0 - mm info 0 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 8e4dc04..7a1b62d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -278,8 +278,6 @@ /* global parameters */ uint16_t country_code; uint16_t network_code; - char *name_long; - char *name_short; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c index 2d6fcb6..41d2361 100644 --- a/src/libbsc/bsc_ctrl_commands.c +++ b/src/libbsc/bsc_ctrl_commands.c @@ -30,45 +30,8 @@ #include #include -#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \ - CTRL_HELPER_GET_STRING(cmdname, dtype, element) \ - CTRL_HELPER_SET_STRING(cmdname, dtype, element) \ -static struct ctrl_cmd_element cmd_##cmdname = { \ - .name = cmdstr, \ - .get = get_##cmdname, \ - .set = set_##cmdname, \ - .verify = verify_vty_description_string, \ -} - -/** - * Check that there are no newlines or comments or other things - * that could make the VTY configuration unparsable. - */ -static int verify_vty_description_string(struct ctrl_cmd *cmd, - const char *value, void *data) -{ - int i; - const size_t len = strlen(value); - - for (i = 0; i < len; ++i) { - switch(value[i]) { - case '#': - case '\n': - case '\r': - cmd->reply = "String includes illegal character"; - return -1; - default: - break; - } - } - - return 0; -} - CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 999); CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 999); -CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, name_short); -CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long); static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) { @@ -452,8 +415,6 @@ int rc = 0; rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 34dfd36..c5a75aa 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -536,9 +536,6 @@ if (!bsc_gsmnet) return -ENOMEM; - bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); - bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); - return 0; } diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index a73c6a4..7612eda 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -167,18 +167,12 @@ vty_out(vty, "BSC is on Country Code %u, Network Code %u " "and has %u BTS%s", net->country_code, net->network_code, net->num_bts, VTY_NEWLINE); - vty_out(vty, " Long network name: '%s'%s", - net->name_long, VTY_NEWLINE); - vty_out(vty, " Short network name: '%s'%s", - net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, - VTY_NEWLINE); - vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", VTY_NEWLINE); @@ -806,12 +800,9 @@ vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); - vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); - vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", gsmnet->handover.win_rxlev_avg, VTY_NEWLINE); diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 2732ebf..35c13dd 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -80,28 +80,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_name_short, - cfg_net_name_short_cmd, - "short name NAME", - "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_long, - cfg_net_name_long_cmd, - "long name NAME", - "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - osmo_talloc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -113,19 +91,6 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->a5_encryption = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, - "mm info (0|1)", - "Mobility Management\n" - "Send MM INFO after LOC UPD ACCEPT\n" - "Disable\n" "Enable\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->send_mm_info = atoi(argv[0]); return CMD_SUCCESS; } @@ -246,10 +211,7 @@ install_node(&net_node, config_write_net); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); - install_element(GSMNET_NODE, &cfg_net_name_short_cmd); - install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5478 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:14 +0000 Subject: [MERGED] osmo-bsc[master]: Remove bogus vty config for LU reject cause In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove bogus vty config for LU reject cause ...................................................................... Remove bogus vty config for LU reject cause The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_vty.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs_vty.c 6 files changed, 0 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 6ad5e59..c7ba689 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -8,7 +8,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 0 paging any use tch 0 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 5031f2c..341aa43 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -7,7 +7,6 @@ mobile network code 1 short name OsmoBSC long name OsmoBSC - location updating reject cause 13 encryption a5 0 neci 0 paging any use tch 0 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 0f8bcb9..8e4dc04 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -280,7 +280,6 @@ uint16_t network_code; char *name_long; char *name_short; - enum gsm48_reject_value reject_cause; int a5_encryption; int neci; int send_mm_info; diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 6fa8e04..a73c6a4 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -172,8 +172,6 @@ vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, " Location updating reject cause: %u%s", - net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, VTY_NEWLINE); vty_out(vty, " NECI (TCH/H): %u%s", net->neci, @@ -810,8 +808,6 @@ vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); - vty_out(vty, " location updating reject cause %u%s", - gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index 59a8d5c..30de0cc 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -42,7 +42,6 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->num_bts = 0; - net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; net->T3103 = GSM_T3103_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 8f6e4ef..2732ebf 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -102,22 +102,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_reject_cause, - cfg_net_reject_cause_cmd, - "location updating reject cause <2-111>", - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Cause Value as Per GSM TS 04.08\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->reject_cause = atoi(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, "encryption a5 (0|1|2|3)", @@ -264,7 +248,6 @@ install_element(GSMNET_NODE, &cfg_net_mnc_cmd); install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); -- To view, visit https://gerrit.osmocom.org/5477 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:15 +0000 Subject: [MERGED] osmo-bsc[master]: Remove unused RRLP options/codec In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unused RRLP options/codec ...................................................................... Remove unused RRLP options/codec RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/Makefile.am M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/rrlp.h M src/libbsc/bsc_vty.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/gsm_data.c 9 files changed, 0 insertions(+), 65 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 64c3abd..6ad5e59 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -12,7 +12,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 7697481..5031f2c 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -11,7 +11,6 @@ encryption a5 0 neci 0 paging any use tch 0 - rrlp mode none mm info 0 handover 0 handover window rxlev averaging 10 diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 1b86f9a..b067fc2 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -44,7 +44,6 @@ pcu_if.h \ pcuif_proto.h \ rest_octets.h \ - rrlp.h \ rs232.h \ signal.h \ socket.h \ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3268426..0f8bcb9 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -332,11 +332,6 @@ /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; - /* Radio Resource Location Protocol (TS 04.31) */ - struct { - enum rrlp_mode mode; - } rrlp; - enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T]; /* Use a TCH for handling requests of type paging any */ @@ -519,9 +514,6 @@ enum gsm_auth_policy gsm_auth_policy_parse(const char *arg); const char *gsm_auth_policy_name(enum gsm_auth_policy policy); - -enum rrlp_mode rrlp_mode_parse(const char *arg); -const char *rrlp_mode_name(enum rrlp_mode mode); enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index 9bbcabd..5d9b570 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -34,14 +34,6 @@ struct osmo_bsc_sccp_con; -/* RRLP mode of operation */ -enum rrlp_mode { - RRLP_MODE_NONE, - RRLP_MODE_MS_BASED, - RRLP_MODE_MS_PREF, - RRLP_MODE_ASS_PREF, -}; - /* Channel Request reason */ enum gsm_chreq_reason_t { GSM_CHREQ_REASON_EMERG, diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h deleted file mode 100644 index c89402a..0000000 --- a/include/osmocom/bsc/rrlp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RRLP_H -#define _RRLP_H - -void on_dso_load_rrlp(void); - -#endif /* _RRLP_H */ - diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 9500645..6fa8e04 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -180,8 +180,6 @@ VTY_NEWLINE); vty_out(vty, " Use TCH for Paging any: %d%s", net->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off", VTY_NEWLINE); vty_out(vty, " Handover: %s%s", net->handover.active ? "On" : "Off", @@ -817,8 +815,6 @@ vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE); vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, VTY_NEWLINE); - vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), - VTY_NEWLINE); vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE); vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE); vty_out(vty, " handover window rxlev averaging %u%s", diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index beb936b..8f6e4ef 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -133,22 +133,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, - "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", - "Radio Resource Location Protocol\n" - "Set the Radio Resource Location Protocol Mode\n" - "Don't send RRLP request\n" - "Request MS-based location\n" - "Request any location, prefer MS-based\n" - "Request any location, prefer MS-assisted\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, "mm info (0|1)", "Mobility Management\n" @@ -282,7 +266,6 @@ install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); - install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c index 6a78e3a..514708b 100644 --- a/src/libcommon/gsm_data.c +++ b/src/libcommon/gsm_data.c @@ -138,24 +138,6 @@ return get_value_string(auth_policy_names, policy); } -static const struct value_string rrlp_mode_names[] = { - { RRLP_MODE_NONE, "none" }, - { RRLP_MODE_MS_BASED, "ms-based" }, - { RRLP_MODE_MS_PREF, "ms-preferred" }, - { RRLP_MODE_ASS_PREF, "ass-preferred" }, - { 0, NULL } -}; - -enum rrlp_mode rrlp_mode_parse(const char *arg) -{ - return get_string_value(rrlp_mode_names, arg); -} - -const char *rrlp_mode_name(enum rrlp_mode mode) -{ - return get_value_string(rrlp_mode_names, mode); -} - static const struct value_string bts_gprs_mode_names[] = { { BTS_GPRS_NONE, "none" }, { BTS_GPRS_GPRS, "gprs" }, -- To view, visit https://gerrit.osmocom.org/5476 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:15 +0000 Subject: [MERGED] osmo-bsc[master]: Remove dead code left over from NITB split In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove dead code left over from NITB split ...................................................................... Remove dead code left over from NITB split There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 --- M configure.ac M include/osmocom/bsc/Makefile.am D include/osmocom/bsc/auth.h M include/osmocom/bsc/bss.h M include/osmocom/bsc/chan_alloc.h M include/osmocom/bsc/common_bsc.h M include/osmocom/bsc/common_cs.h D include/osmocom/bsc/crc24.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/gsm_data_shared.h D include/osmocom/bsc/gsm_subscriber.h M include/osmocom/bsc/ipaccess.h D include/osmocom/bsc/mncc.h D include/osmocom/bsc/mncc_int.h D include/osmocom/bsc/msc_ifaces.h D include/osmocom/bsc/rtp_proxy.h M include/osmocom/bsc/signal.h D include/osmocom/bsc/silent_call.h D include/osmocom/bsc/smpp.h D include/osmocom/bsc/sms_queue.h D include/osmocom/bsc/transaction.h D include/osmocom/bsc/trau_mux.h D include/osmocom/bsc/trau_upqueue.h M src/Makefile.am M src/ipaccess/Makefile.am M src/ipaccess/ipaccess-config.c M src/libbsc/abis_rsl.c M src/libbsc/bsc_api.c M src/libbsc/bsc_init.c M src/libbsc/chan_alloc.c M src/libbsc/e1_config.c M src/libbsc/gsm_04_08_utils.c M src/libbsc/handover_logic.c M src/libbsc/net_init.c M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libcommon/Makefile.am M src/libcommon/common_vty.c D src/libcommon/gsm_subscriber_base.c M src/libcommon/talloc_ctx.c D src/libtrau/Makefile.am D src/libtrau/rtp_proxy.c D src/libtrau/trau_mux.c D src/libtrau/trau_upqueue.c M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_filter.c M src/utils/Makefile.am M src/utils/bs11_config.c M tests/Makefile.am M tests/abis/Makefile.am M tests/bsc-nat-trie/Makefile.am M tests/bsc-nat/Makefile.am M tests/bsc/Makefile.am M tests/bsc/bsc_test.c M tests/bssap/Makefile.am M tests/bssap/bssap_test.c M tests/channel/channel_test.c M tests/gsm0408/Makefile.am M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/Makefile.am M tests/subscr/Makefile.am M tests/testsuite.at D tests/trau/Makefile.am D tests/trau/trau_test.c D tests/trau/trau_test.ok 68 files changed, 25 insertions(+), 2,484 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index bdcf026..98f96bb 100644 --- a/configure.ac +++ b/configure.ac @@ -145,7 +145,6 @@ include/osmocom/Makefile include/osmocom/bsc/Makefile src/Makefile - src/libtrau/Makefile src/libbsc/Makefile src/libcommon/Makefile src/libfilter/Makefile @@ -161,7 +160,6 @@ tests/bsc-nat/Makefile tests/bsc-nat-trie/Makefile tests/abis/Makefile - tests/trau/Makefile tests/subscr/Makefile tests/nanobts_omlattr/Makefile tests/bssap/Makefile diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 9d2ee6e..1b86f9a 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,7 +4,6 @@ abis_om2000.h \ abis_rsl.h \ arfcn_range_encode.h \ - auth.h \ bsc_msc.h \ bsc_msg_filter.h \ bsc_nat.h \ @@ -18,7 +17,6 @@ common.h \ common_bsc.h \ common_cs.h \ - crc24.h \ ctrl.h \ debug.h \ e1_config.h \ @@ -26,16 +24,12 @@ gsm_04_80.h \ gsm_data.h \ gsm_data_shared.h \ - gsm_subscriber.h \ handover.h \ handover_decision.h \ ipaccess.h \ meas_feed.h \ meas_rep.h \ misdn.h \ - mncc.h \ - mncc_int.h \ - msc_ifaces.h \ nat_rewrite_trie.h \ network_listen.h \ openbscdefines.h \ @@ -52,15 +46,9 @@ rest_octets.h \ rrlp.h \ rs232.h \ - rtp_proxy.h \ signal.h \ - silent_call.h \ - sms_queue.h \ socket.h \ system_information.h \ - transaction.h \ - trau_mux.h \ - trau_upqueue.h \ ussd.h \ vty.h \ bsc_api.h \ diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h deleted file mode 100644 index b314bbf..0000000 --- a/include/osmocom/bsc/auth.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _AUTH_H -#define _AUTH_H - -#include - -struct gsm_auth_tuple; - -enum auth_action { - AUTH_ERROR = -1, /* Internal error */ - AUTH_NOT_AVAIL = 0, /* No auth tuple available */ - AUTH_DO_AUTH_THEN_CIPH = 1, /* Firsth authenticate, then cipher */ - AUTH_DO_CIPH = 2, /* Only ciphering */ - AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */ -}; - -extern const struct value_string auth_action_names[]; -static inline const char *auth_action_str(enum auth_action a) -{ - return get_value_string(auth_action_names, a); -} - -#endif /* _AUTH_H */ diff --git a/include/osmocom/bsc/bss.h b/include/osmocom/bsc/bss.h index b12487d..9891f5f 100644 --- a/include/osmocom/bsc/bss.h +++ b/include/osmocom/bsc/bss.h @@ -6,7 +6,7 @@ struct msgb; /* start and stop network */ -extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_alloc(void); extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); diff --git a/include/osmocom/bsc/chan_alloc.h b/include/osmocom/bsc/chan_alloc.h index 320fa94..62d0286 100644 --- a/include/osmocom/bsc/chan_alloc.h +++ b/include/osmocom/bsc/chan_alloc.h @@ -24,9 +24,6 @@ struct gsm_subscriber_connection; -/* Find an allocated channel for a specified subscriber */ -struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub); - /* Allocate a logical channel (SDCCH, TCH, ...) */ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger); diff --git a/include/osmocom/bsc/common_bsc.h b/include/osmocom/bsc/common_bsc.h index 08394e9..32e5097 100644 --- a/include/osmocom/bsc/common_bsc.h +++ b/include/osmocom/bsc/common_bsc.h @@ -5,5 +5,4 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); diff --git a/include/osmocom/bsc/common_cs.h b/include/osmocom/bsc/common_cs.h index 09a4b02..c2e8515 100644 --- a/include/osmocom/bsc/common_cs.h +++ b/include/osmocom/bsc/common_cs.h @@ -6,8 +6,6 @@ struct msgb; struct gsm_network; -typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); - struct vty; #define MAX_A5_KEY_LEN (128/8) @@ -20,8 +18,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); + uint16_t network_code); int common_cs_vty_init(struct gsm_network *network, int (* config_write_net )(struct vty *)); diff --git a/include/osmocom/bsc/crc24.h b/include/osmocom/bsc/crc24.h deleted file mode 100644 index 756638c..0000000 --- a/include/osmocom/bsc/crc24.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CRC24_H -#define _CRC24_H - -#include - -#define INIT_CRC24 0xffffff - -uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); - -#endif diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index cbb809b..3268426 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -24,11 +24,9 @@ #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3] -struct mncc_sock_state; struct gsm_subscriber_group; struct bsc_subscr; struct vlr_instance; -struct vlr_subscr; struct gprs_ra_id; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] @@ -107,34 +105,8 @@ /* global linked list of subscriber_connections */ struct llist_head entry; - /* usage count. If this drops to zero, we start the release - * towards A/Iu */ - uint32_t use_count; - - /* The MS has opened the conn with a CM Service Request, and we shall - * keep it open for an actual request (or until timeout). */ - bool received_cm_service_request; - /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - - /* libmsc/libvlr subscriber information (if available) */ - struct vlr_subscr *vsub; - - /* LU expiration handling */ - uint8_t expire_timer_stopped; - /* SMS helpers for libmsc */ - uint8_t next_rp_ref; - - struct osmo_fsm_inst *conn_fsm; - - /* Are we part of a special "silent" call */ - int silent_call; - - /* MNCC rtp bridge markers */ - int mncc_rtp_bridge; - int mncc_rtp_create_pending; - int mncc_rtp_connect_pending; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; /* BSC */ @@ -142,7 +114,6 @@ /* back pointers */ struct gsm_network *network; - bool in_release; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ @@ -150,9 +121,6 @@ /* for assignment handling */ struct osmo_timer_list T10; /* BSC */ struct gsm_lchan *secondary_lchan; /* BSC */ - - /* connected via 2G or 3G? */ - enum ran_type via_ran; struct gsm_classmark classmark; @@ -336,10 +304,6 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_counter *active_calls; - /* layer 4 */ - struct mncc_sock_state *mncc_state; - mncc_recv_cb_t mncc_recv; - struct llist_head upqueue; /* * TODO: Move the trans_list into the subscriber connection and * create a pending list for MT transactions. These exist before @@ -380,8 +344,6 @@ /* MSC data in case we are a true BSC */ struct osmo_bsc_data *bsc_data; - - struct gsm_sms_queue *sms_queue; /* control interface */ struct ctrl_handle *ctrl; @@ -451,7 +413,6 @@ struct gsm_sms { unsigned long long id; - struct vlr_subscr *receiver; struct gsm_sms_addr src, dst; enum gsm_sms_source_id source; diff --git a/include/osmocom/bsc/gsm_data_shared.h b/include/osmocom/bsc/gsm_data_shared.h index e762c24..9bbcabd 100644 --- a/include/osmocom/bsc/gsm_data_shared.h +++ b/include/osmocom/bsc/gsm_data_shared.h @@ -33,7 +33,6 @@ struct osmo_bsc_data; struct osmo_bsc_sccp_con; -struct gsm_sms_queue; /* RRLP mode of operation */ enum rrlp_mode { diff --git a/include/osmocom/bsc/gsm_subscriber.h b/include/osmocom/bsc/gsm_subscriber.h deleted file mode 100644 index ca66d47..0000000 --- a/include/osmocom/bsc/gsm_subscriber.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _GSM_SUBSCR_H -#define _GSM_SUBSCR_H - -#include - -#include -#include - -#include - -#define GSM_NAME_LENGTH 160 - -#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ -#define GSM_MIN_EXTEN 20000 -#define GSM_MAX_EXTEN 49999 - -#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 -/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ - -#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 - -enum gsm_subscriber_field { - GSM_SUBSCRIBER_IMSI, - GSM_SUBSCRIBER_TMSI, - GSM_SUBSCRIBER_EXTENSION, - GSM_SUBSCRIBER_ID, -}; - -enum gsm_subscriber_update_reason { - GSM_SUBSCRIBER_UPDATE_ATTACHED, - GSM_SUBSCRIBER_UPDATE_DETACHED, - GSM_SUBSCRIBER_UPDATE_EQUIPMENT, -}; - -/* - * Struct for pending channel requests. This is managed in the - * llist_head requests of each subscriber. The reference counting - * should work in such a way that a subscriber with a pending request - * remains in memory. - */ -struct subscr_request { - struct llist_head entry; - - /* human readable label to be able to log pending request kinds */ - const char *label; - - /* the callback data */ - gsm_cbfn *cbfn; - void *param; -}; - -int subscr_update(struct vlr_subscr *vsub, int reason); - -/* - * Paging handling with authentication - */ -struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub, - gsm_cbfn *cbfn, void *param, - const char *label); - -void subscr_remove_request(struct subscr_request *req); -int subscr_rx_paging_response(struct msgb *msg, - struct gsm_subscriber_connection *conn); - -int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, - struct msgb *msg, void *data, void *param); - -#endif /* _GSM_SUBSCR_H */ diff --git a/include/osmocom/bsc/ipaccess.h b/include/osmocom/bsc/ipaccess.h index 82e89c2..3d0f612 100644 --- a/include/osmocom/bsc/ipaccess.h +++ b/include/osmocom/bsc/ipaccess.h @@ -2,11 +2,13 @@ #define _IPACCESS_H #include -#include "gsm_subscriber.h" #include #include #include +struct gsm_bts; +struct gsm_bts_trx; + struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; diff --git a/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h deleted file mode 100644 index 881e041..0000000 --- a/include/osmocom/bsc/mncc.h +++ /dev/null @@ -1,215 +0,0 @@ -/* GSM Mobile Radio Interface Layer 3 messages on the A-bis interface - * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */ - -/* (C) 2008-2009 by Harald Welte - * (C) 2008, 2009 by Holger Hans Peter Freyther - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#ifndef _MNCC_H -#define _MNCC_H - -#include -#include - -#include - -struct gsm_network; -struct msgb; - - -/* One end of a call */ -struct gsm_call { - struct llist_head entry; - - /* network handle */ - void *net; - - /* the 'local' transaction */ - uint32_t callref; - /* the 'remote' transaction */ - uint32_t remote_ref; -}; - -#define MNCC_SETUP_REQ 0x0101 -#define MNCC_SETUP_IND 0x0102 -#define MNCC_SETUP_RSP 0x0103 -#define MNCC_SETUP_CNF 0x0104 -#define MNCC_SETUP_COMPL_REQ 0x0105 -#define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ -#define MNCC_CALL_CONF_IND 0x0107 -#define MNCC_CALL_PROC_REQ 0x0108 -#define MNCC_PROGRESS_REQ 0x0109 -#define MNCC_ALERT_REQ 0x010a -#define MNCC_ALERT_IND 0x010b -#define MNCC_NOTIFY_REQ 0x010c -#define MNCC_NOTIFY_IND 0x010d -#define MNCC_DISC_REQ 0x010e -#define MNCC_DISC_IND 0x010f -#define MNCC_REL_REQ 0x0110 -#define MNCC_REL_IND 0x0111 -#define MNCC_REL_CNF 0x0112 -#define MNCC_FACILITY_REQ 0x0113 -#define MNCC_FACILITY_IND 0x0114 -#define MNCC_START_DTMF_IND 0x0115 -#define MNCC_START_DTMF_RSP 0x0116 -#define MNCC_START_DTMF_REJ 0x0117 -#define MNCC_STOP_DTMF_IND 0x0118 -#define MNCC_STOP_DTMF_RSP 0x0119 -#define MNCC_MODIFY_REQ 0x011a -#define MNCC_MODIFY_IND 0x011b -#define MNCC_MODIFY_RSP 0x011c -#define MNCC_MODIFY_CNF 0x011d -#define MNCC_MODIFY_REJ 0x011e -#define MNCC_HOLD_IND 0x011f -#define MNCC_HOLD_CNF 0x0120 -#define MNCC_HOLD_REJ 0x0121 -#define MNCC_RETRIEVE_IND 0x0122 -#define MNCC_RETRIEVE_CNF 0x0123 -#define MNCC_RETRIEVE_REJ 0x0124 -#define MNCC_USERINFO_REQ 0x0125 -#define MNCC_USERINFO_IND 0x0126 -#define MNCC_REJ_REQ 0x0127 -#define MNCC_REJ_IND 0x0128 - -#define MNCC_BRIDGE 0x0200 -#define MNCC_FRAME_RECV 0x0201 -#define MNCC_FRAME_DROP 0x0202 -#define MNCC_LCHAN_MODIFY 0x0203 -#define MNCC_RTP_CREATE 0x0204 -#define MNCC_RTP_CONNECT 0x0205 -#define MNCC_RTP_FREE 0x0206 - -#define GSM_TCHF_FRAME 0x0300 -#define GSM_TCHF_FRAME_EFR 0x0301 -#define GSM_TCHH_FRAME 0x0302 -#define GSM_TCH_FRAME_AMR 0x0303 -#define GSM_BAD_FRAME 0x03ff - -#define MNCC_SOCKET_HELLO 0x0400 - -#define GSM_MAX_FACILITY 128 -#define GSM_MAX_SSVERSION 128 -#define GSM_MAX_USERUSER 128 - -#define MNCC_F_BEARER_CAP 0x0001 -#define MNCC_F_CALLED 0x0002 -#define MNCC_F_CALLING 0x0004 -#define MNCC_F_REDIRECTING 0x0008 -#define MNCC_F_CONNECTED 0x0010 -#define MNCC_F_CAUSE 0x0020 -#define MNCC_F_USERUSER 0x0040 -#define MNCC_F_PROGRESS 0x0080 -#define MNCC_F_EMERGENCY 0x0100 -#define MNCC_F_FACILITY 0x0200 -#define MNCC_F_SSVERSION 0x0400 -#define MNCC_F_CCCAP 0x0800 -#define MNCC_F_KEYPAD 0x1000 -#define MNCC_F_SIGNAL 0x2000 - -struct gsm_mncc { - /* context based information */ - uint32_t msg_type; - uint32_t callref; - - /* which fields are present */ - uint32_t fields; - - /* data derived informations (MNCC_F_ based) */ - struct gsm_mncc_bearer_cap bearer_cap; - struct gsm_mncc_number called; - struct gsm_mncc_number calling; - struct gsm_mncc_number redirecting; - struct gsm_mncc_number connected; - struct gsm_mncc_cause cause; - struct gsm_mncc_progress progress; - struct gsm_mncc_useruser useruser; - struct gsm_mncc_facility facility; - struct gsm_mncc_cccap cccap; - struct gsm_mncc_ssversion ssversion; - struct { - int sup; - int inv; - } clir; - int signal; - - /* data derived information, not MNCC_F based */ - int keypad; - int more; - int notify; /* 0..127 */ - int emergency; - char imsi[16]; -}; - -struct gsm_data_frame { - uint32_t msg_type; - uint32_t callref; - unsigned char data[0]; -}; - -#define MNCC_SOCK_VERSION 5 -struct gsm_mncc_hello { - uint32_t msg_type; - uint32_t version; - - /* send the sizes of the structs */ - uint32_t mncc_size; - uint32_t data_frame_size; - - /* send some offsets */ - uint32_t called_offset; - uint32_t signal_offset; - uint32_t emergency_offset; -}; - -struct gsm_mncc_rtp { - uint32_t msg_type; - uint32_t callref; - uint32_t ip; - uint16_t port; - uint32_t payload_type; - uint32_t payload_msg_type; -}; - -struct gsm_mncc_bridge { - uint32_t msg_type; - uint32_t callref[2]; -}; - -const char *get_mncc_name(int value); -void mncc_set_cause(struct gsm_mncc *data, int loc, int val); -void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_builtin */ -int int_mncc_recv(struct gsm_network *net, struct msgb *msg); - -/* input from CC code into mncc_sock */ -int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg); - -int mncc_sock_init(struct gsm_network *net, const char *sock_path); - -#define mncc_is_data_frame(msg_type) \ - (msg_type == GSM_TCHF_FRAME \ - || msg_type == GSM_TCHF_FRAME_EFR \ - || msg_type == GSM_TCHH_FRAME \ - || msg_type == GSM_TCH_FRAME_AMR \ - || msg_type == GSM_BAD_FRAME) - - -#endif diff --git a/include/osmocom/bsc/mncc_int.h b/include/osmocom/bsc/mncc_int.h deleted file mode 100644 index 213ce14..0000000 --- a/include/osmocom/bsc/mncc_int.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MNCC_INT_H -#define _MNCC_INT_H - -#include - -struct mncc_int { - uint8_t def_codec[2]; -}; - -extern struct mncc_int mncc_int; - -uint8_t mncc_codec_for_mode(int lchan_type); - -#endif diff --git a/include/osmocom/bsc/msc_ifaces.h b/include/osmocom/bsc/msc_ifaces.h deleted file mode 100644 index dadb828..0000000 --- a/include/osmocom/bsc/msc_ifaces.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -/* These are the interfaces of the MSC layer towards (from?) the BSC and RNC, - * i.e. in the direction towards the mobile device (MS aka UE). - * - * 2G will use the A-interface, - * 3G aka UMTS will use the Iu-interface (for the MSC, it's IuCS). - * - * To allow linking parts of the MSC code without having to include entire - * infrastructures of external libraries, the core transmitting and receiving - * functions are left unimplemented. For example, a unit test does not need to - * link against external ASN1 libraries if it is never going to encode actual - * outgoing messages. It is up to each building scope to implement real world - * functions or to plug mere dummy implementations. - * - * For example, msc_tx_dtap(conn, msg), depending on conn->via_iface, will call - * either iu_tx() or a_tx() [note: at time of writing, the A-interface is not - * yet implemented]. When you try to link against libmsc, you will find that - * the compiler complains about an undefined reference to iu_tx(). If you, - * however, link against libiu as well as the osmo-iuh libs (etc.), iu_tx() is - * available. A unit test may instead simply implement a dummy iu_tx() function - * and not link against osmo-iuh, see tests/libiudummy/. - */ - -/* Each main linkage must implement this function (see comment above). */ -extern int iu_tx(struct msgb *msg, uint8_t sapi); - -int msc_tx_dtap(struct gsm_subscriber_connection *conn, - struct msgb *msg); - -int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn); -int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn, - enum gsm48_reject_value value); - -int msc_tx_common_id(struct gsm_subscriber_connection *conn); -int msc_call_assignment(struct gsm_trans *trans); -int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2); -void msc_call_release(struct gsm_trans *trans); -int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip); diff --git a/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h deleted file mode 100644 index 918420c..0000000 --- a/include/osmocom/bsc/rtp_proxy.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _RTP_PROXY_H -#define _RTP_PROXY_H - -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - - -#include - -#include -#include - -#include - -#define RTP_PT_GSM_FULL 3 -#define RTP_PT_GSM_HALF 96 -#define RTP_PT_GSM_EFR 97 -#define RTP_PT_AMR 98 -#define RTP_LEN_GSM_FULL 33 -#define RTP_LEN_GSM_HALF 15 -#define RTP_LEN_GSM_EFR 31 -#define RTP_GSM_DURATION 160 - -enum rtp_rx_action { - RTP_NONE, - RTP_PROXY, - RTP_RECV_UPSTREAM, -}; - -enum rtp_tx_action { - RTP_SEND_NONE, - RTP_SEND_DOWNSTREAM, -}; - -struct rtp_sub_socket { - struct sockaddr_in sin_local; - struct sockaddr_in sin_remote; - - struct osmo_fd bfd; - /* linked list of to-be-transmitted msgb's */ - struct llist_head tx_queue; -}; - -struct rtp_socket { - struct llist_head list; - - struct rtp_sub_socket rtp; - struct rtp_sub_socket rtcp; - - /* what should we do on receive? */ - enum rtp_rx_action rx_action; - union { - struct { - struct rtp_socket *other_sock; - } proxy; - struct { - struct gsm_network *net; - uint32_t callref; - } receive; - }; - enum rtp_tx_action tx_action; - struct { - uint16_t sequence; - uint32_t timestamp; - uint32_t ssrc; - struct timeval last_tv; - } transmit; -}; - -struct rtp_socket *rtp_socket_create(void); -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip); -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port); -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other); -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref); -int rtp_socket_free(struct rtp_socket *rs); -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame); - -#endif /* _RTP_PROXY_H */ diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index feab246..58d9acf 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -34,34 +34,21 @@ */ enum signal_subsystems { SS_PAGING, - SS_SMS, SS_ABISIP, SS_NM, SS_LCHAN, - SS_SUBSCR, - SS_SCALL, SS_CHALLOC, SS_IPAC_NWL, SS_RF, SS_MSC, SS_HO, SS_CCCH, - SS_SGSN, }; /* SS_PAGING signals */ enum signal_paging { S_PAGING_SUCCEEDED, S_PAGING_EXPIRED, -}; - -/* SS_SMS signals */ -enum signal_sms { - S_SMS_SUBMITTED, /* A SMS has been successfully submitted to us */ - S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */ - S_SMS_SMMA, /* A MS tells us it has more space available */ - S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */ - S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */ }; /* SS_ABISIP signals */ @@ -108,20 +95,6 @@ S_CHALLOC_FREED, /* lchan has been successfully freed */ }; -/* SS_SUBSCR signals */ -enum signal_subscr { - S_SUBSCR_ATTACHED, - S_SUBSCR_DETACHED, - S_SUBSCR_IDENTITY, /* we've received some identity information */ -}; - -/* SS_SCALL signals */ -enum signal_scall { - S_SCALL_SUCCESS, - S_SCALL_EXPIRED, - S_SCALL_DETACHED, -}; - /* SS_IPAC_NWL signals */ enum signal_ipaccess { S_IPAC_NWL_COMPLETE, @@ -136,21 +109,6 @@ S_RF_OFF, S_RF_ON, S_RF_GRACE, -}; - -struct paging_signal_data { - struct vlr_subscr *vsub; - struct gsm_bts *bts; - - int paging_result; - - /* NULL in case the paging didn't work */ - struct gsm_subscriber_connection *conn; -}; - -struct scall_signal_data { - struct gsm_subscriber_connection *conn; - void *data; }; struct ipacc_ack_signal_data { @@ -197,15 +155,6 @@ struct gsm_network *net; }; -struct sms_signal_data { - /* The transaction where this occured */ - struct gsm_trans *trans; - /* Can be NULL for SMMA */ - struct gsm_sms *sms; - /* int paging result. Only the ones with > 0 */ - int paging_result; -}; - struct lchan_signal_data { /* The lchan the signal happened on */ struct gsm_lchan *lchan; @@ -237,24 +186,6 @@ uint16_t rach_slot_count; uint16_t rach_busy_count; uint16_t rach_access_count; -}; - -/* GPRS SGSN signals SS_SGSN */ -enum signal_sgsn { - S_SGSN_ATTACH, - S_SGSN_DETACH, - S_SGSN_UPDATE, - S_SGSN_PDP_ACT, - S_SGSN_PDP_DEACT, - S_SGSN_PDP_TERMINATE, - S_SGSN_PDP_FREE, - S_SGSN_MM_FREE, -}; - -struct sgsn_mm_ctx; -struct sgsn_signal_data { - struct sgsn_mm_ctx *mm; - struct sgsn_pdp_ctx *pdp; /* non-NULL for PDP_ACT, PDP_DEACT, PDP_FREE */ }; #endif diff --git a/include/osmocom/bsc/silent_call.h b/include/osmocom/bsc/silent_call.h deleted file mode 100644 index 5fec77b..0000000 --- a/include/osmocom/bsc/silent_call.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _SILENT_CALL_H -#define _SILENT_CALL_H - -struct gsm_subscriber_connection; - -extern int gsm_silent_call_start(struct vlr_subscr *vsub, - void *data, int type); -extern int gsm_silent_call_stop(struct vlr_subscr *vsub); - -#if 0 -extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); -extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); -#endif - -#endif /* _SILENT_CALL_H */ diff --git a/include/osmocom/bsc/smpp.h b/include/osmocom/bsc/smpp.h deleted file mode 100644 index bcdac8f..0000000 --- a/include/osmocom/bsc/smpp.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -int smpp_openbsc_alloc_init(void *ctx); -int smpp_openbsc_start(struct gsm_network *net); diff --git a/include/osmocom/bsc/sms_queue.h b/include/osmocom/bsc/sms_queue.h deleted file mode 100644 index 2a8bd58..0000000 --- a/include/osmocom/bsc/sms_queue.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SMS_QUEUE_H -#define SMS_QUEUE_H - -struct gsm_network; -struct gsm_sms_queue; -struct vty; - -int sms_queue_start(struct gsm_network *, int in_flight); -int sms_queue_trigger(struct gsm_sms_queue *); - -/* vty helper functions */ -int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty); -int sms_queue_set_max_pending(struct gsm_sms_queue *, int max); -int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail); -int sms_queue_clear(struct gsm_sms_queue *); - -#endif diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h deleted file mode 100644 index 5465548..0000000 --- a/include/osmocom/bsc/transaction.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _TRANSACT_H -#define _TRANSACT_H - -#include -#include -#include -#include -#include -#include - -enum bridge_state { - BRIDGE_STATE_NONE, - BRIDGE_STATE_LOOPBACK_PENDING, - BRIDGE_STATE_LOOPBACK_ESTABLISHED, - BRIDGE_STATE_BRIDGE_PENDING, - BRIDGE_STATE_BRIDGE_ESTABLISHED, -}; - -/* One transaction */ -struct gsm_trans { - /* Entry in list of all transactions */ - struct llist_head entry; - - /* Back pointer to the network struct */ - struct gsm_network *net; - - /* The protocol within which we live */ - uint8_t protocol; - - /* The current transaction ID */ - uint8_t transaction_id; - - /* To whom we belong, unique identifier of remote MM entity */ - struct vlr_subscr *vsub; - - /* The associated connection we are using to transmit messages */ - struct gsm_subscriber_connection *conn; - - /* reference from MNCC or other application */ - uint32_t callref; - - /* if traffic channel receive was requested */ - int tch_recv; - - /* is thats one paging? */ - struct subscr_request *paging_request; - - /* bearer capabilities (rate and codec) */ - struct gsm_mncc_bearer_cap bearer_cap; - - /* status of the assignment, true when done */ - bool assignment_done; - - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - - union { - struct { - - /* current call state */ - int state; - - /* current timer and message queue */ - int Tcurrent; /* current CC timer */ - int T308_second; /* used to send release again */ - struct osmo_timer_list timer; - struct gsm_mncc msg; /* stores setup/disconnect/release message */ - } cc; - struct { - struct gsm411_smc_inst smc_inst; - struct gsm411_smr_inst smr_inst; - - struct gsm_sms *sms; - } sms; - }; - - struct { - struct gsm_trans *peer; - enum bridge_state state; - } bridge; -}; - - - -struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn, - uint8_t proto, uint8_t trans_id); -struct gsm_trans *trans_find_by_callref(struct gsm_network *net, - uint32_t callref); - -struct gsm_trans *trans_alloc(struct gsm_network *net, - struct vlr_subscr *vsub, - uint8_t protocol, uint8_t trans_id, - uint32_t callref); -void trans_free(struct gsm_trans *trans); - -int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub, - uint8_t protocol, uint8_t ti_flag); -struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn); -void trans_conn_closed(struct gsm_subscriber_connection *conn); - -#endif diff --git a/include/osmocom/bsc/trau_mux.h b/include/osmocom/bsc/trau_mux.h deleted file mode 100644 index eeceff5..0000000 --- a/include/osmocom/bsc/trau_mux.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1 - * timeslot on which E1 interface) should be directly muxed to which other - * sub-slot. Entries in the mux map are always bi-directional. - * - * The idea of all this is to directly switch voice channels in the BSC - * from one phone to another. We do this right now since we don't support - * any external interface for voice channels, and in the future as an - * optimization to routing them externally. - */ - -#include -#include -#include - -struct decoded_trau_frame; - -/* map a TRAU mux map entry */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst); -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst); - -/* unmap a TRAU mux map entry */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref); - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits); - -/* add a trau receiver */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref); - -/* send trau from application */ -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame); - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan); - -/* callback invoked if we receive TRAU frames */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv); - -/* TRAU frame transcoding */ -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf); -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf); -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data); -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data); diff --git a/include/osmocom/bsc/trau_upqueue.h b/include/osmocom/bsc/trau_upqueue.h deleted file mode 100644 index ecc7658..0000000 --- a/include/osmocom/bsc/trau_upqueue.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _TRAU_UPQUEUE_H -#define _TRAU_UPQUEUE_H - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg); - -#endif /* _TRAU_UPQUEUE_H */ - diff --git a/src/Makefile.am b/src/Makefile.am index 454bf26..637272d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,7 +24,6 @@ libcommon \ libcommon-cs \ libbsc \ - libtrau \ libfilter \ $(NULL) diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am index 4dfe247..b3b2b8c 100644 --- a/src/ipaccess/Makefile.am +++ b/src/ipaccess/Makefile.am @@ -30,7 +30,6 @@ abisip_find_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -49,7 +48,6 @@ ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) @@ -60,7 +58,6 @@ ipaccess_proxy_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) \ $(NULL) diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index c68e3ea..957a5bb 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -978,7 +978,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) exit(1); diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ef7a6fb..980b3e6 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,6 +48,11 @@ #define RSL_ALLOC_SIZE 1024 #define RSL_ALLOC_HEADROOM 128 + +#define RTP_PT_GSM_FULL 3 +#define RTP_PT_GSM_HALF 96 +#define RTP_PT_GSM_EFR 97 +#define RTP_PT_AMR 98 enum sacch_deact { SACCH_NONE, @@ -159,9 +162,6 @@ if (rc < 0) LOGP(DRSL, LOGL_ERROR, "%s %smismatching chan_nr=0x%02x\n", gsm_ts_and_pchan_name(lchan->ts), log_name, chan_nr); - - if (lchan->conn) - log_set_context(LOG_CTX_VLR_SUBSCR, lchan->conn->vsub); return lchan; } @@ -2420,20 +2420,6 @@ msg->dst = lchan->ts->trx->rsl_link; return abis_rsl_sendmsg(msg); -} - -/* tell BTS to connect RTP stream to our local RTP socket */ -int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan) -{ - struct rtp_socket *rs = lchan->abis_ip.rtp_socket; - int rc; - - rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), - ntohs(rs->rtp.sin_local.sin_port), - /* FIXME: use RTP payload of bound socket, not BTS*/ - lchan->abis_ip.rtp_payload2); - - return rc; } int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 845b1b7..6ff1688 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -24,13 +24,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include @@ -263,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->via_ran = RAN_GERAN_A; conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); @@ -277,11 +274,6 @@ if (conn->network->bsc_api->conn_cleanup) conn->network->bsc_api->conn_cleanup(conn); - - if (conn->vsub) { - LOGP(DNM, LOGL_ERROR, "conn->vsub should have been cleared.\n"); - conn->vsub = NULL; - } if (conn->ho_lchan) { LOGP(DNM, LOGL_ERROR, "The ho_lchan should have been cleared.\n"); @@ -452,10 +444,6 @@ msgb_l3len(msg) - sizeof(*gh)); return; } - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(conn->bts)) - switch_trau_mux(conn->lchan, conn->secondary_lchan); /* swap channels */ osmo_timer_del(&conn->T10); diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c index 2fb3842..34dfd36 100644 --- a/src/libbsc/bsc_init.c +++ b/src/libbsc/bsc_init.c @@ -529,10 +529,10 @@ return 0; } -int bsc_network_alloc(mncc_recv_cb_t mncc_recv) +int bsc_network_alloc(void) { /* initialize our data structures */ - bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1); if (!bsc_gsmnet) return -ENOMEM; diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c index 4b2531e..ad24a1e 100644 --- a/src/libbsc/chan_alloc.c +++ b/src/libbsc/chan_alloc.c @@ -25,12 +25,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -392,13 +390,6 @@ osmo_signal_dispatch(SS_LCHAN, S_LCHAN_UNEXPECTED_RELEASE, &sig); } - if (lchan->abis_ip.rtp_socket) { - LOGP(DRLL, LOGL_ERROR, "%s RTP Proxy Socket remained open.\n", - gsm_lchan_name(lchan)); - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } - /* stop the timer */ osmo_timer_del(&lchan->T3101); @@ -449,11 +440,6 @@ lchan->type = GSM_LCHAN_NONE; rsl_lchan_set_state(lchan, LCHAN_S_NONE); - - if (lchan->abis_ip.rtp_socket) { - rtp_socket_free(lchan->abis_ip.rtp_socket); - lchan->abis_ip.rtp_socket = NULL; - } } /* Drive the release process of the lchan */ diff --git a/src/libbsc/e1_config.c b/src/libbsc/e1_config.c index 3656315..90e29d3 100644 --- a/src/libbsc/e1_config.c +++ b/src/libbsc/e1_config.c @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ { struct gsm_e1_subslot *e1_link = &ts->e1_link; struct e1inp_line *line; - struct e1inp_ts *e1_ts; DEBUGP(DLMI, "e1_reconfig_ts(%u,%u,%u)\n", ts->trx->bts->nr, ts->trx->nr, ts->nr); @@ -61,12 +58,6 @@ "non-existing E1 line %u\n", ts->nr, ts->trx->nr, ts->trx->bts->nr, e1_link->e1_nr); return -ENOMEM; - } - - if (ts_is_tch(ts)) { - e1_ts = &line->ts[e1_link->e1_ts-1]; - e1inp_ts_config_trau(e1_ts, line, subch_cb); - subch_demux_activate(&e1_ts->trau.demux, e1_link->e1_ts_ss); } return 0; diff --git a/src/libbsc/gsm_04_08_utils.c b/src/libbsc/gsm_04_08_utils.c index 7fc696f..414fd6d 100644 --- a/src/libbsc/gsm_04_08_utils.c +++ b/src/libbsc/gsm_04_08_utils.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 7b9dece..a30cd09 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -32,13 +32,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include @@ -270,10 +267,6 @@ rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); osmo_timer_del(&ho->T3103); - - /* switch TRAU muxer for E1 based BTS from one channel to another */ - if (is_e1_bts(new_lchan->conn->bts)) - switch_trau_mux(ho->old_lchan, new_lchan); /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c index a71662c..59a8d5c 100644 --- a/src/libbsc/net_init.c +++ b/src/libbsc/net_init.c @@ -24,12 +24,11 @@ struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; - net = gsm_network_init(ctx, country_code, network_code, mncc_recv); + net = gsm_network_init(ctx, country_code, network_code); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 2ac2612..b410b17 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -39,8 +38,7 @@ */ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv) + uint16_t network_code) { struct gsm_network *net; @@ -55,15 +53,12 @@ net->t3212 = 5; INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); net->bsc_subscribers = talloc_zero(net, struct llist_head); INIT_LLIST_HEAD(net->bsc_subscribers); net->active_calls = osmo_counter_alloc("msc.active_calls"); - - net->mncc_recv = mncc_recv; net->dyn_ts_allow_tch_f = true; @@ -127,17 +122,4 @@ uint8_t *classmark2_lv = (uint8_t *) &resp->classmark2; return gsm48_extract_mi(classmark2_lv, length - classmark_offset, mi_string, mi_type); -} - -uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) -{ - const uint8_t rp_msg_ref = *next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - *next_rp_ref += 1; - - return rp_msg_ref; } diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 74b1a93..beb936b 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -28,7 +28,6 @@ #include #include -#include struct cmd_node net_node = { GSMNET_NODE, diff --git a/src/libcommon/Makefile.am b/src/libcommon/Makefile.am index 6cfebc2..ec997b7 100644 --- a/src/libcommon/Makefile.am +++ b/src/libcommon/Makefile.am @@ -25,5 +25,4 @@ gsm_data_shared.c \ socket.c \ talloc_ctx.c \ - gsm_subscriber_base.c \ $(NULL) diff --git a/src/libcommon/common_vty.c b/src/libcommon/common_vty.c index d4d5fb5..82327d1 100644 --- a/src/libcommon/common_vty.c +++ b/src/libcommon/common_vty.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c deleted file mode 100644 index a746c24..0000000 --- a/src/libcommon/gsm_subscriber_base.c +++ /dev/null @@ -1,37 +0,0 @@ -/* The concept of a subscriber as seen by the BSC */ - -/* (C) 2008 by Harald Welte - * (C) 2009-2010 by Holger Hans Peter Freyther - * (C) 2010 by On-Waves - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -LLIST_HEAD(active_subscribers); -void *tall_subscr_ctx; - diff --git a/src/libcommon/talloc_ctx.c b/src/libcommon/talloc_ctx.c index c8e9cd3..9f64d75 100644 --- a/src/libcommon/talloc_ctx.c +++ b/src/libcommon/talloc_ctx.c @@ -32,8 +32,6 @@ extern void *tall_sigh_ctx; extern void *tall_tqe_ctx; extern void *tall_trans_ctx; -extern void *tall_map_ctx; -extern void *tall_upq_ctx; extern void *tall_ctr_ctx; void talloc_ctx_init(void *ctx_root) @@ -49,7 +47,5 @@ tall_sigh_ctx = talloc_named_const(ctx_root, 0, "signal_handler"); tall_tqe_ctx = talloc_named_const(ctx_root, 0, "subch_txq_entry"); tall_trans_ctx = talloc_named_const(ctx_root, 0, "transaction"); - tall_map_ctx = talloc_named_const(ctx_root, 0, "trau_map_entry"); - tall_upq_ctx = talloc_named_const(ctx_root, 0, "trau_upq_entry"); tall_ctr_ctx = talloc_named_const(ctx_root, 0, "counter"); } diff --git a/src/libtrau/Makefile.am b/src/libtrau/Makefile.am deleted file mode 100644 index 46becd6..0000000 --- a/src/libtrau/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - -I$(top_builddir) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMONETIF_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -noinst_LIBRARIES = \ - libtrau.a \ - $(NULL) - -libtrau_a_SOURCES = \ - rtp_proxy.c \ - trau_mux.c \ - trau_upqueue.c \ - $(NULL) diff --git a/src/libtrau/rtp_proxy.c b/src/libtrau/rtp_proxy.c deleted file mode 100644 index 5b1ca79..0000000 --- a/src/libtrau/rtp_proxy.c +++ /dev/null @@ -1,764 +0,0 @@ -/* RTP proxy handling for ip.access nanoBTS */ - -/* (C) 2009-2013 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include /* gettimeofday() */ -#include /* get..() */ -#include /* clock() */ -#include /* uname() */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* attempt to determine byte order */ -#include -#include - -static LLIST_HEAD(rtp_sockets); - -/* should we mangle the CNAME inside SDES of RTCP packets? We disable - * this by default, as it seems to be not needed */ -static int mangle_rtcp_cname = 0; - -enum rtp_bfd_priv { - RTP_PRIV_NONE, - RTP_PRIV_RTP, - RTP_PRIV_RTCP -}; - -#define RTP_ALLOC_SIZE 1500 - -#define RTCP_TYPE_SDES 202 - -#define RTCP_IE_CNAME 1 - - -#define RTP_VERSION 2 - -/* 33 for FR, all other codecs have smaller size */ -#define MAX_RTP_PAYLOAD_LEN 33 - -/* decode an rtp frame and create a new buffer with payload */ -static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data) -{ - struct msgb *new_msg; - struct gsm_data_frame *frame; - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; - struct rtp_x_hdr *rtpxh; - uint8_t *payload, *payload_out; - int payload_len; - int msg_type; - int x_len; - - if (msg->len < 12) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", - msg->len); - return -EINVAL; - } - if (rtph->version != RTP_VERSION) { - DEBUGPC(DLMUX, "received RTP version %d not supported.\n", - rtph->version); - return -EINVAL; - } - payload = msg->data + sizeof(struct rtp_hdr) + (rtph->csrc_count << 2); - payload_len = msg->len - sizeof(struct rtp_hdr) - (rtph->csrc_count << 2); - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " - "csrc count = %d)\n", msg->len, rtph->csrc_count); - return -EINVAL; - } - if (rtph->extension) { - if (payload_len < sizeof(struct rtp_x_hdr)) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "extension header\n"); - return -EINVAL; - } - rtpxh = (struct rtp_x_hdr *)payload; - x_len = ntohs(rtpxh->length) * 4 + sizeof(struct rtp_x_hdr); - payload += x_len; - payload_len -= x_len; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame too short, " - "extension header exceeds frame length\n"); - return -EINVAL; - } - } - if (rtph->padding) { - if (payload_len < 1) { - DEBUGPC(DLMUX, "received RTP frame too short for " - "padding length\n"); - return -EINVAL; - } - payload_len -= payload[payload_len - 1]; - if (payload_len < 0) { - DEBUGPC(DLMUX, "received RTP frame with padding " - "greater than payload\n"); - return -EINVAL; - } - } - - switch (rtph->payload_type) { - case RTP_PT_GSM_FULL: - msg_type = GSM_TCHF_FRAME; - if (payload_len != RTP_LEN_GSM_FULL) { - DEBUGPC(DLMUX, "received RTP full rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_FULL, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_EFR: - msg_type = GSM_TCHF_FRAME_EFR; - if (payload_len != RTP_LEN_GSM_EFR) { - DEBUGPC(DLMUX, "received RTP extended full rate frame " - "with payload length != %d (len = %d)\n", - RTP_LEN_GSM_EFR, payload_len); - return -EINVAL; - } - break; - case RTP_PT_GSM_HALF: - msg_type = GSM_TCHH_FRAME; - if (payload_len != RTP_LEN_GSM_HALF) { - DEBUGPC(DLMUX, "received RTP half rate frame with " - "payload length != %d (len = %d)\n", - RTP_LEN_GSM_HALF, payload_len); - return -EINVAL; - } - break; - case RTP_PT_AMR: - msg_type = GSM_TCH_FRAME_AMR; - break; - default: - DEBUGPC(DLMUX, "received RTP frame with unknown payload " - "type %d\n", rtph->payload_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN || - (rtph->payload_type == RTP_PT_AMR && - payload_len > MAX_RTP_PAYLOAD_LEN - 1)) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - /* always allocate for the maximum possible size to avoid - * fragmentation */ - new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); - - if (!new_msg) - return -ENOMEM; - frame = (struct gsm_data_frame *) msgb_put(new_msg, sizeof(struct gsm_data_frame)); - frame->msg_type = msg_type; - frame->callref = callref; - if (rtph->payload_type == RTP_PT_AMR) { - /* for FR/HR/EFR the length is implicit. In AMR, we - * need to make it explicit by using the first byte of - * the data[] buffer as length byte */ - uint8_t *data0 = msgb_put(new_msg, 1); - *data0 = payload_len; - } - payload_out = msgb_put(new_msg, payload_len); - memcpy(payload_out, payload, payload_len); - - *data = new_msg; - return 0; -} - -/*! \brief encode and send a rtp frame - * \param[in] rs RTP socket through which we shall send - * \param[in] frame GSM RTP frame to be sent - */ -int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame) -{ - struct rtp_sub_socket *rss = &rs->rtp; - struct msgb *msg; - struct rtp_hdr *rtph; - uint8_t *payload; - int payload_type; - int payload_len; - int duration; /* in samples */ - int is_bfi = 0; - - if (rs->tx_action != RTP_SEND_DOWNSTREAM) { - /* initialize sequences */ - rs->tx_action = RTP_SEND_DOWNSTREAM; - rs->transmit.ssrc = rand(); - rs->transmit.sequence = random(); - rs->transmit.timestamp = random(); - } - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - payload_type = RTP_PT_GSM_FULL; - payload_len = RTP_LEN_GSM_FULL; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHF_FRAME_EFR: - payload_type = RTP_PT_GSM_EFR; - payload_len = RTP_LEN_GSM_EFR; - duration = RTP_GSM_DURATION; - break; - case GSM_TCHH_FRAME: - payload_type = RTP_PT_GSM_HALF; - payload_len = RTP_LEN_GSM_HALF; - duration = RTP_GSM_DURATION; - break; - case GSM_TCH_FRAME_AMR: - payload_type = RTP_PT_AMR; - payload_len = frame->data[0]; - duration = RTP_GSM_DURATION; - break; - case GSM_BAD_FRAME: - payload_type = 0; - payload_len = 0; - duration = RTP_GSM_DURATION; - is_bfi = 1; - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - if (payload_len > MAX_RTP_PAYLOAD_LEN) { - DEBUGPC(DLMUX, "RTP payload too large (%d octets)\n", - payload_len); - return -EINVAL; - } - - if (is_bfi) { - /* In case of a bad frame, just count and drop packet. */ - rs->transmit.timestamp += duration; - rs->transmit.sequence++; - return 0; - } - - msg = msgb_alloc(sizeof(struct rtp_hdr) + payload_len, "RTP-GSM"); - if (!msg) - return -ENOMEM; - rtph = (struct rtp_hdr *) msgb_put(msg, sizeof(struct rtp_hdr)); - rtph->version = RTP_VERSION; - rtph->padding = 0; - rtph->extension = 0; - rtph->csrc_count = 0; - rtph->marker = 0; - rtph->payload_type = payload_type; - rtph->sequence = htons(rs->transmit.sequence++); - rtph->timestamp = htonl(rs->transmit.timestamp); - rs->transmit.timestamp += duration; - rtph->ssrc = htonl(rs->transmit.ssrc); - - payload = msgb_put(msg, payload_len); - if (frame->msg_type == GSM_TCH_FRAME_AMR) - memcpy(payload, frame->data + 1, payload_len); - else - memcpy(payload, frame->data, payload_len); - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - - return 0; -} - -/* iterate over all chunks in one RTCP message, look for CNAME IEs and - * replace all of those with 'new_cname' */ -static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh, - uint16_t *rtcp_len, const char *new_cname) -{ - uint8_t *rtcp_end; - uint8_t *cur = (uint8_t *) rh; - uint8_t tag, len = 0; - - rtcp_end = cur + *rtcp_len; - /* move cur to end of RTP header */ - cur += sizeof(*rh); - - /* iterate over Chunks */ - while (cur+4 < rtcp_end) { - /* skip four bytes SSRC/CSRC */ - cur += 4; - - /* iterate over IE's inside the chunk */ - while (cur+1 < rtcp_end) { - tag = *cur++; - if (tag == 0) { - /* end of chunk, skip additional zero */ - while ((*cur++ == 0) && (cur < rtcp_end)) { } - break; - } - len = *cur++; - - if (tag == RTCP_IE_CNAME) { - /* we've found the CNAME, lets mangle it */ - if (len < strlen(new_cname)) { - /* we need to make more space */ - int increase = strlen(new_cname) - len; - - msgb_push(msg, increase); - memmove(cur+len+increase, cur+len, - rtcp_end - (cur+len)); - /* FIXME: we have to respect RTCP - * padding/alignment rules! */ - len += increase; - *(cur-1) += increase; - rtcp_end += increase; - *rtcp_len += increase; - } - /* copy new CNAME into message */ - memcpy(cur, new_cname, strlen(new_cname)); - /* FIXME: zero the padding in case new CNAME - * is smaller than old one !!! */ - } - cur += len; - } - } - - return 0; -} - -static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs) -{ - struct rtp_sub_socket *rss = &rs->rtcp; - struct rtcp_hdr *rtph; - uint16_t old_len; - int rc; - - if (!mangle_rtcp_cname) - return 0; - - printf("RTCP\n"); - /* iterate over list of RTCP messages */ - rtph = (struct rtcp_hdr *)msg->data; - while ((void *)rtph + sizeof(*rtph) <= (void *)msg->data + msg->len) { - old_len = (ntohs(rtph->length) + 1) * 4; - if ((void *)rtph + old_len > (void *)msg->data + msg->len) { - DEBUGPC(DLMUX, "received RTCP packet too short for " - "length element\n"); - return -EINVAL; - } - if (rtph->type == RTCP_TYPE_SDES) { - char new_cname[255]; - osmo_strlcpy(new_cname, - inet_ntoa(rss->sin_local.sin_addr), - sizeof(new_cname)); - rc = rtcp_sdes_cname_mangle(msg, rtph, &old_len, - new_cname); - if (rc < 0) - return rc; - } - rtph = (void *)rtph + old_len; - } - - return 0; -} - -/* read from incoming RTP/RTCP socket */ -static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - int rc; - struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP"); - struct msgb *new_msg; - struct rtp_sub_socket *other_rss; - - if (!msg) - return -ENOMEM; - - rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); - if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } else if (rc < 0) { - /* Ignore "connection refused". this happens, If we open the - * socket faster than the remote side. */ - if (errno == ECONNREFUSED) - goto out_free; - DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " - "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; - goto out_free; - } - - msgb_put(msg, rc); - - switch (rs->rx_action) { - case RTP_PROXY: - if (!rs->proxy.other_sock) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTP) - other_rss = &rs->proxy.other_sock->rtp; - else if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - other_rss = &rs->proxy.other_sock->rtcp; - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - } else { - rc = -EINVAL; - goto out_free; - } - msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; - break; - - case RTP_RECV_UPSTREAM: - if (!rs->receive.callref || !rs->receive.net) { - rc = -EIO; - goto out_free; - } - if (rss->bfd.priv_nr == RTP_PRIV_RTCP) { - if (!mangle_rtcp_cname) { - msgb_free(msg); - break; - } - /* modify RTCP SDES CNAME */ - rc = rtcp_mangle(msg, rs); - if (rc < 0) - goto out_free; - msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; - break; - } - if (rss->bfd.priv_nr != RTP_PRIV_RTP) { - rc = -EINVAL; - goto out_free; - } - rc = rtp_decode(msg, rs->receive.callref, &new_msg); - if (rc < 0) - goto out_free; - msgb_free(msg); - trau_tx_to_mncc(rs->receive.net, new_msg); - break; - - case RTP_NONE: /* if socket exists, but disabled by app */ - msgb_free(msg); - break; - } - - return 0; - -out_free: - msgb_free(msg); - return rc; -} - -/* \brief write from tx_queue to RTP/RTCP socket */ -static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss) -{ - struct msgb *msg; - int written; - - msg = msgb_dequeue(&rss->tx_queue); - if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; - return 0; - } - - written = write(rss->bfd.fd, msg->data, msg->len); - if (written < msg->len) { - LOGP(DLMIB, LOGL_ERROR, "short write"); - msgb_free(msg); - return -EIO; - } - - msgb_free(msg); - - return 0; -} - - -/*! \brief callback for the select.c:bfd_* layer */ -static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags) -{ - struct rtp_socket *rs = bfd->data; - struct rtp_sub_socket *rss; - - switch (bfd->priv_nr) { - case RTP_PRIV_RTP: - rss = &rs->rtp; - break; - case RTP_PRIV_RTCP: - rss = &rs->rtcp; - break; - default: - return -EINVAL; - } - - if (flags & BSC_FD_READ) - rtp_socket_read(rs, rss); - - if (flags & BSC_FD_WRITE) - rtp_socket_write(rs, rss); - - return 0; -} - -/*! \brief initialize one rtp sub-socket */ -static void init_rss(struct rtp_sub_socket *rss, - struct rtp_socket *rs, int fd, int priv_nr) -{ - /* initialize bfd */ - rss->bfd.fd = fd; - rss->bfd.data = rs; - rss->bfd.priv_nr = priv_nr; - rss->bfd.cb = rtp_bfd_cb; -} - -/*! \brief create a new RTP/RTCP socket and bind it */ -struct rtp_socket *rtp_socket_create(void) -{ - int rc; - struct rtp_socket *rs; - - DEBUGP(DLMUX, "rtp_socket_create(): "); - - rs = talloc_zero(tall_bsc_ctx, struct rtp_socket); - if (!rs) - return NULL; - - INIT_LLIST_HEAD(&rs->rtp.tx_queue); - INIT_LLIST_HEAD(&rs->rtcp.tx_queue); - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_free; - - init_rss(&rs->rtp, rs, rc, RTP_PRIV_RTP); - rc = osmo_fd_register(&rs->rtp.bfd); - if (rc < 0) - goto out_rtp_socket; - - rc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (rc < 0) - goto out_rtp_bfd; - - init_rss(&rs->rtcp, rs, rc, RTP_PRIV_RTCP); - rc = osmo_fd_register(&rs->rtcp.bfd); - if (rc < 0) - goto out_rtcp_socket; - - DEBUGPC(DLMUX, "success\n"); - - rc = rtp_socket_bind(rs, INADDR_ANY); - if (rc < 0) - goto out_rtcp_bfd; - - return rs; - -out_rtcp_bfd: - osmo_fd_unregister(&rs->rtcp.bfd); -out_rtcp_socket: - close(rs->rtcp.bfd.fd); -out_rtp_bfd: - osmo_fd_unregister(&rs->rtp.bfd); -out_rtp_socket: - close(rs->rtp.bfd.fd); -out_free: - talloc_free(rs); - DEBUGPC(DLMUX, "failed\n"); - return NULL; -} - -static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip, - uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_local.sin_family = AF_INET; - rss->sin_local.sin_addr.s_addr = htonl(ip); - rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; - - rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - sizeof(rss->sin_local)); - if (rc < 0) - return rc; - - /* retrieve the address we actually bound to, in case we - * passed INADDR_ANY as IP address */ - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -#define RTP_PORT_BASE 30000 -static unsigned int next_udp_port = RTP_PORT_BASE; - -/*! \brief bind a RTP socket to a specific local address - * \param[in] rs RTP socket to be bound - * \param[in] ip local IP address to which socket is to be bound - */ -int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip) -{ - int rc = -EIO; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_bind(rs=%p, IP=%s): ", rs, - inet_ntoa(ia)); - - /* try to bind to a consecutive pair of ports */ - for (next_udp_port = next_udp_port % 0xffff; - next_udp_port < 0xffff; next_udp_port += 2) { - rc = rtp_sub_socket_bind(&rs->rtp, ip, next_udp_port); - if (rc != 0) - continue; - - rc = rtp_sub_socket_bind(&rs->rtcp, ip, next_udp_port+1); - if (rc == 0) - break; - } - if (rc < 0) { - DEBUGPC(DLMUX, "failed\n"); - return rc; - } - - ia.s_addr = rs->rtp.sin_local.sin_addr.s_addr; - DEBUGPC(DLMUX, "BOUND_IP=%s, BOUND_PORT=%u\n", - inet_ntoa(ia), ntohs(rs->rtp.sin_local.sin_port)); - return ntohs(rs->rtp.sin_local.sin_port); -} - -static int rtp_sub_socket_connect(struct rtp_sub_socket *rss, - uint32_t ip, uint16_t port) -{ - int rc; - socklen_t alen = sizeof(rss->sin_local); - - rss->sin_remote.sin_family = AF_INET; - rss->sin_remote.sin_addr.s_addr = htonl(ip); - rss->sin_remote.sin_port = htons(port); - - rc = connect(rss->bfd.fd, (struct sockaddr *) &rss->sin_remote, - sizeof(rss->sin_remote)); - if (rc < 0) - return rc; - - return getsockname(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, - &alen); -} - -/*! \brief 'connect' a RTP socket to a remote peer - * \param[in] rs RTP socket to be connected - * \param[in] ip remote IP address to which to connect - * \param[in] port remote UDP port number to which to connect - */ -int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port) -{ - int rc; - struct in_addr ia; - - ia.s_addr = htonl(ip); - DEBUGP(DLMUX, "rtp_socket_connect(rs=%p, ip=%s, port=%u)\n", - rs, inet_ntoa(ia), port); - - rc = rtp_sub_socket_connect(&rs->rtp, ip, port); - if (rc < 0) - return rc; - - return rtp_sub_socket_connect(&rs->rtcp, ip, port+1); -} - -/*! \brief bind two RTP/RTCP sockets together in the proxy - * \param[in] this First RTP socket - * \param[in] other Second RTP socket - */ -int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n", - this, other); - - this->rx_action = RTP_PROXY; - this->proxy.other_sock = other; - - other->rx_action = RTP_PROXY; - other->proxy.other_sock = this; - - return 0; -} - -/*! \brief bind RTP/RTCP socket to application, disabling proxy - * \param[in] this RTP socket - * \param[in] net gsm_network argument to trau_tx_to_mncc() - * \param[in] callref callref argument to trau_tx_to_mncc() - */ -int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, - uint32_t callref) -{ - DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n", - this, callref); - - if (callref) { - this->rx_action = RTP_RECV_UPSTREAM; - this->receive.net = net; - this->receive.callref = callref; - } else - this->rx_action = RTP_NONE; - - return 0; -} - -static void free_tx_queue(struct rtp_sub_socket *rss) -{ - struct msgb *msg; - - while ((msg = msgb_dequeue(&rss->tx_queue))) - msgb_free(msg); -} - -/*! \brief Free/release a previously allocated RTP socket - * \param[in[] rs RTP/RTCP socket to be released - */ -int rtp_socket_free(struct rtp_socket *rs) -{ - DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs); - - /* make sure we don't leave references dangling to us */ - if (rs->rx_action == RTP_PROXY && - rs->proxy.other_sock) - rs->proxy.other_sock->proxy.other_sock = NULL; - - osmo_fd_unregister(&rs->rtp.bfd); - close(rs->rtp.bfd.fd); - free_tx_queue(&rs->rtp); - - osmo_fd_unregister(&rs->rtcp.bfd); - close(rs->rtcp.bfd.fd); - free_tx_queue(&rs->rtcp); - - talloc_free(rs); - - return 0; -} diff --git a/src/libtrau/trau_mux.c b/src/libtrau/trau_mux.c deleted file mode 100644 index e570b93..0000000 --- a/src/libtrau/trau_mux.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Simple TRAU frame reflector to route voice calls */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* this corresponds to the bit-lengths of the individual codec - * parameters as indicated in Table 1.1 of TS 06.10 */ -static const uint8_t gsm_fr_map[] = { - 6, 6, 5, 5, 4, 4, 3, 3, - 7, 2, 2, 6, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 7, 2, 2, 6, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 7, 2, 2, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 7, 2, 2, 6, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3 -}; - - -/* - * EFR TRAU parity - * - * g(x) = x^3 + x^1 + 1 - */ -static const struct osmo_crc8gen_code gsm0860_efr_crc3 = { - .bits = 3, - .poly = 0x3, - .init = 0x0, - .remainder = 0x7, -}; - -/* EFR parity bits */ -static inline void efr_parity_bits_1(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 0, 22); - memcpy(check_bits + 22 , d_bits + 24, 3); - check_bits[25] = d_bits[28]; -} - -static inline void efr_parity_bits_2(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 42, 10); - memcpy(check_bits + 10 , d_bits + 90, 2); -} - -static inline void efr_parity_bits_3(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 98, 5); - check_bits[5] = d_bits[104]; - memcpy(check_bits + 6 , d_bits + 143, 2); -} - -static inline void efr_parity_bits_4(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 151, 10); - memcpy(check_bits + 10 , d_bits + 199, 2); -} - -static inline void efr_parity_bits_5(ubit_t *check_bits, const ubit_t *d_bits) -{ - memcpy(check_bits + 0 , d_bits + 207, 5); - check_bits[5] = d_bits[213]; - memcpy(check_bits + 6 , d_bits + 252, 2); -} - -struct map_entry { - struct llist_head list; - struct gsm_e1_subslot src, dst; -}; - -struct upqueue_entry { - struct llist_head list; - struct gsm_network *net; - struct gsm_e1_subslot src; - uint32_t callref; -}; - -static LLIST_HEAD(ss_map); -static LLIST_HEAD(ss_upqueue); - -void *tall_map_ctx, *tall_upq_ctx; - -/* map one particular subslot to another subslot */ -int trau_mux_map(const struct gsm_e1_subslot *src, - const struct gsm_e1_subslot *dst) -{ - struct map_entry *me; - - me = talloc(tall_map_ctx, struct map_entry); - if (!me) { - LOGP(DLMIB, LOGL_FATAL, "Out of memory\n"); - return -ENOMEM; - } - - DEBUGP(DCC, "Setting up TRAU mux map between (e1=%u,ts=%u,ss=%u) " - "and (e1=%u,ts=%u,ss=%u)\n", - src->e1_nr, src->e1_ts, src->e1_ts_ss, - dst->e1_nr, dst->e1_ts, dst->e1_ts_ss); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src, 0); - trau_mux_unmap(dst, 0); - - memcpy(&me->src, src, sizeof(me->src)); - memcpy(&me->dst, dst, sizeof(me->dst)); - llist_add(&me->list, &ss_map); - - return 0; -} - -int trau_mux_map_lchan(const struct gsm_lchan *src, - const struct gsm_lchan *dst) -{ - struct gsm_e1_subslot *src_ss, *dst_ss; - - src_ss = &src->ts->e1_link; - dst_ss = &dst->ts->e1_link; - - return trau_mux_map(src_ss, dst_ss); -} - - -/* unmap one particular subslot from another subslot */ -int trau_mux_unmap(const struct gsm_e1_subslot *ss, uint32_t callref) -{ - struct map_entry *me, *me2; - struct upqueue_entry *ue, *ue2; - - if (ss) - llist_for_each_entry_safe(me, me2, &ss_map, list) { - if (!memcmp(&me->src, ss, sizeof(*ss)) || - !memcmp(&me->dst, ss, sizeof(*ss))) { - llist_del(&me->list); - return 0; - } - } - llist_for_each_entry_safe(ue, ue2, &ss_upqueue, list) { - if (ue->callref == callref) { - llist_del(&ue->list); - return 0; - } - if (ss && !memcmp(&ue->src, ss, sizeof(*ss))) { - llist_del(&ue->list); - return 0; - } - } - return -ENOENT; -} - -/* look-up an enty in the TRAU mux map */ -static struct gsm_e1_subslot * -lookup_trau_mux_map(const struct gsm_e1_subslot *src) -{ - struct map_entry *me; - - llist_for_each_entry(me, &ss_map, list) { - if (!memcmp(&me->src, src, sizeof(*src))) - return &me->dst; - if (!memcmp(&me->dst, src, sizeof(*src))) - return &me->src; - } - return NULL; -} - -/* look-up an enty in the TRAU upqueue */ -struct upqueue_entry * -lookup_trau_upqueue(const struct gsm_e1_subslot *src) -{ - struct upqueue_entry *ue; - - llist_for_each_entry(ue, &ss_upqueue, list) { - if (!memcmp(&ue->src, src, sizeof(*src))) - return ue; - } - return NULL; -} - -static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - -struct msgb *trau_decode_fr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, k, l, o; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 33, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - data = frame->data; - data[0] = 0xd << 4; - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts output bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset input bits */ - while (i < 260) { - data[j/8] |= (tf->d_bits[k+o] << (7-(j%8))); - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } - if (tf->c_bits[11]) /* BFI */ - frame->msg_type = GSM_BAD_FRAME; - else - frame->msg_type = GSM_TCHF_FRAME; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 33); - - return msg; -} - -struct msgb *trau_decode_efr(uint32_t callref, - const struct decoded_trau_frame *tf) -{ - struct msgb *msg; - struct gsm_data_frame *frame; - unsigned char *data; - int i, j, rc; - ubit_t check_bits[26]; - - msg = msgb_alloc(sizeof(struct gsm_data_frame) + 31, - "GSM-DATA"); - if (!msg) - return NULL; - - frame = (struct gsm_data_frame *)msg->data; - memset(frame, 0, sizeof(struct gsm_data_frame)); - frame->msg_type = GSM_TCHF_FRAME_EFR; - frame->callref = callref; - msgb_put(msg, sizeof(struct gsm_data_frame) + 31); - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - - data = frame->data; - data[0] = 0xc << 4; - /* reassemble d-bits */ - for (i = 1, j = 4; i < 39; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_1(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - if (rc) - goto bad_frame; - for (i = 42, j = 42; i < 95; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_2(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - if (rc) - goto bad_frame; - for (i = 98, j = 95; i < 148; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_3(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - if (rc) - goto bad_frame; - for (i = 151, j = 145; i < 204; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_4(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - if (rc) - goto bad_frame; - for (i = 207, j = 198; i < 257; i++, j++) - data[j/8] |= (tf->d_bits[i] << (7-(j%8))); - efr_parity_bits_5(check_bits, tf->d_bits); - rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); - if (rc) - goto bad_frame; - - return msg; - -bad_frame: - frame->msg_type = GSM_BAD_FRAME; - - return msg; -} - -/* we get called by subchan_demux */ -int trau_mux_input(struct gsm_e1_subslot *src_e1_ss, - const uint8_t *trau_bits, int num_bits) -{ - struct decoded_trau_frame tf; - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = lookup_trau_mux_map(src_e1_ss); - struct subch_mux *mx; - struct upqueue_entry *ue; - int rc; - - /* decode TRAU, change it to downlink, re-encode */ - rc = decode_trau_frame(&tf, trau_bits); - if (rc) - return rc; - - if (!dst_e1_ss) { - struct msgb *msg = NULL; - /* frame shall be sent to upqueue */ - if (!(ue = lookup_trau_upqueue(src_e1_ss))) - return -EINVAL; - if (!ue->callref) - return -EINVAL; - if (!memcmp(tf.c_bits, c_bits_check_fr, 5)) - msg = trau_decode_fr(ue->callref, &tf); - else if (!memcmp(tf.c_bits, c_bits_check_efr, 5)) - msg = trau_decode_efr(ue->callref, &tf); - else { - DEBUGPC(DLMUX, "illegal trau (C1-C5) %s\n", - osmo_hexdump(tf.c_bits, 5)); - DEBUGPC(DLMUX, "test trau (C1-C5) %s\n", - osmo_hexdump(c_bits_check_efr, 5)); - return -EINVAL; - } - if (!msg) - return -ENOMEM; - trau_tx_to_mncc(ue->net, msg); - - return 0; - } - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - trau_frame_up2down(&tf); - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* callback when a TRAU frame was received */ -int subch_cb(struct subch_demux *dmx, int ch, uint8_t *data, int len, - void *_priv) -{ - struct e1inp_ts *e1i_ts = _priv; - struct gsm_e1_subslot src_ss; - - src_ss.e1_nr = e1i_ts->line->num; - src_ss.e1_ts = e1i_ts->num; - src_ss.e1_ts_ss = ch; - - return trau_mux_input(&src_ss, data, len); -} - -/* add receiver instance for lchan and callref */ -int trau_recv_lchan(struct gsm_lchan *lchan, uint32_t callref) -{ - struct gsm_e1_subslot *src_ss; - struct upqueue_entry *ue; - - ue = talloc(tall_upq_ctx, struct upqueue_entry); - if (!ue) - return -ENOMEM; - - src_ss = &lchan->ts->e1_link; - - DEBUGP(DCC, "Setting up TRAU receiver (e1=%u,ts=%u,ss=%u) " - "and (callref 0x%x)\n", - src_ss->e1_nr, src_ss->e1_ts, src_ss->e1_ts_ss, - callref); - - /* make sure to get rid of any stale old mappings */ - trau_mux_unmap(src_ss, callref); - - memcpy(&ue->src, src_ss, sizeof(ue->src)); - ue->net = lchan->ts->trx->bts->network; - ue->callref = callref; - llist_add(&ue->list, &ss_upqueue); - - return 0; -} - -void trau_encode_fr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j, k, l, o; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 1; - tf->c_bits[3] = 0; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - i = 0; /* counts bits */ - j = 4; /* counts input bits */ - k = gsm_fr_map[0]-1; /* current number bit in element */ - l = 0; /* counts element bits */ - o = 0; /* offset output bits */ - while (i < 260) { - tf->d_bits[k+o] = (data[j/8] >> (7-(j%8))) & 1; - /* to avoid out-of-bounds access in gsm_fr_map[++l] */ - if (i == 259) - break; - if (--k < 0) { - o += gsm_fr_map[l]; - k = gsm_fr_map[++l]-1; - } - i++; - j++; - } -} - -void trau_encode_efr(struct decoded_trau_frame *tf, - const unsigned char *data) -{ - int i, j; - ubit_t check_bits[26]; - - /* set c-bits and t-bits */ - tf->c_bits[0] = 1; - tf->c_bits[1] = 1; - tf->c_bits[2] = 0; - tf->c_bits[3] = 1; - tf->c_bits[4] = 0; - memset(&tf->c_bits[5], 0, 6); - memset(&tf->c_bits[11], 1, 10); - memset(&tf->t_bits[0], 1, 4); - /* reassemble d-bits */ - tf->d_bits[0] = 1; - for (i = 1, j = 4; i < 39; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_1(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 26, - tf->d_bits + 39); - for (i = 42, j = 42; i < 95; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_2(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 95); - for (i = 98, j = 95; i < 148; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_3(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 148); - for (i = 151, j = 145; i < 204; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_4(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 12, - tf->d_bits + 204); - for (i = 207, j = 198; i < 257; i++, j++) - tf->d_bits[i] = (data[j/8] >> (7-(j%8))) & 1; - efr_parity_bits_5(check_bits, tf->d_bits); - osmo_crc8gen_set_bits(&gsm0860_efr_crc3, check_bits, 8, - tf->d_bits + 257); -} - -int trau_send_frame(struct gsm_lchan *lchan, struct gsm_data_frame *frame) -{ - uint8_t trau_bits_out[TRAU_FRAME_BITS]; - struct gsm_e1_subslot *dst_e1_ss = &lchan->ts->e1_link; - struct subch_mux *mx; - struct decoded_trau_frame tf; - - mx = e1inp_get_mux(dst_e1_ss->e1_nr, dst_e1_ss->e1_ts); - if (!mx) - return -EINVAL; - - switch (frame->msg_type) { - case GSM_TCHF_FRAME: - trau_encode_fr(&tf, frame->data); - break; - case GSM_TCHF_FRAME_EFR: - trau_encode_efr(&tf, frame->data); - break; - default: - DEBUGPC(DLMUX, "unsupported message type %d\n", - frame->msg_type); - return -EINVAL; - } - - encode_trau_frame(trau_bits_out, &tf); - - /* and send it to the muxer */ - return subchan_mux_enqueue(mx, dst_e1_ss->e1_ts_ss, trau_bits_out, - TRAU_FRAME_BITS); -} - -/* switch trau muxer to new lchan */ -int switch_trau_mux(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan) -{ - struct gsm_network *net = old_lchan->ts->trx->bts->network; - struct gsm_trans *trans; - - /* look up transaction with TCH frame receive enabled */ - llist_for_each_entry(trans, &net->trans_list, entry) { - if (trans->conn && trans->conn->lchan == old_lchan && trans->tch_recv) { - /* switch */ - trau_recv_lchan(new_lchan, trans->callref); - } - } - - return 0; -} diff --git a/src/libtrau/trau_upqueue.c b/src/libtrau/trau_upqueue.c deleted file mode 100644 index c1c0003..0000000 --- a/src/libtrau/trau_upqueue.c +++ /dev/null @@ -1,27 +0,0 @@ -/* trau_upqueue.c - Pass msgb's up the chain */ - -/* (C) 2010 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include - -void trau_tx_to_mncc(struct gsm_network *net, struct msgb *msg) -{ - net->mncc_recv(net, msg); -} diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 7db698c..4acbe56 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -40,12 +40,10 @@ osmo_bsc_ctrl.c \ $(NULL) -# once again since TRAU uses CC symbol :( osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 2b71b85..17dddf8 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5d25701..829f207 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -201,7 +201,7 @@ osmo_stats_init(tall_bsc_ctx); /* Allocate global gsm_network struct */ - rc = bsc_network_alloc(NULL); + rc = bsc_network_alloc(); if (rc) { fprintf(stderr, "Allocation failed. exiting.\n"); exit(1); diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index dd20ddb..1bee68e 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -42,7 +42,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ diff --git a/src/osmo-bsc_nat/bsc_filter.c b/src/osmo-bsc_nat/bsc_filter.c index 8d4a680..77ef583 100644 --- a/src/osmo-bsc_nat/bsc_filter.c +++ b/src/osmo-bsc_nat/bsc_filter.c @@ -20,6 +20,8 @@ * */ +#include + #include #include #include diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am index d3f6d62..78d4965 100644 --- a/src/utils/Makefile.am +++ b/src/utils/Makefile.am @@ -49,7 +49,6 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 6487df2..c72a23a 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b4656b..9207434 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,7 +3,6 @@ gsm0408 \ channel \ abis \ - trau \ subscr \ nanobts_omlattr \ bsc-nat \ diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am index 8dc6248..137321c 100644 --- a/tests/abis/Makefile.am +++ b/tests/abis/Makefile.am @@ -28,7 +28,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc-nat-trie/Makefile.am b/tests/bsc-nat-trie/Makefile.am index 6663897..d20bd0a 100644 --- a/tests/bsc-nat-trie/Makefile.am +++ b/tests/bsc-nat-trie/Makefile.am @@ -11,7 +11,6 @@ bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lrt \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \ diff --git a/tests/bsc-nat/Makefile.am b/tests/bsc-nat/Makefile.am index 74838a9..7f6730e 100644 --- a/tests/bsc-nat/Makefile.am +++ b/tests/bsc-nat/Makefile.am @@ -46,7 +46,6 @@ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 90bbb4a..96f87f5 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -34,7 +34,6 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index aedc018..1d7baa1 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/tests/bssap/Makefile.am b/tests/bssap/Makefile.am index 4bbe9ea..77309c9 100644 --- a/tests/bssap/Makefile.am +++ b/tests/bssap/Makefile.am @@ -36,7 +36,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 2b154c1..579cae2 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -82,7 +82,7 @@ struct gsm_network *net; struct bsc_msc_data *msc; - net = bsc_network_init(NULL, 1, 1, NULL); + net = bsc_network_init(NULL, 1, 1); net->bsc_data->rf_ctrl = talloc_zero(NULL, struct osmo_bsc_rf); net->bsc_data->rf_ctrl->policy = S_RF_ON; diff --git a/tests/channel/channel_test.c b/tests/channel/channel_test.c index ec2927e..7957b14 100644 --- a/tests/channel/channel_test.c +++ b/tests/channel/channel_test.c @@ -28,7 +28,6 @@ #include #include #include -#include void test_bts_debug_print(void) { @@ -39,7 +38,7 @@ printf("Testing the lchan printing:"); /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1); if (!network) exit(1); /* Add a BTS with some reasonanbly non-zero id */ diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am index 3bf4a22..c5ae061 100644 --- a/tests/gsm0408/Makefile.am +++ b/tests/gsm0408/Makefile.am @@ -25,7 +25,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index d2085a9..784c3e9 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -715,7 +715,7 @@ osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); - net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + net = bsc_network_init(tall_bsc_ctx, 1, 1); if (!net) { printf("Network init failure.\n"); return EXIT_FAILURE; diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am index 4b49518..336ccaf 100644 --- a/tests/nanobts_omlattr/Makefile.am +++ b/tests/nanobts_omlattr/Makefile.am @@ -24,7 +24,6 @@ nanobts_omlattr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am index 5b770bc..b743063 100644 --- a/tests/subscr/Makefile.am +++ b/tests/subscr/Makefile.am @@ -33,7 +33,6 @@ bsc_subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 13f54e1..6ef3f29 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,12 +39,6 @@ AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore]) AT_CLEANUP -AT_SETUP([trau]) -AT_KEYWORDS([trau]) -cat $abs_srcdir/trau/trau_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/trau/trau_test], [], [expout], [ignore]) -AT_CLEANUP - AT_SETUP([nanobts_omlattr]) AT_KEYWORDS([nanobts_omlattr]) cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout diff --git a/tests/trau/Makefile.am b/tests/trau/Makefile.am deleted file mode 100644 index b51c184..0000000 --- a/tests/trau/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - -I$(top_srcdir)/include \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(LIBSMPP34_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - trau_test.ok \ - $(NULL) - -noinst_PROGRAMS = \ - trau_test \ - $(NULL) - -trau_test_SOURCES = \ - trau_test.c \ - $(NULL) - -trau_test_LDADD = \ - $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ - $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBSMPP34_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(LIBRARY_DL) \ - $(NULL) diff --git a/tests/trau/trau_test.c b/tests/trau/trau_test.c deleted file mode 100644 index c8c9a5e..0000000 --- a/tests/trau/trau_test.c +++ /dev/null @@ -1,84 +0,0 @@ -/* (C) 2013 by Andreas Eversberg - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include -#include -#include - -#include -#include -#include - -void test_trau_fr_efr(unsigned char *data) -{ - struct decoded_trau_frame tf; - struct msgb *msg; - struct gsm_data_frame *frame; - - printf("Testing TRAU FR transcoding.\n"); - data[0] = 0xd0; - trau_encode_fr(&tf, data); - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_fr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME); - OSMO_ASSERT(!memcmp(frame->data, data, 33)); - msgb_free(msg); - - printf("Testing TRAU EFR transcoding.\n"); - data[0] = 0xc0; - trau_encode_efr(&tf, data); - OSMO_ASSERT(tf.d_bits[0] == 1); /* spare bit must be 1 */ - tf.c_bits[11] = 0; /* clear BFI */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_TCHF_FRAME_EFR); - OSMO_ASSERT(!memcmp(frame->data, data, 31)); - - printf("Testing TRAU EFR decoding with CRC error.\n"); - tf.d_bits[0] = 0; /* spare bit must be included */ - msg = trau_decode_efr(1, &tf); - OSMO_ASSERT(msg != NULL); - frame = (struct gsm_data_frame *)msg->data; - OSMO_ASSERT(frame->msg_type == GSM_BAD_FRAME); - msgb_free(msg); -} - -int main() -{ - unsigned char data[33]; - int i; - - msgb_talloc_ctx_init(NULL, 0); - - memset(data, 0x00, sizeof(data)); - test_trau_fr_efr(data); - memset(data, 0xff, sizeof(data)); - test_trau_fr_efr(data); - srandom(42); - for (i = 0; i < sizeof(data); i++) - data[i] = random(); - test_trau_fr_efr(data); - printf("Done\n"); - return 0; -} - -/* stubs */ -void vty_out() {} diff --git a/tests/trau/trau_test.ok b/tests/trau/trau_test.ok deleted file mode 100644 index ef71230..0000000 --- a/tests/trau/trau_test.ok +++ /dev/null @@ -1,10 +0,0 @@ -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Testing TRAU FR transcoding. -Testing TRAU EFR transcoding. -Testing TRAU EFR decoding with CRC error. -Done -- To view, visit https://gerrit.osmocom.org/5475 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:15 +0000 Subject: [MERGED] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo_bsc_bssap.c: Spelling fixes in comment ...................................................................... osmo_bsc_bssap.c: Spelling fixes in comment Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 4fd43aa..aea3994 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -385,7 +385,7 @@ * a cipher we will have to send cipher mode reject to the MSC, * otherwise we will have to pick something that we and the MS * is supporting. Currently we are doing it in a rather static - * way by picking one ecnryption or no encrytpion. + * way by picking one encryption or no encryption. */ static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int payload_length) @@ -613,7 +613,7 @@ get_value_string(gsm48_chan_mode_names, chan_mode), ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, ct.perm_spch_len)); - /* Forward the assingment request to lower layers */ + /* Forward the assignment request to lower layers */ if (aoip) { /* Store network side RTP connection information, we will * process this address later after we have established an RTP @@ -626,7 +626,7 @@ /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP - * endpoints, calling gsm0808_assign_req(), rsponding to + * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); if (!conn->mgcp_ctx) { -- To view, visit https://gerrit.osmocom.org/5503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:53:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:53:15 +0000 Subject: [MERGED] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove libosmo-sccp dependency for osmo-bsc ...................................................................... remove libosmo-sccp dependency for osmo-bsc libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d --- M include/osmocom/bsc/osmo_bsc.h M src/libfilter/Makefile.am M src/osmo-bsc/Makefile.am M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_msc.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/osmo_bsc_vty.c M tests/bsc/Makefile.am 9 files changed, 6 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 8a5cd30..0fd29b7 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -15,7 +15,6 @@ BSC_CON_NO_MEM, }; -struct sccp_connection; struct bsc_msc_data; struct bsc_msc_connection; @@ -47,10 +46,7 @@ int send_ping; /* SCCP connection realted */ - struct sccp_connection *sccp; struct bsc_msc_data *msc; - struct osmo_timer_list sccp_it_timeout; - struct osmo_timer_list sccp_cc_timeout; struct llist_head sccp_queue; unsigned int sccp_queue_size; diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am index 6d3db0b..41a75bd 100644 --- a/src/libfilter/Makefile.am +++ b/src/libfilter/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 4acbe56..7978852 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -11,7 +11,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMONETIF_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -45,7 +44,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon-cs/libcommon-cs.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index c388f5b..152b818 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -29,7 +29,6 @@ #include #include -#include #include #define return_when_not_connected(conn) \ @@ -296,13 +295,11 @@ resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci); if (!resp) { LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n"); - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); return BSC_API_CONN_POL_REJECT; } if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) { - sccp_connection_free(conn->sccp_con->sccp); osmo_bsc_sigtran_del_conn(conn->sccp_con); msgb_free(resp); return BSC_API_CONN_POL_REJECT; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 829f207..e4c8fc5 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -43,7 +43,6 @@ #include -#include #include #define _GNU_SOURCE @@ -233,9 +232,6 @@ /* seed the PRNG */ srand(time(NULL)); - - /* initialize SCCP */ - sccp_set_log_area(DSCCP); /* Read the config */ rc = bsc_network_configure(config_file); diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index 0e5777e..46be2e6 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -34,8 +34,6 @@ #include -#include - #include #include diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index a18d4f3..7669b67 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -511,7 +510,8 @@ /* If unset, use default local SCCP address */ if (!msc->a.bsc_addr.presence) - osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); + osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, @@ -524,7 +524,7 @@ if (!msc->a.msc_addr.presence) osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), - SCCP_SSN_BSSAP); + OSMO_SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { LOGP(DMSC, LOGL_ERROR, diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index a87b20f..f01e6f7 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -28,7 +28,6 @@ #include #include -#include #include @@ -663,14 +662,14 @@ static void enforce_standard_ssn(struct vty *vty, struct osmo_sccp_addr *addr) { if (addr->presence & OSMO_SCCP_ADDR_T_SSN) { - if (addr->ssn != SCCP_SSN_BSSAP) + if (addr->ssn != OSMO_SCCP_SSN_BSSAP) vty_out(vty, "setting an SSN (%u) different from the standard (%u) is not allowd, will use standard SSN for address: %s%s", - addr->ssn, SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); + addr->ssn, OSMO_SCCP_SSN_BSSAP, osmo_sccp_addr_dump(addr), VTY_NEWLINE); } addr->presence |= OSMO_SCCP_ADDR_T_SSN; - addr->ssn = SCCP_SSN_BSSAP; + addr->ssn = OSMO_SCCP_SSN_BSSAP; } DEFUN(cfg_msc_cs7_bsc_addr, diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 96f87f5..ebeb1ed 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ $(COVERAGE_CFLAGS) \ @@ -37,7 +36,6 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOLEGACYMGCP_LIBS) \ -- To view, visit https://gerrit.osmocom.org/5502 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:56:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:56:48 +0000 Subject: [PATCH] osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands Message-ID: Review at https://gerrit.osmocom.org/5513 osmo-bsc.cfg.tmpl: Remove bogus VTY commands There are plenty of VTY commands that were inherited from OsmoNITB, but which make no sense in a BSC. Upstream OsmoBSC has removed them in change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38, c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and 8311a81bae85618302273c3f769275893161a7d7 Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22 --- M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/5513/1 diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 95db16d..56ebe5a 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -29,13 +29,8 @@ network network country code ${bsc.net.mcc} mobile network code ${bsc.net.mnc} - short name ${bsc.net.short_name} - long name ${bsc.net.long_name} - location updating reject cause 13 encryption ${bsc.net.encryption} neci 1 - rrlp mode none - mm info 1 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 -- To view, visit https://gerrit.osmocom.org/5513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:57:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:57:36 +0000 Subject: osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:57:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:57:38 +0000 Subject: [MERGED] osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bsc.cfg.tmpl: Remove bogus VTY commands ...................................................................... osmo-bsc.cfg.tmpl: Remove bogus VTY commands There are plenty of VTY commands that were inherited from OsmoNITB, but which make no sense in a BSC. Upstream OsmoBSC has removed them in change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38, c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and 8311a81bae85618302273c3f769275893161a7d7 Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22 --- M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl index 95db16d..56ebe5a 100644 --- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl @@ -29,13 +29,8 @@ network network country code ${bsc.net.mcc} mobile network code ${bsc.net.mnc} - short name ${bsc.net.short_name} - long name ${bsc.net.long_name} - location updating reject cause 13 encryption ${bsc.net.encryption} neci 1 - rrlp mode none - mm info 1 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 -- To view, visit https://gerrit.osmocom.org/5513 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 19 17:59:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 17:59:34 +0000 Subject: [PATCH] osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5504 to look at the new patch set (#4). Remove unused struct osmo_bsc_sccp_con member sccp_queue_size Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/5504/4 diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 0fd29b7..13072c2 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -48,9 +48,6 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; - struct llist_head sccp_queue; - unsigned int sccp_queue_size; - struct gsm_subscriber_connection *conn; uint8_t new_subscriber; -- To view, visit https://gerrit.osmocom.org/5504 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:25 +0000 Subject: osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5504 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:34 +0000 Subject: [MERGED] osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size ...................................................................... Remove unused struct osmo_bsc_sccp_con member sccp_queue_size Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 0fd29b7..13072c2 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -48,9 +48,6 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; - struct llist_head sccp_queue; - unsigned int sccp_queue_size; - struct gsm_subscriber_connection *conn; uint8_t new_subscriber; -- To view, visit https://gerrit.osmocom.org/5504 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:34 +0000 Subject: [MERGED] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove unused 'lac' member of 'struct gsm_subscriber_connection' ...................................................................... remove unused 'lac' member of 'struct gsm_subscriber_connection' This field was used in write-pnly mode, i.e. set but never read. Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c 2 files changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 2e97055..3cc3794 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -96,8 +96,6 @@ /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; - - uint16_t lac; }; diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 6ff1688..9ec51af 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -261,7 +261,6 @@ conn->network = net; conn->lchan = lchan; conn->bts = lchan->ts->trx->bts; - conn->lac = conn->bts->location_area_code; lchan->conn = conn; llist_add_tail(&conn->entry, &net->subscr_conns); return conn; -- To view, visit https://gerrit.osmocom.org/5508 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:34 +0000 Subject: [MERGED] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo-bsc: Move user plane/voice related bits into sub-structure ...................................................................... osmo-bsc: Move user plane/voice related bits into sub-structure This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 --- M include/osmocom/bsc/osmo_bsc.h M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_ctrl.c M src/osmo-bsc/osmo_bsc_mgcp.c M src/osmo-bsc/osmo_bsc_sigtran.c 7 files changed, 43 insertions(+), 44 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 131007b..485c836 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -26,23 +26,23 @@ int ciphering_handled; /* for audio handling */ - uint16_t cic; - uint32_t rtp_ip; - int rtp_port; + struct { + uint16_t cic; + uint32_t rtp_ip; + int rtp_port; + /* RTP address of the remote end (assigned by MSC through assignment request) */ + struct sockaddr_storage aoip_rtp_addr_remote; - /* RTP address of the remote end (assigned by MSC through assignment - * request) */ - struct sockaddr_storage aoip_rtp_addr_remote; + /* Local RTP address (reported back to the MSC by us with the + * assignment complete message) */ + struct sockaddr_storage aoip_rtp_addr_local; - /* Local RTP address (reported back to the MSC by us with the - * assignment complete message) */ - struct sockaddr_storage aoip_rtp_addr_local; - - /* storage to keep states of the MGCP connection handler, the - * handler is created when an assignment request is received - * and is terminated when the assignment complete message is - * sent */ - struct mgcp_ctx *mgcp_ctx; + /* storage to keep states of the MGCP connection handler, the + * handler is created when an assignment request is received + * and is terminated when the assignment complete message is + * sent */ + struct mgcp_ctx *mgcp_ctx; + } user_plane; /* for advanced ping/pong */ int send_ping; diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index 152b818..a2a8630 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) { + if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 0c11b85..82367f0 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -57,17 +57,17 @@ /* we can ask it to connect now */ LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n", - con->sccp_con->rtp_port, lchan->abis_ip.conn_id); + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.conn_id); /* If AoIP is in use, the rtp_ip, which has been communicated * via the A interface as connect_ip */ - if(con->sccp_con->rtp_ip) - rtp_ip = con->sccp_con->rtp_ip; + if(con->sccp_con->user_plane.rtp_ip) + rtp_ip = con->sccp_con->user_plane.rtp_ip; else rtp_ip = ntohl(INADDR_ANY); rc = rsl_ipacc_mdcx(lchan, rtp_ip, - con->sccp_con->rtp_port, + con->sccp_con->user_plane.rtp_port, lchan->abis_ip.rtp_payload2); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc); @@ -84,13 +84,13 @@ * inform the logic that controls the MGW about the new * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); - mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) { + mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); + } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN COMPL (POSTPONED)\n"); - mgcp_ass_complete(con->sccp_con->mgcp_ctx, lchan); + mgcp_ass_complete(con->sccp_con->user_plane.mgcp_ctx, lchan); } break; } diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index aea3994..6f2d0f4 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -361,13 +361,13 @@ return -1; } - if (conn->mgcp_ctx) { + if (conn->user_plane.mgcp_ctx) { /* NOTE: This is the AoIP case, osmo-bsc has to negotiate with * the MGCP-GW. For this an mgcp_ctx should be created that * contains the FSM and some system data. When the connection * is removed from the MGCP-GW, then osmo_bsc_sigtran_send() * calls osmo_bsc_sigtran_send(). */ - mgcp_clear_complete(conn->mgcp_ctx, resp); + mgcp_clear_complete(conn->user_plane.mgcp_ctx, resp); } else { /* NOTE: This is the SCCP-Lite case, since we do not handle * the MGCP-GW switching ourselves, we may skip everything @@ -535,11 +535,9 @@ /* Detect if a CIC code is present, if so, we use the classic ip.access * method to calculate the RTP port */ if (TLVP_PRESENT(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)) { - conn->cic = - osmo_load16be(TLVP_VAL - (&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); - timeslot = conn->cic & 0x1f; - multiplex = (conn->cic & ~0x1f) >> 5; + conn->user_plane.cic = osmo_load16be(TLVP_VAL(&tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)); + timeslot = conn->user_plane.cic & 0x1f; + multiplex = (conn->user_plane.cic & ~0x1f) >> 5; } else if (TLVP_PRESENT(&tp, GSM0808_IE_AOIP_TRASP_ADDR)) { /* Decode AoIP transport address element */ data = TLVP_VAL(&tp, GSM0808_IE_AOIP_TRASP_ADDR); @@ -621,15 +619,16 @@ * reasons, functional wise it would not matter when exactly * the network side RTP connection is made, as long it is made * before we return with the assignment complete message. */ - memcpy(&conn->aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); + memcpy(&conn->user_plane.aoip_rtp_addr_remote, &rtp_addr, sizeof(rtp_addr)); /* Create an assignment request using the MGCP fsm. This FSM * is directly started when its created (now) and will also * take care about the further processing (creating RTP * endpoints, calling gsm0808_assign_req(), responding to * the assignment request etc... */ - conn->mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, conn, chan_mode, full_rate); - if (!conn->mgcp_ctx) { + conn->user_plane.mgcp_ctx = mgcp_assignm_req(msc->network, msc->network->mgw.client, + conn, chan_mode, full_rate); + if (!conn->user_plane.mgcp_ctx) { LOGP(DMSC, LOGL_ERROR, "MGCP GW failure, rejecting assignment... (id=%i)\n", conn->conn_id); goto reject; } @@ -641,8 +640,8 @@ * (the MSC does that for us). We set conn->rtp_ip to 0 and check * on this later. By this we know that we have to behave accordingly * to sccp-lite. */ - conn->rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); - conn->rtp_ip = 0; + conn->user_plane.rtp_port = mgcp_timeslot_to_port(multiplex, timeslot, msc->rtp_base); + conn->user_plane.rtp_ip = 0; return gsm0808_assign_req(conn->conn, chan_mode, full_rate); } @@ -849,7 +848,7 @@ lchan->abis_ip.ass_compl.chosen_channel, lchan->abis_ip.ass_compl.encr_alg_id, lchan->abis_ip.ass_compl.speech_mode, - &conn->sccp_con->aoip_rtp_addr_local, + &conn->sccp_con->user_plane.aoip_rtp_addr_local, &sc, NULL); diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 6330892..8c9dfe7 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -552,7 +552,7 @@ if (!conn->sccp_con) continue; - if (conn->sccp_con->cic != cic) + if (conn->sccp_con->user_plane.cic != cic) continue; /* diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f5efa95..ebd13d6 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -231,8 +231,8 @@ /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ - conn->rtp_port = r->audio_port; - conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->user_plane.rtp_port = r->audio_port; + conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -428,7 +428,7 @@ * identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ - if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { + if (conn->user_plane.aoip_rtp_addr_remote.ss_family != AF_INET) { LOGPFSML(fi, LOGL_ERROR, "CRCX/NET: endpoint:%x MSC uses unsupported address format in AoIP transport identifier -- aborting...\n", rtp_endpoint); @@ -436,7 +436,7 @@ return; } - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_remote; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_remote; addr = inet_ntoa(sin->sin_addr); port = osmo_ntohs(sin->sin_port); LOGPFSML(fi, LOGL_DEBUG, "CRCX/NET: MSC expects RTP input on address %s:%u\n", addr, port); @@ -512,7 +512,7 @@ r->audio_ip, r->audio_port); /* Store address */ - sin = (struct sockaddr_in *)&conn->aoip_rtp_addr_local; + sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_local; sin->sin_family = AF_INET; sin->sin_addr.s_addr = inet_addr(r->audio_ip); sin->sin_port = osmo_ntohs(r->audio_port); diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 7669b67..67f8703 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -385,8 +385,8 @@ } /* Remove mgcp context if existant */ - if (conn->mgcp_ctx) - mgcp_free_ctx(conn->mgcp_ctx); + if (conn->user_plane.mgcp_ctx) + mgcp_free_ctx(conn->user_plane.mgcp_ctx); llist_del(&conn->entry); talloc_free(conn); -- To view, visit https://gerrit.osmocom.org/5506 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:35 +0000 Subject: [MERGED] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' ...................................................................... osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con' Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 --- M include/osmocom/bsc/osmo_bsc.h 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h index 13072c2..131007b 100644 --- a/include/osmocom/bsc/osmo_bsc.h +++ b/include/osmocom/bsc/osmo_bsc.h @@ -19,8 +19,10 @@ struct bsc_msc_connection; struct osmo_bsc_sccp_con { + /* list_head anchoring us to gsm_network.subscr_conns */ struct llist_head entry; + /* flag to prevent multiple simultaneous ciphering commands */ int ciphering_handled; /* for audio handling */ @@ -48,9 +50,12 @@ /* SCCP connection realted */ struct bsc_msc_data *msc; + /* back-pointer to subscriber connection */ struct gsm_subscriber_connection *conn; + /* state related to welcome USSD */ uint8_t new_subscriber; + /* state related to osmo_bsc_filter.c */ struct bsc_filter_state filter_state; /* Sigtran connection ID */ -- To view, visit https://gerrit.osmocom.org/5505 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 19 18:34:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 19 Dec 2017 18:34:35 +0000 Subject: [MERGED] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm_data.h: Document all fields of gsm_subscriber_connection ...................................................................... gsm_data.h: Document all fields of gsm_subscriber_connection Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 14 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 1cedef0..2e97055 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -75,20 +75,26 @@ /* libbsc subscriber information (if available) */ struct bsc_subscr *bsub; - /* bsc structures */ - struct osmo_bsc_sccp_con *sccp_con; /* BSC */ + /* SCCP connection associatd with this subscriber_connection */ + struct osmo_bsc_sccp_con *sccp_con; /* back pointers */ struct gsm_network *network; - struct gsm_lchan *lchan; /* BSC */ - struct gsm_lchan *ho_lchan; /* BSC */ - struct gsm_bts *bts; /* BSC */ + /* the primary / currently active lchan to the BTS/subscriber */ + struct gsm_lchan *lchan; + /* the future/allocated but not yet used lchan during HANDOVER */ + struct gsm_lchan *ho_lchan; + /* a short-hand pointer to the BTS currently serving the subscriber, + * points to gsm_subscriber_connection.lchan->ts->trx->bts */ + struct gsm_bts *bts; - /* for assignment handling */ - struct osmo_timer_list T10; /* BSC */ - struct gsm_lchan *secondary_lchan; /* BSC */ + /* timer for assignment handling */ + struct osmo_timer_list T10; + /* the future allocated but not yet used lchan during ASSIGNMENT */ + struct gsm_lchan *secondary_lchan; + /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; uint16_t lac; -- To view, visit https://gerrit.osmocom.org/5507 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Tue Dec 19 20:03:40 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:03:40 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a3970b7b5595_354c912f582933e5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 138s] | #define HAVE_STRINGS_H 1 [ 138s] | #define HAVE_INTTYPES_H 1 [ 138s] | #define HAVE_STDINT_H 1 [ 138s] | #define HAVE_UNISTD_H 1 [ 138s] | #define HAVE_DLFCN_H 1 [ 138s] | #define LT_OBJDIR ".libs/" [ 138s] | #define BUILD_SMPP 1 [ 138s] | #define STDC_HEADERS 1 [ 138s] | #define HAVE_DBI_DBD_H 1 [ 138s] | #define HAVE_PCAP_PCAP_H 1 [ 138s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 138s] | [ 138s] | configure: exit 0 [ 138s] [ 138s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 138s] make[1]: *** [override_dh_auto_test] Error 1 [ 138s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 138s] debian/rules:13: recipe for target 'build' failed [ 138s] make: *** [build] Error 2 [ 138s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 138s] [ 138s] lamb02 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:03:28 UTC 2017. [ 138s] [ 138s] ### VM INTERACTION START ### [ 141s] [ 132.633609] reboot: Power down [ 141s] ### VM INTERACTION END ### [ 141s] [ 141s] lamb02 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:03:31 UTC 2017. [ 141s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:05:24 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:05:24 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a397114eaed7_354c912f58293557@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 173s] | #define HAVE_STRINGS_H 1 [ 173s] | #define HAVE_INTTYPES_H 1 [ 173s] | #define HAVE_STDINT_H 1 [ 173s] | #define HAVE_UNISTD_H 1 [ 173s] | #define HAVE_DLFCN_H 1 [ 173s] | #define LT_OBJDIR ".libs/" [ 173s] | #define BUILD_SMPP 1 [ 173s] | #define STDC_HEADERS 1 [ 173s] | #define HAVE_DBI_DBD_H 1 [ 173s] | #define HAVE_PCAP_PCAP_H 1 [ 173s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 173s] | [ 173s] | configure: exit 0 [ 173s] [ 173s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 173s] make[1]: *** [override_dh_auto_test] Error 1 [ 173s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 173s] debian/rules:13: recipe for target 'build' failed [ 173s] make: *** [build] Error 2 [ 173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 173s] [ 173s] build30 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:05:02 UTC 2017. [ 173s] [ 173s] ### VM INTERACTION START ### [ 176s] [ 162.221780] reboot: Power down [ 177s] ### VM INTERACTION END ### [ 177s] [ 177s] build30 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:05:07 UTC 2017. [ 177s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:05:57 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:05:57 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a39713099441_354c912f582937d0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 150s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 150s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 150s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 150s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 150s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 150s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 150s] -Done. [ 150s] ./testsuite.at:7: exit code was 139, expected 0 [ 150s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 150s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 150s] make[1]: *** [override_dh_auto_test] Error 1 [ 150s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 150s] debian/rules:13: recipe for target 'build' failed [ 150s] make: *** [build] Error 2 [ 150s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 150s] [ 150s] lamb06 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:05:37 UTC 2017. [ 150s] [ 150s] ### VM INTERACTION START ### [ 153s] [ 144.611310] reboot: Power down [ 153s] ### VM INTERACTION END ### [ 153s] [ 153s] lamb06 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:05:41 UTC 2017. [ 153s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:07:06 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:07:06 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a39716f24d1d_354c912f582940bd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_8.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 136s] ./testsuite.at:7: exit code was 139, expected 0 [ 136s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 136s] # -*- compilation -*- [ 136s] 5. testsuite.at:31: testing channel ... [ 136s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test [ 136s] stderr: [ 136s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0 [ 136s] /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source: line 25: 22819 Segmentation fault $abs_top_builddir/tests/channel/channel_test [ 136s] --- expout 2017-12-19 20:06:50.123997606 +0000 [ 136s] +++ /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 2017-12-19 20:06:50.123997606 +0000 [ 136s] @@ -1,4 +0,0 @@ [ 136s] -Testing the gsm_subscriber chan logic [ 136s] -Reached, didn't crash, test passed [ 136s] -Testing subslot numbers for pchan types [ 136s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) (bts=45,trx=1,ts=3,ss=4) [ 136s] ./testsuite.at:34: exit code was 139, expected 0 [ 136s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED (testsuite.at:34) [ 136s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 136s] make[1]: *** [override_dh_auto_test] Error 1 [ 136s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 136s] debian/rules:13: recipe for target 'build' failed [ 136s] make: *** [build] Error 2 [ 136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 136s] [ 136s] wildcard3 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:06:50 UTC 2017. [ 136s] [ 136s] ### VM INTERACTION START ### [ 137s] Powering off. [ 137s] [ 124.665690] reboot: Power down -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:07:06 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:07:06 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a39716f641e7_354c912f582941f0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 89s] | #define HAVE_STRINGS_H 1 [ 89s] | #define HAVE_INTTYPES_H 1 [ 89s] | #define HAVE_STDINT_H 1 [ 89s] | #define HAVE_UNISTD_H 1 [ 89s] | #define HAVE_DLFCN_H 1 [ 89s] | #define LT_OBJDIR ".libs/" [ 89s] | #define BUILD_SMPP 1 [ 89s] | #define STDC_HEADERS 1 [ 89s] | #define HAVE_DBI_DBD_H 1 [ 89s] | #define HAVE_PCAP_PCAP_H 1 [ 89s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 89s] | [ 89s] | configure: exit 0 [ 89s] [ 89s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 89s] make[1]: *** [override_dh_auto_test] Error 1 [ 89s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 89s] debian/rules:13: recipe for target 'build' failed [ 89s] make: *** [build] Error 2 [ 89s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 89s] [ 89s] build84 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:06:52 UTC 2017. [ 89s] [ 89s] ### VM INTERACTION START ### [ 92s] [ 86.716305] reboot: Power down [ 92s] ### VM INTERACTION END ### [ 92s] [ 92s] build84 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:06:55 UTC 2017. [ 92s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:08:14 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:08:14 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a3971c737072_354c912f582942ad@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 141s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 141s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 141s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 141s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 141s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 141s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 141s] -Done. [ 141s] ./testsuite.at:7: exit code was 139, expected 0 [ 141s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 141s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 141s] make[1]: *** [override_dh_auto_test] Error 1 [ 141s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 141s] debian/rules:13: recipe for target 'build' failed [ 141s] make: *** [build] Error 2 [ 141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 141s] [ 141s] lamb53 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:08:01 UTC 2017. [ 141s] [ 141s] ### VM INTERACTION START ### [ 144s] [ 136.852633] reboot: Power down [ 144s] ### VM INTERACTION END ### [ 144s] [ 144s] lamb53 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:08:06 UTC 2017. [ 144s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:08:31 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:08:31 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a3971c86a138_354c912f58294323@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 154s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b [ 154s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b [ 154s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b [ 154s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b [ 154s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx [ 154s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 154s] -Done. [ 154s] ./testsuite.at:7: exit code was 139, expected 0 [ 154s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7) [ 154s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 154s] make[1]: *** [override_dh_auto_test] Error 1 [ 154s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 154s] debian/rules:13: recipe for target 'build' failed [ 154s] make: *** [build] Error 2 [ 154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 154s] [ 154s] lamb27 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:08:16 UTC 2017. [ 154s] [ 154s] ### VM INTERACTION START ### [ 158s] [ 150.072232] reboot: Power down [ 158s] ### VM INTERACTION END ### [ 158s] [ 158s] lamb27 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:08:20 UTC 2017. [ 158s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:09:41 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:09:41 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a39722414603_354c912f582947cb@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 169s] | #define HAVE_STRINGS_H 1 [ 169s] | #define HAVE_INTTYPES_H 1 [ 169s] | #define HAVE_STDINT_H 1 [ 169s] | #define HAVE_UNISTD_H 1 [ 169s] | #define HAVE_DLFCN_H 1 [ 169s] | #define LT_OBJDIR ".libs/" [ 169s] | #define BUILD_SMPP 1 [ 169s] | #define STDC_HEADERS 1 [ 169s] | #define HAVE_DBI_DBD_H 1 [ 169s] | #define HAVE_PCAP_PCAP_H 1 [ 169s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 169s] | [ 169s] | configure: exit 0 [ 169s] [ 169s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 169s] make[1]: *** [override_dh_auto_test] Error 1 [ 169s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 169s] debian/rules:13: recipe for target 'build' failed [ 169s] make: *** [build] Error 2 [ 169s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 169s] [ 169s] cloud121 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:09:25 UTC 2017. [ 169s] [ 169s] ### VM INTERACTION START ### [ 173s] [ 156.925764] reboot: Power down [ 175s] ### VM INTERACTION END ### [ 175s] [ 175s] cloud121 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:09:32 UTC 2017. [ 175s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 20:14:06 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 20:14:06 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a3973145d37f_354c912f58295435@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 143s] | #define HAVE_STRINGS_H 1 [ 143s] | #define HAVE_INTTYPES_H 1 [ 143s] | #define HAVE_STDINT_H 1 [ 143s] | #define HAVE_UNISTD_H 1 [ 143s] | #define HAVE_DLFCN_H 1 [ 143s] | #define LT_OBJDIR ".libs/" [ 143s] | #define BUILD_SMPP 1 [ 143s] | #define STDC_HEADERS 1 [ 143s] | #define HAVE_DBI_DBD_H 1 [ 143s] | #define HAVE_PCAP_PCAP_H 1 [ 143s] | #define HAVE_TM_GMTOFF_IN_TM 1 [ 143s] | [ 143s] | configure: exit 0 [ 143s] [ 143s] debian/rules:32: recipe for target 'override_dh_auto_test' failed [ 143s] make[1]: *** [override_dh_auto_test] Error 1 [ 143s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 143s] debian/rules:13: recipe for target 'build' failed [ 143s] make: *** [build] Error 2 [ 143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 143s] [ 143s] lamb60 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:13:55 UTC 2017. [ 143s] [ 143s] ### VM INTERACTION START ### [ 146s] [ 138.219926] reboot: Power down [ 146s] ### VM INTERACTION END ### [ 146s] [ 146s] lamb60 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 20:13:59 UTC 2017. [ 146s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 19 21:24:57 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 21:24:57 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a3983b82d721_354c912f5831285c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64 Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 1046s] | configure:3076: checking whether make sets $(MAKE) [ 1046s] | configure:3098: result: yes [ 1046s] | configure:3155: checking for gcc [ 1046s] | configure:3171: found /usr/bin/gcc [ 1046s] | configure:3182: result: gcc [ 1046s] | configure:3411: checking for C compiler version [ 1046s] | configure:3420: gcc --version >&5 [ 1046s] | gcc (Debian 6.3.0-18) 6.3.0 20170516 [ 1046s] | Copyright (C) 2016 Free Software Foundation, Inc. [ 1046s] | This is free software; see the source for copying conditions. There is NO [ 1046s] | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [ 1046s] | [ 1046s] | configure:3431: $? = 0 [ 1046s] | configure:3420: gcc -v >&5 [ 1046s] | Using built-in specs. [ 1046s] | COLLECT_GCC=gcc [ 1046s] | COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/6/lto-wrapper [ 1046s] | Target: aarch64-linux-gnu [ 1046s] | Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-arm64 --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-fix-cortex-a53-843419 --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu [ 1046s] | Thread model: posix [ 1046s] | gcc version 6.3.0 20170516 (Debian 6.3.0-18) [ 1046s] | configure:3431: $? = 0 [ 1046s] | configure:3420: gcc -V >&5 [ 1048s] | gcc: error: unrecognized command line option[ 989.967956] sysrq: SysRq : Power Off [ 1048s] [ 989.982274] reboot: Power down [ 1049s] ### VM INTERACTION END ### [ 1049s] [ 1049s] obs-arm-2 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 21:24:50 UTC 2017. [ 1049s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 19 22:56:27 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 22:56:27 +0000 Subject: [PATCH] osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr Message-ID: Review at https://gerrit.osmocom.org/5514 jobs: master: fix: libosmoabis should trigger osmo-hlr Change-Id: I9a122cee4fa98115140e4a34f623958697affed2 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/14/5514/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 78d373b..3e2e5fb 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -35,7 +35,7 @@ - libasn1c - libgtpnl - libosmo-abis: - trigger: master-openbsc, master-libosmo-netif + trigger: master-openbsc, master-libosmo-netif, master-osmo-hlr - libosmo-dsp: cmd: > -- To view, visit https://gerrit.osmocom.org/5514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a122cee4fa98115140e4a34f623958697affed2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 22:56:49 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 22:56:49 +0000 Subject: osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/5514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a122cee4fa98115140e4a34f623958697affed2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 19 22:56:50 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 22:56:50 +0000 Subject: [MERGED] osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jobs: master: fix: libosmoabis should trigger osmo-hlr ...................................................................... jobs: master: fix: libosmoabis should trigger osmo-hlr Change-Id: I9a122cee4fa98115140e4a34f623958697affed2 --- M jobs/master-builds.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 78d373b..3e2e5fb 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -35,7 +35,7 @@ - libasn1c - libgtpnl - libosmo-abis: - trigger: master-openbsc, master-libosmo-netif + trigger: master-openbsc, master-libosmo-netif, master-osmo-hlr - libosmo-dsp: cmd: > -- To view, visit https://gerrit.osmocom.org/5514 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a122cee4fa98115140e4a34f623958697affed2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 23:10:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 19 Dec 2017 23:10:43 +0000 Subject: [PATCH] osmo-hlr[master]: fix debug log: put 'deriving 2G from 3G' in proper place Message-ID: Review at https://gerrit.osmocom.org/5515 fix debug log: put 'deriving 2G from 3G' in proper place Don't log "deriving 2G from 3G" when we're actually calculating separately; log it when we're actually deriving from 3G. Add log "calculating 2G separately" in the right place. The test output changes show that each test said "separate 2G" at the top while logging "deriving 2G from 3G" further down, which was obviously wrong. Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc --- M src/auc.c M tests/auc/auc_test.err M tests/auc/auc_ts_55_205_test_sets.err 3 files changed, 32 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/5515/1 diff --git a/src/auc.c b/src/auc.c index f55b377..79c3918 100644 --- a/src/auc.c +++ b/src/auc.c @@ -144,6 +144,7 @@ if (!aud2g) { /* use the 2G tokens from 3G keys */ + DBGP("vector [%u]: deriving 2G from 3G\n", i); DBGVB(kc); DBGVB(sres); DBGVV("0x%x", auth_types); @@ -151,7 +152,7 @@ } /* calculate 2G separately */ - DBGP("vector [%u]: deriving 2G from 3G\n", i); + DBGP("vector [%u]: calculating 2G separately\n", i); rc = osmo_auth_gen_vec(&vtmp, aud2g, rand); if (rc < 0) { diff --git a/tests/auc/auc_test.err b/tests/auc/auc_test.err index 5263d04..0a4d9af 100644 --- a/tests/auc/auc_test.err +++ b/tests/auc/auc_test.err @@ -35,7 +35,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 -DAUC vector [0]: deriving 2G from 3G +DAUC vector [0]: calculating 2G separately DAUC vector [0]: kc = 241a5b16aeb8e400 DAUC vector [0]: sres = 429d5b27 DAUC vector [0]: auth_types = 0x3 @@ -55,7 +55,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 -DAUC vector [0]: deriving 2G from 3G +DAUC vector [0]: calculating 2G separately DAUC vector [0]: kc = 241a5b16aeb8e400 DAUC vector [0]: sres = 429d5b27 DAUC vector [0]: auth_types = 0x3 @@ -78,6 +78,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 059a4f668f6fbe39 DAUC vector [0]: sres = 9b36efdf DAUC vector [0]: auth_types = 0x3 @@ -96,6 +97,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 059a4f668f6fbe39 DAUC vector [0]: sres = 9b36efdf DAUC vector [0]: auth_types = 0x3 @@ -117,6 +119,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -137,6 +140,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -147,6 +151,7 @@ DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5 DAUC vector [1]: res = 43023475cb29292c0000000000000000 DAUC vector [1]: res_len = 8 +DAUC vector [1]: deriving 2G from 3G DAUC vector [1]: kc = aef73dd515e86c15 DAUC vector [1]: sres = 882b1d59 DAUC vector [1]: auth_types = 0x3 @@ -157,6 +162,7 @@ DAUC vector [2]: ik = 648dab72016181406243420649e63dc9 DAUC vector [2]: res = 010cab11cc63a6e40000000000000000 DAUC vector [2]: res_len = 8 +DAUC vector [2]: deriving 2G from 3G DAUC vector [2]: kc = f0eaf8cb19e0758d DAUC vector [2]: sres = cd6f0df5 DAUC vector [2]: auth_types = 0x3 @@ -179,6 +185,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -189,6 +196,7 @@ DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5 DAUC vector [1]: res = 43023475cb29292c0000000000000000 DAUC vector [1]: res_len = 8 +DAUC vector [1]: deriving 2G from 3G DAUC vector [1]: kc = aef73dd515e86c15 DAUC vector [1]: sres = 882b1d59 DAUC vector [1]: auth_types = 0x3 @@ -199,6 +207,7 @@ DAUC vector [2]: ik = 648dab72016181406243420649e63dc9 DAUC vector [2]: res = 010cab11cc63a6e40000000000000000 DAUC vector [2]: res_len = 8 +DAUC vector [2]: deriving 2G from 3G DAUC vector [2]: kc = f0eaf8cb19e0758d DAUC vector [2]: sres = cd6f0df5 DAUC vector [2]: auth_types = 0x3 diff --git a/tests/auc/auc_ts_55_205_test_sets.err b/tests/auc/auc_ts_55_205_test_sets.err index 1c5ad60..b0f83ae 100644 --- a/tests/auc/auc_ts_55_205_test_sets.err +++ b/tests/auc/auc_ts_55_205_test_sets.err @@ -12,6 +12,7 @@ DAUC vector [0]: ik = f769bcd751044604127672711c6d3441 DAUC vector [0]: res = a54211d5e3ba50bf0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = eae4be823af9a08b DAUC vector [0]: sres = 46f8416a DAUC vector [0]: auth_types = 0x3 @@ -34,6 +35,7 @@ DAUC vector [0]: ik = 59a92d3b476a0443487055cf88b2307b DAUC vector [0]: res = 8011c48c0c214ed20000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = aa01739b8caa976d DAUC vector [0]: sres = 8c308a5e DAUC vector [0]: auth_types = 0x3 @@ -56,6 +58,7 @@ DAUC vector [0]: ik = 0c4524adeac041c4dd830d20854fc46b DAUC vector [0]: res = f365cd683cd92e960000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9a8ec95f408cc507 DAUC vector [0]: sres = cfbce3fe DAUC vector [0]: auth_types = 0x3 @@ -78,6 +81,7 @@ DAUC vector [0]: ik = 1c42e960d89b8fa99f2744e0708ccb53 DAUC vector [0]: res = 5860fc1bce351e7e0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = cdc1dc0841b81a22 DAUC vector [0]: sres = 9655e265 DAUC vector [0]: auth_types = 0x3 @@ -100,6 +104,7 @@ DAUC vector [0]: ik = a7466cc1e6b2a1337d49d3b66e95d7b4 DAUC vector [0]: res = 16c8233f05a0ac280000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = df75bc5ea899879f DAUC vector [0]: sres = 13688f17 DAUC vector [0]: auth_types = 0x3 @@ -122,6 +127,7 @@ DAUC vector [0]: ik = 88ab80a415f15c73711254a1d388f696 DAUC vector [0]: res = 8c25a16cd918a1df0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 84b417ae3aeab4f3 DAUC vector [0]: sres = 553d00b3 DAUC vector [0]: auth_types = 0x3 @@ -144,6 +150,7 @@ DAUC vector [0]: ik = f9ec0865eb32f22369cade40c59c3a44 DAUC vector [0]: res = a63241e1ffc3e5ab0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 3b4e244cdc60ce03 DAUC vector [0]: sres = 59f1a44a DAUC vector [0]: auth_types = 0x3 @@ -166,6 +173,7 @@ DAUC vector [0]: ik = 90527ebaa5588968db41727325a04d9e DAUC vector [0]: res = 4a90b2171ac83a760000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 8d4ec01de597acfe DAUC vector [0]: sres = 50588861 DAUC vector [0]: auth_types = 0x3 @@ -188,6 +196,7 @@ DAUC vector [0]: ik = ed0318ca5deb9206272f6e8fa64ba411 DAUC vector [0]: res = 4bc2212d8624910a0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = d8debc4ffbcd60aa DAUC vector [0]: sres = cde6b027 DAUC vector [0]: auth_types = 0x3 @@ -210,6 +219,7 @@ DAUC vector [0]: ik = 74f24e8c26df58e1b38d7dcd4f1b7fbd DAUC vector [0]: res = 6fc30fee6d1235230000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = f0eaa50a1edcebb7 DAUC vector [0]: sres = 02d13acd DAUC vector [0]: auth_types = 0x3 @@ -232,6 +242,7 @@ DAUC vector [0]: ik = c251df0d888dd9329bcf46655b226e40 DAUC vector [0]: res = aefa357beac2a87a0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 82dbab7f83f063da DAUC vector [0]: sres = 44389d01 DAUC vector [0]: auth_types = 0x3 @@ -254,6 +265,7 @@ DAUC vector [0]: ik = 0c9fb81613884c2535dd0eabf3b440d8 DAUC vector [0]: res = 98dbbd099b3b408d0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 3c66cb98cab2d33d DAUC vector [0]: sres = 03e0fd84 DAUC vector [0]: auth_types = 0x3 @@ -276,6 +288,7 @@ DAUC vector [0]: ik = 7f4d6ae7440e18789a8b75ad3f42f03a DAUC vector [0]: res = af4a411e1139f2c20000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9612b5d88a4130bb DAUC vector [0]: sres = be73b3dc DAUC vector [0]: auth_types = 0x3 @@ -298,6 +311,7 @@ DAUC vector [0]: ik = abcbae8fd46115e9961a55d0da5f2078 DAUC vector [0]: res = 7bffa5c2f41fbc050000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 75a150df3c6aed08 DAUC vector [0]: sres = 8fe019c7 DAUC vector [0]: auth_types = 0x3 @@ -320,6 +334,7 @@ DAUC vector [0]: ik = 0b3f8d024fe6bfafaa982b8f82e319c2 DAUC vector [0]: res = 7e3f44c7591f6f450000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = b7f92e426a36fec5 DAUC vector [0]: sres = 27202b82 DAUC vector [0]: auth_types = 0x3 @@ -342,6 +357,7 @@ DAUC vector [0]: ik = d61c853c280dd9c46f297baec386de17 DAUC vector [0]: res = 70f6bdb9ad21525f0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 88d9de10a22004c5 DAUC vector [0]: sres = ddd7efe6 DAUC vector [0]: auth_types = 0x3 @@ -364,6 +380,7 @@ DAUC vector [0]: ik = 66bec707eb2afc476d7408a8f2927b36 DAUC vector [0]: res = 479dd25c20792d630000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = a819e577a8d6175b DAUC vector [0]: sres = 67e4ff3f DAUC vector [0]: auth_types = 0x3 @@ -386,6 +403,7 @@ DAUC vector [0]: ik = 9744871ad32bf9bbd1dd5ce54e3e2e5a DAUC vector [0]: res = 28d7b0f2a2ec3de50000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9a8d0e883ff0887a DAUC vector [0]: sres = 8a3b8d17 DAUC vector [0]: auth_types = 0x3 @@ -408,6 +426,7 @@ DAUC vector [0]: ik = b4721368bc16ea67875c5598688bb0ef DAUC vector [0]: res = a95100e2760952cd0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = ed29b2f1c27f9f34 DAUC vector [0]: sres = df58522f DAUC vector [0]: auth_types = 0x3 -- To view, visit https://gerrit.osmocom.org/5515 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 19 23:22:57 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 19 Dec 2017 23:22:57 +0000 Subject: meta-telephony[201705]: osmo-sgsn: no longer depend on libpcap In-Reply-To: References: Message-ID: Patch Set 1: Verified-1 This should actually be merged against branch laforge/nightly instead of 201705, since 201705 still doesn't use an osmo-sgsn new enough. -- To view, visit https://gerrit.osmocom.org/5485 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I284c16c1f7abd3b24525b824baca357576f16675 Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From admin at opensuse.org Tue Dec 19 23:29:25 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 19 Dec 2017 23:29:25 +0000 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a39a0f3340a0_354c912f5835436a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly openbsc Last lines of build log: [ 412s] | ac_cv_header_memory_h=yes [ 412s] | ac_cv_header_pcap_pcap_h=yes [ 412s] | ac_cv_header_stdc=yes [ 412s] | ac_cv_header_stdint_h=yes [ 412s] | ac_cv_header_stdlib_h=yes [ 412s] | ac_cv_header_string_h=yes [ 412s] | ac_cv_header_strings_h=yes [ 412s] | ac_cv_header_sys_stat_h=yes [ 412s] | ac_cv_header_sys_types_h=yes [ 412s] | ac_cv_header_unistd_h=yes [ 412s] | ac_cv_host=arm-unknown-linux-gnueabihf [ 412s] | ac_cv_objext=o [ 412s] | ac_cv_path_EGREP='/bin/grep -E' [ 412s] | ac_cv_path_FGREP='/bin/grep -F' [ 412s] | ac_cv_path_GREP=/bin/grep [ 412s] | ac_cv_path_PKG_CONFIG_INSTALLED=/usr/bin/pkg-config [ 412s] | ac_cv_path_SED=/bin/sed [ 412s] | ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config [ 412s] | ac_cv_path_install='/usr/bin/install -c' [ 412s] | ac_cv_path_lt_DD=/bin/dd [ 412s] | ac_cv_path_mkdir=/bin/mkdir [ 412s] | ac_cv_prog_AWK=gawk [ 412s] | ac_cv_prog_CPP='gcc -E' [ 414s] | ac_cv_prog_a[ 359.118835] SysRq : Power Off [ 414s] [ 359.120183] reboot: Power down [ 414s] ### VM INTERACTION END ### [ 414s] [ 414s] armbuild18 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 23:29:09 UTC 2017. [ 414s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 19 23:32:48 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Tue, 19 Dec 2017 23:32:48 +0000 Subject: libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/4893/4/src/osmo_ss7.c File src/osmo_ss7.c: Line 1792: osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, > to keep the public API backwards compatible, you should rather introduce os We don't need changes anywhere else because the only direct user of this API is osmo-stp which resides in this same repository and its implementation is fixed in the same code. Other users like osmo-msc or osmo-bsc, afaik, use the "simple_server" API, whose implementation is also fixed internally in this commit to bind the IPs after creating the server, which means no code or VTY change is needed for projects using the "simple_server" API. -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 00:47:56 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 00:47:56 +0000 Subject: [PATCH] libosmocore[master]: rate_ctr: fix osmo-sgsn DoS: don't return NULL on already us... Message-ID: Review at https://gerrit.osmocom.org/5516 rate_ctr: fix osmo-sgsn DoS: don't return NULL on already used index Recent patch I563764af1d28043e909234ebb048239125ce6ecd introduced returning NULL from rate_ctr_group_alloc() when the index passed already exists. Instead of returning NULL, find an unused group index and use that, adjust the error message. In stats_test.c, adjust, and also assert allocated counter group indexes everywhere. Rationale: The original patch causes osmo-sgsn to crash as soon as the second subscriber attempts to establish an MM context. Of course osmo-sgsn is wrong to a) fail to check a NULL return value and crash and b) to fail to allocate an MM context just because the rate counter group could not be allocated (it still rejects the MM context completely if rate_ctr_group_alloc() fails). Nevertheless, the price we pay for rate counter correctness is, at least in this instance, way too high: osmo-sgsn becomes completely unusable for more than one subscriber. Numerous other places exist where rate_ctr_group_alloc() is called with a constant index number; from a quick grep magic I found these possible breaking points: osmo-sgsn/src/gprs/gb_proxy.c:1431: cfg->ctrg = rate_ctr_group_alloc(tall_bsc_ctx, &global_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:139: sgsn->rate_ctrs = rate_ctr_group_alloc(tall_bsc_ctx, &sgsn_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:270: ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0); osmo-sgsn/src/gprs/gtphub.c:888: b->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, 0); osmo-bsc/src/libfilter/bsc_msg_acc.c:87: lst->stats = rate_ctr_group_alloc(lst, &bsc_cfg_acc_list_desc, 0); osmo-pcu/src/bts.cpp:228: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:793: tbf->m_ctrs = rate_ctr_group_alloc(tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:879: tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:880: tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:970: tbf->m_dl_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:977: tbf->m_dl_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:1475: ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/bts.cpp:226: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 1); We can fix all of these callers and then reconsider returning NULL, but IMO even into the future, rate counter group indexes are not something worth failing to provide service for. For future bugs we should keep the automatic index picking in case of index collisions. We will get an error message barfed and can fix the issue in our own time, while the application remains completely usable, and even the rate counters can still be queried (at wrong indexes, but life is tough). Related: I49aa95b610f2faec52dede2e4816da47ca1dfb14 (osmo-sgsn's segfault) Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 --- M src/rate_ctr.c M tests/stats/stats_test.c 2 files changed, 31 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/5516/1 diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 72c6bb1..ec054c5 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -178,6 +178,27 @@ return NULL; } +/*! Find an unused index for this rate counter group. + * \param[in] name Name of the counter group + * \returns the largest used index number + 1, or 0 if none exist yet. */ +static unsigned int rate_ctr_get_unused_name_idx(const char *name) +{ + unsigned int idx = 0; + struct rate_ctr_group *ctrg; + + llist_for_each_entry(ctrg, &rate_ctr_groups, list) { + if (!ctrg->desc) + continue; + + if (strcmp(ctrg->desc->group_name_prefix, name)) + continue; + + if (idx <= ctrg->idx) + idx = ctrg->idx + 1; + } + return idx; +} + /*! Allocate a new group of counters according to description * \param[in] ctx \ref talloc context * \param[in] desc Rate counter group description @@ -191,9 +212,11 @@ struct rate_ctr_group *group; if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { - LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u\n", - desc->group_name_prefix, idx); - return NULL; /* group already exist */ + unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); + LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," + " instead using index %u. This is a software bug that needs fixing.\n", + desc->group_name_prefix, idx, new_idx); + idx = new_idx; } size = sizeof(struct rate_ctr_group) + diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 35faf9a..6ef8841 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -324,16 +324,16 @@ statg2 = osmo_stat_item_group_alloc(stats_ctx, &statg_desc, 2); OSMO_ASSERT(statg2 != NULL); ctrg1 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 1); - OSMO_ASSERT(ctrg1 != NULL); + OSMO_ASSERT(ctrg1 && ctrg1->idx == 1); ctrg2 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); - OSMO_ASSERT(ctrg2 != NULL); + OSMO_ASSERT(ctrg2 && ctrg2->idx == 2); ctrg_dup = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); - if (ctrg_dup != NULL && ctrg2 != NULL) - printf("FAIL: successfully allocated already existing counter group!\n"); + OSMO_ASSERT(ctrg_dup && ctrg_dup->idx == 3); + rate_ctr_group_free(ctrg_dup); ctrg3 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc_dot, 3); - OSMO_ASSERT(ctrg3 != NULL); + OSMO_ASSERT(ctrg3 && ctrg3->idx == 3); srep1 = stats_reporter_create_test("test1"); OSMO_ASSERT(srep1 != NULL); -- To view, visit https://gerrit.osmocom.org/5516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 00:48:04 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 00:48:04 +0000 Subject: [PATCH] osmo-sgsn[master]: gprs_gmm: segfault: gracefully handle failure to alloc context Message-ID: Review at https://gerrit.osmocom.org/5517 gprs_gmm: segfault: gracefully handle failure to alloc context This counter allocation error I hit uncovers a segfault when allocating an MM context fails in the GSM_MI_TYPE_TMSI case: DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:509 handle_co_initial(dir=1, proc=19) DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:229 RNC 23: new LAC 24358 RAC 22 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1271 MM(---/ffffffff) -> GMM ATTACH REQUEST MI(3427325924) type="GPRS attach" DLGLOBAL <001d> ../../../src/libosmocore/src/rate_ctr.c:195 counter group 'sgsn:mmctx' already exists for index 0 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_sgsn.c:272 MM(/00000000) Cannot allocate counter group Program received signal SIGSEGV, Segmentation fault. gsm48_rx_gmm_att_req (llme=0x0, msg=0x555555886950, ctx=0x0) at ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1375 1375 ctx->p_tmsi = tmsi; Fix it with a bit of code already present for the GSM_MI_TYPE_IMSI case just above the segfault. Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 --- M src/gprs/gprs_gmm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/17/5517/1 diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 147e001..8441f6b 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1372,6 +1372,10 @@ ctx = sgsn_mm_ctx_alloc_iu(msg->dst); else ctx = sgsn_mm_ctx_alloc_gb(msgb_tlli(msg), &ra_id); + if (!ctx) { + reject_cause = GMM_CAUSE_NET_FAIL; + goto rejected; + } ctx->p_tmsi = tmsi; } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { -- To view, visit https://gerrit.osmocom.org/5517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 00:53:39 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 00:53:39 +0000 Subject: osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Patch Set 4: -Code-Review Verified+1 verified to work in manual test with two nano3G -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From nhofmeyr at sysmocom.de Wed Dec 20 01:05:42 2017 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Wed, 20 Dec 2017 02:05:42 +0100 Subject: Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64 In-Reply-To: <5a3973145d37f_354c912f58295435@build.opensuse.org> References: <5a3973145d37f_354c912f58295435@build.opensuse.org> Message-ID: <20171220010542.GC7452@my.box> This is most probably related to / fixed by https://gerrit.osmocom.org/5516 : [ 142s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0 [ 142s] /usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/1/test-source: line 25: 20213 Segmentation fault $abs_top_builddir/tests/gsm0408/gsm0408_test On Tue, Dec 19, 2017 at 08:14:06PM +0000, OBS Notification wrote: > Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:30:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:30:38 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: common: ports: tweak OpenGGSN to osmo-ggsn as on port-number... Message-ID: Review at https://gerrit.osmocom.org/5518 common: ports: tweak OpenGGSN to osmo-ggsn as on port-numbers wiki page Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Change-Id: Ieaac06c9d914fc7481107ca8ebe6192b36b91bcd --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/18/5518/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index a69483a..15573ab 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -31,10 +31,10 @@ |TCP|4254|telnet (VTY)|osmo-msc |TCP|4255|Control Interface|osmo-msc |TCP|4256|telnet (VTY)|osmo-sip-connector -|TCP|4257|Control Interface|ggsn (OpenGGSN) +|TCP|4257|Control Interface|osmo-ggsn, ggsn (OpenGGSN) |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr -|TCP|4260|telnet (VTY)|ggsn (OpenGGSN) +|TCP|4260|telnet (VTY)|osmo-ggsn |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/5518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieaac06c9d914fc7481107ca8ebe6192b36b91bcd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:30:38 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:30:38 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: ports: add osmo-hnbgw as on port-numbers wiki page Message-ID: Review at https://gerrit.osmocom.org/5519 ports: add osmo-hnbgw as on port-numbers wiki page Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Related: Ife52a968a41cb286f640006587877971ff66c1a4 (libosmocore) Change-Id: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/19/5519/1 diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 15573ab..fd2cf8c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,6 +35,8 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|osmo-ggsn +|TCP|4261|telnet (VTY)|osmo-hnbgw +|TCP|4262|Control Interface|osmo-hnbgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/5519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:30:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:30:54 +0000 Subject: [PATCH] libosmocore[master]: ports: define proper VTY and CTRL ports for OsmoHNBGW Message-ID: Review at https://gerrit.osmocom.org/5520 ports: define proper VTY and CTRL ports for OsmoHNBGW So far it uses 2323, a development default. Instead, assign new ports, appending to the common range of VTY and CTRL ports: 4261 and 4262. Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Related: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 (osmo-gsm-manuals) Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/5520/1 diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index f974daf..4e93190 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -17,4 +17,5 @@ /* 4256 used by VTY interface */ #define OSMO_CTRL_PORT_GGSN 4257 #define OSMO_CTRL_PORT_HLR 4259 +#define OSMO_CTRL_PORT_HNBGW 4262 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ff0b58c..4819b87 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -29,4 +29,6 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 +#define OSMO_VTY_PORT_HNBGW 4261 +/* 4262 used by control interface */ /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/5520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:33:08 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:33:08 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: use proper VTY port number defined in libosmocore (4261) Message-ID: Review at https://gerrit.osmocom.org/5521 hnbgw: use proper VTY port number defined in libosmocore (4261) We used to have hardcoded 2323 from early development, use the proper libosmocore definition instead. Depends: Ife52a968a41cb286f640006587877971ff66c1a4 (libosmocore) Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 --- M src/hnbgw.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/21/5521/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index c1b931c..41958ea 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -470,7 +470,7 @@ log_set_log_level(osmo_stderr_target, hnbgw_cmdline_config.log_level); - rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), 2323); + rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); if (rc < 0) { perror("Error binding VTY port"); exit(1); -- To view, visit https://gerrit.osmocom.org/5521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:41:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:41:11 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: use proper VTY port number defined in libosmocore (4261) In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5521 to look at the new patch set (#2). hnbgw: use proper VTY port number defined in libosmocore (4261) We used to have hardcoded 2323 from early development, use the proper libosmocore definition instead. Depends: Ife52a968a41cb286f640006587877971ff66c1a4 (libosmocore) Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 --- M src/hnbgw.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/21/5521/2 diff --git a/src/hnbgw.c b/src/hnbgw.c index c1b931c..45a753f 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -45,6 +45,7 @@ #include #include #include +#include #include @@ -470,7 +471,7 @@ log_set_log_level(osmo_stderr_target, hnbgw_cmdline_config.log_level); - rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), 2323); + rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); if (rc < 0) { perror("Error binding VTY port"); exit(1); -- To view, visit https://gerrit.osmocom.org/5521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 01:41:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 01:41:21 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: use proper talloc ctx for vty telnet init Message-ID: Review at https://gerrit.osmocom.org/5522 hnbgw: use proper talloc ctx for vty telnet init Change-Id: I355c6e5489f24566612528cd679c5cab21eed008 --- M src/hnbgw.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/22/5522/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index 45a753f..ff3e2a9 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -471,7 +471,7 @@ log_set_log_level(osmo_stderr_target, hnbgw_cmdline_config.log_level); - rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); + rc = telnet_init_dynif(tall_hnb_ctx, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); if (rc < 0) { perror("Error binding VTY port"); exit(1); -- To view, visit https://gerrit.osmocom.org/5522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I355c6e5489f24566612528cd679c5cab21eed008 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 09:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 09:04:00 +0000 Subject: libosmocore[master]: rate_ctr: fix osmo-sgsn DoS: don't return NULL on already us... In-Reply-To: References: Message-ID: Patch Set 1: I think we should fix the callers instead. We can introduce special idx value (smth very big) which could be used by callers to indicate "next available index" but this patch would just hide the error instead of fixing it. -- To view, visit https://gerrit.osmocom.org/5516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 09:12:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 09:12:45 +0000 Subject: osmo-sgsn[master]: gprs_gmm: segfault: gracefully handle failure to alloc context In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:40:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 10:40:48 +0000 Subject: [PATCH] osmo-sgsn[master]: Use connection id when allocating rate counters Message-ID: Review at https://gerrit.osmocom.org/5523 Use connection id when allocating rate counters Due to recent libosmocore's change we can't allocate rate counters with the same name and index which are already allocated. This causes sgsn_mm_ctx_alloc_iu() failure for multiple subscribers. Fix this by using conn_id parameter from ranap_ue_conn_ctx. Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Related: OS#2757 --- M src/gprs/gprs_sgsn.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/23/5523/1 diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 768d953..c4321f9 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -255,21 +255,23 @@ { #if BUILD_IU struct sgsn_mm_ctx *ctx; + struct ranap_ue_conn_ctx *ue_ctx = uectx; ctx = talloc_zero(tall_bsc_ctx, struct sgsn_mm_ctx); if (!ctx) return NULL; ctx->ran_type = MM_CTX_T_UTRAN_Iu; - ctx->iu.ue_ctx = uectx; + ctx->iu.ue_ctx = ue_ctx; ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; ctx->gmm_state = GMM_DEREGISTERED; ctx->pmm_state = PMM_DETACHED; ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL; - ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0); + ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, ue_ctx->conn_id); if (!ctx->ctrg) { - LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group\n"); + LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group for %s.%u\n", + mmctx_ctrg_desc.group_name_prefix, ue_ctx->conn_id); talloc_free(ctx); return NULL; } -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:52:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:52:35 +0000 Subject: libosmocore[master]: rate_ctr: fix osmo-sgsn DoS: don't return NULL on already us... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:52:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:52:46 +0000 Subject: [MERGED] libosmocore[master]: rate_ctr: fix osmo-sgsn DoS: don't return NULL on already us... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rate_ctr: fix osmo-sgsn DoS: don't return NULL on already used index ...................................................................... rate_ctr: fix osmo-sgsn DoS: don't return NULL on already used index Recent patch I563764af1d28043e909234ebb048239125ce6ecd introduced returning NULL from rate_ctr_group_alloc() when the index passed already exists. Instead of returning NULL, find an unused group index and use that, adjust the error message. In stats_test.c, adjust, and also assert allocated counter group indexes everywhere. Rationale: The original patch causes osmo-sgsn to crash as soon as the second subscriber attempts to establish an MM context. Of course osmo-sgsn is wrong to a) fail to check a NULL return value and crash and b) to fail to allocate an MM context just because the rate counter group could not be allocated (it still rejects the MM context completely if rate_ctr_group_alloc() fails). Nevertheless, the price we pay for rate counter correctness is, at least in this instance, way too high: osmo-sgsn becomes completely unusable for more than one subscriber. Numerous other places exist where rate_ctr_group_alloc() is called with a constant index number; from a quick grep magic I found these possible breaking points: osmo-sgsn/src/gprs/gb_proxy.c:1431: cfg->ctrg = rate_ctr_group_alloc(tall_bsc_ctx, &global_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:139: sgsn->rate_ctrs = rate_ctr_group_alloc(tall_bsc_ctx, &sgsn_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:270: ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0); osmo-sgsn/src/gprs/gtphub.c:888: b->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, 0); osmo-bsc/src/libfilter/bsc_msg_acc.c:87: lst->stats = rate_ctr_group_alloc(lst, &bsc_cfg_acc_list_desc, 0); osmo-pcu/src/bts.cpp:228: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:793: tbf->m_ctrs = rate_ctr_group_alloc(tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:879: tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:880: tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:970: tbf->m_dl_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:977: tbf->m_dl_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:1475: ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/bts.cpp:226: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 1); We can fix all of these callers and then reconsider returning NULL, but IMO even into the future, rate counter group indexes are not something worth failing to provide service for. For future bugs we should keep the automatic index picking in case of index collisions. We will get an error message barfed and can fix the issue in our own time, while the application remains completely usable, and even the rate counters can still be queried (at wrong indexes, but life is tough). Related: I49aa95b610f2faec52dede2e4816da47ca1dfb14 (osmo-sgsn's segfault) Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 --- M src/rate_ctr.c M tests/stats/stats_test.c 2 files changed, 31 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rate_ctr.c b/src/rate_ctr.c index 72c6bb1..ec054c5 100644 --- a/src/rate_ctr.c +++ b/src/rate_ctr.c @@ -178,6 +178,27 @@ return NULL; } +/*! Find an unused index for this rate counter group. + * \param[in] name Name of the counter group + * \returns the largest used index number + 1, or 0 if none exist yet. */ +static unsigned int rate_ctr_get_unused_name_idx(const char *name) +{ + unsigned int idx = 0; + struct rate_ctr_group *ctrg; + + llist_for_each_entry(ctrg, &rate_ctr_groups, list) { + if (!ctrg->desc) + continue; + + if (strcmp(ctrg->desc->group_name_prefix, name)) + continue; + + if (idx <= ctrg->idx) + idx = ctrg->idx + 1; + } + return idx; +} + /*! Allocate a new group of counters according to description * \param[in] ctx \ref talloc context * \param[in] desc Rate counter group description @@ -191,9 +212,11 @@ struct rate_ctr_group *group; if (rate_ctr_get_group_by_name_idx(desc->group_name_prefix, idx)) { - LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u\n", - desc->group_name_prefix, idx); - return NULL; /* group already exist */ + unsigned int new_idx = rate_ctr_get_unused_name_idx(desc->group_name_prefix); + LOGP(DLGLOBAL, LOGL_ERROR, "counter group '%s' already exists for index %u," + " instead using index %u. This is a software bug that needs fixing.\n", + desc->group_name_prefix, idx, new_idx); + idx = new_idx; } size = sizeof(struct rate_ctr_group) + diff --git a/tests/stats/stats_test.c b/tests/stats/stats_test.c index 35faf9a..6ef8841 100644 --- a/tests/stats/stats_test.c +++ b/tests/stats/stats_test.c @@ -324,16 +324,16 @@ statg2 = osmo_stat_item_group_alloc(stats_ctx, &statg_desc, 2); OSMO_ASSERT(statg2 != NULL); ctrg1 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 1); - OSMO_ASSERT(ctrg1 != NULL); + OSMO_ASSERT(ctrg1 && ctrg1->idx == 1); ctrg2 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); - OSMO_ASSERT(ctrg2 != NULL); + OSMO_ASSERT(ctrg2 && ctrg2->idx == 2); ctrg_dup = rate_ctr_group_alloc(stats_ctx, &ctrg_desc, 2); - if (ctrg_dup != NULL && ctrg2 != NULL) - printf("FAIL: successfully allocated already existing counter group!\n"); + OSMO_ASSERT(ctrg_dup && ctrg_dup->idx == 3); + rate_ctr_group_free(ctrg_dup); ctrg3 = rate_ctr_group_alloc(stats_ctx, &ctrg_desc_dot, 3); - OSMO_ASSERT(ctrg3 != NULL); + OSMO_ASSERT(ctrg3 && ctrg3->idx == 3); srep1 = stats_reporter_create_test("test1"); OSMO_ASSERT(srep1 != NULL); -- To view, visit https://gerrit.osmocom.org/5516 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:53:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:53:09 +0000 Subject: osmo-sgsn[master]: gprs_gmm: segfault: gracefully handle failure to alloc context In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:53:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:53:11 +0000 Subject: [MERGED] osmo-sgsn[master]: gprs_gmm: segfault: gracefully handle failure to alloc context In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs_gmm: segfault: gracefully handle failure to alloc context ...................................................................... gprs_gmm: segfault: gracefully handle failure to alloc context This counter allocation error I hit uncovers a segfault when allocating an MM context fails in the GSM_MI_TYPE_TMSI case: DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:509 handle_co_initial(dir=1, proc=19) DRANAP <001a> ../../../src/osmo-iuh/src/iu_client.c:229 RNC 23: new LAC 24358 RAC 22 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1271 MM(---/ffffffff) -> GMM ATTACH REQUEST MI(3427325924) type="GPRS attach" DLGLOBAL <001d> ../../../src/libosmocore/src/rate_ctr.c:195 counter group 'sgsn:mmctx' already exists for index 0 DMM <0002> ../../../../src/osmo-sgsn/src/gprs/gprs_sgsn.c:272 MM(/00000000) Cannot allocate counter group Program received signal SIGSEGV, Segmentation fault. gsm48_rx_gmm_att_req (llme=0x0, msg=0x555555886950, ctx=0x0) at ../../../../src/osmo-sgsn/src/gprs/gprs_gmm.c:1375 1375 ctx->p_tmsi = tmsi; Fix it with a bit of code already present for the GSM_MI_TYPE_IMSI case just above the segfault. Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 --- M src/gprs/gprs_gmm.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 147e001..8441f6b 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1372,6 +1372,10 @@ ctx = sgsn_mm_ctx_alloc_iu(msg->dst); else ctx = sgsn_mm_ctx_alloc_gb(msgb_tlli(msg), &ra_id); + if (!ctx) { + reject_cause = GMM_CAUSE_NET_FAIL; + goto rejected; + } ctx->p_tmsi = tmsi; } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { -- To view, visit https://gerrit.osmocom.org/5517 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49aa95b610f2faec52dede2e4816da47ca1dfb14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:56:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:56:05 +0000 Subject: osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 I would argue that the TLLI might make more sense. The SCCP Connection IDentifier is a value that has local significance only (i.e. only between the SCCP provider (libosmo-sigtran) and the SCCP user (osmo-sgsn). The TLLI however is an address that shows up in protocol traces so it has some external significance, too. The main problem is probably that the TLLI changes over time :/ What makes most sense is to have some kind of lookup helper for rate counters in the SGSN where one could say "give me the counter for IMSI XYZ or PDO-Context 1 at IMSI XYZ". So the index is still there, but unused and replaced by a more meaningful way to query those counters that one is actually interested in. -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:56:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:56:22 +0000 Subject: osmo-gsm-manuals[master]: ports: add osmo-hnbgw as on port-numbers wiki page In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:56:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:56:51 +0000 Subject: osmo-gsm-manuals[master]: common: ports: tweak OpenGGSN to osmo-ggsn as on port-number... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieaac06c9d914fc7481107ca8ebe6192b36b91bcd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:56:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:56:56 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: common: ports: tweak OpenGGSN to osmo-ggsn as on port-number... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: common: ports: tweak OpenGGSN to osmo-ggsn as on port-numbers wiki page ...................................................................... common: ports: tweak OpenGGSN to osmo-ggsn as on port-numbers wiki page Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Change-Id: Ieaac06c9d914fc7481107ca8ebe6192b36b91bcd --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index a69483a..15573ab 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -31,10 +31,10 @@ |TCP|4254|telnet (VTY)|osmo-msc |TCP|4255|Control Interface|osmo-msc |TCP|4256|telnet (VTY)|osmo-sip-connector -|TCP|4257|Control Interface|ggsn (OpenGGSN) +|TCP|4257|Control Interface|osmo-ggsn, ggsn (OpenGGSN) |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr -|TCP|4260|telnet (VTY)|ggsn (OpenGGSN) +|TCP|4260|telnet (VTY)|osmo-ggsn |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/5518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieaac06c9d914fc7481107ca8ebe6192b36b91bcd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:56:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:56:56 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: ports: add osmo-hnbgw as on port-numbers wiki page In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ports: add osmo-hnbgw as on port-numbers wiki page ...................................................................... ports: add osmo-hnbgw as on port-numbers wiki page Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Related: Ife52a968a41cb286f640006587877971ff66c1a4 (libosmocore) Change-Id: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 --- M common/chapters/port_numbers.adoc 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc index 15573ab..fd2cf8c 100644 --- a/common/chapters/port_numbers.adoc +++ b/common/chapters/port_numbers.adoc @@ -35,6 +35,8 @@ |TCP|4258|telnet (VTY)|osmo-hlr |TCP|4259|Control Interface|osmo-hlr |TCP|4260|telnet (VTY)|osmo-ggsn +|TCP|4261|telnet (VTY)|osmo-hnbgw +|TCP|4262|Control Interface|osmo-hnbgw |UDP|4729|GSMTAP|Almost every osmocom project |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat |UDP|2427|GSMTAP|osmo-pcu, osmo-bts -- To view, visit https://gerrit.osmocom.org/5519 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:57:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:57:18 +0000 Subject: libosmocore[master]: ports: define proper VTY and CTRL ports for OsmoHNBGW In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:57:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:57:20 +0000 Subject: [MERGED] libosmocore[master]: ports: define proper VTY and CTRL ports for OsmoHNBGW In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ports: define proper VTY and CTRL ports for OsmoHNBGW ...................................................................... ports: define proper VTY and CTRL ports for OsmoHNBGW So far it uses 2323, a development default. Instead, assign new ports, appending to the common range of VTY and CTRL ports: 4261 and 4262. Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Related: I28bd7a97d24455f88fadc6724d45c3264ba2fce4 (osmo-gsm-manuals) Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4 --- M include/osmocom/ctrl/ports.h M include/osmocom/vty/ports.h 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h index f974daf..4e93190 100644 --- a/include/osmocom/ctrl/ports.h +++ b/include/osmocom/ctrl/ports.h @@ -17,4 +17,5 @@ /* 4256 used by VTY interface */ #define OSMO_CTRL_PORT_GGSN 4257 #define OSMO_CTRL_PORT_HLR 4259 +#define OSMO_CTRL_PORT_HNBGW 4262 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h index ff0b58c..4819b87 100644 --- a/include/osmocom/vty/ports.h +++ b/include/osmocom/vty/ports.h @@ -29,4 +29,6 @@ #define OSMO_VTY_PORT_HLR 4258 /* 4259 used by control interface */ #define OSMO_VTY_PORT_GGSN 4260 +#define OSMO_VTY_PORT_HNBGW 4261 +/* 4262 used by control interface */ /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ -- To view, visit https://gerrit.osmocom.org/5520 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife52a968a41cb286f640006587877971ff66c1a4 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:58:30 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:58:30 +0000 Subject: osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:58:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:58:32 +0000 Subject: [MERGED] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC ...................................................................... iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than one LAC per OsmoHNBGW. iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page successfully in a setup with multiple LACs (read: multiple hNodeB) connected to an OsmoHNBGW. Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC shows up on a different RNC Id than before, move it over to the new RNC Id. Future patches should probably add: * timeouts of RNC Id / LAC,RAC validity, to remove unused entries. * VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed. * VTY/CTRL commands to remove RNC Id / LAC,RAC entries. Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 --- M src/iu_client.c 1 file changed, 127 insertions(+), 82 deletions(-) Approvals: Neels Hofmeyr: Verified Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/iu_client.c b/src/iu_client.c index 3ee900c..0724220 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -47,6 +47,15 @@ uint16_t rnc_id; }; +struct iu_lac_rac_entry { + struct llist_head entry; + + /* LAC: Location Area Code (for CS and PS) */ + uint16_t lac; + /* RAC: Routing Area Code (for PS only) */ + uint8_t rac; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -58,9 +67,10 @@ struct llist_head entry; uint16_t rnc_id; - uint16_t lac; /* Location Area Code (used for CS and PS) */ - uint8_t rac; /* Routing Area Code (used for PS only) */ struct osmo_sccp_addr sccp_addr; + + /* A list of struct iu_lac_rac_entry */ + struct llist_head lac_rac_list; }; void *talloc_iu_ctx; @@ -81,6 +91,9 @@ #define LOGPIU(level, fmt, args...) \ LOGP(iu_log_subsystem, level, fmt, ## args) + +#define LOGPIUC(level, fmt, args...) \ + LOGPC(iu_log_subsystem, level, fmt, ## args) static LLIST_HEAD(ue_conn_ctx_list); static LLIST_HEAD(rnc_list); @@ -119,53 +132,109 @@ return NULL; } -static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, uint8_t rac, - struct osmo_sccp_addr *addr) +static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); + OSMO_ASSERT(rnc); + + INIT_LLIST_HEAD(&rnc->lac_rac_list); rnc->rnc_id = rnc_id; - rnc->lac = lac; - rnc->rac = rac; rnc->sccp_addr = *addr; llist_add(&rnc->entry, &rnc_list); - LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n", - rnc->rnc_id, rnc->lac, rnc->rac); + LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, osmo_sccp_addr_dump(addr)); return rnc; +} + +/* Find a match for the given LAC (and RAC). For CS, pass rac as 0. + * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no match is found, or to the + * match if a match is found. Return true if a match is found. */ +static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct iu_lac_rac_entry **lre, + uint16_t lac, uint8_t rac) +{ + struct ranap_iu_rnc *r; + struct iu_lac_rac_entry *e; + + if (rnc) + *rnc = NULL; + if (lre) + *lre = NULL; + + llist_for_each_entry(r, &rnc_list, entry) { + llist_for_each_entry(e, &r->lac_rac_list, entry) { + if (e->lac == lac && e->rac == rac) { + if (rnc) + *rnc = r; + if (lre) + *lre = e; + return true; + } + } + } + return false; +} + +static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id) +{ + struct ranap_iu_rnc *rnc; + llist_for_each_entry(rnc, &rnc_list, entry) { + if (rnc->rnc_id == rnc_id) + return rnc; + } + return NULL; +} + +static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b) +{ + char buf[256]; + osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf)); + return !strcmp(buf, osmo_sccp_addr_dump(b)); } static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac, uint8_t rac, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc; - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->rnc_id != rnc_id) - continue; + struct ranap_iu_rnc *old_rnc; + struct iu_lac_rac_entry *lre; - /* We have this RNC Id registered already. Make sure that the - * details match. */ + /* Make sure we know this rnc_id and that this SCCP address is in our records */ + rnc = iu_rnc_id_find(rnc_id); - /* TODO should a mismatch be an error? */ - if (rnc->lac != lac || rnc->rac != rac) - LOGPIU(LOGL_NOTICE, "RNC %d changes its details:" - " LAC=%d RAC=%d --> LAC=%d RAC=%d\n", - rnc->rnc_id, rnc->lac, rnc->rac, - lac, rac); - rnc->lac = lac; - rnc->rac = rac; + if (rnc) { + if (!same_sccp_addr(&rnc->sccp_addr, addr)) { + LOGPIU(LOGL_NOTICE, "RNC %u changed its SCCP addr to %s (LAC=%u RAC=%u)\n", + rnc_id, osmo_sccp_addr_dump(addr), lac, rac); + rnc->sccp_addr = *addr; + } + } else + rnc = iu_rnc_alloc(rnc_id, addr); - if (addr && memcmp(&rnc->sccp_addr, addr, sizeof(*addr))) - LOGPIU(LOGL_NOTICE, "RNC %d on New SCCP Addr %s" - " (LAC=%d RAC=%d)\n", - rnc->rnc_id, osmo_sccp_addr_dump(addr), rnc->lac, rnc->rac); - rnc->sccp_addr = *addr; - return rnc; + /* Detect whether the LAC,RAC is already recorded in another RNC */ + iu_rnc_lac_rac_find(&old_rnc, &lre, lac, rac); + + if (old_rnc && old_rnc != rnc) { + /* LAC,RAC already exists in a different RNC */ + LOGPIU(LOGL_NOTICE, "LAC %u RAC %u moved from RNC %u %s", + lac, rac, old_rnc->rnc_id, osmo_sccp_addr_dump(&old_rnc->sccp_addr)); + LOGPIUC(LOGL_NOTICE, " to RNC %u %s\n", + rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); + + llist_del(&lre->entry); + llist_add(&lre->entry, &rnc->lac_rac_list); + } else if (!old_rnc) { + /* LAC,RAC not recorded yet */ + LOGPIU(LOGL_NOTICE, "RNC %u: new LAC %u RAC %u\n", rnc_id, lac, rac); + lre = talloc_zero(rnc, struct iu_lac_rac_entry); + lre->lac = lac; + lre->rac = rac; + llist_add(&lre->entry, &rnc->lac_rac_list); } + /* else, LAC,RAC already recorded with the current RNC. */ - /* Not found, make a new one. */ - return iu_rnc_alloc(rnc_id, lac, rac, addr); + return rnc; } /*********************************************************************** @@ -602,69 +671,45 @@ struct msgb *msg; msg = ranap_new_msg_paging_cmd(imsi, tmsi, is_ps? 1 : 0, paging_cause); msg->l2h = msg->data; - osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); - return 0; + return osmo_sccp_tx_unitdata_msg(g_scu, &g_local_sccp_addr, called_addr, msg); } -static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptimsi, +static int iu_page(const char *imsi, const uint32_t *tmsi_or_ptmsi, uint16_t lac, uint8_t rac, bool is_ps) { struct ranap_iu_rnc *rnc; - int pagings_sent = 0; + int rc; + const char *log_msg; + int log_level; + int paged = 0; - if (tmsi_or_ptimsi) { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use %s %x)\n", - is_ps? "IuPS" : "IuCS", - imsi, - is_ps? "PTMSI" : "TMSI", - *tmsi_or_ptimsi); + iu_rnc_lac_rac_find(&rnc, NULL, lac, rac); + if (rnc) { + if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptmsi, is_ps, 0) == 0) { + log_msg = "Paging"; + log_level = LOGL_DEBUG; + paged = 1; + } else { + log_msg = "Paging failed"; + log_level = LOGL_ERROR; + } } else { - LOGPIU(LOGL_DEBUG, "%s: Looking for RNCs to page for IMSI %s" - " (paging will use IMSI)\n", - is_ps? "IuPS" : "IuCS", - imsi - ); + log_msg = "Found no RNC to Page"; + log_level = LOGL_ERROR; } - llist_for_each_entry(rnc, &rnc_list, entry) { - if (rnc->lac != lac) - continue; - if (is_ps && rnc->rac != rac) - continue; + if (is_ps) + LOGPIU(log_level, "IuPS: %s on LAC %d RAC %d", log_msg, lac, rac); + else + LOGPIU(log_level, "IuCS: %s on LAC %d", log_msg, lac); + if (rnc) + LOGPIUC(log_level, " at SCCP-addr %s", osmo_sccp_addr_dump(&rnc->sccp_addr)); + if (tmsi_or_ptmsi) + LOGPIUC(log_level, ", for %s %08x\n", is_ps? "PTMSI" : "TMSI", *tmsi_or_ptmsi); + else + LOGPIUC(log_level, ", for IMSI %s\n", imsi); - /* Found a match! */ - if (iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi_or_ptimsi, is_ps, 0) - == 0) { - LOGPIU(LOGL_DEBUG, - "%s: Paged for IMSI %s on RNC %d, on SCCP addr %s\n", - is_ps? "IuPS" : "IuCS", - imsi, rnc->rnc_id, osmo_sccp_addr_dump(&rnc->sccp_addr)); - pagings_sent ++; - } - } - - /* Some logging... */ - if (pagings_sent > 0) { - LOGPIU(LOGL_DEBUG, - "%s: %d RNCs were paged for IMSI %s.\n", - is_ps? "IuPS" : "IuCS", - pagings_sent, imsi); - } - else { - if (is_ps) { - LOGPIU(LOGL_ERROR, "IuPS: Found no RNC to page for" - " LAC %d RAC %d (would have paged IMSI %s)\n", - lac, rac, imsi); - } - else { - LOGPIU(LOGL_ERROR, "IuCS: Found no RNC to page for" - " LAC %d (would have paged IMSI %s)\n", - lac, imsi); - } - } - - return pagings_sent; + return paged; } int ranap_iu_page_cs(const char *imsi, const uint32_t *tmsi, uint16_t lac) -- To view, visit https://gerrit.osmocom.org/5381 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I189f8e2663353276b1c615d2f78455dafe568045 Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 10:58:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 10:58:47 +0000 Subject: osmo-iuh[master]: hnbgw: use proper talloc ctx for vty telnet init In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I355c6e5489f24566612528cd679c5cab21eed008 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:02:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:02:53 +0000 Subject: osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/5498/1/include/osmocom/ranap/iu_helpers.h File include/osmocom/ranap/iu_helpers.h: Line 11: int ranap_transp_assoc_decode(uint16_t *port, RANAP_IuTransportAssociation_t *transp_assoc); input pointer arguments should be 'const' https://gerrit.osmocom.org/#/c/5498/1/src/iu_helpers.c File src/iu_helpers.c: Line 113: snprintf(addr, addr_len, "%u.%u.%u.%u", buf[3], buf[4], buf[5], buf[6]); can we please simply use inet_ntop() to do the conversion? I don't see reasons to re-invent standard C library functions here. This way the function could even do IPv6 from day one (even though if higher layers don't). If you explicitly don't want IPv6, you could still use inet_ntoa(). -- To view, visit https://gerrit.osmocom.org/5498 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:07:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:07:41 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/5499/1/src/ranap_msg_factory.c File src/ranap_msg_factory.c: Line 253: LOGP(DRANAP, LOGL_ERROR, "error encoding security mode command IEs: %d\n", rc); ASN_SEQUENCE_ADD() might do a realloc() inside asn_set_add() so please make sure you do proper cleanup. In fact, the ASN_STRUCT_FREE_CONTENTS_ONLY exactly below this statement are doing this ,so the if-then-return clause you add should be after those two calls but before ranap_generate_initiating_message() Line 332: if (rc < 0) { same problem ehre, move this below the ASN_STRUCT_FREE_CONTENTS_ONLY() but above the ranap_generate_* Line 458: if (rc < 0) { and once more. -- To view, visit https://gerrit.osmocom.org/5499 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:07:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:07:55 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: remove unusued variable In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5500 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:09:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:09:24 +0000 Subject: libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/4893/4/src/osmo_ss7.c File src/osmo_ss7.c: Line 1792: osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, > We don't need changes anywhere else because the only direct user of this AP I think even simple_server is not used in osmocom projects either, as the only server is the STP (SG) while all other entities are clients (ASPs) that connect to the STP/SG. -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:09:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:09:56 +0000 Subject: python/osmo-python-tests[master]: scripts: add symlink to osmopy In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5493 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:10:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:10:09 +0000 Subject: python/osmo-python-tests[master]: add cmdline doc to osmo_interact_* and osmo_verify_* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5494 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94dcad257558b917cb54fc877122594cd164f496 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:10:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:10:17 +0000 Subject: python/osmo-python-tests[master]: README: mention osmo_interact_* and osmo_verify_transcript_* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5495 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:10:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:10:19 +0000 Subject: python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5496 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:11:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:11:04 +0000 Subject: python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 11:11:15 +0000 Subject: [MERGED] python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix osmo_interact_* and osmo_verify_transcript_* after dir split ...................................................................... fix osmo_interact_* and osmo_verify_transcript_* after dir split After I30cdf0f85b2a60a235960911c9827f4129da40db, * the osmo_interact_{vty,ctrl}.py can no longer import osmo_interact_common, since it was moved to scripts/ in error. * the osmo_verify_{vty,ctrl} scripts can no longer import osmo_interact_{vty,ctrl}, since it is also in scripts/. Notably, the osmo_interact_{vty,ctrl}.py also served as scripts while being modules at the same time, which is not good. Fix these issues by adding a new osmopy/osmo_interact/ submodule with osmopy/osmo_interact/common.py, /vty.py and /ctrl.py as modules, and add in scripts thin wrappers that invoke the modules' main(). Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 --- M osmopy/__init__.py A osmopy/osmo_interact/__init__.py R osmopy/osmo_interact/common.py A osmopy/osmo_interact/ctrl.py A osmopy/osmo_interact/vty.py M scripts/osmo_interact_ctrl.py M scripts/osmo_interact_vty.py M scripts/osmo_verify_transcript_ctrl.py M scripts/osmo_verify_transcript_vty.py 9 files changed, 321 insertions(+), 315 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmopy/__init__.py b/osmopy/__init__.py index 6150ea4..b1b0651 100644 --- a/osmopy/__init__.py +++ b/osmopy/__init__.py @@ -1,4 +1,4 @@ #!/usr/bin/env python -__version__ = '0.0.5' +__version__ = '0.0.6' -__all__ = ['obscvty', 'osmoutil', 'osmo_ipa'] +__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact'] diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py new file mode 100644 index 0000000..4fc4fac --- /dev/null +++ b/osmopy/osmo_interact/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python +__all__ = ['common', 'vty', 'ctrl'] diff --git a/scripts/osmo_interact_common.py b/osmopy/osmo_interact/common.py similarity index 97% rename from scripts/osmo_interact_common.py rename to osmopy/osmo_interact/common.py index 5efc22d..f7070ae 100644 --- a/scripts/osmo_interact_common.py +++ b/osmopy/osmo_interact/common.py @@ -24,6 +24,11 @@ osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits. ''' +# Our setup.py currently wants everything to be parsable by both py2 and py3. +# IMHO that is not a good idea, but until that changes, let's just keep this +# py2 legacy shim in here so we can syntax-check this py3 module with py2. +from __future__ import print_function + import argparse import sys import os diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py new file mode 100755 index 0000000..b752351 --- /dev/null +++ b/osmopy/osmo_interact/ctrl.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run CTRL commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_ctrl.py. +''' + +import re + +from .common import * +from osmopy.osmo_ipa import Ctrl, IPA + +class InteractCtrl(Interact): + next_id = 1 + keep_ids = True + re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') + + class CtrlStep(Interact.StepBase): + + @staticmethod + def is_next_step(line, interact_instance): + m = InteractCtrl.re_command.match(line) + if not m: + return None + next_step = InteractCtrl.CtrlStep() + + set_get = m.group(1) + cmd_id = m.group(2) + var_val = m.group(3) + if not interact_instance.keep_ids: + cmd_id = interact_instance.next_id + interact_instance.next_id += 1 + next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) + + return next_step + + def __init__(self, port, host, verbose=False, update=False, keep_ids=True): + if not update: + keep_ids = True + self.keep_ids = keep_ids + super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) + + def connect(self): + self.next_id = 1 + super().connect() + + def send(self, data): + data = Ctrl().add_header(data) + return self.socket.send(data) == len(data) + + def receive(self): + responses = [] + data = self.socket.recv(4096) + while (len(data)>0): + (response_with_header, data) = IPA().split_combined(data) + response = Ctrl().rem_header(response_with_header) + responses.append(response.decode('utf-8')) + return responses + + def command(self, command): + assert self.send(command) + res = self.receive() + split_responses = [] + for r in res: + split_responses.extend(r.splitlines()) + sys.stdout.flush() + sys.stderr.flush() + return split_responses + +def main_interact_ctrl(): + parser = common_parser() + parser_add_run_args(parser) + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, verbose=False, update=False, + keep_ids=True) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + + +def main_verify_transcript_ctrl(): + parser = common_parser() + parser_add_verify_args(parser) + parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', + help='With --update, default is to overwrite the command IDs' + ' so that they are consecutive numbers starting from 1.' + ' With --keep-ids, do not change these command IDs.') + args = parser.parse_args() + + interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py new file mode 100755 index 0000000..f34e87e --- /dev/null +++ b/osmopy/osmo_interact/vty.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python3 +# +# (C) 2017 by sysmocom s.f.m.c. GmbH +# All rights reserved. +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +''' +Run VTY commands or test transcripts against a given application. Commandline +invocation exposes only direct command piping, the transcript verification code +is exposed as commandline args by osmo_verify_transcript_vty.py. +''' + +import re + +from .common import * + +class InteractVty(Interact): + + class VtyStep(Interact.StepBase): + expect_node = None # e.g. '(config-net)' + expect_prompt_char = None # '>' or '#' + + def __init__(self, prompt): + super().__init__() + self.prompt = prompt + + def verify_interact_state(self, interact_instance): + if interact_instance.update: + return + if interact_instance.this_node != self.expect_node: + raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' + % (self.expect_node, interact_instance.this_node)) + if interact_instance.this_prompt_char != self.expect_prompt_char: + raise Exception('Mismatch: expected VTY prompt character %r, got %r' + % (self.expect_prompt_char, interact_instance.this_prompt_char)) + + @staticmethod + def is_next_step(line, interact_instance): + m = interact_instance.re_prompt.match(line) + if not m: + return None + next_step = InteractVty.VtyStep(interact_instance.prompt) + next_step.expect_node = m.group(1) + next_step.expect_prompt_char = m.group(2) + next_step.command = m.group(3) + return next_step + + def command_str(self, interact_instance=None): + if interact_instance is None: + node = self.expect_node + prompt_char = self.expect_prompt_char + else: + node = interact_instance.last_node + prompt_char = interact_instance.last_prompt_char + if node: + node = '(%s)' % node + node = node or '' + return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) + + def __init__(self, prompt, port, host, verbose, update): + self.prompt = prompt + super().__init__(InteractVty.VtyStep, port, host, verbose, update) + + def connect(self): + self.this_node = None + self.this_prompt_char = '>' # slight cheat for initial prompt char + self.last_node = None + self.last_prompt_char = None + + super().connect() + # receive the first welcome message and discard + data = self.socket.recv(4096) + if not self.prompt: + b = data + b = b[b.rfind(b'\n') + 1:] + while b and (b[0] < ord('A') or b[0] > ord('z')): + b = b[1:] + prompt_str = b.decode('utf-8') + if '>' in prompt_str: + self.prompt = prompt_str[:prompt_str.find('>')] + if not self.prompt: + raise Exception('Could not find application name; needed to decode prompts.' + ' Initial data was: %r' % data) + self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) + + def _command(self, command_str, timeout=10): + self.socket.send(command_str.encode()) + + waited_since = time.time() + received_lines = [] + last_line = '' + + while True: + new_data = self.socket.recv(4096).decode('utf-8') + + last_line = "%s%s" % (last_line, new_data) + + if last_line: + lines = last_line.splitlines() + received_lines.extend(lines[:-1]) + last_line = lines[-1] + + match = self.re_prompt.match(last_line) + if not match: + if time.time() - waited_since > timeout: + raise IOError("Failed to read data (did the app crash?)") + time.sleep(.1) + continue + + self.last_node = self.this_node + self.last_prompt_char = self.this_prompt_char + self.this_node = match.group(1) or None + self.this_prompt_char = match.group(2) + break + + # expecting to have received the command we sent as echo, remove it + clean_command_str = command_str.strip() + if clean_command_str.endswith('?'): + clean_command_str = clean_command_str[:-1] + if received_lines and received_lines[0] == clean_command_str: + received_lines = received_lines[1:] + return received_lines + + def command(self, command_str, timeout=10): + command_str = command_str or '\r' + if command_str[-1] not in '?\r\t': + command_str = command_str + '\r' + + received_lines = self._command(command_str, timeout) + + # send escape to cancel the '?' command line + if command_str[-1] == '?': + self._command('\x03', timeout) + + return received_lines + +def parser_add_vty_args(parser): + parser.add_argument('-n', '--prompt-name', dest='prompt', + help="Name used in application's telnet VTY prompt." + " If omitted, will attempt to determine the name from" + " the initial VTY prompt.") + return parser + +def main_interact_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_run_args(parser) + parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', + help="Equivalent to '-c \"show online-help\" -O -'," + " can be used to generate the VTY reference file as" + " required by osmo-gsm-manuals.git.") + args = parser.parse_args() + + if args.gen_xml: + if args.cmd_str: + raise Exception('It does not make sense to pass both --command and' + ' --gen-xml-ref.') + args.cmd_str = 'show online-help' + + interact = InteractVty(args.prompt, args.port, args.host, + verbose=False, update=False) + + main_run_commands(args.run_app_str, args.output_path, args.cmd_str, + args.cmd_files, interact) + +def main_verify_transcript_vty(): + parser = common_parser() + parser_add_vty_args(parser) + parser_add_verify_args(parser) + args = parser.parse_args() + + interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) + + main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) + +# vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_ctrl.py b/scripts/osmo_interact_ctrl.py index 9b1a20b..eb88800 100755 --- a/scripts/osmo_interact_ctrl.py +++ b/scripts/osmo_interact_ctrl.py @@ -18,83 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_ctrl.py. -''' +from osmopy.osmo_interact.ctrl import main_interact_ctrl -import re - -from osmopy.osmo_interact_common import * -from osmopy.osmo_ipa import Ctrl, IPA - -class InteractCtrl(Interact): - next_id = 1 - keep_ids = True - re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$') - - class CtrlStep(Interact.StepBase): - - @staticmethod - def is_next_step(line, interact_instance): - m = InteractCtrl.re_command.match(line) - if not m: - return None - next_step = InteractCtrl.CtrlStep() - - set_get = m.group(1) - cmd_id = m.group(2) - var_val = m.group(3) - if not interact_instance.keep_ids: - cmd_id = interact_instance.next_id - interact_instance.next_id += 1 - next_step.command = '%s %s %s' % (set_get, cmd_id, var_val) - - return next_step - - def __init__(self, port, host, verbose=False, update=False, keep_ids=True): - if not update: - keep_ids = True - self.keep_ids = keep_ids - super().__init__(InteractCtrl.CtrlStep, port=port, host=host, verbose=verbose, update=update) - - def connect(self): - self.next_id = 1 - super().connect() - - def send(self, data): - data = Ctrl().add_header(data) - return self.socket.send(data) == len(data) - - def receive(self): - responses = [] - data = self.socket.recv(4096) - while (len(data)>0): - (response_with_header, data) = IPA().split_combined(data) - response = Ctrl().rem_header(response_with_header) - responses.append(response.decode('utf-8')) - return responses - - def command(self, command): - assert self.send(command) - res = self.receive() - split_responses = [] - for r in res: - split_responses.extend(r.splitlines()) - sys.stdout.flush() - sys.stderr.flush() - return split_responses - -if __name__ == '__main__': - parser = common_parser() - parser_add_run_args(parser) - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, verbose=False, update=False, - keep_ids=True) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_interact_vty.py b/scripts/osmo_interact_vty.py index b57cd8c..b47b46c 100755 --- a/scripts/osmo_interact_vty.py +++ b/scripts/osmo_interact_vty.py @@ -18,163 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY commands or test transcripts against a given application. Commandline -invocation exposes only direct command piping, the transcript verification code -is exposed as commandline args by osmo_verify_transcript_vty.py. -''' +from osmopy.osmo_interact.vty import main_interact_vty -import re - -from osmopy.osmo_interact_common import * - -class InteractVty(Interact): - - class VtyStep(Interact.StepBase): - expect_node = None # e.g. '(config-net)' - expect_prompt_char = None # '>' or '#' - - def __init__(self, prompt): - super().__init__() - self.prompt = prompt - - def verify_interact_state(self, interact_instance): - if interact_instance.update: - return - if interact_instance.this_node != self.expect_node: - raise Exception('Mismatch: expected VTY node %r in the prompt, got %r' - % (self.expect_node, interact_instance.this_node)) - if interact_instance.this_prompt_char != self.expect_prompt_char: - raise Exception('Mismatch: expected VTY prompt character %r, got %r' - % (self.expect_prompt_char, interact_instance.this_prompt_char)) - - @staticmethod - def is_next_step(line, interact_instance): - m = interact_instance.re_prompt.match(line) - if not m: - return None - next_step = InteractVty.VtyStep(interact_instance.prompt) - next_step.expect_node = m.group(1) - next_step.expect_prompt_char = m.group(2) - next_step.command = m.group(3) - return next_step - - def command_str(self, interact_instance=None): - if interact_instance is None: - node = self.expect_node - prompt_char = self.expect_prompt_char - else: - node = interact_instance.last_node - prompt_char = interact_instance.last_prompt_char - if node: - node = '(%s)' % node - node = node or '' - return '%s%s%s %s' % (self.prompt, node, prompt_char, self.command) - - def __init__(self, prompt, port, host, verbose, update): - self.prompt = prompt - super().__init__(InteractVty.VtyStep, port, host, verbose, update) - - def connect(self): - self.this_node = None - self.this_prompt_char = '>' # slight cheat for initial prompt char - self.last_node = None - self.last_prompt_char = None - - super().connect() - # receive the first welcome message and discard - data = self.socket.recv(4096) - if not self.prompt: - b = data - b = b[b.rfind(b'\n') + 1:] - while b and (b[0] < ord('A') or b[0] > ord('z')): - b = b[1:] - prompt_str = b.decode('utf-8') - if '>' in prompt_str: - self.prompt = prompt_str[:prompt_str.find('>')] - if not self.prompt: - raise Exception('Could not find application name; needed to decode prompts.' - ' Initial data was: %r' % data) - self.re_prompt = re.compile('^%s(?:\(([\w-]*)\))?([#>]) (.*)$' % self.prompt) - - def _command(self, command_str, timeout=10): - self.socket.send(command_str.encode()) - - waited_since = time.time() - received_lines = [] - last_line = '' - - while True: - new_data = self.socket.recv(4096).decode('utf-8') - - last_line = "%s%s" % (last_line, new_data) - - if last_line: - lines = last_line.splitlines() - received_lines.extend(lines[:-1]) - last_line = lines[-1] - - match = self.re_prompt.match(last_line) - if not match: - if time.time() - waited_since > timeout: - raise IOError("Failed to read data (did the app crash?)") - time.sleep(.1) - continue - - self.last_node = self.this_node - self.last_prompt_char = self.this_prompt_char - self.this_node = match.group(1) or None - self.this_prompt_char = match.group(2) - break - - # expecting to have received the command we sent as echo, remove it - clean_command_str = command_str.strip() - if clean_command_str.endswith('?'): - clean_command_str = clean_command_str[:-1] - if received_lines and received_lines[0] == clean_command_str: - received_lines = received_lines[1:] - return received_lines - - def command(self, command_str, timeout=10): - command_str = command_str or '\r' - if command_str[-1] not in '?\r\t': - command_str = command_str + '\r' - - received_lines = self._command(command_str, timeout) - - # send escape to cancel the '?' command line - if command_str[-1] == '?': - self._command('\x03', timeout) - - return received_lines - -def parser_add_vty_args(parser): - parser.add_argument('-n', '--prompt-name', dest='prompt', - help="Name used in application's telnet VTY prompt." - " If omitted, will attempt to determine the name from" - " the initial VTY prompt.") - return parser - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_run_args(parser) - parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', - help="Equivalent to '-c \"show online-help\" -O -'," - " can be used to generate the VTY reference file as" - " required by osmo-gsm-manuals.git.") - args = parser.parse_args() - - if args.gen_xml: - if args.cmd_str: - raise Exception('It does not make sense to pass both --command and' - ' --gen-xml-ref.') - args.cmd_str = 'show online-help' - - interact = InteractVty(args.prompt, args.port, args.host, - verbose=False, update=False) - - main_run_commands(args.run_app_str, args.output_path, args.cmd_str, - args.cmd_files, interact) +main_interact_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_ctrl.py b/scripts/osmo_verify_transcript_ctrl.py index 3afbc62..b24fbfa 100755 --- a/scripts/osmo_verify_transcript_ctrl.py +++ b/scripts/osmo_verify_transcript_ctrl.py @@ -18,41 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run CTRL test transcripts against a given application. +from osmopy.osmo_interact.ctrl import main_verify_transcript_ctrl -A CTRL transcript contains CTRL commands and their expected results. -It looks like: - -" -SET 1 var val -SET_REPLY 1 var OK -GET 2 var -GET_REPLY 2 var val -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the CTRL port. - -This module can either be run directly to run or update a given CTRL transcript, -or it can be imported as a module to run more complex setups. -''' - -from osmopy.osmo_interact_ctrl import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_verify_args(parser) - parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', - help='With --update, default is to overwrite the command IDs' - ' so that they are consecutive numbers starting from 1.' - ' With --keep-ids, do not change these command IDs.') - args = parser.parse_args() - - interact = InteractCtrl(args.port, args.host, args.verbose, args.update, args.keep_ids) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_ctrl() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai diff --git a/scripts/osmo_verify_transcript_vty.py b/scripts/osmo_verify_transcript_vty.py index e70c36c..2695e86 100755 --- a/scripts/osmo_verify_transcript_vty.py +++ b/scripts/osmo_verify_transcript_vty.py @@ -18,50 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -''' -Run VTY test transcripts against a given application. +from osmopy.osmo_interact.vty import main_verify_transcript_vty -A VTY transcript contains VTY commands and their expected results. -It looks like: - -" -OsmoHLR> enable - -OsmoHLR# subscriber show imsi 123456789023000 -% No subscriber for imsi = '123456789023000' -OsmoHLR# subscriber show msisdn 12345 -% No subscriber for msisdn = '12345' - -OsmoHLR# subscriber create imsi 123456789023000 -% Created subscriber 123456789023000 - ID: 1 - IMSI: 123456789023000 - MSISDN: none - No auth data -" - -The application to be tested is described by -- a binary to run, -- command line arguments to pass to the binary, -- the VTY telnet port, -- the application name as printed in the VTY prompt. - -This module can either be run directly to run or update a given VTY transcript, -or it can be imported as a module to run more complex setups. -''' - -import re - -from osmopy.osmo_interact_vty import * - -if __name__ == '__main__': - parser = common_parser() - parser_add_vty_args(parser) - parser_add_verify_args(parser) - args = parser.parse_args() - - interact = InteractVty(args.prompt, args.port, args.host, args.verbose, args.update) - - main_verify_transcripts(args.run_app_str, args.transcript_files, interact, args.verbose) +main_verify_transcript_vty() # vim: tabstop=4 shiftwidth=4 expandtab nocin ai -- To view, visit https://gerrit.osmocom.org/5492 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:16:53 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 11:16:53 +0000 Subject: [PATCH] osmo-sgsn[master]: gtphub: make rate_ctr unique Message-ID: Review at https://gerrit.osmocom.org/5524 gtphub: make rate_ctr unique * compute unique rate counter index when allocating new gtphub tunnel * propagate rate counter allocation error to upper layers * log and gracefully handle tunnel allocation error Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Related: OS#2757 --- M src/gprs/gtphub.c 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/24/5524/1 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 7e3e663..a06e561 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1121,8 +1121,9 @@ struct gtphub_tunnel_endpoint *te = &tun->endpoint[side_idx][plane_idx]; te->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, - 0); - OSMO_ASSERT(te->counters_io); + side_idx + (plane_idx + 1) * 2); + if (!te->counters_io) + return NULL; } tun->expiry_entry.del_cb = gtphub_tunnel_del_cb; @@ -1486,7 +1487,13 @@ } /* A new tunnel. */ - p->tun = tun = gtphub_tunnel_new(); + tun = gtphub_tunnel_new(); + if (!tun) { + LOG(LOGL_ERROR, "Failed to allocate new tunnel %s <-> %s\n", + gtphub_port_str(from_ctrl), gtphub_port_str(to_ctrl)); + return -1; + } + p->tun = tun; /* Create TEI mapping */ tun->tei_repl = nr_pool_next(&hub->tei_pool); -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:45:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 11:45:08 +0000 Subject: [PATCH] osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5524 to look at the new patch set (#2). gtphub: make rate_ctr unique * compute unique rate counter index when allocating new gtphub tunnel * propagate rate counter allocation error to upper layers * log and gracefully handle tunnel allocation error Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Related: OS#2757 --- M src/gprs/gtphub.c 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/24/5524/2 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 7e3e663..b5d199d 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1121,8 +1121,9 @@ struct gtphub_tunnel_endpoint *te = &tun->endpoint[side_idx][plane_idx]; te->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, - 0); - OSMO_ASSERT(te->counters_io); + 1 + side_idx + (plane_idx + 1) * 2); + if (!te->counters_io) + return NULL; } tun->expiry_entry.del_cb = gtphub_tunnel_del_cb; @@ -1486,7 +1487,13 @@ } /* A new tunnel. */ - p->tun = tun = gtphub_tunnel_new(); + tun = gtphub_tunnel_new(); + if (!tun) { + LOG(LOGL_ERROR, "Failed to allocate new tunnel %s <-> %s\n", + gtphub_port_str(from_ctrl), gtphub_port_str(to_ctrl)); + return -1; + } + p->tun = tun; /* Create TEI mapping */ tun->tei_repl = nr_pool_next(&hub->tei_pool); @@ -2709,8 +2716,9 @@ } pp->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, - >phub_ctrg_io_desc, 0); + >phub_ctrg_io_desc, port); if (!pp->counters_io) { + LOG(LOGL_ERROR, "Failed to allocate rate counters for %s:%u\n", gsn_addr_to_str(&a->addr), port) talloc_free(pp); return NULL; } -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:47:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 11:47:40 +0000 Subject: osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Patch Set 1: > the TLLI might make more sense we use it on the other allocation path, I'll look into it. > to have some kind of lookup helper for rate counters in the SGSN Have this would be used? Ctrl, vty, smth else? -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:48:48 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 11:48:48 +0000 Subject: osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Patch Set 2: Note: this still might collide if we use port below 7 which is unlikely but possible. Note sure yet how to handle this properly. -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 11:52:31 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 11:52:31 +0000 Subject: [PATCH] osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5524 to look at the new patch set (#3). gtphub: make rate_ctr unique * compute unique rate counter index when allocating new gtphub tunnel * propagate rate counter allocation error to upper layers * log and gracefully handle tunnel allocation error Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Related: OS#2757 --- M src/gprs/gtphub.c 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/24/5524/3 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 7e3e663..6b09bfb 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1121,8 +1121,9 @@ struct gtphub_tunnel_endpoint *te = &tun->endpoint[side_idx][plane_idx]; te->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, - 0); - OSMO_ASSERT(te->counters_io); + 1 + side_idx + (plane_idx + 1) * 2); + if (!te->counters_io) + return NULL; } tun->expiry_entry.del_cb = gtphub_tunnel_del_cb; @@ -1486,7 +1487,13 @@ } /* A new tunnel. */ - p->tun = tun = gtphub_tunnel_new(); + tun = gtphub_tunnel_new(); + if (!tun) { + LOG(LOGL_ERROR, "Failed to allocate new tunnel %s <-> %s\n", + gtphub_port_str(from_ctrl), gtphub_port_str(to_ctrl)); + return -1; + } + p->tun = tun; /* Create TEI mapping */ tun->tei_repl = nr_pool_next(&hub->tei_pool); @@ -2709,8 +2716,9 @@ } pp->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, - >phub_ctrg_io_desc, 0); + >phub_ctrg_io_desc, port); if (!pp->counters_io) { + LOG(LOGL_ERROR, "Failed to allocate rate counters for %s:%u\n", gsn_addr_to_str(&a->addr), port); talloc_free(pp); return NULL; } -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 3 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 12:11:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 12:11:12 +0000 Subject: [PATCH] osmo-sgsn[master]: Replace '.' in counter names with ':' Message-ID: Review at https://gerrit.osmocom.org/5525 Replace '.' in counter names with ':' The '.' is illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208 --- M src/gprs/gb_proxy.c M src/gprs/gb_proxy_peer.c M src/gprs/gtphub.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/25/5525/1 diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 17a0109..6a9bc22 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -70,7 +70,7 @@ }; static const struct rate_ctr_group_desc global_ctrg_desc = { - .group_name_prefix = "gbproxy.global", + .group_name_prefix = "gbproxy:global", .group_description = "GBProxy Global Statistics", .num_ctr = ARRAY_SIZE(global_ctr_description), .ctr_desc = global_ctr_description, diff --git a/src/gprs/gb_proxy_peer.c b/src/gprs/gb_proxy_peer.c index 69cce3a..f2cdd93 100644 --- a/src/gprs/gb_proxy_peer.c +++ b/src/gprs/gb_proxy_peer.c @@ -73,7 +73,7 @@ osmo_static_assert(ARRAY_SIZE(peer_ctr_description) == GBPROX_PEER_CTR_LAST, everything_described); static const struct rate_ctr_group_desc peer_ctrg_desc = { - .group_name_prefix = "gbproxy.peer", + .group_name_prefix = "gbproxy:peer", .group_description = "GBProxy Peer Statistics", .num_ctr = ARRAY_SIZE(peer_ctr_description), .ctr_desc = peer_ctr_description, diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 6b09bfb..4fe1bfd 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -125,7 +125,7 @@ }; static const struct rate_ctr_group_desc gtphub_ctrg_io_desc = { - .group_name_prefix = "gtphub.bind", + .group_name_prefix = "gtphub:bind", .group_description = "I/O Statistics", .num_ctr = ARRAY_SIZE(gtphub_counters_io_desc), .ctr_desc = gtphub_counters_io_desc, -- To view, visit https://gerrit.osmocom.org/5525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 12:28:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 12:28:44 +0000 Subject: [PATCH] osmo-sgsn[master]: Remove dead code Message-ID: Review at https://gerrit.osmocom.org/5526 Remove dead code Get rid of ifdefs around old unused code to improve readability. Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c --- M src/gprs/gprs_gmm.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/26/5526/1 diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 147e001..54fe62f 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1339,9 +1339,6 @@ if (!ctx) ctx = sgsn_mm_ctx_by_imsi(mi_string); if (!ctx) { -#if 0 - return gsm48_tx_gmm_att_rej(msg, GMM_CAUSE_IMSI_UNKNOWN); -#else if (msg->dst) ctx = sgsn_mm_ctx_alloc_iu(msg->dst); else @@ -1351,7 +1348,6 @@ goto rejected; } osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); -#endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { ctx->gb.tlli = msgb_tlli(msg); -- To view, visit https://gerrit.osmocom.org/5526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:28:10 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 13:28:10 +0000 Subject: [PATCH] osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5499 to look at the new patch set (#2). ranap_msg_factory: check IE encoder return codes in many functions, the returncode (rc) from the IE encoder functions is not checked. Add a return code check and log error message (like it is already done in the functions which already check the return code) Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae --- M src/ranap_msg_factory.c 1 file changed, 40 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/99/5499/2 diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index fe7e325..f47c82b 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -185,6 +185,10 @@ /* ies -> dt */ rc = ranap_encode_directtransferies(&dt, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding direct transfer IEs: %d\n", rc); + return NULL; + } /* dt -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_DirectTransfer, @@ -251,6 +255,11 @@ if (ck) ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_EncryptionInformation, &ies.encryptionInformation); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode command IEs: %d\n", rc); + return NULL; + } + /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_SecurityModeControl, RANAP_Criticality_reject, @@ -282,6 +291,10 @@ /* ies -> out */ rc = ranap_encode_securitymodecompleteies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode complete IEs: %d\n", rc); + return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_SecurityModeControl, @@ -317,10 +330,14 @@ /* ies -> out */ rc = ranap_encode_commonid_ies(&out, &ies); + /* release dynamic allocations attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); - if (rc < 0) + + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding common id IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_CommonID, @@ -349,8 +366,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecommandies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release command IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_Release, @@ -377,8 +396,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecompleteies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release complete IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_Iu_Release, @@ -434,11 +455,15 @@ /* ies -> out */ rc = ranap_encode_pagingies(&out, &ies); + /* release dynamic allocation attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_TemporaryUE_ID, &ies.temporaryUE_ID); - if (rc < 0) + + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding paging IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Paging, @@ -879,13 +904,17 @@ memcpy(&ies.cause, cause, sizeof(ies.cause)); rc = ranap_encode_iu_releaserequesties(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_Iu_ReleaseRequest, &out); return NULL; + } /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_ReleaseRequest, RANAP_Criticality_reject, &asn_DEF_RANAP_Iu_ReleaseRequest, &out); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_Iu_ReleaseRequest, &out); return msg; @@ -915,11 +944,15 @@ /* encoe the list IEs into the output */ rc = ranap_encode_rab_releaserequesties(&out, &ies); - if (rc < 0) - return NULL; + /* 'out' has been generated, we can release the input */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseList, &ies.raB_ReleaseList); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); + return NULL; + } + /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_RAB_ReleaseRequest, RANAP_Criticality_reject, -- To view, visit https://gerrit.osmocom.org/5499 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:29:19 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 13:29:19 +0000 Subject: [PATCH] osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5498 to look at the new patch set (#2). iu: iu_helpers: add functions to decode ip/port from rab-ass add ranap_transp_assoc_decode() to decode the port information from an RANAP_IuTransportAssociation_t field. add ranap_transp_layer_addr_decode() to decode the ip-address from an RANAP_TransportLayerAddress_t field. Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 --- M include/osmocom/ranap/iu_helpers.h M src/iu_helpers.c 2 files changed, 58 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/98/5498/2 diff --git a/include/osmocom/ranap/iu_helpers.h b/include/osmocom/ranap/iu_helpers.h index 109b6da..9d801be 100644 --- a/include/osmocom/ranap/iu_helpers.h +++ b/include/osmocom/ranap/iu_helpers.h @@ -3,5 +3,11 @@ #include #include +#include +#include + int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len); int ranap_imsi_encode(uint8_t *out, size_t out_len, const char *in); +int ranap_transp_assoc_decode(uint16_t *port, const RANAP_IuTransportAssociation_t *transp_assoc); +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, + const RANAP_TransportLayerAddress_t *trasp_layer_addr); diff --git a/src/iu_helpers.c b/src/iu_helpers.c index 2f44e93..5e78293 100644 --- a/src/iu_helpers.c +++ b/src/iu_helpers.c @@ -20,8 +20,12 @@ #include #include - +#include +#include +#include "asn1helpers.h" #include +#include +#include /* decode a BCD-string as used inside ASN.1 encoded Iu interface protocols */ int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len) @@ -70,3 +74,50 @@ } return i; } + +/* decode a network port as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_assoc_decode(uint16_t *port, const RANAP_IuTransportAssociation_t *transp_assoc) +{ + uint32_t result; + + if (!transp_assoc) + return -EINVAL; + + result = asn1bitstr_to_u32((BIT_STRING_t *) & transp_assoc->choice.bindingID); + + /* The lower 16 bits should be zero, otherwise the decoding may + * have yielded some odd result */ + if (result & 0xFFFF) + return -EINVAL; + + *port = (uint16_t) ((result >> 16) & 0xFFFF); + + if (*port == 0) + return -EINVAL; + + return 0; +} + +/* decode a network address as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, + const RANAP_TransportLayerAddress_t *trasp_layer_addr) +{ + unsigned char *buf; + int len; + const char *rc; + + buf = trasp_layer_addr->buf; + len = trasp_layer_addr->size; + + if (buf[0] == 0x35 && len > 7) + rc = inet_ntop(AF_INET, buf + 3, addr, addr_len); + else if (len > 3) + rc = inet_ntop(AF_INET, buf, addr, addr_len); + else + return -EINVAL; + + if (!rc) + return -EINVAL; + + return 0; +} -- To view, visit https://gerrit.osmocom.org/5498 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:51:59 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 13:51:59 +0000 Subject: libosmocore[master]: cosmetic: logging: simplify logging level VTY cmd doc compos... In-Reply-To: References: Message-ID: Patch Set 1: failure on ARM: logging.c:917:7: error: assignment makes pointer from integer without a cast [-Werror] str = talloc_asprintf_append(str, fmt, ## args); but talloc_asprintf_append() should return char*, not int -- To view, visit https://gerrit.osmocom.org/5488 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib818e2d524c750f07bea2aa585011f40e3ee82e8 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:57:53 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 13:57:53 +0000 Subject: osmo-iuh[master]: hnbgw: use proper VTY port number defined in libosmocore (4261) In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:57:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 13:57:54 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: use proper VTY port number defined in libosmocore (4261) In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: hnbgw: use proper VTY port number defined in libosmocore (4261) ...................................................................... hnbgw: use proper VTY port number defined in libosmocore (4261) We used to have hardcoded 2323 from early development, use the proper libosmocore definition instead. Depends: Ife52a968a41cb286f640006587877971ff66c1a4 (libosmocore) Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 --- M src/hnbgw.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index c1b931c..45a753f 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -45,6 +45,7 @@ #include #include #include +#include #include @@ -470,7 +471,7 @@ log_set_log_level(osmo_stderr_target, hnbgw_cmdline_config.log_level); - rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), 2323); + rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); if (rc < 0) { perror("Error binding VTY port"); exit(1); -- To view, visit https://gerrit.osmocom.org/5521 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id67d89695ebdc6288f507338c15ad773b8adf6e4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 13:59:25 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 13:59:25 +0000 Subject: [MERGED] python/osmo-python-tests[master]: scripts: add symlink to osmopy In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: scripts: add symlink to osmopy ...................................................................... scripts: add symlink to osmopy To allow running the scripts from within the scripts/ dir without having to install osmopy on the system first, place a symlink to the osmopy module dir. This allows testing modifications without having to run setup.py all the time. Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c --- A scripts/osmopy 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/scripts/osmopy b/scripts/osmopy new file mode 120000 index 0000000..2ba06a1 --- /dev/null +++ b/scripts/osmopy @@ -0,0 +1 @@ +../osmopy/ \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/5493 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 14:00:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 14:00:55 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 5: > It does improve situation but I still think it's better to be > paranoid about string parsing even if ATM we explicitly > null-terminate it. String termination is a non-issue in this code. -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 14:55:07 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 14:55:07 +0000 Subject: [PATCH] osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5402 to look at the new patch set (#3). octphy: l1_oml: check returncode of trx_by_l1h() The function trx_by_l1h() is used to fetch the pointer to a an osmo_bts_trx from a list. The ID that is used to reference the transceiver comes from the incoming message. If the firmware sends odd identifiers (firmware bugs, damaged packets) the transceiver can not be found in the list and a nullpointer is returned, which then leads into a nullpointer derefernece problem. Check the returncode, and depending on the situation either return with -EINVAL or exit osmo-bts immediately. Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/5402/3 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index a1c384a..d57228d 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -54,6 +54,9 @@ bool no_fw_check = 0; +#define LOGPTRX(byTrxId, level, fmt, args...) \ + LOGP(DL1C, level, "(byTrxId %u) " fmt, byTrxId, ## args) + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -377,6 +380,10 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during lchan activation\n"); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ar->LchId); sapi = ar->LchId.bySAPI; @@ -488,6 +495,11 @@ } trx = trx_by_l1h(fl1, pcr->TrxId.byTrxId); + if (!trx) { + LOGPTRX(pcr->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during cipher mode activation\n"); + return -EINVAL; + } + OSMO_ASSERT(pcr->TrxId.byTrxId == trx->nr); ts = &trx->ts[pcr->PchId.byTimeslotNb]; /* for some strange reason the response does not tell which @@ -687,6 +699,10 @@ mOCTVC1_GSM_MSG_TRX_DEACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ldr); trx = trx_by_l1h(fl1, ldr->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ldr->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during lchan deactivation\n"); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ldr->LchId); @@ -1266,6 +1282,10 @@ mOCTVC1_GSM_MSG_TRX_OPEN_RSP_SWAP(or); trx = trx_by_l1h(fl1h, or->TrxId.byTrxId); + if (!trx) { + LOGPTRX(or->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during TRX opening procedure -- abort\n"); + exit(1); + } LOGP(DL1C, LOGL_INFO, "TRX-OPEN.resp(trx=%u) = %s\n", trx->nr, octvc1_rc2string(or->Header.ulReturnCode)); @@ -1394,6 +1414,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during physical channel activation -- abort\n"); + exit(1); + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); @@ -1472,6 +1497,11 @@ struct gsm_bts_trx_ts *ts; trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during ts disconnection\n"); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; ts = &trx->ts[ts_nr]; @@ -1495,6 +1525,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id while connecting ts\n"); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 14:56:57 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 14:56:57 +0000 Subject: [PATCH] osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port) In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5320 to look at the new patch set (#4). mgcp: validate rtp connection data in MGW response (ip/port) Currently the pasing results from the RTP ip/port are fed into inet_addr without checking the results. Check the return code of inet_addr to be sure that the IP-Address got properly decoded. Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/20/5320/4 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 6907d4f..8ea6415 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -198,6 +198,7 @@ struct mgcp_ctx *mgcp_ctx = priv; int rc; struct osmo_bsc_sccp_con *conn; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -227,13 +228,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ conn->user_plane.rtp_port = r->audio_port; - conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->user_plane.rtp_ip = osmo_ntohl(addr); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -480,6 +488,7 @@ struct osmo_bsc_sccp_con *conn; struct gsm_lchan *lchan; struct sockaddr_in *sin; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -511,13 +520,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Store address */ sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_local; sin->sin_family = AF_INET; - sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_addr.s_addr = addr; sin->sin_port = osmo_ntohs(r->audio_port); /* Notify the FSM that we got the response. */ -- To view, visit https://gerrit.osmocom.org/5320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:23:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 15:23:22 +0000 Subject: [PATCH] osmo-sgsn[master]: gsm48_rx_gmm_att_req: fix error handling: don't clean up NUL... Message-ID: Review at https://gerrit.osmocom.org/5527 gsm48_rx_gmm_att_req: fix error handling: don't clean up NULL llme Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68 --- M src/gprs/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/27/5527/1 diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 8441f6b..f26c22b 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1443,7 +1443,7 @@ rc = gsm48_tx_gmm_att_rej_oldmsg(msg, reject_cause); if (ctx) mm_ctx_cleanup_free(ctx, "GPRS ATTACH REJ"); - else + else if (llme) gprs_llgmm_unassign(llme); return rc; -- To view, visit https://gerrit.osmocom.org/5527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:40:33 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 15:40:33 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5463/3/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: Line 113: "paging timeout (default|<1-65535>)", > let's alsocall it 'paging response-timer' to align with the spec language. the drawback of aliases is that when writing the config back to file, possibly one will be changed into the other. It's not a hard requirement to write back the same alias as was read in, but to spare us that confusion I decided to only use 'paging response timer' in all the naming. Close enough to 'timeout' anyway. -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:40:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:40:39 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 5: any answer to neels' comments? -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:40:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:40:58 +0000 Subject: osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port) In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:41:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:41:11 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: validate rtp connection data in MGW response (ip/port) ...................................................................... mgcp: validate rtp connection data in MGW response (ip/port) Currently the pasing results from the RTP ip/port are fed into inet_addr without checking the results. Check the return code of inet_addr to be sure that the IP-Address got properly decoded. Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 18 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 6907d4f..8ea6415 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -198,6 +198,7 @@ struct mgcp_ctx *mgcp_ctx = priv; int rc; struct osmo_bsc_sccp_con *conn; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -227,13 +228,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Set the connection details in the conn struct. The code that * controls the BTS via RSL will take these values and signal them * to the BTS via RSL/IPACC */ conn->user_plane.rtp_port = r->audio_port; - conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(r->audio_ip)); + conn->user_plane.rtp_ip = osmo_ntohl(addr); /* Notify the FSM that we got the response. */ osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx); @@ -480,6 +488,7 @@ struct osmo_bsc_sccp_con *conn; struct gsm_lchan *lchan; struct sockaddr_in *sin; + uint32_t addr; OSMO_ASSERT(mgcp_ctx); conn = mgcp_ctx->conn; @@ -511,13 +520,20 @@ return; } + addr = inet_addr(r->audio_ip); + if (addr == INADDR_NONE) { + LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse response (invalid IP-address)\n"); + handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP); + return; + } + LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port); /* Store address */ sin = (struct sockaddr_in *)&conn->user_plane.aoip_rtp_addr_local; sin->sin_family = AF_INET; - sin->sin_addr.s_addr = inet_addr(r->audio_ip); + sin->sin_addr.s_addr = addr; sin->sin_port = osmo_ntohs(r->audio_port); /* Notify the FSM that we got the response. */ -- To view, visit https://gerrit.osmocom.org/5320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:41:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:41:12 +0000 Subject: [MERGED] osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp: cancel transactions on timeout ...................................................................... mgcp: cancel transactions on timeout when a transaction to the MGW times out, then the context information is freed. Unfortunately the client is not informed about this and will try to execute the callback anyway. explicitly cancel the transaction in order to prevent access to already freed data structures. Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf --- M include/osmocom/bsc/osmo_bsc_mgcp.h M src/osmo-bsc/osmo_bsc_mgcp.c 2 files changed, 11 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index e4b038c..7452513 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -21,6 +21,7 @@ #pragma once #include +#include /* MGCP state handler context. This context information stores all information * to handle the direction of the RTP streams via MGCP. There is one instance @@ -48,6 +49,7 @@ struct gsm_lchan *lchan; struct gsm_lchan *ho_lchan; struct msgb *resp; + mgcp_trans_id_t mgw_pending_trans; }; struct mgcp_ctx *mgcp_assignm_req(void *ctx, struct mgcp_client *mgcp, struct osmo_bsc_sccp_con *conn, diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index ebd13d6..6907d4f 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -182,6 +182,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, crcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -335,6 +336,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -460,6 +462,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, crcx_for_net_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -595,6 +598,7 @@ OSMO_ASSERT(msg); /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, dlcx_for_all_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -652,6 +656,8 @@ msg = mgcp_msg_gen(mgcp, &mgcp_msg); OSMO_ASSERT(msg); + /* Transmit MGCP message to MGW */ + mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg); rc = mgcp_client_tx(mgcp, msg, mdcx_for_bts_ho_resp_cb, mgcp_ctx); if (rc < 0) { handle_error(mgcp_ctx, MGCP_ERR_MGW_TX_FAIL); @@ -815,6 +821,9 @@ /* At least release the occupied endpoint ID */ mgcp_client_release_endpoint(mgcp_ctx->rtp_endpoint, mgcp); + /* Cancel the transaction that timed out */ + mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); + /* Initiate self destruction of the FSM */ osmo_fsm_inst_state_chg(fi, ST_HALT, 0, 0); osmo_fsm_inst_dispatch(fi, EV_TEARDOWN, mgcp_ctx); -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:42:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:42:58 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5463/3/src/libmsc/msc_vty.c File src/libmsc/msc_vty.c: Line 113: "paging timeout (default|<1-65535>)", > the drawback of aliases is that when writing the config back to file, possi why would there be any aliases involved? We don't have any existing code that we need to interoperate with, right? -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:44:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:44:20 +0000 Subject: osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:44:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:44:25 +0000 Subject: [MERGED] osmo-bts[master]: octphy: l1_oml: check returncode of trx_by_l1h() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octphy: l1_oml: check returncode of trx_by_l1h() ...................................................................... octphy: l1_oml: check returncode of trx_by_l1h() The function trx_by_l1h() is used to fetch the pointer to a an osmo_bts_trx from a list. The ID that is used to reference the transceiver comes from the incoming message. If the firmware sends odd identifiers (firmware bugs, damaged packets) the transceiver can not be found in the list and a nullpointer is returned, which then leads into a nullpointer derefernece problem. Check the returncode, and depending on the situation either return with -EINVAL or exit osmo-bts immediately. Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 35 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index a1c384a..d57228d 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -54,6 +54,9 @@ bool no_fw_check = 0; +#define LOGPTRX(byTrxId, level, fmt, args...) \ + LOGP(DL1C, level, "(byTrxId %u) " fmt, byTrxId, ## args) + /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = { @@ -377,6 +380,10 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during lchan activation\n"); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ar->LchId); sapi = ar->LchId.bySAPI; @@ -488,6 +495,11 @@ } trx = trx_by_l1h(fl1, pcr->TrxId.byTrxId); + if (!trx) { + LOGPTRX(pcr->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during cipher mode activation\n"); + return -EINVAL; + } + OSMO_ASSERT(pcr->TrxId.byTrxId == trx->nr); ts = &trx->ts[pcr->PchId.byTimeslotNb]; /* for some strange reason the response does not tell which @@ -687,6 +699,10 @@ mOCTVC1_GSM_MSG_TRX_DEACTIVATE_LOGICAL_CHANNEL_RSP_SWAP(ldr); trx = trx_by_l1h(fl1, ldr->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ldr->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during lchan deactivation\n"); + return -EINVAL; + } lchan = get_lchan_by_lchid(trx, &ldr->LchId); @@ -1266,6 +1282,10 @@ mOCTVC1_GSM_MSG_TRX_OPEN_RSP_SWAP(or); trx = trx_by_l1h(fl1h, or->TrxId.byTrxId); + if (!trx) { + LOGPTRX(or->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during TRX opening procedure -- abort\n"); + exit(1); + } LOGP(DL1C, LOGL_INFO, "TRX-OPEN.resp(trx=%u) = %s\n", trx->nr, octvc1_rc2string(or->Header.ulReturnCode)); @@ -1394,6 +1414,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during physical channel activation -- abort\n"); + exit(1); + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); @@ -1472,6 +1497,11 @@ struct gsm_bts_trx_ts *ts; trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id during ts disconnection\n"); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; ts = &trx->ts[ts_nr]; @@ -1495,6 +1525,11 @@ mOCTVC1_GSM_MSG_TRX_ACTIVATE_PHYSICAL_CHANNEL_RSP_SWAP(ar); trx = trx_by_l1h(fl1, ar->TrxId.byTrxId); + if (!trx) { + LOGPTRX(ar->TrxId.byTrxId, LOGL_ERROR, "response with unexpected physical transceiver-id while connecting ts\n"); + return -EINVAL; + } + ts_nr = ar->PchId.byTimeslotNb; OSMO_ASSERT(ts_nr <= ARRAY_SIZE(trx->ts)); -- To view, visit https://gerrit.osmocom.org/5402 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:46:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:46:03 +0000 Subject: osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:46:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:46:07 +0000 Subject: [MERGED] osmo-pcu[master]: Introduce LOGTBF* for consistent logging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Introduce LOGTBF* for consistent logging ...................................................................... Introduce LOGTBF* for consistent logging When troubleshooting complex issues with TBF lifecycle, it's much easier to follow the logs which are consistently formatted. Add LOGTBF*() macro similar to struct-specific log routines we use in other Osmocom project and use it to log TBF-related messages in a unified way. Tweak test output accordingly. Related: OS#2407 Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.err 6 files changed, 980 insertions(+), 1,015 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified -- To view, visit https://gerrit.osmocom.org/5215 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:46:42 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 15:46:42 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 5: (2 comments) > any answer to neels' comments? https://gerrit.osmocom.org/#/c/5157/1/include/osmocom/bsc/osmo_bsc_mgcp.h File include/osmocom/bsc/osmo_bsc_mgcp.h: Line 47: enum gsm48_chan_mode chan_mode; > The question asked comes down to: is the struct mgcp_ctx per call or per en Thanks for clarifying that. Then I think everything is fine here. https://gerrit.osmocom.org/#/c/5157/1/src/osmo-bsc/osmo_bsc_mgcp.c File src/osmo-bsc/osmo_bsc_mgcp.c: Line 825: mgcp_client_cancel(mgcp, mgcp_ctx->mgw_pending_trans); > I'm also thinking, since this is an issue for all MGCP clients, it would ma Done -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:47:00 2017 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 20 Dec 2017 15:47:00 +0000 Subject: osmo-bsc[master]: mgcp: cancel transactions on timeout In-Reply-To: References: Message-ID: Patch Set 5: > (2 comments) > > > any answer to neels' comments? I hope its now visible. -- To view, visit https://gerrit.osmocom.org/5157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:47:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:47:04 +0000 Subject: osmo-sgsn[master]: .service: remove OpenBSC from service desription In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:47:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:47:08 +0000 Subject: [MERGED] osmo-sgsn[master]: .service: remove OpenBSC from service desription In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: .service: remove OpenBSC from service desription ...................................................................... .service: remove OpenBSC from service desription Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a --- M contrib/systemd/osmo-sgsn.service 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/systemd/osmo-sgsn.service b/contrib/systemd/osmo-sgsn.service index bf6a8e0..0991c70 100644 --- a/contrib/systemd/osmo-sgsn.service +++ b/contrib/systemd/osmo-sgsn.service @@ -1,5 +1,5 @@ [Unit] -Description=OpenBSC SGSN +Description=Osmocom SGSN (Serving GPRS Support Node) Wants=osmo-hlr.service After=osmo-hlr.service After=osmo-hnbgw.service -- To view, visit https://gerrit.osmocom.org/5443 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I555939235437a0b3253a1236a918e1f491ed9d3a Gerrit-PatchSet: 3 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:47:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:47:20 +0000 Subject: libosmocore[master]: libosmocodec: add FR bit offset definitions In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:48:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:48:31 +0000 Subject: libosmocore[master]: libosmocodec: add FR/HR/EFR frame length definitions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5420 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:48:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:48:38 +0000 Subject: [MERGED] libosmocore[master]: libosmocodec: add FR/HR/EFR frame length definitions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libosmocodec: add FR/HR/EFR frame length definitions ...................................................................... libosmocodec: add FR/HR/EFR frame length definitions There are some projects, such as OsmoBTS and OsmocomBB, which are dealing with raw TCH payloads, so they need to have the FR/HR/EFR frame length defined. At the moment, each project defines them itself. Let's share these definitions. Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 --- M include/osmocom/codec/codec.h 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 3e62a01..6a1bf9f 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -7,6 +7,13 @@ #include +/* TS 101318 Chapter 5.1: 260 bits + 4bit sig */ +#define GSM_FR_BYTES 33 +/* TS 101318 Chapter 5.2: 112 bits, no sig */ +#define GSM_HR_BYTES 14 +/* TS 101318 Chapter 5.3: 244 bits + 4bit sig */ +#define GSM_EFR_BYTES 31 + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ -- To view, visit https://gerrit.osmocom.org/5420 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:48:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:48:39 +0000 Subject: [MERGED] libosmocore[master]: libosmocodec: add FR bit offset definitions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libosmocodec: add FR bit offset definitions ...................................................................... libosmocodec: add FR bit offset definitions This change defines the GSM FR bit positions as described in RFC 3551, which will be used by further ECU (Error Correction Unit) implementation. Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed --- M include/Makefile.am A include/osmocom/codec/gsm610_bits.h 2 files changed, 273 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/Makefile.am b/include/Makefile.am index 4714003..09f5ca6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,7 @@ nobase_include_HEADERS = \ osmocom/codec/codec.h \ + osmocom/codec/gsm610_bits.h \ osmocom/core/application.h \ osmocom/core/backtrace.h \ osmocom/core/bit16gen.h \ diff --git a/include/osmocom/codec/gsm610_bits.h b/include/osmocom/codec/gsm610_bits.h new file mode 100644 index 0000000..cef4cf4 --- /dev/null +++ b/include/osmocom/codec/gsm610_bits.h @@ -0,0 +1,272 @@ +/*! \file gsm610_bits.h */ + +#pragma once + +/* This enumeration describs a GSM-FR (GSM 06.10) frame in ints RTP bit order + * representation. See also RFC 3551 Table 3: GSM payload format */ +enum gsm610_rtp_bit_offsets { + GSM610_RTP_SIGNATURE_0, + GSM610_RTP_SIGNATURE_1, + GSM610_RTP_SIGNATURE_2, + GSM610_RTP_SIGNATURE_3, + GSM610_RTP_LARC0_0, + GSM610_RTP_LARC0_1, + GSM610_RTP_LARC0_2, + GSM610_RTP_LARC0_3, + GSM610_RTP_LARC0_4, + GSM610_RTP_LARC0_5, + GSM610_RTP_LARC1_0, + GSM610_RTP_LARC1_1, + GSM610_RTP_LARC1_2, + GSM610_RTP_LARC1_3, + GSM610_RTP_LARC1_4, + GSM610_RTP_LARC1_5, + GSM610_RTP_LARC2_0, + GSM610_RTP_LARC2_1, + GSM610_RTP_LARC2_2, + GSM610_RTP_LARC2_3, + GSM610_RTP_LARC2_4, + GSM610_RTP_LARC3_0, + GSM610_RTP_LARC3_1, + GSM610_RTP_LARC3_2, + GSM610_RTP_LARC3_3, + GSM610_RTP_LARC3_4, + GSM610_RTP_LARC4_0, + GSM610_RTP_LARC4_1, + GSM610_RTP_LARC4_2, + GSM610_RTP_LARC4_3, + GSM610_RTP_LARC5_0, + GSM610_RTP_LARC5_1, + GSM610_RTP_LARC5_2, + GSM610_RTP_LARC5_3, + GSM610_RTP_LARC6_0, + GSM610_RTP_LARC6_1, + GSM610_RTP_LARC6_2, + GSM610_RTP_LARC7_0, + GSM610_RTP_LARC7_1, + GSM610_RTP_LARC7_2, + GSM610_RTP_NC0_0, + GSM610_RTP_NC0_1, + GSM610_RTP_NC0_2, + GSM610_RTP_NC0_3, + GSM610_RTP_NC0_4, + GSM610_RTP_NC0_5, + GSM610_RTP_NC0_6, + GSM610_RTP_BC0_0, + GSM610_RTP_BC0_1, + GSM610_RTP_MC0_0, + GSM610_RTP_MC0_1, + GSM610_RTP_XMAXC00, + GSM610_RTP_XMAXC01, + GSM610_RTP_XMAXC02, + GSM610_RTP_XMAXC03, + GSM610_RTP_XMAXC04, + GSM610_RTP_XMAXC05, + GSM610_RTP_XMC0_0, + GSM610_RTP_XMC0_1, + GSM610_RTP_XMC0_2, + GSM610_RTP_XMC1_0, + GSM610_RTP_XMC1_1, + GSM610_RTP_XMC1_2, + GSM610_RTP_XMC2_0, + GSM610_RTP_XMC2_1, + GSM610_RTP_XMC2_2, + GSM610_RTP_XMC3_0, + GSM610_RTP_XMC3_1, + GSM610_RTP_XMC3_2, + GSM610_RTP_XMC4_0, + GSM610_RTP_XMC4_1, + GSM610_RTP_XMC4_2, + GSM610_RTP_XMC5_0, + GSM610_RTP_XMC5_1, + GSM610_RTP_XMC5_2, + GSM610_RTP_XMC6_0, + GSM610_RTP_XMC6_1, + GSM610_RTP_XMC6_2, + GSM610_RTP_XMC7_0, + GSM610_RTP_XMC7_1, + GSM610_RTP_XMC7_2, + GSM610_RTP_XMC8_0, + GSM610_RTP_XMC8_1, + GSM610_RTP_XMC8_2, + GSM610_RTP_XMC9_0, + GSM610_RTP_XMC9_1, + GSM610_RTP_XMC9_2, + GSM610_RTP_XMC10_0, + GSM610_RTP_XMC10_1, + GSM610_RTP_XMC10_2, + GSM610_RTP_XMC11_0, + GSM610_RTP_XMC11_1, + GSM610_RTP_XMC11_2, + GSM610_RTP_XMC12_0, + GSM610_RTP_XMC12_1, + GSM610_RTP_XCM12_2, + GSM610_RTP_NC1_0, + GSM610_RTP_NC1_1, + GSM610_RTP_NC1_2, + GSM610_RTP_NC1_3, + GSM610_RTP_NC1_4, + GSM610_RTP_NC1_5, + GSM610_RTP_NC1_6, + GSM610_RTP_BC1_0, + GSM610_RTP_BC1_1, + GSM610_RTP_MC1_0, + GSM610_RTP_MC1_1, + GSM610_RTP_XMAXC10, + GSM610_RTP_XMAXC11, + GSM610_RTP_XMAXC12, + GSM610_RTP_XMAXC13, + GSM610_RTP_XMAXC14, + GSM610_RTP_XMAX15, + GSM610_RTP_XMC13_0, + GSM610_RTP_XMC13_1, + GSM610_RTP_XMC13_2, + GSM610_RTP_XMC14_0, + GSM610_RTP_XMC14_1, + GSM610_RTP_XMC14_2, + GSM610_RTP_XMC15_0, + GSM610_RTP_XMC15_1, + GSM610_RTP_XMC15_2, + GSM610_RTP_XMC16_0, + GSM610_RTP_XMC16_1, + GSM610_RTP_XMC16_2, + GSM610_RTP_XMC17_0, + GSM610_RTP_XMC17_1, + GSM610_RTP_XMC17_2, + GSM610_RTP_XMC18_0, + GSM610_RTP_XMC18_1, + GSM610_RTP_XMC18_2, + GSM610_RTP_XMC19_0, + GSM610_RTP_XMC19_1, + GSM610_RTP_XMC19_2, + GSM610_RTP_XMC20_0, + GSM610_RTP_XMC20_1, + GSM610_RTP_XMC20_2, + GSM610_RTP_XMC21_0, + GSM610_RTP_XMC21_1, + GSM610_RTP_XMC21_2, + GSM610_RTP_XMC22_0, + GSM610_RTP_XMC22_1, + GSM610_RTP_XMC22_2, + GSM610_RTP_XMC23_0, + GSM610_RTP_XMC23_1, + GSM610_RTP_XMC23_2, + GSM610_RTP_XMC24_0, + GSM610_RTP_XMC24_1, + GSM610_RTP_XMC24_2, + GSM610_RTP_XMC25_0, + GSM610_RTP_XMC25_1, + GSM610_RTP_XMC25_2, + GSM610_RTP_NC2_0, + GSM610_RTP_NC2_1, + GSM610_RTP_NC2_2, + GSM610_RTP_NC2_3, + GSM610_RTP_NC2_4, + GSM610_RTP_NC2_5, + GSM610_RTP_NC2_6, + GSM610_RTP_BC2_0, + GSM610_RTP_BC2_1, + GSM610_RTP_MC2_0, + GSM610_RTP_MC2_1, + GSM610_RTP_XMAXC20, + GSM610_RTP_XMAXC21, + GSM610_RTP_XMAXC22, + GSM610_RTP_XMAXC23, + GSM610_RTP_XMAXC24, + GSM610_RTP_XMAXC25, + GSM610_RTP_XMC26_0, + GSM610_RTP_XMC26_1, + GSM610_RTP_XMC26_2, + GSM610_RTP_XMC27_0, + GSM610_RTP_XMC27_1, + GSM610_RTP_XMC27_2, + GSM610_RTP_XMC28_0, + GSM610_RTP_XMC28_1, + GSM610_RTP_XMC28_2, + GSM610_RTP_XMC29_0, + GSM610_RTP_XMC29_1, + GSM610_RTP_XMC29_2, + GSM610_RTP_XMC30_0, + GSM610_RTP_XMC30_1, + GSM610_RTP_XMC30_2, + GSM610_RTP_XMC31_0, + GSM610_RTP_XMC31_1, + GSM610_RTP_XMC31_2, + GSM610_RTP_XMC32_0, + GSM610_RTP_XMC32_1, + GSM610_RTP_XMC32_2, + GSM610_RTP_XMC33_0, + GSM610_RTP_XMC33_1, + GSM610_RTP_XMC33_2, + GSM610_RTP_XMC34_0, + GSM610_RTP_XMC34_1, + GSM610_RTP_XMC34_2, + GSM610_RTP_XMC35_0, + GSM610_RTP_XMC35_1, + GSM610_RTP_XMC35_2, + GSM610_RTP_XMC36_0, + GSM610_RTP_XMC36_1, + GSM610_RTP_XMC36_2, + GSM610_RTP_XMC37_0, + GSM610_RTP_XMC37_1, + GSM610_RTP_XMC37_2, + GSM610_RTP_XMC38_0, + GSM610_RTP_XMC38_1, + GSM610_RTP_XMC38_2, + GSM610_RTP_NC3_0, + GSM610_RTP_NC3_1, + GSM610_RTP_NC3_2, + GSM610_RTP_NC3_3, + GSM610_RTP_NC3_4, + GSM610_RTP_NC3_5, + GSM610_RTP_NC3_6, + GSM610_RTP_BC3_0, + GSM610_RTP_BC3_1, + GSM610_RTP_MC3_0, + GSM610_RTP_MC3_1, + GSM610_RTP_XMAXC30, + GSM610_RTP_XMAXC31, + GSM610_RTP_XMAXC32, + GSM610_RTP_XMAXC33, + GSM610_RTP_XMAXC34, + GSM610_RTP_XMAXC35, + GSM610_RTP_XMC39_0, + GSM610_RTP_XMC39_1, + GSM610_RTP_XMC39_2, + GSM610_RTP_XMC40_0, + GSM610_RTP_XMC40_1, + GSM610_RTP_XMC40_2, + GSM610_RTP_XMC41_0, + GSM610_RTP_XMC41_1, + GSM610_RTP_XMC41_2, + GSM610_RTP_XMC42_0, + GSM610_RTP_XMC42_1, + GSM610_RTP_XMC42_2, + GSM610_RTP_XMC43_0, + GSM610_RTP_XMC43_1, + GSM610_RTP_XMC43_2, + GSM610_RTP_XMC44_0, + GSM610_RTP_XMC44_1, + GSM610_RTP_XMC44_2, + GSM610_RTP_XMC45_0, + GSM610_RTP_XMC45_1, + GSM610_RTP_XMC45_2, + GSM610_RTP_XMC46_0, + GSM610_RTP_XMC46_1, + GSM610_RTP_XMC46_2, + GSM610_RTP_XMC47_0, + GSM610_RTP_XMC47_1, + GSM610_RTP_XMC47_2, + GSM610_RTP_XMC48_0, + GSM610_RTP_XMC48_1, + GSM610_RTP_XMC48_2, + GSM610_RTP_XMC49_0, + GSM610_RTP_XMC49_1, + GSM610_RTP_XMC49_2, + GSM610_RTP_XMC50_0, + GSM610_RTP_XMC50_1, + GSM610_RTP_XMC50_2, + GSM610_RTP_XMC51_0, + GSM610_RTP_XMC51_1, + GSM610_RTP_XMC51_2 +}; -- To view, visit https://gerrit.osmocom.org/5385 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d0a198af0f8dd1f690b5a81f5c9eb92c43aefed Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:49:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:49:36 +0000 Subject: osmo-msc[master]: smpp_smsc: fix truncated string copy into bind_r.system_id In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5471 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5845666201f945ea9f83da62f2dd4bec52eb74cf Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:49:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:49:38 +0000 Subject: [MERGED] osmo-msc[master]: smpp_smsc: fix truncated string copy into bind_r.system_id In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: smpp_smsc: fix truncated string copy into bind_r.system_id ...................................................................... smpp_smsc: fix truncated string copy into bind_r.system_id The target buffer in libsmpp is 16 bytes long, and snprintf() may omit the terminating zero. There seems to be no handling for unterminated strings, so osmo_strlcpy() is the safer (and presumably more optimal) choice. Change-Id: I5845666201f945ea9f83da62f2dd4bec52eb74cf --- M src/libmsc/smpp_smsc.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c index 88cecfc..34b93f8 100644 --- a/src/libmsc/smpp_smsc.c +++ b/src/libmsc/smpp_smsc.c @@ -509,8 +509,7 @@ bind_r.command_status = rc; /* build response */ - snprintf((char *)bind_r.system_id, sizeof(bind_r.system_id), "%s", - esme->smsc->system_id); + osmo_strlcpy((char*)bind_r.system_id, esme->smsc->system_id, sizeof(bind_r.system_id)); /* add interface version TLV */ tlv.tag = TLVID_sc_interface_version; -- To view, visit https://gerrit.osmocom.org/5471 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5845666201f945ea9f83da62f2dd4bec52eb74cf Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:50:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:50:19 +0000 Subject: libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:50:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:50:35 +0000 Subject: [MERGED] libosmocore[master]: ctrl: tighten CTRL input parsing In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: tighten CTRL input parsing ...................................................................... ctrl: tighten CTRL input parsing Validate that incoming CTRL commands... - have decimal IDs, - return error on trailing characters, - have invalid characters in variable identifiers, - send detailed error messages as reply to the requestor. Adjust ctrl_test.{c,ok}, which best show the change in behavior. Message handling causes log messages on stderr; previously, stderr was empty. Add '[ignore]' in testsuite.at so that the nonempty stderr doesn't cause test failures. Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 --- M src/ctrl/control_cmd.c M tests/ctrl/ctrl_test.c M tests/ctrl/ctrl_test.ok M tests/testsuite.at 4 files changed, 144 insertions(+), 121 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index c2ce2be..f32a200 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -281,6 +281,15 @@ return res; } +static bool id_str_valid(const char *str) +{ + for (;*str;str++) { + if (!isdigit(*str)) + return false; + } + return true; +} + /*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR and an error message in * ctrl->reply on any error. * The caller is responsible to talloc_free() the returned struct pointer. */ @@ -306,6 +315,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request malformed"; + LOGP(DLCTRL, LOGL_NOTICE, "Malformed request: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -314,6 +324,7 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Request type unknown"; + LOGP(DLCTRL, LOGL_NOTICE, "Request type unknown: \"%s\"\n", osmo_escape_str(str, -1)); goto err; } @@ -323,6 +334,15 @@ cmd->type = CTRL_TYPE_ERROR; cmd->id = "err"; cmd->reply = "Missing ID"; + LOGP(DLCTRL, LOGL_NOTICE, "Missing ID: \"%s\"\n", osmo_escape_str(str, -1)); + goto err; + } + + if (!id_str_valid(tmp)) { + cmd->type = CTRL_TYPE_ERROR; + cmd->id = "err"; + cmd->reply = "Invalid message ID number"; + LOGP(DLCTRL, LOGL_NOTICE, "Invalid message ID number: \"%s\"\n", osmo_escape_str(tmp, -1)); goto err; } cmd->id = talloc_strdup(cmd, tmp); @@ -331,14 +351,30 @@ switch (cmd->type) { case CTRL_TYPE_GET: - var = strtok_r(NULL, " ", &saveptr); + var = strtok_r(NULL, " \n", &saveptr); if (!var) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "GET incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete\n"); + LOGP(DLCTRL, LOGL_NOTICE, "GET Command incomplete: \"%s\"\n", + osmo_escape_str(str, -1)); + goto err; + } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); goto err; } cmd->variable = talloc_strdup(cmd, var); + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "GET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "GET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } LOGP(DLCTRL, LOGL_DEBUG, "Command: GET %s\n", cmd->variable); break; case CTRL_TYPE_SET: @@ -350,31 +386,57 @@ LOGP(DLCTRL, LOGL_NOTICE, "SET Command incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->value = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->value) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = %s\n", cmd->variable, cmd->value); + + var = strtok_r(NULL, "", &saveptr); + if (var) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "SET with trailing characters"; + LOGP(DLCTRL, LOGL_NOTICE, "SET with trailing characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } + + LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->value, -1)); break; case CTRL_TYPE_GET_REPLY: case CTRL_TYPE_SET_REPLY: case CTRL_TYPE_TRAP: var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, " ", &saveptr); + val = strtok_r(NULL, "", &saveptr); if (!var || !val) { cmd->type = CTRL_TYPE_ERROR; cmd->reply = "Trap/Reply incomplete"; LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); goto err; } + if (!osmo_separated_identifiers_valid(var, ".")) { + cmd->type = CTRL_TYPE_ERROR; + cmd->reply = "Trap/Reply variable contains invalid characters"; + LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", + osmo_escape_str(var, -1)); + goto err; + } cmd->variable = talloc_strdup(cmd, var); cmd->reply = talloc_strdup(cmd, val); if (!cmd->variable || !cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: %s\n", cmd->variable, cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_ERROR: - var = strtok_r(NULL, "\0", &saveptr); + var = strtok_r(NULL, "", &saveptr); if (!var) { cmd->reply = ""; goto err; @@ -382,7 +444,8 @@ cmd->reply = talloc_strdup(cmd, var); if (!cmd->reply) goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR %s\n", cmd->reply); + LOGP(DLCTRL, LOGL_DEBUG, "Command: ERROR \"%s\"\n", + osmo_escape_str(cmd->reply, -1)); break; case CTRL_TYPE_UNKNOWN: default: diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c index 39ec61a..a38591f 100644 --- a/tests/ctrl/ctrl_test.c +++ b/tests/ctrl/ctrl_test.c @@ -79,14 +79,19 @@ cmd = ctrl_cmd_parse2(ctx, msg); OSMO_ASSERT(cmd); - OSMO_ASSERT(t->expect_parsed.type == cmd->type); + if (t->expect_parsed.type != cmd->type) { + printf("type mismatch: got %s\n", get_value_string(ctrl_type_vals, cmd->type)); + OSMO_ASSERT(t->expect_parsed.type == cmd->type); + } #define ASSERT_SAME_STR(field) \ assert_same_str(#field, t->expect_parsed.field, cmd->field) ASSERT_SAME_STR(id); - ASSERT_SAME_STR(variable); - ASSERT_SAME_STR(value); + if (t->expect_parsed.type != CTRL_TYPE_ERROR) { + ASSERT_SAME_STR(variable); + ASSERT_SAME_STR(value); + } ASSERT_SAME_STR(reply); talloc_free(cmd); @@ -140,75 +145,66 @@ { .type = CTRL_TYPE_GET, .id = "1", - .variable = "variable\n", /* current bug */ + .variable = "variable", }, "ERROR 1 Command not found", }, { "GET 1 var\ni\nable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ni\nable", /* current bug */ + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 var\ti\table", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ti\table", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 var\ri\rable", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "var\ri\rable", /* current bug */ + .reply = "GET variable contains invalid characters", }, - "ERROR 1 Command not found", + "ERROR 1 GET variable contains invalid characters", }, { "GET 1 variable value", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable value\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "GET 1 variable multiple value tokens\n", { - .type = CTRL_TYPE_GET, + .type = CTRL_TYPE_ERROR, .id = "1", - .variable = "variable", - .value = NULL, + .reply = "GET with trailing characters", }, - "ERROR 1 Command not found", - + "ERROR 1 GET with trailing characters", }, { "SET 1 variable value", { @@ -218,7 +214,6 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET 1 variable value\n", { @@ -228,27 +223,22 @@ .value = "value", }, "ERROR 1 Command not found", - }, { "SET weird_id variable value", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET weird_id variable value\n", { - .type = CTRL_TYPE_SET, - .id = "weird_id", - .variable = "variable", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR weird_id Command not found", - + "ERROR err Invalid message ID number", }, { "SET 1 variable multiple value tokens", { @@ -278,7 +268,6 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET 1 variable value_with_trailing_spaces \n", { @@ -288,27 +277,22 @@ .value = "value_with_trailing_spaces ", }, "ERROR 1 Command not found", - }, { "SET \n special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\n", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \n Command not found", - + "ERROR err Invalid message ID number", }, { "SET \t special_char_id value", { - .type = CTRL_TYPE_SET, - .id = "\t", - .variable = "special_char_id", - .value = "value", + .type = CTRL_TYPE_ERROR, + .id = "err", + .reply = "Invalid message ID number", }, - "ERROR \t Command not found", - + "ERROR err Invalid message ID number", }, { "GET_REPLY 1 variable OK", { @@ -317,7 +301,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, { "SET_REPLY 1 variable OK", { @@ -326,7 +309,6 @@ .variable = "variable", .reply = "OK", }, - .reply_str = NULL, }, }; diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok index 4a3a169..087ebbc 100644 --- a/tests/ctrl/ctrl_test.ok +++ b/tests/ctrl/ctrl_test.ok @@ -19,7 +19,7 @@ test: 'GET 1 variable\n' parsing: id = '1' -variable = 'variable\n' +variable = 'variable' value = '(null)' reply = '(null)' handling: @@ -28,65 +28,51 @@ test: 'GET 1 var\ni\nable' parsing: id = '1' -variable = 'var\ni\nable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 var\ti\table' parsing: id = '1' -variable = 'var\ti\table' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 var\ri\rable' parsing: id = '1' -variable = 'var\ri\rable' -value = '(null)' -reply = '(null)' +reply = 'GET variable contains invalid characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET variable contains invalid characters' ok test: 'GET 1 variable value' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable value\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'GET 1 variable multiple value tokens\n' parsing: id = '1' -variable = 'variable' -value = '(null)' -reply = '(null)' +reply = 'GET with trailing characters' handling: -replied: 'ERROR 1 Command not found' +replied: 'ERROR 1 GET with trailing characters' ok test: 'SET 1 variable value' parsing: @@ -108,21 +94,17 @@ ok test: 'SET weird_id variable value' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET weird_id variable value\n' parsing: -id = 'weird_id' -variable = 'variable' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR weird_id Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET 1 variable multiple value tokens' parsing: @@ -162,21 +144,17 @@ ok test: 'SET \n special_char_id value' parsing: -id = '\n' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \n Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'SET \t special_char_id value' parsing: -id = '\t' -variable = 'special_char_id' -value = 'value' -reply = '(null)' +id = 'err' +reply = 'Invalid message ID number' handling: -replied: 'ERROR \t Command not found' +replied: 'ERROR err Invalid message ID number' ok test: 'GET_REPLY 1 variable OK' parsing: diff --git a/tests/testsuite.at b/tests/testsuite.at index 4a59b22..81730ee 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -18,7 +18,7 @@ AT_SETUP([ctrl]) AT_KEYWORDS([ctrl]) cat $abs_srcdir/ctrl/ctrl_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/ctrl/ctrl_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([kasumi]) -- To view, visit https://gerrit.osmocom.org/5438 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:50:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:50:36 +0000 Subject: [MERGED] libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP ...................................................................... ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP So far, error reporting just says "Trap/Reply", more accurately report 'GET REPLY', 'SET REPLY' and 'TRAP' as appropriate. Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 --- M src/ctrl/control_cmd.c 1 file changed, 28 insertions(+), 25 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index f32a200..c747e84 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -410,31 +410,34 @@ LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", cmd->variable, osmo_escape_str(cmd->value, -1)); break; - case CTRL_TYPE_GET_REPLY: - case CTRL_TYPE_SET_REPLY: - case CTRL_TYPE_TRAP: - var = strtok_r(NULL, " ", &saveptr); - val = strtok_r(NULL, "", &saveptr); - if (!var || !val) { - cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply incomplete"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply incomplete\n"); - goto err; - } - if (!osmo_separated_identifiers_valid(var, ".")) { - cmd->type = CTRL_TYPE_ERROR; - cmd->reply = "Trap/Reply variable contains invalid characters"; - LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable contains invalid characters: \"%s\"\n", - osmo_escape_str(var, -1)); - goto err; - } - cmd->variable = talloc_strdup(cmd, var); - cmd->reply = talloc_strdup(cmd, val); - if (!cmd->variable || !cmd->reply) - goto oom; - LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: \"%s\"\n", cmd->variable, - osmo_escape_str(cmd->reply, -1)); - break; +#define REPLY_CASE(TYPE, NAME) \ + case TYPE: \ + var = strtok_r(NULL, " ", &saveptr); \ + val = strtok_r(NULL, "", &saveptr); \ + if (!var) { \ + cmd->type = CTRL_TYPE_ERROR; \ + cmd->reply = NAME " incomplete"; \ + LOGP(DLCTRL, LOGL_NOTICE, NAME " incomplete\n"); \ + goto err; \ + } \ + if (!osmo_separated_identifiers_valid(var, ".")) { \ + cmd->type = CTRL_TYPE_ERROR; \ + cmd->reply = NAME " variable contains invalid characters"; \ + LOGP(DLCTRL, LOGL_NOTICE, NAME " variable contains invalid characters: \"%s\"\n", \ + osmo_escape_str(var, -1)); \ + goto err; \ + } \ + cmd->variable = talloc_strdup(cmd, var); \ + cmd->reply = talloc_strdup(cmd, val); \ + if (!cmd->variable || !cmd->reply) \ + goto oom; \ + LOGP(DLCTRL, LOGL_DEBUG, "Command: " NAME " %s: %s\n", cmd->variable, \ + osmo_escape_str(cmd->reply, -1)); \ + break + REPLY_CASE(CTRL_TYPE_GET_REPLY, "GET REPLY"); + REPLY_CASE(CTRL_TYPE_SET_REPLY, "SET REPLY"); + REPLY_CASE(CTRL_TYPE_TRAP, "TRAP"); +#undef REPLY_CASE case CTRL_TYPE_ERROR: var = strtok_r(NULL, "", &saveptr); if (!var) { -- To view, visit https://gerrit.osmocom.org/5439 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01 Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:51:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:51:19 +0000 Subject: openbsc[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5491 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5fab86bca617cabcd59484066975e17ab2320b6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:51:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:51:24 +0000 Subject: [MERGED] openbsc[master]: Fix tests after rate_ctr change In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix tests after rate_ctr change ...................................................................... Fix tests after rate_ctr change Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * free bts struct after each test This is a backport of 4ab7268a902af24fcd4870148b709fed4fbf900c from OsmoBSC. Change-Id: Ic5fab86bca617cabcd59484066975e17ab2320b6 Related: OS#2757 --- M openbsc/tests/channel/channel_test.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 3 files changed, 73 insertions(+), 67 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index cf19aab..049786b 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -59,28 +59,23 @@ } -void test_request_chan(void) +void test_request_chan(struct gsm_network *net) { - struct gsm_network *network; struct gsm_bts *bts; printf("Testing the gsm_subscriber chan logic\n"); - /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); + bts = gsm_bts_alloc(net, 0); bts->location_area_code = 23; - s_conn.network = network; + s_conn.network = net; /* Create a dummy subscriber */ struct gsm_subscriber *subscr = subscr_alloc(); subscr->lac = 23; - subscr->group = network->subscr_group; + subscr->group = net->subscr_group; OSMO_ASSERT(subscr->group); - OSMO_ASSERT(subscr->group->net == network); + OSMO_ASSERT(subscr->group->net == net); /* Ask for a channel... */ struct subscr_request *sr; @@ -93,20 +88,15 @@ } -void test_bts_debug_print(void) +void test_bts_debug_print(struct gsm_network *net) { - struct gsm_network *network; struct gsm_bts *bts; struct gsm_bts_trx *trx; printf("Testing the lchan printing:"); - /* Create a dummy network */ - network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - if (!network) - exit(1); /* Add a BTS with some reasonanbly non-zero id */ - bts = gsm_bts_alloc(network, 45); + bts = gsm_bts_alloc(net, 45); /* Add a second TRX to test on multiple TRXs */ gsm_bts_trx_alloc(bts); @@ -154,11 +144,18 @@ int main(int argc, char **argv) { + struct gsm_network *network; + osmo_init_logging(&log_info); - test_request_chan(); + /* Create a dummy network */ + network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!network) + return EXIT_FAILURE; + + test_request_chan(network); test_dyn_ts_subslots(); - test_bts_debug_print(); + test_bts_debug_print(network); return EXIT_SUCCESS; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 3882f05..6f48599 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -145,30 +145,36 @@ } } -static inline void test_si2q_segfault(void) +static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, const char *msg) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); - - if (!network) + struct gsm_bts *bts = gsm_bts_alloc(net, 0); + if (!bts) { + printf("BTS allocation failure in %s()\n", msg); exit(1); - bts = gsm_bts_alloc(network, 0); + } + printf("BTS allocation OK in %s()\n", msg); + + bts->network = net; + + return bts; +} + +static inline void test_si2q_segfault(struct gsm_network *net) +{ + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + printf("Test SI2quater UARFCN (same scrambling code and diversity):\n"); _bts_uarfcn_add(bts, 10564, 319, 0); _bts_uarfcn_add(bts, 10612, 319, 0); gen(bts, __func__); + + talloc_free(bts); } -static inline void test_si2q_mu(void) +static inline void test_si2q_mu(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Test SI2quater multiple UARFCNs:\n"); - - if (!network) - exit(1); - bts = gsm_bts_alloc(network, 0); _bts_uarfcn_add(bts, 10564, 318, 0); _bts_uarfcn_add(bts, 10612, 319, 0); @@ -177,18 +183,14 @@ _bts_uarfcn_add(bts, 10613, 64, 0); _bts_uarfcn_add(bts, 10613, 164, 0); _bts_uarfcn_add(bts, 10613, 14, 0); + + talloc_free(bts); } -static inline void test_si2q_u(void) +static inline void test_si2q_u(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); /* first generate invalid SI as no UARFCN added */ gen(bts, __func__); @@ -205,18 +207,14 @@ _bts_uarfcn_add(bts, 1982, 223, 1); _bts_uarfcn_add(bts, 1982, 14, 0); _bts_uarfcn_add(bts, 1982, 88, 0); + + talloc_free(bts); } -static inline void test_si2q_e(void) +static inline void test_si2q_e(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -238,18 +236,14 @@ add_earfcn_b(bts, 1965, OSMO_EARFCN_MEAS_INVALID); add_earfcn_b(bts, 1967, 4); add_earfcn_b(bts, 1982, 3); + + talloc_free(bts); } -static inline void test_si2q_long(void) +static inline void test_si2q_long(struct gsm_network *net) { - struct gsm_bts *bts; - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n"); - - if (!network) - exit(1); - - bts = gsm_bts_alloc(network, 0); bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; bts->si_common.si2quater_neigh_list.meas_bw = bts->si_common.data.meas_bw_list; @@ -286,6 +280,8 @@ _bts_uarfcn_add(bts, 1976, 224, 1); _bts_uarfcn_add(bts, 1976, 225, 1); _bts_uarfcn_add(bts, 1976, 226, 1); + + talloc_free(bts); } static void test_mi_functionality(void) @@ -671,10 +667,10 @@ OSMO_ASSERT(res == 1); } -static void test_si_ba_ind(void) +static void test_si_ba_ind(struct gsm_network *net) { - struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); - struct gsm_bts *bts = gsm_bts_alloc(network, 0); + struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__); + const struct gsm48_system_information_type_2 *si2 = (struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2); const struct gsm48_system_information_type_2bis *si2bis = @@ -690,7 +686,6 @@ int rc; - bts->network = network; bts->c0->arfcn = 23; printf("Testing if BA-IND is set as expected in SI2xxx and SI5xxx\n"); @@ -734,8 +729,16 @@ int main(int argc, char **argv) { + struct gsm_network *net; + osmo_init_logging(&log_info); log_set_log_level(osmo_stderr_target, LOGL_INFO); + + net = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); + if (!net) { + printf("Network init failure.\n"); + return EXIT_FAILURE; + } test_location_area_identifier(); test_mi_functionality(); @@ -746,13 +749,13 @@ test_range_encoding(); test_gsm411_rp_ref_wrap(); - test_si2q_segfault(); - test_si2q_e(); - test_si2q_u(); - test_si2q_mu(); - test_si2q_long(); + test_si2q_segfault(net); + test_si2q_e(net); + test_si2q_u(net); + test_si2q_mu(net); + test_si2q_long(net); - test_si_ba_ind(); + test_si_ba_ind(net); printf("Done.\n"); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 4fff78f..1039883 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -62,6 +62,7 @@ Allocated reference: 255 Allocated reference: 0 Allocated reference: 1 +BTS allocation OK in test_si2q_segfault() Test SI2quater UARFCN (same scrambling code and diversity): generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -69,6 +70,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 e8 0a 7f 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 2 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 e8 0a 7f 52 88 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_e() Testing SYSINFO_TYPE_2quater EARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -92,6 +94,7 @@ added EARFCN 1982 - generating SI2quater for 7 EARFCNs and 0 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e4 1e fa c2 80 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si2q_u() Testing SYSINFO_TYPE_2quater UARFCN generation: generating SI2quater for 0 EARFCNs and 0 UARFCNs... generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @@ -117,6 +120,7 @@ generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 50 1c 3b 31 fa dd 88 85 7b c4 1c 2b 2b 2b 2b generating SI2quater for 0 EARFCNs and 11 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 0f 7c 58 1c 3b 25 7a ea 08 91 fb c4 1f b0 2b 2b 2b +BTS allocation OK in test_si2q_mu() Test SI2quater multiple UARFCNs: generating SI2quater for 0 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7c 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -134,6 +138,7 @@ generating SI2quater for 0 EARFCNs and 7 UARFCNs... generated valid SI2quater [00/01]: [23] 59 06 07 40 20 25 52 ea 10 81 ce a9 74 08 1f fa 54 ba 82 52 03 2b 2b generated valid SI2quater [01/01]: [23] 59 06 07 42 20 25 52 e8 30 81 d3 7f fd b2 86 54 a2 02 9f 03 2b 2b 2b +BTS allocation OK in test_si2q_long() Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation: generating SI2quater for 17 EARFCNs and 1 UARFCNs... generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 0c 1a 10 99 66 0f 04 83 c1 1c bb 2b 03 2b 2b @@ -201,6 +206,7 @@ generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b +BTS allocation OK in test_si_ba_ind() Testing if BA-IND is set as expected in SI2xxx and SI5xxx SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- To view, visit https://gerrit.osmocom.org/5491 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5fab86bca617cabcd59484066975e17ab2320b6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:52:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:52:34 +0000 Subject: libosmocore[master]: logging vty: tweak general 'logging' command doc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:54:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:54:44 +0000 Subject: libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:54:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:54:46 +0000 Subject: [MERGED] libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jenkins: add 'make V=1' for more verbose build logs ...................................................................... jenkins: add 'make V=1' for more verbose build logs In the logs, it is nice to see whether e.g. sanitize or -Werror args actually made it to the gcc command line. With V=1 we see the complete command invocations that would be hidden otherwise. Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5798c95..c341d05 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ prep_build "$src_dir" "$build_dir" "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" - $MAKE $PARALLEL_MAKE check \ + $MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh } -- To view, visit https://gerrit.osmocom.org/4860 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie89b1c39489ba80fb47716f4c747f2c85960e32e Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:55:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:55:08 +0000 Subject: osmo-iuh[master]: fix 3 compiler warnings in ranap_common.c In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5489 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:55:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:55:14 +0000 Subject: [MERGED] osmo-iuh[master]: fix 3 compiler warnings in ranap_common.c In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix 3 compiler warnings in ranap_common.c ...................................................................... fix 3 compiler warnings in ranap_common.c ranap_common.c:282 col 45: warning: format ?%u? expects argument of type ?unsigned int?, but argument 4 has type ?RANAP_CauseNon_Standard_t {aka const long int}? [-Wformat=] ranap_common.c:527 col 15: warning: implicit declaration of function ?asn1str_to_u16?; did you mean ?asn_strtol?? [-Wimplicit-function-declaration] ranap_common.c:546 col 11: warning: unused variable ?addr? [-Wunused-variable] Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e --- M src/ranap_common.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ranap_common.c b/src/ranap_common.c index 13c913f..46203e0 100644 --- a/src/ranap_common.c +++ b/src/ranap_common.c @@ -24,6 +24,7 @@ #include #include +#include extern int asn1_xer_print; int _ranap_DRANAP = 0; @@ -278,7 +279,7 @@ cause->choice.misc)); break; case RANAP_Cause_PR_non_Standard: - snprintf(buf, sizeof(buf), "non-standard(%u)", + snprintf(buf, sizeof(buf), "non-standard(%ld)", cause->choice.non_Standard); break; default: @@ -542,7 +543,6 @@ int ranap_ip_from_transp_layer_addr(const BIT_STRING_t *in, uint32_t *ip) { - uint32_t addr; uint8_t x213[] = {0x35, 0x00, 0x01}; /* Only support IPv4 for now - plain and with x213 encapsulation */ -- To view, visit https://gerrit.osmocom.org/5489 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:56:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:56:55 +0000 Subject: osmo-hlr[master]: fix debug log: put 'deriving 2G from 3G' in proper place In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5515 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:56:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:56:58 +0000 Subject: [MERGED] osmo-hlr[master]: fix debug log: put 'deriving 2G from 3G' in proper place In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix debug log: put 'deriving 2G from 3G' in proper place ...................................................................... fix debug log: put 'deriving 2G from 3G' in proper place Don't log "deriving 2G from 3G" when we're actually calculating separately; log it when we're actually deriving from 3G. Add log "calculating 2G separately" in the right place. The test output changes show that each test said "separate 2G" at the top while logging "deriving 2G from 3G" further down, which was obviously wrong. Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc --- M src/auc.c M tests/auc/auc_test.err M tests/auc/auc_ts_55_205_test_sets.err 3 files changed, 32 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/auc.c b/src/auc.c index f55b377..79c3918 100644 --- a/src/auc.c +++ b/src/auc.c @@ -144,6 +144,7 @@ if (!aud2g) { /* use the 2G tokens from 3G keys */ + DBGP("vector [%u]: deriving 2G from 3G\n", i); DBGVB(kc); DBGVB(sres); DBGVV("0x%x", auth_types); @@ -151,7 +152,7 @@ } /* calculate 2G separately */ - DBGP("vector [%u]: deriving 2G from 3G\n", i); + DBGP("vector [%u]: calculating 2G separately\n", i); rc = osmo_auth_gen_vec(&vtmp, aud2g, rand); if (rc < 0) { diff --git a/tests/auc/auc_test.err b/tests/auc/auc_test.err index 5263d04..0a4d9af 100644 --- a/tests/auc/auc_test.err +++ b/tests/auc/auc_test.err @@ -35,7 +35,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 -DAUC vector [0]: deriving 2G from 3G +DAUC vector [0]: calculating 2G separately DAUC vector [0]: kc = 241a5b16aeb8e400 DAUC vector [0]: sres = 429d5b27 DAUC vector [0]: auth_types = 0x3 @@ -55,7 +55,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 -DAUC vector [0]: deriving 2G from 3G +DAUC vector [0]: calculating 2G separately DAUC vector [0]: kc = 241a5b16aeb8e400 DAUC vector [0]: sres = 429d5b27 DAUC vector [0]: auth_types = 0x3 @@ -78,6 +78,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 059a4f668f6fbe39 DAUC vector [0]: sres = 9b36efdf DAUC vector [0]: auth_types = 0x3 @@ -96,6 +97,7 @@ DAUC vector [0]: ik = 27497388b6cb044648f396aa155b95ef DAUC vector [0]: res = e229c19e791f2e410000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 059a4f668f6fbe39 DAUC vector [0]: sres = 9b36efdf DAUC vector [0]: auth_types = 0x3 @@ -117,6 +119,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -137,6 +140,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -147,6 +151,7 @@ DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5 DAUC vector [1]: res = 43023475cb29292c0000000000000000 DAUC vector [1]: res_len = 8 +DAUC vector [1]: deriving 2G from 3G DAUC vector [1]: kc = aef73dd515e86c15 DAUC vector [1]: sres = 882b1d59 DAUC vector [1]: auth_types = 0x3 @@ -157,6 +162,7 @@ DAUC vector [2]: ik = 648dab72016181406243420649e63dc9 DAUC vector [2]: res = 010cab11cc63a6e40000000000000000 DAUC vector [2]: res_len = 8 +DAUC vector [2]: deriving 2G from 3G DAUC vector [2]: kc = f0eaf8cb19e0758d DAUC vector [2]: sres = cd6f0df5 DAUC vector [2]: auth_types = 0x3 @@ -179,6 +185,7 @@ DAUC vector [0]: ik = f19c20ca863137f8892326d959ec5e01 DAUC vector [0]: res = 9af5a557902d2db80000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 7526fc13c5976685 DAUC vector [0]: sres = 0ad888ef DAUC vector [0]: auth_types = 0x3 @@ -189,6 +196,7 @@ DAUC vector [1]: ik = 79f21ed53bcb47787de57d136ff803a5 DAUC vector [1]: res = 43023475cb29292c0000000000000000 DAUC vector [1]: res_len = 8 +DAUC vector [1]: deriving 2G from 3G DAUC vector [1]: kc = aef73dd515e86c15 DAUC vector [1]: sres = 882b1d59 DAUC vector [1]: auth_types = 0x3 @@ -199,6 +207,7 @@ DAUC vector [2]: ik = 648dab72016181406243420649e63dc9 DAUC vector [2]: res = 010cab11cc63a6e40000000000000000 DAUC vector [2]: res_len = 8 +DAUC vector [2]: deriving 2G from 3G DAUC vector [2]: kc = f0eaf8cb19e0758d DAUC vector [2]: sres = cd6f0df5 DAUC vector [2]: auth_types = 0x3 diff --git a/tests/auc/auc_ts_55_205_test_sets.err b/tests/auc/auc_ts_55_205_test_sets.err index 1c5ad60..b0f83ae 100644 --- a/tests/auc/auc_ts_55_205_test_sets.err +++ b/tests/auc/auc_ts_55_205_test_sets.err @@ -12,6 +12,7 @@ DAUC vector [0]: ik = f769bcd751044604127672711c6d3441 DAUC vector [0]: res = a54211d5e3ba50bf0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = eae4be823af9a08b DAUC vector [0]: sres = 46f8416a DAUC vector [0]: auth_types = 0x3 @@ -34,6 +35,7 @@ DAUC vector [0]: ik = 59a92d3b476a0443487055cf88b2307b DAUC vector [0]: res = 8011c48c0c214ed20000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = aa01739b8caa976d DAUC vector [0]: sres = 8c308a5e DAUC vector [0]: auth_types = 0x3 @@ -56,6 +58,7 @@ DAUC vector [0]: ik = 0c4524adeac041c4dd830d20854fc46b DAUC vector [0]: res = f365cd683cd92e960000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9a8ec95f408cc507 DAUC vector [0]: sres = cfbce3fe DAUC vector [0]: auth_types = 0x3 @@ -78,6 +81,7 @@ DAUC vector [0]: ik = 1c42e960d89b8fa99f2744e0708ccb53 DAUC vector [0]: res = 5860fc1bce351e7e0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = cdc1dc0841b81a22 DAUC vector [0]: sres = 9655e265 DAUC vector [0]: auth_types = 0x3 @@ -100,6 +104,7 @@ DAUC vector [0]: ik = a7466cc1e6b2a1337d49d3b66e95d7b4 DAUC vector [0]: res = 16c8233f05a0ac280000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = df75bc5ea899879f DAUC vector [0]: sres = 13688f17 DAUC vector [0]: auth_types = 0x3 @@ -122,6 +127,7 @@ DAUC vector [0]: ik = 88ab80a415f15c73711254a1d388f696 DAUC vector [0]: res = 8c25a16cd918a1df0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 84b417ae3aeab4f3 DAUC vector [0]: sres = 553d00b3 DAUC vector [0]: auth_types = 0x3 @@ -144,6 +150,7 @@ DAUC vector [0]: ik = f9ec0865eb32f22369cade40c59c3a44 DAUC vector [0]: res = a63241e1ffc3e5ab0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 3b4e244cdc60ce03 DAUC vector [0]: sres = 59f1a44a DAUC vector [0]: auth_types = 0x3 @@ -166,6 +173,7 @@ DAUC vector [0]: ik = 90527ebaa5588968db41727325a04d9e DAUC vector [0]: res = 4a90b2171ac83a760000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 8d4ec01de597acfe DAUC vector [0]: sres = 50588861 DAUC vector [0]: auth_types = 0x3 @@ -188,6 +196,7 @@ DAUC vector [0]: ik = ed0318ca5deb9206272f6e8fa64ba411 DAUC vector [0]: res = 4bc2212d8624910a0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = d8debc4ffbcd60aa DAUC vector [0]: sres = cde6b027 DAUC vector [0]: auth_types = 0x3 @@ -210,6 +219,7 @@ DAUC vector [0]: ik = 74f24e8c26df58e1b38d7dcd4f1b7fbd DAUC vector [0]: res = 6fc30fee6d1235230000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = f0eaa50a1edcebb7 DAUC vector [0]: sres = 02d13acd DAUC vector [0]: auth_types = 0x3 @@ -232,6 +242,7 @@ DAUC vector [0]: ik = c251df0d888dd9329bcf46655b226e40 DAUC vector [0]: res = aefa357beac2a87a0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 82dbab7f83f063da DAUC vector [0]: sres = 44389d01 DAUC vector [0]: auth_types = 0x3 @@ -254,6 +265,7 @@ DAUC vector [0]: ik = 0c9fb81613884c2535dd0eabf3b440d8 DAUC vector [0]: res = 98dbbd099b3b408d0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 3c66cb98cab2d33d DAUC vector [0]: sres = 03e0fd84 DAUC vector [0]: auth_types = 0x3 @@ -276,6 +288,7 @@ DAUC vector [0]: ik = 7f4d6ae7440e18789a8b75ad3f42f03a DAUC vector [0]: res = af4a411e1139f2c20000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9612b5d88a4130bb DAUC vector [0]: sres = be73b3dc DAUC vector [0]: auth_types = 0x3 @@ -298,6 +311,7 @@ DAUC vector [0]: ik = abcbae8fd46115e9961a55d0da5f2078 DAUC vector [0]: res = 7bffa5c2f41fbc050000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 75a150df3c6aed08 DAUC vector [0]: sres = 8fe019c7 DAUC vector [0]: auth_types = 0x3 @@ -320,6 +334,7 @@ DAUC vector [0]: ik = 0b3f8d024fe6bfafaa982b8f82e319c2 DAUC vector [0]: res = 7e3f44c7591f6f450000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = b7f92e426a36fec5 DAUC vector [0]: sres = 27202b82 DAUC vector [0]: auth_types = 0x3 @@ -342,6 +357,7 @@ DAUC vector [0]: ik = d61c853c280dd9c46f297baec386de17 DAUC vector [0]: res = 70f6bdb9ad21525f0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 88d9de10a22004c5 DAUC vector [0]: sres = ddd7efe6 DAUC vector [0]: auth_types = 0x3 @@ -364,6 +380,7 @@ DAUC vector [0]: ik = 66bec707eb2afc476d7408a8f2927b36 DAUC vector [0]: res = 479dd25c20792d630000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = a819e577a8d6175b DAUC vector [0]: sres = 67e4ff3f DAUC vector [0]: auth_types = 0x3 @@ -386,6 +403,7 @@ DAUC vector [0]: ik = 9744871ad32bf9bbd1dd5ce54e3e2e5a DAUC vector [0]: res = 28d7b0f2a2ec3de50000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = 9a8d0e883ff0887a DAUC vector [0]: sres = 8a3b8d17 DAUC vector [0]: auth_types = 0x3 @@ -408,6 +426,7 @@ DAUC vector [0]: ik = b4721368bc16ea67875c5598688bb0ef DAUC vector [0]: res = a95100e2760952cd0000000000000000 DAUC vector [0]: res_len = 8 +DAUC vector [0]: deriving 2G from 3G DAUC vector [0]: kc = ed29b2f1c27f9f34 DAUC vector [0]: sres = df58522f DAUC vector [0]: auth_types = 0x3 -- To view, visit https://gerrit.osmocom.org/5515 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:58:25 +0000 Subject: osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 deferring mostly to neels here, he wrote the code. -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 3 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:58:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:58:48 +0000 Subject: osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Patch Set 1: > Have this would be used? Ctrl, vty, smth else? CTRL. -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:59:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:59:02 +0000 Subject: osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 15:59:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 15:59:16 +0000 Subject: osmo-sgsn[master]: Remove dead code In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:00:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:00:11 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: use proper talloc ctx for vty telnet init In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: use proper talloc ctx for vty telnet init ...................................................................... hnbgw: use proper talloc ctx for vty telnet init Change-Id: I355c6e5489f24566612528cd679c5cab21eed008 --- M src/hnbgw.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index 45a753f..ff3e2a9 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -471,7 +471,7 @@ log_set_log_level(osmo_stderr_target, hnbgw_cmdline_config.log_level); - rc = telnet_init_dynif(NULL, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); + rc = telnet_init_dynif(tall_hnb_ctx, g_hnb_gw, vty_get_bind_addr(), OSMO_VTY_PORT_HNBGW); if (rc < 0) { perror("Error binding VTY port"); exit(1); -- To view, visit https://gerrit.osmocom.org/5522 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I355c6e5489f24566612528cd679c5cab21eed008 Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:00:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:00:59 +0000 Subject: [MERGED] libosmocore[master]: logging vty: tweak general 'logging' command doc In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: logging vty: tweak general 'logging' command doc ...................................................................... logging vty: tweak general 'logging' command doc 'logging' is not only for terminals, also for stderr and other log targets. Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 --- M include/osmocom/vty/logging.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h index 9bafb98..1baa3f8 100644 --- a/include/osmocom/vty/logging.h +++ b/include/osmocom/vty/logging.h @@ -2,7 +2,7 @@ #pragma once -#define LOGGING_STR "Configure log message to this terminal\n" +#define LOGGING_STR "Configure logging\n" #define FILTER_STR "Filter log messages\n" struct log_info; -- To view, visit https://gerrit.osmocom.org/5253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1ee59c7d1073502259b7d60008206ac3d8e87a3 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:01:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:01:13 +0000 Subject: [MERGED] osmo-msc[master]: log: a_iface.c: revisit logging, use LOGPCONN In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: log: a_iface.c: revisit logging, use LOGPCONN ...................................................................... log: a_iface.c: revisit logging, use LOGPCONN Add LOGPBSCCONN for struct bsc_conn. Use LOGPCONN or LOGPBSCCONN whereever possible. Tweak a few log messages and remove one redundant log. Change-Id: If9cb0e7a5cef2ec37a1a7c548aecf11a11c22eec --- M src/libmsc/a_iface.c 1 file changed, 18 insertions(+), 19 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index cdd8d89..29084d6 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -48,6 +48,9 @@ vlr_subscr_name(conn ? conn->vsub : NULL), conn ? conn->a.conn_id : -1, \ ## args) +#define LOGPBSCCONN(conn, level, fmt, args...) \ + LOGP(DMSC, level, "(conn_id %u) " fmt, conn ? conn->conn_id : (uint32_t)(-1), ## args) + /* A pointer to the GSM network we work with. By the current paradigm, * there can only be one gsm_network per MSC. The pointer is set once * when calling a_init() */ @@ -87,12 +90,9 @@ struct bsc_conn *conn; struct bsc_conn *conn_temp; - LOGP(DMSC, LOGL_DEBUG, - "Removing connection from active sccp-connection list (conn_id=%i)\n", - conn_id); - llist_for_each_entry_safe(conn, conn_temp, &active_connections, list) { if (conn->conn_id == conn_id) { + LOGPBSCCONN(conn, LOGL_DEBUG, "Removing A-interface conn\n"); llist_del(&conn->list); talloc_free(conn); } @@ -148,7 +148,7 @@ OSMO_ASSERT(conn); OSMO_ASSERT(conn->a.scu); - LOGP(DMSC, LOGL_DEBUG, "Passing DTAP message from MSC to BSC (conn_id=%i)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_DEBUG, "Passing DTAP message from MSC to BSC\n"); msg->l3h = msg->data; msg_resp = gsm0808_create_dtap(msg, link_id); @@ -158,12 +158,11 @@ msgb_free(msg); if (!msg_resp) { - LOGP(DMSC, LOGL_ERROR, "Unable to generate BSSMAP DTAP message!\n"); + LOGPCONN(conn, LOGL_ERROR, "Unable to generate BSSMAP DTAP message!\n"); return -EINVAL; - } else - LOGP(DMSC, LOGL_DEBUG, "Message will be sent as BSSMAP DTAP message!\n"); + } - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg_resp->data, msg_resp->len)); /* osmo_sccp_tx_data_msg() takes ownership of msg_resp */ return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); } @@ -182,7 +181,7 @@ LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len)); msg_resp = gsm0808_create_cipher(ei, include_imeisv ? &crm : NULL); - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg_resp->data, msg_resp->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg_resp->data, msg_resp->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg_resp); } @@ -271,7 +270,7 @@ } /* If nothing matches, tag the result as invalid */ - LOGP(DMSC, LOGL_ERROR, "Invalid permitted speech version / rate detected, discarding.\n"); + LOGP(DMSC, LOGL_ERROR, "Invalid permitted speech version: %d\n", speech_ver); return 0xFF; } @@ -294,7 +293,8 @@ return GSM0808_SPEECH_HALF_PREF; } - LOGP(DMSC, LOGL_ERROR, "Invalid speech version / rate combination preference, defaulting to full rate.\n"); + LOGP(DMSC, LOGL_ERROR, "Invalid radio channel preference: %d; defaulting to full rate.\n", + radio); return GSM0808_SPEECH_FULL_BM; } @@ -377,19 +377,19 @@ conn = trans->conn; OSMO_ASSERT(conn); - LOGP(DMSC, LOGL_ERROR, "Sending assignment command to BSC (conn_id %u)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_ERROR, "Sending Assignment Command to BSC\n"); /* Channel type */ rc = enc_channel_type(&ct, &trans->bearer_cap); if (rc < 0) { - LOGP(DMSC, LOGL_ERROR, "Faild to generate channel type -- assignment not sent!\n"); + LOGPCONN(conn, LOGL_ERROR, "Not sending Assignment to BSC: failed to generate channel type\n"); return -EINVAL; } /* Speech codec list */ rc = enc_speech_codec_list(&scl, &ct); if (rc < 0) { - LOGP(DMSC, LOGL_ERROR, "Faild to generate Speech codec list -- assignment not sent!\n"); + LOGPCONN(conn, LOGL_ERROR, "Not sending Assignment to BSC: failed to generate speech codec list\n"); return -EINVAL; } @@ -404,7 +404,7 @@ msg = gsm0808_create_ass(&ct, NULL, &rtp_addr, &scl, ci_ptr); - LOGP(DMSC, LOGL_DEBUG, "N-DATA.req(%u, %s)\n", conn->a.conn_id, osmo_hexdump(msg->data, msg->len)); + LOGPCONN(conn, LOGL_DEBUG, "N-DATA.req(%s)\n", osmo_hexdump(msg->data, msg->len)); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); } @@ -413,7 +413,7 @@ { struct msgb *msg; - LOGP(DMSC, LOGL_NOTICE, "Sending clear command to BSC (conn_id=%u)\n", conn->a.conn_id); + LOGPCONN(conn, LOGL_NOTICE, "Sending Clear command to BSC\n"); msg = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL); return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); @@ -552,8 +552,7 @@ /* Clear only A connections and connections that actually * belong to the specified BSC */ if (conn->via_ran == RAN_GERAN_A && memcmp(bsc_addr, &conn->a.bsc_addr, sizeof(conn->a.bsc_addr)) == 0) { - LOGP(DMSC, LOGL_NOTICE, "Dropping orphaned subscriber connection (conn_id %i)\n", - conn->a.conn_id); + LOGPCONN(conn, LOGL_NOTICE, "Dropping orphaned subscriber connection\n"); msc_clear_request(conn, GSM48_CC_CAUSE_SWITCH_CONG); /* If there is still an SCCP connection active, remove it now */ -- To view, visit https://gerrit.osmocom.org/5474 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9cb0e7a5cef2ec37a1a7c548aecf11a11c22eec Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:01:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:01:52 +0000 Subject: osmo-sgsn[master]: gsm48_rx_gmm_att_req: fix error handling: don't clean up NUL... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:01:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:01:54 +0000 Subject: [MERGED] osmo-sgsn[master]: gsm48_rx_gmm_att_req: fix error handling: don't clean up NUL... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm48_rx_gmm_att_req: fix error handling: don't clean up NULL llme ...................................................................... gsm48_rx_gmm_att_req: fix error handling: don't clean up NULL llme Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68 --- M src/gprs/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index 8441f6b..f26c22b 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1443,7 +1443,7 @@ rc = gsm48_tx_gmm_att_rej_oldmsg(msg, reject_cause); if (ctx) mm_ctx_cleanup_free(ctx, "GPRS ATTACH REJ"); - else + else if (llme) gprs_llgmm_unassign(llme); return rc; -- To view, visit https://gerrit.osmocom.org/5527 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78903d0846568d4e98b6e43e62bbe3c329b5bc68 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:02:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:02:51 +0000 Subject: osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5498 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:15 +0000 Subject: osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5499 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:20 +0000 Subject: [MERGED] osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ranap_msg_factory: check IE encoder return codes ...................................................................... ranap_msg_factory: check IE encoder return codes in many functions, the returncode (rc) from the IE encoder functions is not checked. Add a return code check and log error message (like it is already done in the functions which already check the return code) Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae --- M src/ranap_msg_factory.c 1 file changed, 40 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index fe7e325..f47c82b 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -185,6 +185,10 @@ /* ies -> dt */ rc = ranap_encode_directtransferies(&dt, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding direct transfer IEs: %d\n", rc); + return NULL; + } /* dt -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_DirectTransfer, @@ -251,6 +255,11 @@ if (ck) ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_EncryptionInformation, &ies.encryptionInformation); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode command IEs: %d\n", rc); + return NULL; + } + /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_SecurityModeControl, RANAP_Criticality_reject, @@ -282,6 +291,10 @@ /* ies -> out */ rc = ranap_encode_securitymodecompleteies(&out, &ies); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding security mode complete IEs: %d\n", rc); + return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_SecurityModeControl, @@ -317,10 +330,14 @@ /* ies -> out */ rc = ranap_encode_commonid_ies(&out, &ies); + /* release dynamic allocations attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); - if (rc < 0) + + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding common id IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_CommonID, @@ -349,8 +366,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecommandies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release command IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_Release, @@ -377,8 +396,10 @@ /* ies -> out */ rc = ranap_encode_iu_releasecompleteies(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release complete IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_successful_outcome(RANAP_ProcedureCode_id_Iu_Release, @@ -434,11 +455,15 @@ /* ies -> out */ rc = ranap_encode_pagingies(&out, &ies); + /* release dynamic allocation attached to ies */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, &ies.permanentNAS_UE_ID); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_TemporaryUE_ID, &ies.temporaryUE_ID); - if (rc < 0) + + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding paging IEs: %d\n", rc); return NULL; + } /* out -> msg */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Paging, @@ -879,13 +904,17 @@ memcpy(&ies.cause, cause, sizeof(ies.cause)); rc = ranap_encode_iu_releaserequesties(&out, &ies); - if (rc < 0) + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_Iu_ReleaseRequest, &out); return NULL; + } /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_ReleaseRequest, RANAP_Criticality_reject, &asn_DEF_RANAP_Iu_ReleaseRequest, &out); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_Iu_ReleaseRequest, &out); return msg; @@ -915,11 +944,15 @@ /* encoe the list IEs into the output */ rc = ranap_encode_rab_releaserequesties(&out, &ies); - if (rc < 0) - return NULL; + /* 'out' has been generated, we can release the input */ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseList, &ies.raB_ReleaseList); + if (rc < 0) { + LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: %d\n", rc); + return NULL; + } + /* encode the output into the msgb */ msg = ranap_generate_initiating_message(RANAP_ProcedureCode_id_RAB_ReleaseRequest, RANAP_Criticality_reject, -- To view, visit https://gerrit.osmocom.org/5499 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:20 +0000 Subject: [MERGED] osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: iu: iu_helpers: add functions to decode ip/port from rab-ass ...................................................................... iu: iu_helpers: add functions to decode ip/port from rab-ass add ranap_transp_assoc_decode() to decode the port information from an RANAP_IuTransportAssociation_t field. add ranap_transp_layer_addr_decode() to decode the ip-address from an RANAP_TransportLayerAddress_t field. Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 --- M include/osmocom/ranap/iu_helpers.h M src/iu_helpers.c 2 files changed, 58 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ranap/iu_helpers.h b/include/osmocom/ranap/iu_helpers.h index 109b6da..9d801be 100644 --- a/include/osmocom/ranap/iu_helpers.h +++ b/include/osmocom/ranap/iu_helpers.h @@ -3,5 +3,11 @@ #include #include +#include +#include + int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len); int ranap_imsi_encode(uint8_t *out, size_t out_len, const char *in); +int ranap_transp_assoc_decode(uint16_t *port, const RANAP_IuTransportAssociation_t *transp_assoc); +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, + const RANAP_TransportLayerAddress_t *trasp_layer_addr); diff --git a/src/iu_helpers.c b/src/iu_helpers.c index 2f44e93..5e78293 100644 --- a/src/iu_helpers.c +++ b/src/iu_helpers.c @@ -20,8 +20,12 @@ #include #include - +#include +#include +#include "asn1helpers.h" #include +#include +#include /* decode a BCD-string as used inside ASN.1 encoded Iu interface protocols */ int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t in_len) @@ -70,3 +74,50 @@ } return i; } + +/* decode a network port as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_assoc_decode(uint16_t *port, const RANAP_IuTransportAssociation_t *transp_assoc) +{ + uint32_t result; + + if (!transp_assoc) + return -EINVAL; + + result = asn1bitstr_to_u32((BIT_STRING_t *) & transp_assoc->choice.bindingID); + + /* The lower 16 bits should be zero, otherwise the decoding may + * have yielded some odd result */ + if (result & 0xFFFF) + return -EINVAL; + + *port = (uint16_t) ((result >> 16) & 0xFFFF); + + if (*port == 0) + return -EINVAL; + + return 0; +} + +/* decode a network address as used inside ASN.1 encoded Iu interface protocols */ +int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, + const RANAP_TransportLayerAddress_t *trasp_layer_addr) +{ + unsigned char *buf; + int len; + const char *rc; + + buf = trasp_layer_addr->buf; + len = trasp_layer_addr->size; + + if (buf[0] == 0x35 && len > 7) + rc = inet_ntop(AF_INET, buf + 3, addr, addr_len); + else if (len > 3) + rc = inet_ntop(AF_INET, buf, addr, addr_len); + else + return -EINVAL; + + if (!rc) + return -EINVAL; + + return 0; +} -- To view, visit https://gerrit.osmocom.org/5498 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062 Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:20 +0000 Subject: [MERGED] osmo-iuh[master]: ranap_msg_factory: remove unusued variable In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ranap_msg_factory: remove unusued variable ...................................................................... ranap_msg_factory: remove unusued variable remove variable i in ranap_new_msg_sec_mod_compl() as it is not used (compiler warning) Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f --- M src/ranap_msg_factory.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index f47c82b..c287f02 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -280,7 +280,7 @@ RANAP_SecurityModeCompleteIEs_t ies; RANAP_SecurityModeComplete_t out; struct msgb *msg; - int i, rc; + int rc; memset(&ies, 0, sizeof(ies)); memset(&out, 0, sizeof(out)); -- To view, visit https://gerrit.osmocom.org/5500 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f Gerrit-PatchSet: 4 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:29 +0000 Subject: [MERGED] python/osmo-python-tests[master]: add cmdline doc to osmo_interact_* and osmo_verify_* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add cmdline doc to osmo_interact_* and osmo_verify_* ...................................................................... add cmdline doc to osmo_interact_* and osmo_verify_* The tools are so far badly under-documented. Alleviate that by comprehensive description and examples shown by -h option output. Hint at that from the README. Change-Id: I94dcad257558b917cb54fc877122594cd164f496 --- M osmopy/osmo_interact/common.py M osmopy/osmo_interact/ctrl.py M osmopy/osmo_interact/vty.py 3 files changed, 137 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py index f7070ae..31f44a8 100644 --- a/osmopy/osmo_interact/common.py +++ b/osmopy/osmo_interact/common.py @@ -19,9 +19,9 @@ # along with this program. If not, see . ''' -Common code for osmo_interact_vty.py and osmo_interact_ctrl.py. +Common code for VTY and CTRL interface interaction and transcript verification. This implements all of application interaction, piping and verification. -osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits. +vty.py and ctrl.py plug VTY and CTRL interface specific bits. ''' # Our setup.py currently wants everything to be parsable by both py2 and py3. @@ -370,8 +370,9 @@ return passed -def common_parser(): - parser = argparse.ArgumentParser() +def common_parser(doc=None): + parser = argparse.ArgumentParser(description=doc, + formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('-r', '--run', dest='run_app_str', help='command to run to launch application to test,' ' including command line arguments. If omitted, no' diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py index b752351..85e7554 100755 --- a/osmopy/osmo_interact/ctrl.py +++ b/osmopy/osmo_interact/ctrl.py @@ -87,7 +87,30 @@ return split_responses def main_interact_ctrl(): - parser = common_parser() + ''' +Run CTRL commands against a given application by stdin/stdout piping. + +Optionally, this can launch and tear down the application with -r. + +For example, to start a session that allows typing CTRL commands on stdin: + + osmo_interact_ctrl.py -p 4259 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' + +Where 4259 is OsmoHLR's CTRL port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_ctrl.py -p 4259 + +See also osmo_verify_transcript_vty.py, which allows verifying and updating +complete CTRL session transcripts, in essence to write CTRL tests from a screen +dump of a CTRL session. + +A VTY equivalent is osmo_interact_vty.py. +''' + parser = common_parser(__doc__) parser_add_run_args(parser) args = parser.parse_args() @@ -99,7 +122,44 @@ def main_verify_transcript_ctrl(): - parser = common_parser() + ''' +A CTRL transcript contains CTRL commands and their expected results. +It looks like: + +" +SET 1 var val +SET_REPLY 1 var OK + +GET 2 var +GET_REPLY 2 var val +" + +Optionally, this can launch and tear down the application with -r. + +For example, if above transcript example is in file test.ctrl, you can verify +that OsmoHLR still shows this behavior by: + + osmo_interact_ctrl.py -p 4259 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' \\ + test.ctrl + +Where 4259 is OsmoHLR's CTRL port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_ctrl.py -p 4259 test.ctrl + +If osmo-hlr has changed its behavior, e.g. some reply changed, the transcript +can be automatically updated, which overwrites the file, like: + + osmo_interact_ctrl.py -p 4259 -u test.ctrl + +See also osmo_interact_ctrl.py, which allows piping CTRL commands to stdin. + +A VTY equivalent is osmo_verify_transcript_vty.py. +''' + parser = common_parser(__doc__) parser_add_verify_args(parser) parser.add_argument('-i', '--keep-ids', dest='keep_ids', action='store_true', help='With --update, default is to overwrite the command IDs' diff --git a/osmopy/osmo_interact/vty.py b/osmopy/osmo_interact/vty.py index f34e87e..4704c09 100755 --- a/osmopy/osmo_interact/vty.py +++ b/osmopy/osmo_interact/vty.py @@ -156,7 +156,30 @@ return parser def main_interact_vty(): - parser = common_parser() + ''' +Run VTY commands against a given application by stdin/stdout piping. + +Optionally, this can launch and tear down the application with -r. + +For example, to extract the VTY reference XML file from osmo-hlr: + + osmo_interact_vty.py -p 4258 --gen-xml-ref \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' + +Where 4258 is OsmoHLR's VTY port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_vty.py -p 4258 --gen-xml-ref + +See also osmo_verify_transcript_vty.py, which allows verifying and updating +complete VTY session transcripts, in essence to write VTY tests from a screen +dump of a VTY session. + +A Control interface equivalent is osmo_interact_ctrl.py. +''' + parser = common_parser(__doc__) parser_add_vty_args(parser) parser_add_run_args(parser) parser.add_argument('-X', '--gen-xml-ref', dest='gen_xml', action='store_true', @@ -178,7 +201,52 @@ args.cmd_files, interact) def main_verify_transcript_vty(): - parser = common_parser() + ''' +A VTY transcript contains VTY commands and their expected results. +It looks like a screen dump of a live VTY session: + +" +OsmoHLR> enable + +OsmoHLR# subscriber show imsi 123456789023000 +% No subscriber for imsi = '123456789023000' +OsmoHLR# subscriber show msisdn 12345 +% No subscriber for msisdn = '12345' + +OsmoHLR# subscriber create imsi 123456789023000 +% Created subscriber 123456789023000 + ID: 1 + IMSI: 123456789023000 + MSISDN: none + No auth data +" + +Optionally, this can launch and tear down the application with -r. + +For example, if above transcript example is in file test.vty, you can verify +that OsmoHLR still shows this behavior by: + + osmo_interact_vty.py -p 4258 \\ + -r 'osmo-hlr -c /etc/osmocom/osmo-hlr.cfg -l /tmp/hlr.db' \\ + test.vty + +Where 4258 is OsmoHLR's VTY port number, see +https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers + +If osmo-hlr is already running, this shortens to just + + osmo_interact_vty.py -p 4258 test.vty + +If osmo-hlr has changed its behavior, e.g. some error message changed, the +transcript can be automatically updated, which overwrites the file, like: + + osmo_interact_vty.py -p 4258 -u test.vty + +See also osmo_interact_vty.py, which allows piping VTY commands to stdin. + +A Control interface equivalent is osmo_verify_transcript_ctrl.py. +''' + parser = common_parser(__doc__) parser_add_vty_args(parser) parser_add_verify_args(parser) args = parser.parse_args() -- To view, visit https://gerrit.osmocom.org/5494 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94dcad257558b917cb54fc877122594cd164f496 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:39 +0000 Subject: python/osmo-python-tests[master]: README: mention osmo_interact_* and osmo_verify_transcript_* In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5495 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:40 +0000 Subject: [MERGED] python/osmo-python-tests[master]: README: mention osmo_interact_* and osmo_verify_transcript_* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: README: mention osmo_interact_* and osmo_verify_transcript_* ...................................................................... README: mention osmo_interact_* and osmo_verify_transcript_* Move the libs/scripts that they (possibly) replace below the new additions and mention that they are superseded. Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 --- M README 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/README b/README index 25be782..9694aba 100644 --- a/README +++ b/README @@ -7,10 +7,14 @@ Use There are currently following scripts in this package: -osmodumpdoc.py - dump documentation (the VTY's "show online-help"). osmotestconfig.py - test that apps start/write with example configs -osmotestvty.py - test vty operations (currently, tests very few) soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_interact_vty.py - pipe stdin/stdout to a VTY session +osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port +osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps +osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files +osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X +osmotestvty.py - test vty operations, superseded by osmo_verify_transcript_vty.py Each of these scripts imports a project-specific osmoappdesc.py, which provides information about the available apps, configs, vty ports, etc. @@ -24,9 +28,10 @@ cd /openbsc/openbsc && osmodumpdoc.py Libraries: -osmopy/obscvty.py - connect to a vty, run commands on it, see the result osmopy/osmoutil.py - code that's shared between the scripts osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework +osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL ports +osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty obscvty.py may be of general use. osmoutil.py probably isn't. -- To view, visit https://gerrit.osmocom.org/5495 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:48 +0000 Subject: python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5496 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:03:50 +0000 Subject: [MERGED] python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: README: mention twisted_ipa.py in scripts section, not as lib ...................................................................... README: mention twisted_ipa.py in scripts section, not as lib Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 --- M README 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/README b/README index 9694aba..e85c1c4 100644 --- a/README +++ b/README @@ -13,6 +13,7 @@ osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files +twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X osmotestvty.py - test vty operations, superseded by osmo_verify_transcript_vty.py @@ -30,7 +31,6 @@ Libraries: osmopy/osmoutil.py - code that's shared between the scripts osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python -twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted framework osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL ports osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty -- To view, visit https://gerrit.osmocom.org/5496 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289 Gerrit-PatchSet: 2 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:04:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:04:09 +0000 Subject: [MERGED] libosmo-sccp[master]: ss7: Re-bind xUA server socket after setting new IP In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ss7: Re-bind xUA server socket after setting new IP ...................................................................... ss7: Re-bind xUA server socket after setting new IP In osmo-stp, cmd "local-ip" inside node "listen m3ua 2905" was actually not being applied, because the server was created + bound at "listen" command time using NULL as IP, and at "local-ip" time the IP was changed but the server was not re-bound using the new IP, so it kept listening at 0.0.0.0. With this patch, we defer binding the socket to "local-ip" cmd time, after the IP has been applied. As a result, if no "local-ip" command is provided, then the bind never happens, which means it is now mandatory that users of osmo_ss7_xua_server_create API not using osmo_ss7_xua_server_set_local_host call new provided API osmo_ss7_xua_server_bind. Another new API osmo_ss7_bind_all_instances is provided to easily make sure all servers are bound after configuration process. This is specially important for servers which doesn't contain the "local-ip" parameter. Users of osmo_sccp_simple_server API are not affected by this change, and they not requrie to call any new API. Furthermore, using osmo_ss7_xua_server_bind in VTY code ensures the xUA server is automatically bound to the new address if the operator changes the "local-ip" cmd at runtime. Related: OS#2647 Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c M stp/stp_main.c 5 files changed, 66 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 71c2022..94d5e8a 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -108,6 +108,8 @@ void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst); int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst, uint8_t c0, uint8_t c1, uint8_t c2); +int osmo_ss7_instance_bind(struct osmo_ss7_instance *inst); +int osmo_ss7_bind_all_instances(); /*********************************************************************** * MTP Users (Users of MTP, such as SCCP or ISUP) @@ -441,6 +443,9 @@ uint16_t local_port, const char *local_host); int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); + +int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 86fb45c..7f82f6e 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -423,6 +423,42 @@ return 0; } +/*! \brief bind all xUA servers belonging to an SS7 Instance + * \param[in] inst SS7 Instance to apply the socket binding (and start listening) + * \returns 0 on success; negative value on error */ +int osmo_ss7_instance_bind(struct osmo_ss7_instance *inst) +{ + struct osmo_xua_server *oxs; + int rc = 0; + + llist_for_each_entry(oxs, &inst->xua_servers, list) { + if (osmo_ss7_xua_server_bind(oxs) < 0) { + LOGSS7(inst, LOGL_ERROR, "Unable to bind xUA server %s:%u\n", + oxs->cfg.local.host, oxs->cfg.local.port); + rc = -1; + } + } + return rc; +} + +/*! \brief bind all xUA servers on each of the stored SS7 instances + * \returns 0 on success; negative value on error */ +int osmo_ss7_bind_all_instances() +{ + OSMO_ASSERT(ss7_initialized); + + struct osmo_ss7_instance *inst; + int rc = 0; + + llist_for_each_entry(inst, &osmo_ss7_instances, list) { + if (osmo_ss7_instance_bind(inst) < 0 ) { + LOGSS7(inst, LOGL_ERROR, "Unable to bind all xUA servers in ss7 instance\n"); + rc = -1; + } + } + return rc; +} + /*********************************************************************** * MTP Users (Users of MTP, such as SCCP or ISUP) ***********************************************************************/ @@ -1745,7 +1781,7 @@ return NULL; } -/*! \brief create a new xUA server listening to given ip/port +/*! \brief create a new xUA server configured with given ip/port * \param[in] ctx talloc allocation context * \param[in] proto protocol (xUA variant) to use * \param[in] local_port local SCTP port to bind/listen to @@ -1757,7 +1793,6 @@ uint16_t local_port, const char *local_host) { struct osmo_xua_server *oxs = talloc_zero(inst, struct osmo_xua_server); - int rc; OSMO_ASSERT(ss7_initialized); if (!oxs) @@ -1781,13 +1816,6 @@ osmo_stream_srv_link_set_port(oxs->server, oxs->cfg.local.port); osmo_stream_srv_link_set_proto(oxs->server, asp_proto_to_ip_proto(proto)); - rc = osmo_stream_srv_link_open(oxs->server); - if (rc < 0) { - osmo_stream_srv_link_destroy(oxs->server); - oxs->server = NULL; - talloc_free(oxs); - } - oxs->inst = inst; llist_add_tail(&oxs->list, &inst->xua_servers); @@ -1798,6 +1826,19 @@ return oxs; } +/*! \brief Set the xUA server to bind/listen to the currently configured ip/port + * \param[in] xs xUA server to operate + * \returns 0 on success, negative value on error. + */ +int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs) +{ + LOGP(DLSS7, LOGL_INFO, "(Re)binding %s Server to %s:%u\n", + get_value_string(osmo_ss7_asp_protocol_vals, xs->cfg.proto), + xs->cfg.local.host, xs->cfg.local.port); + return osmo_stream_srv_link_open(xs->server); +} + int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host) { diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 403a9ac..ea06b02 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -467,6 +467,10 @@ struct osmo_xua_server *xs = vty->index; osmo_ss7_xua_server_set_local_host(xs, argv[0]); + if (osmo_ss7_xua_server_bind(xs) < 0) { + vty_out(vty, "Unable to bind xUA server to IP %s%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } diff --git a/src/sccp_user.c b/src/sccp_user.c index d9de8d7..cd89c88 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -521,6 +521,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_xua_server *xs; + int rc; if (local_port < 0) local_port = osmo_ss7_asp_protocol_port(prot); @@ -535,6 +536,10 @@ if (!xs) goto out_ss7; + rc = osmo_ss7_xua_server_bind(xs); + if (rc < 0) + goto out_xs; + /* Allocate SCCP stack */ ss7->sccp = osmo_sccp_instance_create(ss7, NULL); if (!ss7->sccp) diff --git a/stp/stp_main.c b/stp/stp_main.c index 69d26b5..3216101 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -183,6 +183,8 @@ exit(1); } + osmo_ss7_bind_all_instances(); + rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { perror("Erro binding VTY port\n"); -- To view, visit https://gerrit.osmocom.org/4893 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79738963d633bec70705ff159c5b2127cd498aa2 Gerrit-PatchSet: 5 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:04:44 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:04:44 +0000 Subject: [PATCH] osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5524 to look at the new patch set (#4). gtphub: make rate_ctr unique * compute unique rate counter index when allocating new gtphub tunnel * propagate rate counter allocation error to upper layers * log and gracefully handle tunnel allocation error Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Related: OS#2757 --- M src/gprs/gtphub.c 1 file changed, 25 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/24/5524/4 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 5e962f2..0727dd5 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -879,14 +879,14 @@ ofd->cb = NULL; } -static void gtphub_bind_init(struct gtphub_bind *b) +static void gtphub_bind_init(struct gtphub_bind *b, uint32_t idx) { ZERO_STRUCT(b); INIT_LLIST_HEAD(&b->peers); b->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, - >phub_ctrg_io_desc, 0); + >phub_ctrg_io_desc, idx); OSMO_ASSERT(b->counters_io); } @@ -913,7 +913,8 @@ static void gtphub_bind_free(struct gtphub_bind *b) { OSMO_ASSERT(llist_empty(&b->peers)); - rate_ctr_group_free(b->counters_io); + if (b->counters_io) + rate_ctr_group_free(b->counters_io); } static void gtphub_bind_stop(struct gtphub_bind *b) { @@ -1107,6 +1108,14 @@ talloc_free(tun); } +#define CTR_IDX(s, p, a, b) (a + s + (p + b) * 2) + +/* rate counter index for tunnels: [3; 6] */ +#define CTR_IDX_TUN(s, p) CTR_IDX(s, p, 1, 1) + +/* rate counter index for hubs: [7; 10] */ +#define CTR_IDX_HUB(s, p) CTR_IDX(s, p, 3, 2) + static struct gtphub_tunnel *gtphub_tunnel_new() { struct gtphub_tunnel *tun; @@ -1121,8 +1130,9 @@ struct gtphub_tunnel_endpoint *te = &tun->endpoint[side_idx][plane_idx]; te->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, >phub_ctrg_io_desc, - 0); - OSMO_ASSERT(te->counters_io); + CTR_IDX_TUN(side_idx, plane_idx)); + if (!te->counters_io) + return NULL; } tun->expiry_entry.del_cb = gtphub_tunnel_del_cb; @@ -1486,7 +1496,13 @@ } /* A new tunnel. */ - p->tun = tun = gtphub_tunnel_new(); + tun = gtphub_tunnel_new(); + if (!tun) { + LOG(LOGL_ERROR, "Failed to allocate new tunnel %s <-> %s\n", + gtphub_port_str(from_ctrl), gtphub_port_str(to_ctrl)); + return -1; + } + p->tun = tun; /* Create TEI mapping */ tun->tei_repl = nr_pool_next(&hub->tei_pool); @@ -2460,7 +2476,7 @@ int side_idx; int plane_idx; for_each_side_and_plane(side_idx, plane_idx) { - gtphub_bind_init(&hub->to_gsns[side_idx][plane_idx]); + gtphub_bind_init(&hub->to_gsns[side_idx][plane_idx], CTR_IDX_HUB(side_idx, plane_idx)); } hub->to_gsns[GTPH_SIDE_SGSN][GTPH_PLANE_CTRL].label = "SGSN Ctrl"; @@ -2709,8 +2725,9 @@ } pp->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, - >phub_ctrg_io_desc, 0); + >phub_ctrg_io_desc, port); if (!pp->counters_io) { + LOG(LOGL_ERROR, "Failed to allocate rate counters for %s:%u\n", gsn_addr_to_str(&a->addr), port); talloc_free(pp); return NULL; } -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:04:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:04:45 +0000 Subject: [PATCH] osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration Message-ID: Review at https://gerrit.osmocom.org/5528 cosmetic: use macro for gtphub plane iteration Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 --- M src/gprs/gtphub.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/28/5528/1 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 0727dd5..b0e75ca 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1533,7 +1533,7 @@ int ie_mandatory = (p->type == GTP_CREATE_PDP_REQ); unsigned int side_idx = p->side_idx; - for (plane_idx = 0; plane_idx < 2; plane_idx++) { + for_each_plane(plane_idx) { int rc; struct gsn_addr use_addr; uint16_t use_port; -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:04:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:04:45 +0000 Subject: [PATCH] osmo-sgsn[master]: gtphub: check for gsn_addr_from_sockaddr() errors Message-ID: Review at https://gerrit.osmocom.org/5529 gtphub: check for gsn_addr_from_sockaddr() errors Previously the return value was ignored. Check it and log error message. Change-Id: If6babdad650dc6a84e6a784fc8d3c5abe146ecc1 --- M src/gprs/gtphub.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/5529/1 diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index b0e75ca..2ff1b7c 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1583,7 +1583,9 @@ * gtphub_handle_buf(), we'd be creating a peer port just to * expire it right away. */ if (hub->sgsn_use_sender && (side_idx == GTPH_SIDE_SGSN)) { - gsn_addr_from_sockaddr(&use_addr, &use_port, &from_ctrl->sa); + int rc = gsn_addr_from_sockaddr(&use_addr, &use_port, &from_ctrl->sa); + if (rc < 0) + LOG(LOGL_ERROR, "%s(): failed to obtain GSN address\n", __func__); } else { use_port = gtphub_plane_idx_default_port[plane_idx]; @@ -2765,7 +2767,9 @@ struct gsn_addr gsna; uint16_t port; - gsn_addr_from_sockaddr(&gsna, &port, addr); + int rc = gsn_addr_from_sockaddr(&gsna, &port, addr); + if (rc < 0) + LOG(LOGL_ERROR, "%s(): failed to obtain GSN address\n", __func__); pa = gtphub_addr_find(bind, &gsna); if (!pa) -- To view, visit https://gerrit.osmocom.org/5529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6babdad650dc6a84e6a784fc8d3c5abe146ecc1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:04:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:04:47 +0000 Subject: python/osmo-python-tests[master]: Ignore compilation byproducts In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:05:47 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:05:47 +0000 Subject: python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/5482/3/contrib/jenkins.sh File contrib/jenkins.sh: PS3, Line 9: python2 -m compileall I think we can do better than this copy+paste stile. let's at least define a variable like $PYTHONFLAGS and $PY (analogous to $CFLAGS and $CC in C projects) -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 3 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:05:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:05:49 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Ignore compilation byproducts In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Ignore compilation byproducts ...................................................................... Ignore compilation byproducts Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 --- M .gitignore 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 766f495..095d598 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ osmopython.egg-info/ +*.pyc +build/ +dist/ -- To view, visit https://gerrit.osmocom.org/5483 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:06:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:06:18 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 7 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:06:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:06:43 +0000 Subject: [MERGED] osmo-msc[master]: libmsc: db.c: Replace dbi APIs marked as deprecated In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libmsc: db.c: Replace dbi APIs marked as deprecated ...................................................................... libmsc: db.c: Replace dbi APIs marked as deprecated Several warning messages about those APIs being deprecated were printed at compile time. Change-Id: I6052159acf240cc7e8e2b3a3af10d8210708ddb6 --- M src/libmsc/db.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 0104bce..0cb8ff3 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -47,6 +47,7 @@ static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; +static dbi_inst inst; #define SCHEMA_REVISION "5" @@ -611,9 +612,9 @@ int db_init(const char *name) { - dbi_initialize(NULL); + dbi_initialize_r(NULL, &inst); - conn = dbi_conn_new("sqlite3"); + conn = dbi_conn_new_r("sqlite3", inst); if (conn == NULL) { LOGP(DDB, LOGL_FATAL, "Failed to create connection.\n"); return 1; @@ -677,7 +678,7 @@ int db_fini(void) { dbi_conn_close(conn); - dbi_shutdown(); + dbi_shutdown_r(inst); free(db_dirname); free(db_basename); -- To view, visit https://gerrit.osmocom.org/5423 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6052159acf240cc7e8e2b3a3af10d8210708ddb6 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:07:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:07:20 +0000 Subject: osmo-ggsn[master]: ggsn_vty.c: Print ipv6 link-local cmd when writing config to... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08aeaa98d6dc318b7e9740d837ba4ac48cd7051c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:07:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:07:23 +0000 Subject: [MERGED] osmo-ggsn[master]: ggsn_vty.c: Print ipv6 link-local cmd when writing config to... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: ggsn_vty.c: Print ipv6 link-local cmd when writing config to file ...................................................................... ggsn_vty.c: Print ipv6 link-local cmd when writing config to file Previous commit added the ipv6 link-local vty cmd but forgot to add code to print its value in config_write_apn. Fixes: 37c45e3998fca240b5266abd3ac883d0a35bab50 Change-Id: I08aeaa98d6dc318b7e9740d837ba4ac48cd7051c --- M ggsn/ggsn_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c index db392fa..6ddfc0d 100644 --- a/ggsn/ggsn_vty.c +++ b/ggsn/ggsn_vty.c @@ -686,6 +686,8 @@ } if (apn->v6.cfg.ifconfig_prefix.addr.len) vty_dump_prefix(vty, " ipv6 ifconfig", &apn->v6.cfg.ifconfig_prefix); + if (apn->v6.cfg.ll_prefix.addr.len) + vty_dump_prefix(vty, " ipv6 link-local", &apn->v6.cfg.ll_prefix); /* must be last */ vty_out(vty, " %sshutdown%s", apn->cfg.shutdown ? "" : "no ", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08aeaa98d6dc318b7e9740d837ba4ac48cd7051c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:09:30 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:09:30 +0000 Subject: osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Patch Set 2: So ideally we should use smth which could be easily known to ctrl interface user. The problem with TLLI is that we might allocate and this happens after the context allocation which does rate counter allocation. One solution would be to defer rate counter allocation until we know TLLI although it would be more intrusive than current patch. Another option would be to use IMSI (maybe shortened to fit into index). -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:14:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:14:42 +0000 Subject: osmo-ttcn3-hacks[master]: GPRS/Gb: use generic linker In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5316/3/gprs_gb/.gitignore File gprs_gb/.gitignore: Line 1: # Add files to be ignored manually in here: I think we need to find an automatic solution for this, keeping manual lists of files is not going to work. My approach is to typically use ../rmlinks.sh before any 'git status' calls. Not sure if one can configure git to ignore all symlinks, which might be one solution. -- To view, visit https://gerrit.osmocom.org/5316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:14:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:14:50 +0000 Subject: [MERGED] osmo-msc[master]: cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* ...................................................................... cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_* These rx functions are only used for the A interface, hence the names should not suggest general SCCP rx (which Iu also has). Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351 --- M include/osmocom/msc/a_iface_bssap.h M src/libmsc/a_iface.c M src/libmsc/a_iface_bssap.c 3 files changed, 7 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/a_iface_bssap.h b/include/osmocom/msc/a_iface_bssap.h index 237c618..79b8390 100644 --- a/include/osmocom/msc/a_iface_bssap.h +++ b/include/osmocom/msc/a_iface_bssap.h @@ -34,8 +34,8 @@ }; /* Receive incoming connection less data messages via sccp */ -void sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); +void a_sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); /* Receive incoming connection oriented data messages via sccp */ -int sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); +int a_sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg); diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 29084d6..9dacca5 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -505,7 +505,7 @@ if (msgb_l2len(oph->msg) > 0) { LOGP(DMSC, LOGL_DEBUG, "N-CONNECT.ind(%u, %s)\n", scu_prim->u.connect.conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - rc = sccp_rx_dt(scu, &a_conn_info, oph->msg); + rc = a_sccp_rx_dt(scu, &a_conn_info, oph->msg); } else LOGP(DMSC, LOGL_DEBUG, "N-CONNECT.ind(%u)\n", scu_prim->u.connect.conn_id); @@ -517,7 +517,7 @@ a_conn_info.conn_id = scu_prim->u.data.conn_id; LOGP(DMSC, LOGL_DEBUG, "N-DATA.ind(%u, %s)\n", scu_prim->u.data.conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - sccp_rx_dt(scu, &a_conn_info, oph->msg); + a_sccp_rx_dt(scu, &a_conn_info, oph->msg); break; case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION): @@ -527,7 +527,7 @@ a_conn_info.bsc_addr = &scu_prim->u.unitdata.calling_addr; a_conn_info.reset = get_reset_ctx_by_sccp_addr(&scu_prim->u.unitdata.calling_addr); DEBUGP(DMSC, "N-UNITDATA.ind(%s)\n", osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); - sccp_rx_udt(scu, &a_conn_info, oph->msg); + a_sccp_rx_udt(scu, &a_conn_info, oph->msg); break; default: diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 8a1e39b..909a9f9 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -175,7 +175,7 @@ } /* Receive incoming connection less data messages via sccp */ -void sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) +void a_sccp_rx_udt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) { /* Note: The only valid message type that can be received * via UNITDATA are BSS Management messages */ @@ -690,7 +690,7 @@ } /* Handle incoming connection oriented messages */ -int sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) +int a_sccp_rx_dt(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg) { OSMO_ASSERT(scu); OSMO_ASSERT(a_conn_info); -- To view, visit https://gerrit.osmocom.org/5473 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6815c3d4dea4c2abfdff1cf0239ada6a9254f351 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:15:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:15:43 +0000 Subject: osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:16:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:16:09 +0000 Subject: osmo-sgsn[master]: gtphub: check for gsn_addr_from_sockaddr() errors In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5529 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6babdad650dc6a84e6a784fc8d3c5abe146ecc1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:17:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 16:17:36 +0000 Subject: osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Patch Set 2: we can use your current patch, but we should also add a new lookup helper so we can do GET foo.bar.imsi.901700123456789.rate_ctr.abs or something along those lines. The automatic "index" works fine for trx/bts/ts numbers in the BSC, but it doesn't work well with mm_contexts or the like. -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:52:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:52:03 +0000 Subject: [MERGED] osmo-sgsn[master]: Replace '.' in counter names with ':' In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Replace '.' in counter names with ':' ...................................................................... Replace '.' in counter names with ':' The '.' is illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208 --- M src/gprs/gb_proxy.c M src/gprs/gb_proxy_peer.c M src/gprs/gtphub.c 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 17a0109..6a9bc22 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -70,7 +70,7 @@ }; static const struct rate_ctr_group_desc global_ctrg_desc = { - .group_name_prefix = "gbproxy.global", + .group_name_prefix = "gbproxy:global", .group_description = "GBProxy Global Statistics", .num_ctr = ARRAY_SIZE(global_ctr_description), .ctr_desc = global_ctr_description, diff --git a/src/gprs/gb_proxy_peer.c b/src/gprs/gb_proxy_peer.c index 69cce3a..f2cdd93 100644 --- a/src/gprs/gb_proxy_peer.c +++ b/src/gprs/gb_proxy_peer.c @@ -73,7 +73,7 @@ osmo_static_assert(ARRAY_SIZE(peer_ctr_description) == GBPROX_PEER_CTR_LAST, everything_described); static const struct rate_ctr_group_desc peer_ctrg_desc = { - .group_name_prefix = "gbproxy.peer", + .group_name_prefix = "gbproxy:peer", .group_description = "GBProxy Peer Statistics", .num_ctr = ARRAY_SIZE(peer_ctr_description), .ctr_desc = peer_ctr_description, diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 7e3e663..5e962f2 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -125,7 +125,7 @@ }; static const struct rate_ctr_group_desc gtphub_ctrg_io_desc = { - .group_name_prefix = "gtphub.bind", + .group_name_prefix = "gtphub:bind", .group_description = "I/O Statistics", .num_ctr = ARRAY_SIZE(gtphub_counters_io_desc), .ctr_desc = gtphub_counters_io_desc, -- To view, visit https://gerrit.osmocom.org/5525 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208 Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:52:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:52:03 +0000 Subject: [MERGED] osmo-sgsn[master]: Remove dead code In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove dead code ...................................................................... Remove dead code Get rid of ifdefs around old unused code to improve readability. Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c --- M src/gprs/gprs_gmm.c 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index f26c22b..f07b806 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1339,9 +1339,6 @@ if (!ctx) ctx = sgsn_mm_ctx_by_imsi(mi_string); if (!ctx) { -#if 0 - return gsm48_tx_gmm_att_rej(msg, GMM_CAUSE_IMSI_UNKNOWN); -#else if (msg->dst) ctx = sgsn_mm_ctx_alloc_iu(msg->dst); else @@ -1351,7 +1348,6 @@ goto rejected; } osmo_strlcpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); -#endif } if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { ctx->gb.tlli = msgb_tlli(msg); -- To view, visit https://gerrit.osmocom.org/5526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia80cf845b624d520d67143b61c9de3d49074cb8c Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 20 16:55:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 16:55:23 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5158 to look at the new patch set (#6). TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 179 insertions(+), 79 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/5158/6 diff --git a/src/bts.cpp b/src/bts.cpp index b2af7aa..9e8a6c8 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -687,7 +687,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGPTBF(tbf, LOGL_DEBUG, "[UPLINK] START\n"); LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] RACH " "qbit-ta=%d ra=0x%02x, Fn=%d " diff --git a/src/tbf.cpp b/src/tbf.cpp index 18059ac..a5eedd9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -56,6 +57,14 @@ OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), { 0, NULL } +}; + +static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T3169), + OSMO_VALUE_STRING(T3191), + OSMO_VALUE_STRING(T3193), + OSMO_VALUE_STRING(T3195), + { 0, NULL } }; static const struct rate_ctr_desc tbf_ctr_description[] = { @@ -182,6 +191,7 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T31, 0, sizeof(T31)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -323,7 +333,7 @@ /* Clean up the old MS object */ /* TODO: Use timer? */ - if (old_ms->ul_tbf() && old_ms->ul_tbf()->T == 0) { + if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending(T_MAX)) { if (old_ms->ul_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -334,7 +344,7 @@ tbf_free(old_ms->ul_tbf()); } } - if (old_ms->dl_tbf() && old_ms->dl_tbf()->T == 0) { + if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending(T_MAX)) { if (old_ms->dl_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -393,7 +403,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -462,6 +472,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -547,9 +558,40 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { - return stop_timer("T3191"); + if (t >= T_MAX) { + LOGPTBF(this, LOGL_ERROR, "attempting to stop unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + if (osmo_timer_pending(&T31[t])) { + LOGPTBF(this, LOGL_DEBUG, "stopping timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + osmo_timer_del(&T31[t]); + } +} + +/* check if any of T31xx timer(s) are pending */ +bool gprs_rlcmac_tbf::timers_pending(enum tbf_timers t) +{ + uint8_t i; + + if (t != T_MAX) + return osmo_timer_pending(&T31[t]); + + for (i = T3169; i < T_MAX; i++) + if (osmo_timer_pending(&T31[i])) + return true; + + return false; +} + +void gprs_rlcmac_tbf::stop_timers(const char *reason) +{ + uint8_t i; + for (i = 0; i < T_MAX; i++) + t_stop((enum tbf_timers)i, reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -559,6 +601,60 @@ T, reason); osmo_timer_del(&timer); } +} + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) +{ + LOGPTBF(tbf, LOGL_NOTICE, "%s timeout expired, freeing TBF\n", + get_value_string(tbf_timers_names, t)); + + if (run_diag) + tbf->rlcmac_diag(); + + tbf_free(tbf); +} + +#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); } + +T_CBACK(T3169, true) +T_CBACK(T3191, true) +T_CBACK(T3193, false) +T_CBACK(T3195, true) + +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +{ + if (t >= T_MAX) { + LOGPTBF(this, LOGL_ERROR, "attempting to start unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + if (!force && osmo_timer_pending(&T31[t])) + return; + + LOGPTBF(this, LOGL_DEBUG, "%sstarting timer %s [%s] with %u sec. %u microsec.\n", + osmo_timer_pending(&T31[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); + + T31[t].data = this; + + switch(t) { + case T3169: + T31[t].cb = cb_T3169; + break; + case T3191: + T31[t].cb = cb_T3191; + break; + case T3193: + T31[t].cb = cb_T3193; + break; + case T3195: + T31[t].cb = cb_T3195; + break; + default: + LOGPTBF(this, LOGL_ERROR, "attempting to set callback for unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + osmo_timer_schedule(&T31[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -658,7 +754,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -680,7 +776,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -702,7 +798,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -728,7 +824,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -999,64 +1095,47 @@ { LOGPTBF(this, LOGL_DEBUG, "timer %u expired.\n", T); - switch (T) { - case 0: /* assignment */ - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { - if (state_is(GPRS_RLCMAC_ASSIGN)) { - LOGPTBF(this, LOGL_NOTICE, - "releasing due to PACCH assignment timeout.\n"); - tbf_free(this); - return; - } else - LOGPTBF(this, LOGL_ERROR, - "Error: TBF is not in assign state\n"); - } - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { - gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); - dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { - tbf_assign_control_ts(dl_tbf); - - if (!dl_tbf->upgrade_to_multislot) { - /* change state to FLOW, so scheduler - * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); - break; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - dl_tbf->update(); - - dl_tbf->trigger_ass(dl_tbf); - } else - LOGPTBF(dl_tbf, LOGL_NOTICE, - "Continue flow after IMM.ASS confirm\n"); - } - break; - case 3169: - case 3191: - case 3195: - LOGPTBF(this, LOGL_NOTICE, "T%d timeout during " - "transsmission\n", T); - rlcmac_diag(); - /* fall through */ - case 3193: - LOGP(DRLCMAC, LOGL_DEBUG, - "%s will be freed due to timeout\n", tbf_name(this)); - /* free TBF */ - tbf_free(this); + if (T) { + LOGPTBF(this, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", T); return; - break; - default: - LOGP(DRLCMAC, LOGL_ERROR, - "%s timer expired in unknown mode: %u\n", tbf_name(this), T); + } + + /* assignment */ + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { + if (state_is(GPRS_RLCMAC_ASSIGN)) { + LOGPTBF(this, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); + tbf_free(this); + return; + } else + LOGPTBF(this, LOGL_ERROR, "Error: TBF is not in assign state\n"); + } + + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); + dl_tbf->m_wait_confirm = 0; + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { + tbf_assign_control_ts(dl_tbf); + + if (!dl_tbf->upgrade_to_multislot) { + /* change state to FLOW, so scheduler + * will start transmission */ + dl_tbf->set_state(GPRS_RLCMAC_FLOW); + return; + } + + /* This tbf can be upgraded to use multiple DL + * timeslots and now that there is already one + * slot assigned send another DL assignment via + * PDCH. */ + + /* keep to flags */ + dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + dl_tbf->update(); + + dl_tbf->trigger_ass(dl_tbf); + } else + LOGPTBF(dl_tbf, LOGL_NOTICE, "Continue flow after IMM.ASS confirm\n"); } } diff --git a/src/tbf.h b/src/tbf.h index 15d414d..06c9f60 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -138,6 +138,24 @@ #define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DRLCMACUL, level, "%s " fmt, tbf_name(tbf), ## args) #define LOGPTBFDL(tbf, level, fmt, args...) LOGP(DRLCMACDL, level, "%s " fmt, tbf_name(tbf), ## args) +enum tbf_timers { + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + T3169, + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + T3191, + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + T3193, + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + T3195, + T_MAX +}; + #define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */ #define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */ #define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */ @@ -177,7 +195,10 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + bool timers_pending(enum tbf_timers t); + void t_stop(enum tbf_timers t, const char *reason); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -305,7 +326,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - + struct osmo_timer_list T31[T_MAX]; mutable char m_name_buf[60]; }; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 0bcb67b..b043989 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -216,9 +216,9 @@ } /* Clean up the old MS object */ /* TODO: Put this into a separate function, use timer? */ - if (ms_old->ul_tbf() && ms_old->ul_tbf()->T == 0) + if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->ul_tbf()); - if (ms_old->dl_tbf() && ms_old->dl_tbf()->T == 0) + if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->dl_tbf()); ms->merge_old_ms(ms_old); @@ -485,6 +485,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -651,7 +652,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + t_stop(T3191, "ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -854,7 +855,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1116,9 +1117,8 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - tbf_timer_start(this, 3193, - bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + "release (DL-TBF)", true); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 09ee1f0..8e4e57e 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -191,7 +191,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..18bbc76 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,9 +51,9 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(tbf->timers_pending(T3191) || tbf->timers_pending(T3193)); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) - OSMO_ASSERT(tbf->T != 0); + OSMO_ASSERT(tbf->timers_pending(T_MAX)); } static void test_tbf_base() -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 20 17:03:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 17:03:03 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5182 to look at the new patch set (#5). TBF: add N3101 counter Properly reset the counter when receiving valid RLCMAC block and update it when no data is received as per 3GPP TS 44.060 ?8.1.1.1 Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Fixes: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h 3 files changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/5182/5 diff --git a/src/bts.cpp b/src/bts.cpp index 9e8a6c8..867658e 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -996,6 +996,10 @@ ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] Packet Control Ack\n"); @@ -1185,6 +1189,9 @@ return; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + if (tbf->handle_ack_nack()) LOGPTBF(tbf, LOGL_NOTICE, "Recovered downlink ack\n"); @@ -1248,6 +1255,9 @@ "wrong TFI=%d, ignoring!\n", tfi); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; if (tbf->handle_ack_nack()) LOGPTBF(tbf, LOGL_NOTICE, "Recovered EGPRS downlink ack\n"); @@ -1417,6 +1427,9 @@ } LOGPTBFDL(dl_tbf, LOGL_ERROR, "RX: [PCU <- BTS] FIXME: Packet resource request\n"); + + /* Reset N3101 counter: */ + dl_tbf->m_n3101 = 0; } else { struct gprs_rlcmac_ul_tbf *ul_tbf; int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI; @@ -1427,6 +1440,9 @@ } LOGPTBFUL(ul_tbf, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n"); + + /* Reset N3101 counter: */ + ul_tbf->m_n3101 = 0; } } @@ -1579,6 +1595,9 @@ return 0; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas); } diff --git a/src/tbf.cpp b/src/tbf.cpp index a5eedd9..dc0777f 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -177,6 +177,7 @@ was_releasing(0), upgrade_to_multislot(0), bts(bts_), + m_n3101(0), m_tfi(0), m_created_ts(0), m_ctrs(NULL), @@ -740,6 +741,14 @@ poll_state = GPRS_RLCMAC_POLL_NONE; + m_n3101++; + if (m_n3101 == bts->bts_data()->n3101) { + LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); + set_state(GPRS_RLCMAC_RELEASING); + t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + return; + } + if (ul_tbf && ul_tbf->handle_ctrl_ack()) { if (!ul_tbf->ctrl_ack_to_toggle()) { LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK\n"); diff --git a/src/tbf.h b/src/tbf.h index 06c9f60..4489695 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -296,6 +296,8 @@ /* store the BTS this TBF belongs to */ BTS *bts; + uint8_t m_n3101; /* N3101 counter */ + /* * private fields. We can't make it private as it is breaking the * llist macros. -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 17:09:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 20 Dec 2017 17:09:55 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: unify timer handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5234 to look at the new patch set (#3). TBF: unify timer handling Use generic timer handling infrastracture to handle assignment/reject internal timer as well. Rename timer array accordingly. Use defines with explicit second/microsecond values to make it more readable. Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 4 files changed, 32 insertions(+), 68 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5234/3 diff --git a/src/bts.cpp b/src/bts.cpp index 867658e..8a8ed02 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -554,7 +554,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); + dl_tbf->t_start(T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); return 0; } @@ -1041,7 +1041,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer("control acked (DL-TBF)"); + new_tbf->t_stop(T0, "control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index dc0777f..ea27597 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -60,6 +60,7 @@ }; static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T0), OSMO_VALUE_STRING(T3169), OSMO_VALUE_STRING(T3191), OSMO_VALUE_STRING(T3193), @@ -170,7 +171,6 @@ poll_fn(0), poll_ts(0), n3105(0), - T(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -191,8 +191,7 @@ /* The classes of these members do not have proper constructors yet. * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); - memset(&timer, 0, sizeof(timer)); - memset(&T31, 0, sizeof(T31)); + memset(&T, 0, sizeof(T)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -472,7 +471,7 @@ "be sure not to free in this state. PLEASE FIX!\n", get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); @@ -538,27 +537,6 @@ "RELEASING", }; -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason) -{ - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, - "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); - - if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); - - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); - - tbf->T = T; - - /* Tunning timers can be safely re-scheduled. */ - tbf->timer.data = tbf; - tbf->timer.cb = &tbf_timer_cb; - - osmo_timer_schedule(&tbf->timer, seconds, microseconds); -} - void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { if (t >= T_MAX) { @@ -579,10 +557,11 @@ uint8_t i; if (t != T_MAX) - return osmo_timer_pending(&T31[t]); + return osmo_timer_pending(&T[t]); + /* we don't start with T0 because it's internal timer which requires special handling */ for (i = T3169; i < T_MAX; i++) - if (osmo_timer_pending(&T31[i])) + if (osmo_timer_pending(&T[i])) return true; return false; @@ -591,17 +570,9 @@ void gprs_rlcmac_tbf::stop_timers(const char *reason) { uint8_t i; - for (i = 0; i < T_MAX; i++) + /* we start with T0 because timer reset does not require any special handling */ + for (i = T0; i < T_MAX; i++) t_stop((enum tbf_timers)i, reason); -} - -void gprs_rlcmac_tbf::stop_timer(const char *reason) -{ - if (osmo_timer_pending(&timer)) { - LOGPTBF(this, LOGL_DEBUG, "stopping timer T%u [%s]\n", - T, reason); - osmo_timer_del(&timer); - } } static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) @@ -629,33 +600,36 @@ get_value_string(tbf_timers_names, t), reason); } - if (!force && osmo_timer_pending(&T31[t])) + if (!force && osmo_timer_pending(&T[t])) return; LOGPTBF(this, LOGL_DEBUG, "%sstarting timer %s [%s] with %u sec. %u microsec.\n", - osmo_timer_pending(&T31[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); + osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); - T31[t].data = this; + T[t].data = this; switch(t) { + case T0: + T[t].cb = tbf_timer_cb; + break; case T3169: - T31[t].cb = cb_T3169; + T[t].cb = cb_T3169; break; case T3191: - T31[t].cb = cb_T3191; + T[t].cb = cb_T3191; break; case T3193: - T31[t].cb = cb_T3193; + T[t].cb = cb_T3193; break; case T3195: - T31[t].cb = cb_T3195; + T[t].cb = cb_T3195; break; default: LOGPTBF(this, LOGL_ERROR, "attempting to set callback for unknown timer %s [%s]\n", get_value_string(tbf_timers_names, t), reason); } - osmo_timer_schedule(&T31[t], sec, microsec); + osmo_timer_schedule(&T[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -1102,12 +1076,7 @@ void gprs_rlcmac_tbf::handle_timeout() { - LOGPTBF(this, LOGL_DEBUG, "timer %u expired.\n", T); - - if (T) { - LOGPTBF(this, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", T); - return; - } + LOGPTBF(this, LOGL_DEBUG, "timer 0 expired.\n"); /* assignment */ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { @@ -1267,7 +1236,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer("assignment (DL-TBF)"); + new_dl_tbf->t_stop(T0, "assignment (DL-TBF)"); } @@ -1297,7 +1266,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); + t_start(T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index 4489695..88f5d6a 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -39,9 +39,9 @@ * TBF instance */ -#define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */ -#define Tassign_pacch 2,0 /* timeout for pacch assigment */ -#define Treject_pacch 0,2000 /* timeout for tbf reject for PRR*/ +#define T_ASS_AGCH_USEC 200000 /* waiting after IMM.ASS confirm */ +#define T_ASS_PACCH_SEC 2 /* timeout for pacch assigment */ +#define T_REJ_PACCH_USEC 2000 /* timeout for tbf reject for PRR*/ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ @@ -139,6 +139,9 @@ #define LOGPTBFDL(tbf, level, fmt, args...) LOGP(DRLCMACDL, level, "%s " fmt, tbf_name(tbf), ## args) enum tbf_timers { + /* internal assign/reject timer */ + T0, + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ T3169, @@ -194,7 +197,6 @@ int update(); void handle_timeout(); - void stop_timer(const char *reason); void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); @@ -266,9 +268,6 @@ gprs_rlc m_rlc; uint8_t n3105; /* N3105 counter */ - - struct osmo_timer_list timer; - unsigned int T; /* Txxxx number */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ @@ -328,7 +327,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - struct osmo_timer_list T31[T_MAX]; + struct osmo_timer_list T[T_MAX]; mutable char m_name_buf[60]; }; @@ -351,9 +350,6 @@ GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); - -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index b043989..33eb75b 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -484,7 +484,6 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer("assignment (DL-TBF)"); stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ @@ -499,7 +498,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); + t_start(T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); } else { LOGPTBFDL(this, LOGL_DEBUG, "Send dowlink assignment on PCH, no TBF exist (IMSI=%s)\n", imsi()); -- To view, visit https://gerrit.osmocom.org/5234 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 20:00:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 20:00:28 +0000 Subject: osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 20:02:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 20:02:02 +0000 Subject: osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 20:02:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 20:02:10 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: implement independent T31xx timers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TBF: implement independent T31xx timers ...................................................................... TBF: implement independent T31xx timers Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ?13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 179 insertions(+), 79 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index b2af7aa..9e8a6c8 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -687,7 +687,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf_timer_start(tbf, 3169, m_bts.t3169, 0, "RACH (new UL-TBF)"); + tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGPTBF(tbf, LOGL_DEBUG, "[UPLINK] START\n"); LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] RACH " "qbit-ta=%d ra=0x%02x, Fn=%d " diff --git a/src/tbf.cpp b/src/tbf.cpp index 18059ac..a5eedd9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -32,6 +32,7 @@ extern "C" { #include +#include #include #include } @@ -56,6 +57,14 @@ OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ), OSMO_VALUE_STRING(GPRS_RLCMAC_UL_ASS_WAIT_ACK), { 0, NULL } +}; + +static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T3169), + OSMO_VALUE_STRING(T3191), + OSMO_VALUE_STRING(T3193), + OSMO_VALUE_STRING(T3195), + { 0, NULL } }; static const struct rate_ctr_desc tbf_ctr_description[] = { @@ -182,6 +191,7 @@ * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); memset(&timer, 0, sizeof(timer)); + memset(&T31, 0, sizeof(T31)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -323,7 +333,7 @@ /* Clean up the old MS object */ /* TODO: Use timer? */ - if (old_ms->ul_tbf() && old_ms->ul_tbf()->T == 0) { + if (old_ms->ul_tbf() && !old_ms->ul_tbf()->timers_pending(T_MAX)) { if (old_ms->ul_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -334,7 +344,7 @@ tbf_free(old_ms->ul_tbf()); } } - if (old_ms->dl_tbf() && old_ms->dl_tbf()->T == 0) { + if (old_ms->dl_tbf() && !old_ms->dl_tbf()->timers_pending(T_MAX)) { if (old_ms->dl_tbf() == this) { LOGP(DRLCMAC, LOGL_ERROR, "%s is referred by the old MS " @@ -393,7 +403,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf_timer_start(tbf, 3169, bts->t3169, 0, "allocation (UL-TBF)"); + tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -462,6 +472,7 @@ get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); llist_del(&tbf->list()); @@ -547,9 +558,40 @@ osmo_timer_schedule(&tbf->timer, seconds, microseconds); } -void gprs_rlcmac_tbf::stop_t3191() +void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { - return stop_timer("T3191"); + if (t >= T_MAX) { + LOGPTBF(this, LOGL_ERROR, "attempting to stop unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + if (osmo_timer_pending(&T31[t])) { + LOGPTBF(this, LOGL_DEBUG, "stopping timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + osmo_timer_del(&T31[t]); + } +} + +/* check if any of T31xx timer(s) are pending */ +bool gprs_rlcmac_tbf::timers_pending(enum tbf_timers t) +{ + uint8_t i; + + if (t != T_MAX) + return osmo_timer_pending(&T31[t]); + + for (i = T3169; i < T_MAX; i++) + if (osmo_timer_pending(&T31[i])) + return true; + + return false; +} + +void gprs_rlcmac_tbf::stop_timers(const char *reason) +{ + uint8_t i; + for (i = 0; i < T_MAX; i++) + t_stop((enum tbf_timers)i, reason); } void gprs_rlcmac_tbf::stop_timer(const char *reason) @@ -559,6 +601,60 @@ T, reason); osmo_timer_del(&timer); } +} + +static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) +{ + LOGPTBF(tbf, LOGL_NOTICE, "%s timeout expired, freeing TBF\n", + get_value_string(tbf_timers_names, t)); + + if (run_diag) + tbf->rlcmac_diag(); + + tbf_free(tbf); +} + +#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); } + +T_CBACK(T3169, true) +T_CBACK(T3191, true) +T_CBACK(T3193, false) +T_CBACK(T3195, true) + +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +{ + if (t >= T_MAX) { + LOGPTBF(this, LOGL_ERROR, "attempting to start unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + if (!force && osmo_timer_pending(&T31[t])) + return; + + LOGPTBF(this, LOGL_DEBUG, "%sstarting timer %s [%s] with %u sec. %u microsec.\n", + osmo_timer_pending(&T31[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); + + T31[t].data = this; + + switch(t) { + case T3169: + T31[t].cb = cb_T3169; + break; + case T3191: + T31[t].cb = cb_T3191; + break; + case T3193: + T31[t].cb = cb_T3193; + break; + case T3195: + T31[t].cb = cb_T3195; + break; + default: + LOGPTBF(this, LOGL_ERROR, "attempting to set callback for unknown timer %s [%s]\n", + get_value_string(tbf_timers_names, t), reason); + } + + osmo_timer_schedule(&T31[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -658,7 +754,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached"); + ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -680,7 +776,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -702,7 +798,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(this, 3195, bts_data()->t3195, 0, "MAX N3105 reached"); + t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -728,7 +824,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached"); + dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -999,64 +1095,47 @@ { LOGPTBF(this, LOGL_DEBUG, "timer %u expired.\n", T); - switch (T) { - case 0: /* assignment */ - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { - if (state_is(GPRS_RLCMAC_ASSIGN)) { - LOGPTBF(this, LOGL_NOTICE, - "releasing due to PACCH assignment timeout.\n"); - tbf_free(this); - return; - } else - LOGPTBF(this, LOGL_ERROR, - "Error: TBF is not in assign state\n"); - } - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { - gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); - dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { - tbf_assign_control_ts(dl_tbf); - - if (!dl_tbf->upgrade_to_multislot) { - /* change state to FLOW, so scheduler - * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); - break; - } - - /* This tbf can be upgraded to use multiple DL - * timeslots and now that there is already one - * slot assigned send another DL assignment via - * PDCH. */ - - /* keep to flags */ - dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; - - dl_tbf->update(); - - dl_tbf->trigger_ass(dl_tbf); - } else - LOGPTBF(dl_tbf, LOGL_NOTICE, - "Continue flow after IMM.ASS confirm\n"); - } - break; - case 3169: - case 3191: - case 3195: - LOGPTBF(this, LOGL_NOTICE, "T%d timeout during " - "transsmission\n", T); - rlcmac_diag(); - /* fall through */ - case 3193: - LOGP(DRLCMAC, LOGL_DEBUG, - "%s will be freed due to timeout\n", tbf_name(this)); - /* free TBF */ - tbf_free(this); + if (T) { + LOGPTBF(this, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", T); return; - break; - default: - LOGP(DRLCMAC, LOGL_ERROR, - "%s timer expired in unknown mode: %u\n", tbf_name(this), T); + } + + /* assignment */ + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { + if (state_is(GPRS_RLCMAC_ASSIGN)) { + LOGPTBF(this, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); + tbf_free(this); + return; + } else + LOGPTBF(this, LOGL_ERROR, "Error: TBF is not in assign state\n"); + } + + if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); + dl_tbf->m_wait_confirm = 0; + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { + tbf_assign_control_ts(dl_tbf); + + if (!dl_tbf->upgrade_to_multislot) { + /* change state to FLOW, so scheduler + * will start transmission */ + dl_tbf->set_state(GPRS_RLCMAC_FLOW); + return; + } + + /* This tbf can be upgraded to use multiple DL + * timeslots and now that there is already one + * slot assigned send another DL assignment via + * PDCH. */ + + /* keep to flags */ + dl_tbf->state_flags &= GPRS_RLCMAC_FLAG_TO_MASK; + + dl_tbf->update(); + + dl_tbf->trigger_ass(dl_tbf); + } else + LOGPTBF(dl_tbf, LOGL_NOTICE, "Continue flow after IMM.ASS confirm\n"); } } diff --git a/src/tbf.h b/src/tbf.h index 15d414d..06c9f60 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -138,6 +138,24 @@ #define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DRLCMACUL, level, "%s " fmt, tbf_name(tbf), ## args) #define LOGPTBFDL(tbf, level, fmt, args...) LOGP(DRLCMACDL, level, "%s " fmt, tbf_name(tbf), ## args) +enum tbf_timers { + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ + T3169, + + /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF. + Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */ + T3191, + + /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the + MS for this TBF. */ + T3193, + + /* Wait for reuse of TFI(s) when there is no response from the MS + (radio failure or cell change) for this TBF/MBMS radio bearer. */ + T3195, + T_MAX +}; + #define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */ #define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */ #define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */ @@ -177,7 +195,10 @@ int update(); void handle_timeout(); void stop_timer(const char *reason); - void stop_t3191(); + void stop_timers(const char *reason); + bool timers_pending(enum tbf_timers t); + void t_stop(enum tbf_timers t, const char *reason); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, @@ -305,7 +326,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - + struct osmo_timer_list T31[T_MAX]; mutable char m_name_buf[60]; }; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 0bcb67b..b043989 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -216,9 +216,9 @@ } /* Clean up the old MS object */ /* TODO: Put this into a separate function, use timer? */ - if (ms_old->ul_tbf() && ms_old->ul_tbf()->T == 0) + if (ms_old->ul_tbf() && !ms_old->ul_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->ul_tbf()); - if (ms_old->dl_tbf() && ms_old->dl_tbf()->T == 0) + if (ms_old->dl_tbf() && !ms_old->dl_tbf()->timers_pending(T_MAX)) tbf_free(ms_old->dl_tbf()); ms->merge_old_ms(ms_old); @@ -485,6 +485,7 @@ { /* stop pending timer */ stop_timer("assignment (DL-TBF)"); + stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ if (old_tbf) { @@ -651,7 +652,7 @@ /* reset N3105 */ n3105 = 0; - stop_t3191(); + t_stop(T3191, "ACK/NACK received"); poll_state = GPRS_RLCMAC_POLL_NONE; return ack_recovered; @@ -854,7 +855,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - tbf_timer_start(this, 3191, bts_data()->t3191, 0, "final block (DL-TBF)"); + t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1116,9 +1117,8 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - tbf_timer_start(this, 3193, - bts_data()->t3193_msec / 1000, - (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)"); + t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + "release (DL-TBF)", true); /* reset rlc states */ m_tx_counter = 0; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 09ee1f0..8e4e57e 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -191,7 +191,7 @@ unsigned int block_idx; /* restart T3169 */ - tbf_timer_start(this, 3169, bts_data()->t3169, 0, "acked (data)"); + t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index d4b51fe..18bbc76 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -51,9 +51,9 @@ { OSMO_ASSERT(tbf); if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE)) - OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193); + OSMO_ASSERT(tbf->timers_pending(T3191) || tbf->timers_pending(T3193)); if (tbf->state_is(GPRS_RLCMAC_RELEASING)) - OSMO_ASSERT(tbf->T != 0); + OSMO_ASSERT(tbf->timers_pending(T_MAX)); } static void test_tbf_base() -- To view, visit https://gerrit.osmocom.org/5158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0305873ca47534f53441247217881da59625e1f7 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Wed Dec 20 20:02:11 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 20 Dec 2017 20:02:11 +0000 Subject: [MERGED] osmo-pcu[master]: TBF: add N3101 counter In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TBF: add N3101 counter ...................................................................... TBF: add N3101 counter Properly reset the counter when receiving valid RLCMAC block and update it when no data is received as per 3GPP TS 44.060 ?8.1.1.1 Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Fixes: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h 3 files changed, 30 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 9e8a6c8..867658e 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -996,6 +996,10 @@ ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None"); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] Packet Control Ack\n"); @@ -1185,6 +1189,9 @@ return; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + if (tbf->handle_ack_nack()) LOGPTBF(tbf, LOGL_NOTICE, "Recovered downlink ack\n"); @@ -1248,6 +1255,9 @@ "wrong TFI=%d, ignoring!\n", tfi); return; } + + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; if (tbf->handle_ack_nack()) LOGPTBF(tbf, LOGL_NOTICE, "Recovered EGPRS downlink ack\n"); @@ -1417,6 +1427,9 @@ } LOGPTBFDL(dl_tbf, LOGL_ERROR, "RX: [PCU <- BTS] FIXME: Packet resource request\n"); + + /* Reset N3101 counter: */ + dl_tbf->m_n3101 = 0; } else { struct gprs_rlcmac_ul_tbf *ul_tbf; int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI; @@ -1427,6 +1440,9 @@ } LOGPTBFUL(ul_tbf, LOGL_ERROR, "RX: [PCU <- BTS] %s FIXME: Packet resource request\n"); + + /* Reset N3101 counter: */ + ul_tbf->m_n3101 = 0; } } @@ -1579,6 +1595,9 @@ return 0; } + /* Reset N3101 counter: */ + tbf->m_n3101 = 0; + return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas); } diff --git a/src/tbf.cpp b/src/tbf.cpp index a5eedd9..dc0777f 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -177,6 +177,7 @@ was_releasing(0), upgrade_to_multislot(0), bts(bts_), + m_n3101(0), m_tfi(0), m_created_ts(0), m_ctrs(NULL), @@ -740,6 +741,14 @@ poll_state = GPRS_RLCMAC_POLL_NONE; + m_n3101++; + if (m_n3101 == bts->bts_data()->n3101) { + LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); + set_state(GPRS_RLCMAC_RELEASING); + t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + return; + } + if (ul_tbf && ul_tbf->handle_ctrl_ack()) { if (!ul_tbf->ctrl_ack_to_toggle()) { LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK\n"); diff --git a/src/tbf.h b/src/tbf.h index 06c9f60..4489695 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -296,6 +296,8 @@ /* store the BTS this TBF belongs to */ BTS *bts; + uint8_t m_n3101; /* N3101 counter */ + /* * private fields. We can't make it private as it is breaking the * llist macros. -- To view, visit https://gerrit.osmocom.org/5182 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 20 22:00:18 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 20 Dec 2017 22:00:18 +0000 Subject: osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and parti... In-Reply-To: References: Message-ID: Patch Set 1: Hi Max, > That's really huge. Could you perhaps split it into several smaller > commits with more detailed description? This would be much easier > to review and merge. agree with you, but as indicated here: http://lists.osmocom.org/pipermail/baseband-devel/2017-December/005464.html > The person who was working with us on the handover > code had left and we were not in the position to > upload the code at that time. So, I think this patch will remain unchanged until somebody with strong interest in handover will come and clean up / split the code. For now, it makes sense to cherry-pick this change into a separate branch as is. What do you think? -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Muhammad Awais Aslam Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Dec 20 22:08:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 22:08:01 +0000 Subject: [PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5463 to look at the new patch set (#4). fix paging: add timeout to discard unsuccessful paging Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/vlr.h M src/libcommon-cs/common_cs.c M src/libmsc/gsm_subscriber.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 7 files changed, 298 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/5463/4 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 6349fe0..1b0bff9 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,6 +344,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; +#define MSC_PAGING_RESPONSE_TIMER_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -408,6 +409,7 @@ unsigned int num_bts; struct llist_head bts_list; + unsigned int paging_response_timer; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b625608..1b365a9 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -157,6 +157,7 @@ struct { /* pending requests */ bool is_paging; + struct osmo_timer_list paging_response_timer; /* list of struct subscr_request */ struct llist_head requests; uint8_t lac; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index bad8262..4748865 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -60,6 +60,8 @@ /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; + net->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index a013e0e..b3d38d1 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -76,7 +76,10 @@ return -EINVAL; } - if (event == GSM_PAGING_SUCCEEDED) + osmo_timer_del(&vsub->cs.paging_response_timer); + + if (event == GSM_PAGING_SUCCEEDED + || event == GSM_PAGING_EXPIRED) msc_stop_paging(vsub); /* Inform parts of the system we don't know */ @@ -126,6 +129,12 @@ return -EINVAL; } +static void paging_response_timer_cb(void *data) +{ + struct vlr_subscr *vsub = data; + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); +} + /*! \brief Start a paging request for vsub, call cbfn(param) when done. * \param vsub subscriber to page. * \param cbfn function to call when the conn is established. @@ -138,6 +147,7 @@ { int rc; struct subscr_request *request; + struct gsm_network *net = vsub->vlr->user_ctx; /* Start paging.. we know it is async so we can do it before */ if (!vsub->cs.is_paging) { @@ -152,6 +162,8 @@ /* reduced on the first paging callback */ vlr_subscr_get(vsub); vsub->cs.is_paging = true; + osmo_timer_setup(&vsub->cs.paging_response_timer, paging_response_timer_cb, vsub); + osmo_timer_schedule(&vsub->cs.paging_response_timer, net->paging_response_timer, 0); } else { LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n", vlr_subscr_name(vsub)); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 14ad19e..c1c9f6b 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -109,6 +109,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd, + "paging response-timer (default|<1-65535>)", + "Configure Paging\n" + "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards" + " BSS or RNC\n" + "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_RESPONSE_TIMER_DEFAULT) " seconds)\n" + "Set paging timeout in seconds\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (!strcmp(argv[1], "default")) + gsmnet->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT; + else + gsmnet->paging_response_timer = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -129,6 +145,9 @@ if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error) vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); + + if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT) + vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE); mgcp_client_config_write(vty, " "); #ifdef BUILD_IU @@ -186,6 +205,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); + install_element(MSC_NODE, &cfg_msc_paging_response_timer_cmd); mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); #ifdef BUILD_IU diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index d8a3a31..4e0e27d 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,8 +182,101 @@ comment_end(); } +void test_ms_timeout_paging() +{ + struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; + + rx_from_ran = RAN_GERAN_A; + + comment_start(); + + fake_time_start(); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0"); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1", + "12010809710000004026f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0", NULL); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + EXPECT_CONN_COUNT(0); + + BTW("an SMS is sent, MS is paged"); + paging_expect_imsi(imsi); + paging_sent = false; + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("time passes and no paging result is received"); + + fake_time_passes(MSC_PAGING_RESPONSE_TIMER_DEFAULT - 1, 0); + + btw("the paging timeout has not yet expired"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == true, "%d"); + btw("another request is added to the list but does not cause another paging"); + paging_sent = false; + paging_expect_imsi(NULL); + send_sms(vsub, vsub, + "One paging ought to be enough for anyone."); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 2, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == false, "%d"); + + btw("the paging timeout expires, the paging as well as the requests are canceled"); + fake_time_passes(2, 0); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + + BTW("subscriber detaches"); + expect_bssap_clear(); + ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(!vsub); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_ms_timeout_lu_auth_resp, test_ms_timeout_cm_auth_resp, + test_ms_timeout_paging, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 50f60fd..c8b7e96 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -337,6 +337,173 @@ full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 +===== test_ms_timeout_paging +- Total time passed: 0.000000 s +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH +DMM LU/new-LAC: 1/23 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0 +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000004620: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 +DVLR GSUP rx 17: 10010809710000004026f00804036470f1 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR GSUP tx: 12010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 +DVLR GSUP rx 11: 06010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:46071, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:46071: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:46071: Freeing subscriber connection +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +--- +- an SMS is sent, MS is paged +DREF VLR subscr MSISDN:46071 usage increases to: 2 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- time passes and no paging result is received +- Total time passed: 9.000000 s +- the paging timeout has not yet expired + paging_stopped == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + vsub->cs.is_paging == 1 +- another request is added to the list but does not cause another paging +DREF VLR subscr MSISDN:46071 usage increases to: 5 +DMM Subscriber MSISDN:46071 already paged. + llist_count(&vsub->cs.requests) == 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 4 + paging_sent == 0 +- the paging timeout expires, the paging as well as the requests are canceled +- Total time passed: 11.000000 s +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 + paging_stopped == 1 +DREF VLR subscr MSISDN:46071 usage increases to: 2 + vsub->cs.is_paging == 0 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +--- +- subscriber detaches + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) +DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DMM IMSI DETACH for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 +DMM msc_subscr_conn_close(vsub=unknown, cause=0): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF unknown: MSC conn use - compl_l3 == 0 (0x0) +DRLL Freeing subscriber connection with NULL subscriber + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +===== test_ms_timeout_paging: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 22:34:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 22:34:45 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: hnb info: record MCC, MNC, show on 'show hnb' Message-ID: Review at https://gerrit.osmocom.org/5530 hnbgw: hnb info: record MCC, MNC, show on 'show hnb' Before, MCC and MNC were always reported as zero, now the output of 'show hnb all' looks like: OsmoHNBGW> show hnb all HNB "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 11111 RAC 99 SAC 65535 CID 1048575 HNBAP ID 0 RUA ID 0 Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b --- M src/Makefile.am M src/hnbgw_hnbap.c 2 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/30/5530/1 diff --git a/src/Makefile.am b/src/Makefile.am index ab772a4..85bfad6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 7c1e239..058a42a 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -380,8 +380,7 @@ ctx->id.sac = asn1str_to_u16(&ies.sac); ctx->id.rac = asn1str_to_u8(&ies.rac); ctx->id.cid = asn1bitstr_to_u28(&ies.cellIdentity); - //ctx->id.mcc FIXME - //ctx->id.mnc FIXME + gsm48_mcc_mnc_from_bcd(ies.plmNidentity.buf, &ctx->id.mcc, &ctx->id.mnc); DEBUGP(DHNBAP, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); -- To view, visit https://gerrit.osmocom.org/5530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 20 22:34:45 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 20 Dec 2017 22:34:45 +0000 Subject: [PATCH] osmo-iuh[master]: hnbap, rua, ranap decode: fix segfault on decode error Message-ID: Review at https://gerrit.osmocom.org/5531 hnbap,rua,ranap decode: fix segfault on decode error Looking at hnbap_decode_hnbregisterrequesties(), I noticed a segfault if decoding the HNB Register Request PDU fails, which is due to an unchecked return value in code generated by asn1tostruct.py. Add return value and NULL pointer checks and hence fix null dereference on erratic PDUs across HNBAP, RUA and RANAP protocols. Similar checks exist in other places, this one was simply missing. Since the result of asn1tostruct.py is not committed, here is an example diff of the resulting change, of which there are 128 instances in total: @@ -304,7 +329,12 @@ memset(hnbRegisterRequestIEs, 0, sizeof(HNBRegisterRequestIEs_t)); HNBAP_DEBUG("Decoding message HNBRegisterRequestIEs (%s:%d)\n", __FILE__, __LINE__); - ANY_to_type_aper(any_p, &asn_DEF_HNBRegisterRequest, (void**)&hNBRegisterRequest_p); + tempDecoded = ANY_to_type_aper(any_p, &asn_DEF_HNBRegisterRequest, (void**)&hNBRegisterRequest_p); + + if (tempDecoded < 0 || hNBRegisterRequest_p == NULL) { + HNBAP_DEBUG("Decoding of message HNBRegisterRequestIEs failed\n"); + return -1; + } for (i = 0; i < hNBRegisterRequest_p->hnbRegisterRequest_ies.list.count; i++) { IE_t *ie_p; Change-Id: I6cb9cc9a88d22f03befa43f0968a874476fa079d --- M asn1/utils/asn1tostruct.py 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/31/5531/1 diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 8364c27..5586e40 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -311,7 +311,12 @@ f.write(" memset(%s, 0, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), prefix + re.sub('-', '_', key))) f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), prefix + re.sub('-', '_', keyName))) - f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower)) + f.write(" tempDecoded = ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower)) + f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (asn1cStructfirstlower)) + f.write(" %s_DEBUG(\"Decoding of message %s failed\\n\");\n" % (fileprefix.upper(), prefix + re.sub('-', '_', keyName))) + f.write(" return -1;\n") + f.write(" }\n\n") + f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess)) f.write(" %sIE_t *ie_p;\n" % (prefix)) f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess)) -- To view, visit https://gerrit.osmocom.org/5531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cb9cc9a88d22f03befa43f0968a874476fa079d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 04:16:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 21 Dec 2017 04:16:17 +0000 Subject: [PATCH] osmo-iuh[master]: vty: tweak / improve HNB and cnlink introspection Message-ID: Review at https://gerrit.osmocom.org/5532 vty: tweak / improve HNB and cnlink introspection Add 'show cnlink'. Tweak 'show hnb all'. The result looks something like: OsmoHNBGW> show cnlink IuCS: 'OsmoHNBGW'=RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP IuPS: 'OsmoHNBGW'=RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP OsmoHNBGW> show hnb all No HNB connected OsmoHNBGW> show hnb all HNB 192.168.0.15:61809 "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 OsmoHNBGW> show hnb all HNB 192.168.0.15:61809 "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 HNB 192.168.0.124:61809 "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 OsmoHNBGW> show hnb all HNB 192.168.0.15:61809 "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 HNB 192.168.0.124:61809 "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS 23->1000 (RUA->SUA) state=1 IuPS 23->1001 (RUA->SUA) state=1 OsmoHNBGW> show hnb all HNB 192.168.0.15:61809 "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 IuCS 24->1002 (RUA->SUA) state=1 IuPS 24->1003 (RUA->SUA) state=1 HNB 192.168.0.124:61809 "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS 23->1000 (RUA->SUA) state=1 IuPS 23->1001 (RUA->SUA) state=1 Related: OS#2772 OS#2773 Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 --- M src/hnbgw_vty.c 1 file changed, 59 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/32/5532/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 3d16970..16efb05 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -19,6 +19,7 @@ */ #include +#include #include @@ -27,6 +28,8 @@ #include #include #include +#include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -108,19 +111,62 @@ return vty->node; } +static void vty_dump_cnlink_info(struct vty *vty) +{ +#define QUOTE(STR) \ + STR ? "'" : "", \ + STR ? STR : "", \ + STR ? "':" : "" + + vty_out(vty, "IuCS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s%s", + QUOTE(g_hnb_gw->config.iucs_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iucs_remote_addr), + VTY_NEWLINE); + vty_out(vty, "IuPS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s%s", + QUOTE(g_hnb_gw->config.iups_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iups_remote_addr), + VTY_NEWLINE); +} + +DEFUN(show_cnlink, show_cnlink_cmd, "show cnlink", + SHOW_STR "Display information on core network link\n") +{ + vty_dump_cnlink_info(vty); + return CMD_SUCCESS; +} + +static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) +{ + struct sockaddr_in addr; + socklen_t addr_size = sizeof(struct sockaddr_in); + if (!ofd || ofd->fd < 0 + || getpeername(ofd->fd, (struct sockaddr *)&addr, &addr_size)) { + vty_out(vty, "(no addr)"); + return; + } + vty_out(vty, "%s:%u", inet_ntoa(addr.sin_addr), addr.sin_port); +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; - vty_out(vty, "HNB \"%s\" MCC %u MNC %u LAC %u RAC %u SAC %u CID %u%s", hnb->identity_info, - hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, - VTY_NEWLINE); - vty_out(vty, " HNBAP ID %u RUA ID %u%s", hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); + vty_out(vty, "HNB "); + vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); + vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE); + vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCCP-stream:HNBAP=%u,RUA=%u%s", + hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, + hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); llist_for_each_entry(map, &hnb->map_list, hnb_list) { - vty_out(vty, " Map %u->%u (RUA->SUA) cnlink=%p state=%u%s", map->rua_ctx_id, map->scu_conn_id, - map->cn_link, map->state, VTY_NEWLINE); - + vty_out(vty, " %s %u->%u (RUA->SUA) state=%u%s", + map->is_ps ? "IuPS" : "IuCS", + map->rua_ctx_id, map->scu_conn_id, + map->state, VTY_NEWLINE); } } @@ -132,6 +178,11 @@ DEFUN(show_hnb, show_hnb_cmd, "show hnb all", SHOW_STR "Display information about a HNB") { struct hnb_context *hnb; + + if (llist_empty(&g_hnb_gw->hnb_list)) { + vty_out(vty, "No HNB connected%s", VTY_NEWLINE); + return CMD_SUCCESS; + } llist_for_each_entry(hnb, &g_hnb_gw->hnb_list, list) { vty_dump_hnb_info(vty, hnb); @@ -282,6 +333,7 @@ install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_addr_cmd); + install_element_ve(&show_cnlink_cmd); install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/5532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 04:24:55 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 21 Dec 2017 04:24:55 +0000 Subject: [PATCH] osmo-iuh[master]: compiler warning: asn1tostruct.py: return 0 at end of *_free... Message-ID: Review at https://gerrit.osmocom.org/5533 compiler warning: asn1tostruct.py: return 0 at end of *_free_*() Related: OS#2670 Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 --- M asn1/utils/asn1tostruct.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/33/5533/1 diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 5586e40..dab24a0 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -389,6 +389,7 @@ iename = re.sub('id-', '', ie[0]) ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename)) f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore)) + f.write(" return 0;\n") f.write("}\n\n") for key in iesDefs: -- To view, visit https://gerrit.osmocom.org/5533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 09:52:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 09:52:46 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: unify timer handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5234 to look at the new patch set (#4). TBF: unify timer handling Use generic timer handling infrastracture to handle assignment/reject internal timer. Rename timer array accordingly. Use defines with explicit second/microsecond values to make it more readable. Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 4 files changed, 32 insertions(+), 68 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5234/4 diff --git a/src/bts.cpp b/src/bts.cpp index 867658e..8a8ed02 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -554,7 +554,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - tbf_timer_start(dl_tbf, 0, Tassign_agch, "assignment (AGCH)"); + dl_tbf->t_start(T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); return 0; } @@ -1041,7 +1041,7 @@ } new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ - new_tbf->stop_timer("control acked (DL-TBF)"); + new_tbf->t_stop(T0, "control acked (DL-TBF)"); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index dc0777f..ea27597 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -60,6 +60,7 @@ }; static const struct value_string tbf_timers_names[] = { + OSMO_VALUE_STRING(T0), OSMO_VALUE_STRING(T3169), OSMO_VALUE_STRING(T3191), OSMO_VALUE_STRING(T3193), @@ -170,7 +171,6 @@ poll_fn(0), poll_ts(0), n3105(0), - T(0), fT(0), num_fT_exp(0), state(GPRS_RLCMAC_NULL), @@ -191,8 +191,7 @@ /* The classes of these members do not have proper constructors yet. * Just set them to 0 like talloc_zero did */ memset(&pdch, 0, sizeof(pdch)); - memset(&timer, 0, sizeof(timer)); - memset(&T31, 0, sizeof(T31)); + memset(&T, 0, sizeof(T)); memset(&m_rlc, 0, sizeof(m_rlc)); memset(&gsm_timer, 0, sizeof(gsm_timer)); @@ -472,7 +471,7 @@ "be sure not to free in this state. PLEASE FIX!\n", get_value_string(gprs_rlcmac_tbf_dl_ass_state_names, tbf->dl_ass_state)); - tbf->stop_timer("freeing TBF"); + tbf->stop_timers("freeing TBF"); /* TODO: Could/Should generate bssgp_tx_llc_discarded */ tbf_unlink_pdch(tbf); @@ -538,27 +537,6 @@ "RELEASING", }; -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason) -{ - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, - "%s %sstarting timer T%u [%s] with %u sec. %u microsec.", - tbf_name(tbf), osmo_timer_pending(&tbf->timer) ? "re" : "", T, reason, seconds, microseconds); - - if (T != tbf->T && osmo_timer_pending(&tbf->timer)) - LOGPC(DRLCMAC, LOGL_ERROR, " while old timer T%u pending", tbf->T); - - LOGPC(DRLCMAC, (T != tbf->T) ? LOGL_ERROR : LOGL_DEBUG, "\n"); - - tbf->T = T; - - /* Tunning timers can be safely re-scheduled. */ - tbf->timer.data = tbf; - tbf->timer.cb = &tbf_timer_cb; - - osmo_timer_schedule(&tbf->timer, seconds, microseconds); -} - void gprs_rlcmac_tbf::t_stop(enum tbf_timers t, const char *reason) { if (t >= T_MAX) { @@ -579,10 +557,11 @@ uint8_t i; if (t != T_MAX) - return osmo_timer_pending(&T31[t]); + return osmo_timer_pending(&T[t]); + /* we don't start with T0 because it's internal timer which requires special handling */ for (i = T3169; i < T_MAX; i++) - if (osmo_timer_pending(&T31[i])) + if (osmo_timer_pending(&T[i])) return true; return false; @@ -591,17 +570,9 @@ void gprs_rlcmac_tbf::stop_timers(const char *reason) { uint8_t i; - for (i = 0; i < T_MAX; i++) + /* we start with T0 because timer reset does not require any special handling */ + for (i = T0; i < T_MAX; i++) t_stop((enum tbf_timers)i, reason); -} - -void gprs_rlcmac_tbf::stop_timer(const char *reason) -{ - if (osmo_timer_pending(&timer)) { - LOGPTBF(this, LOGL_DEBUG, "stopping timer T%u [%s]\n", - T, reason); - osmo_timer_del(&timer); - } } static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers t, bool run_diag) @@ -629,33 +600,36 @@ get_value_string(tbf_timers_names, t), reason); } - if (!force && osmo_timer_pending(&T31[t])) + if (!force && osmo_timer_pending(&T[t])) return; LOGPTBF(this, LOGL_DEBUG, "%sstarting timer %s [%s] with %u sec. %u microsec.\n", - osmo_timer_pending(&T31[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); + osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); - T31[t].data = this; + T[t].data = this; switch(t) { + case T0: + T[t].cb = tbf_timer_cb; + break; case T3169: - T31[t].cb = cb_T3169; + T[t].cb = cb_T3169; break; case T3191: - T31[t].cb = cb_T3191; + T[t].cb = cb_T3191; break; case T3193: - T31[t].cb = cb_T3193; + T[t].cb = cb_T3193; break; case T3195: - T31[t].cb = cb_T3195; + T[t].cb = cb_T3195; break; default: LOGPTBF(this, LOGL_ERROR, "attempting to set callback for unknown timer %s [%s]\n", get_value_string(tbf_timers_names, t), reason); } - osmo_timer_schedule(&T31[t], sec, microsec); + osmo_timer_schedule(&T[t], sec, microsec); } int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, @@ -1102,12 +1076,7 @@ void gprs_rlcmac_tbf::handle_timeout() { - LOGPTBF(this, LOGL_DEBUG, "timer %u expired.\n", T); - - if (T) { - LOGPTBF(this, LOGL_ERROR, "%s timer expired in unknown mode: %u\n", T); - return; - } + LOGPTBF(this, LOGL_DEBUG, "timer 0 expired.\n"); /* assignment */ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { @@ -1267,7 +1236,7 @@ new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ - new_dl_tbf->stop_timer("assignment (DL-TBF)"); + new_dl_tbf->t_stop(T0, "assignment (DL-TBF)"); } @@ -1297,7 +1266,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - tbf_timer_start(this, 0, Treject_pacch, "reject (PACCH)"); + t_start(T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index 4489695..88f5d6a 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -39,9 +39,9 @@ * TBF instance */ -#define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */ -#define Tassign_pacch 2,0 /* timeout for pacch assigment */ -#define Treject_pacch 0,2000 /* timeout for tbf reject for PRR*/ +#define T_ASS_AGCH_USEC 200000 /* waiting after IMM.ASS confirm */ +#define T_ASS_PACCH_SEC 2 /* timeout for pacch assigment */ +#define T_REJ_PACCH_USEC 2000 /* timeout for tbf reject for PRR*/ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ @@ -139,6 +139,9 @@ #define LOGPTBFDL(tbf, level, fmt, args...) LOGP(DRLCMACDL, level, "%s " fmt, tbf_name(tbf), ## args) enum tbf_timers { + /* internal assign/reject timer */ + T0, + /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */ T3169, @@ -194,7 +197,6 @@ int update(); void handle_timeout(); - void stop_timer(const char *reason); void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); @@ -266,9 +268,6 @@ gprs_rlc m_rlc; uint8_t n3105; /* N3105 counter */ - - struct osmo_timer_list timer; - unsigned int T; /* Txxxx number */ struct osmo_gsm_timer_list gsm_timer; unsigned int fT; /* fTxxxx number */ @@ -328,7 +327,7 @@ LListHead m_list; LListHead m_ms_list; bool m_egprs_enabled; - struct osmo_timer_list T31[T_MAX]; + struct osmo_timer_list T[T_MAX]; mutable char m_name_buf[60]; }; @@ -351,9 +350,6 @@ GprsMs *ms, uint32_t tlli, uint8_t trx_no, uint8_t ts_no); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); - -void tbf_timer_start(struct gprs_rlcmac_tbf *tbf, unsigned int T, - unsigned int seconds, unsigned int microseconds, const char *reason); inline bool gprs_rlcmac_tbf::state_is(enum gprs_rlcmac_tbf_state rhs) const { diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index b043989..33eb75b 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -484,7 +484,6 @@ void gprs_rlcmac_dl_tbf::trigger_ass(struct gprs_rlcmac_tbf *old_tbf) { /* stop pending timer */ - stop_timer("assignment (DL-TBF)"); stop_timers("assignment (DL-TBF)"); /* check for downlink tbf: */ @@ -499,7 +498,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); + t_start(T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); } else { LOGPTBFDL(this, LOGL_DEBUG, "Send dowlink assignment on PCH, no TBF exist (IMSI=%s)\n", imsi()); -- To view, visit https://gerrit.osmocom.org/5234 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 09:52:46 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 09:52:46 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log timer invocation source In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5208 to look at the new patch set (#3). TBF: log timer invocation source When troubleshooting TBF timers we're not only interested in timer duration but also in the code which triggered it. Let's use LOGPSRC to log it: wrap t_start() in a macro for convenience. Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 29 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/5208/3 diff --git a/src/bts.cpp b/src/bts.cpp index 8a8ed02..feead9a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -554,7 +554,7 @@ LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); if (dl_tbf->m_wait_confirm) - dl_tbf->t_start(T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); + T_START(dl_tbf, T0, 0, T_ASS_AGCH_USEC, "assignment (AGCH)", true); return 0; } @@ -687,7 +687,7 @@ tbf->set_ta(ta); tbf->set_state(GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); - tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); + T_START(tbf, T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGPTBF(tbf, LOGL_DEBUG, "[UPLINK] START\n"); LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] RACH " "qbit-ta=%d ra=0x%02x, Fn=%d " diff --git a/src/tbf.cpp b/src/tbf.cpp index ea27597..520f6c4 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -35,6 +35,7 @@ #include #include #include +#include } #include @@ -403,7 +404,7 @@ tbf->m_contention_resolution_done = 1; tbf->set_state(GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); - tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); + T_START(tbf, T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -544,10 +545,10 @@ get_value_string(tbf_timers_names, t), reason); } - if (osmo_timer_pending(&T31[t])) { + if (osmo_timer_pending(&T[t])) { LOGPTBF(this, LOGL_DEBUG, "stopping timer %s [%s]\n", get_value_string(tbf_timers_names, t), reason); - osmo_timer_del(&T31[t]); + osmo_timer_del(&T[t]); } } @@ -593,18 +594,20 @@ T_CBACK(T3193, false) T_CBACK(T3195, true) -void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force) +void gprs_rlcmac_tbf::t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force, + const char *file, unsigned line) { if (t >= T_MAX) { - LOGPTBF(this, LOGL_ERROR, "attempting to start unknown timer %s [%s]\n", - get_value_string(tbf_timers_names, t), reason); + LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to start unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); } if (!force && osmo_timer_pending(&T[t])) return; - LOGPTBF(this, LOGL_DEBUG, "%sstarting timer %s [%s] with %u sec. %u microsec.\n", - osmo_timer_pending(&T[t]) ? "re" : "", get_value_string(tbf_timers_names, t), reason, sec, microsec); + LOGPSRC(DRLCMAC, LOGL_DEBUG, file, line, "%s %sstarting timer %s [%s] with %u sec. %u microsec.\n", + tbf_name(this), osmo_timer_pending(&T[t]) ? "re" : "", + get_value_string(tbf_timers_names, t), reason, sec, microsec); T[t].data = this; @@ -625,8 +628,8 @@ T[t].cb = cb_T3195; break; default: - LOGPTBF(this, LOGL_ERROR, "attempting to set callback for unknown timer %s [%s]\n", - get_value_string(tbf_timers_names, t), reason); + LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to set callback for unknown timer %s [%s]\n", + tbf_name(this), get_value_string(tbf_timers_names, t), reason); } osmo_timer_schedule(&T[t], sec, microsec); @@ -719,7 +722,7 @@ if (m_n3101 == bts->bts_data()->n3101) { LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); + T_START(this, T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); return; } @@ -737,7 +740,7 @@ "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); - ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); + T_START(ul_tbf, T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } /* reschedule UL ack */ @@ -759,7 +762,7 @@ if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(this, T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); return; @@ -781,7 +784,7 @@ if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); - t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(this, T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); return; @@ -807,7 +810,7 @@ if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); - dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); + T_START(dl_tbf, T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; @@ -1266,7 +1269,7 @@ /* Start Tmr only if it is UL TBF */ if (direction == GPRS_RLCMAC_UL_TBF) - t_start(T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); + T_START(this, T0, 0, T_REJ_PACCH_USEC, "reject (PACCH)", true); return msg; diff --git a/src/tbf.h b/src/tbf.h index 88f5d6a..40ed974 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -169,6 +169,8 @@ #define GPRS_RLCMAC_FLAG_TO_DL_ASS 7 #define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */ +#define T_START(tbf, t, sec, usec, r, f) tbf->t_start(t, sec, usec, r, f, __FILE__, __LINE__) + struct gprs_rlcmac_tbf { gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir); @@ -200,7 +202,8 @@ void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); - void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force); + void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force, + const char *file, unsigned line); int establish_dl_tbf_on_pacch(); int check_polling(uint32_t fn, uint8_t ts, diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 33eb75b..84f6166 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -498,7 +498,7 @@ state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); /* start timer */ - t_start(T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); + T_START(this, T0, T_ASS_PACCH_SEC, 0, "assignment (PACCH)", true); } else { LOGPTBFDL(this, LOGL_DEBUG, "Send dowlink assignment on PCH, no TBF exist (IMSI=%s)\n", imsi()); @@ -854,7 +854,7 @@ m_tx_counter = 0; /* start timer whenever we send the final block */ if (is_final) - t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); + T_START(this, T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); clear_poll_timeout_flag(); @@ -1116,7 +1116,7 @@ set_state(GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ - t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, + T_START(this, T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, "release (DL-TBF)", true); /* reset rlc states */ diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 8e4e57e..45de7cd 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -191,7 +191,7 @@ unsigned int block_idx; /* restart T3169 */ - t_start(T3169, bts_data()->t3169, 0, "acked (data)", true); + T_START(this, T3169, bts_data()->t3169, 0, "acked (data)", true); /* Increment RX-counter */ this->m_rx_counter++; -- To view, visit https://gerrit.osmocom.org/5208 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 10:20:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 10:20:57 +0000 Subject: [PATCH] osmo-pcu[master]: Fix warnings Message-ID: Review at https://gerrit.osmocom.org/5534 Fix warnings Fix warnings detected by compiler and coverity scan. Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e Fixes: CID181479 --- M src/bts.cpp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/5534/1 diff --git a/src/bts.cpp b/src/bts.cpp index 867658e..3655567 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -219,7 +219,7 @@ } /* The static allocator might have already registered the counter group. - If this happens and we still called explicitly (in tests/* for example) + If this happens and we still called explicitly (in tests/ for example) than just allocate the group with different index. This shall be removed once weget rid of BTS singleton */ if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0)) @@ -1439,7 +1439,7 @@ return; } LOGPTBFUL(ul_tbf, LOGL_ERROR, - "RX: [PCU <- BTS] %s FIXME: Packet resource request\n"); + "RX: [PCU <- BTS] FIXME: Packet resource request\n"); /* Reset N3101 counter: */ ul_tbf->m_n3101 = 0; -- To view, visit https://gerrit.osmocom.org/5534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:24:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 11:24:56 +0000 Subject: [PATCH] osmo-pcu[master]: cosmetic: clarify coding scheme and puncturing Message-ID: Review at https://gerrit.osmocom.org/5535 cosmetic: clarify coding scheme and puncturing * use appropriate types for coding scheme parameters * add comment regarding possible number of RLCMAC blocks The code in create_dl_acked_block() has underlying assumption that rlc.num_data_blocks can never be more than 2, which is true and is enforced by appropriate asserts but is not obvious when looking at the function code alone. It's equally hard for Coverity which leads to false positives in scan. Lets' make this assumption explicit by putting it into for(;;) condition alongside with corresponding comment. Fixes: CID143070 Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78 --- M src/gprs_coding_scheme.cpp M src/gprs_coding_scheme.h M src/rlc.cpp M src/rlc.h M src/tbf_dl.cpp 5 files changed, 45 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/35/5535/1 diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp index 719cbb2..3094ae6 100644 --- a/src/gprs_coding_scheme.cpp +++ b/src/gprs_coding_scheme.cpp @@ -55,12 +55,12 @@ static struct { struct { - unsigned int bytes; - unsigned int ext_bits; - unsigned int data_header_bits; + uint8_t bytes; + uint8_t ext_bits; + uint8_t data_header_bits; } uplink, downlink; - unsigned int data_bytes; - unsigned int optional_padding_bits; + uint8_t data_bytes; + uint8_t optional_padding_bits; const char *name; GprsCodingScheme::HeaderType data_hdr; GprsCodingScheme::Family family; @@ -99,10 +99,10 @@ static struct { struct { - int data_header_bits; + uint8_t data_header_bits; } uplink, downlink; - unsigned int data_block_header_bits; - unsigned int num_blocks; + uint8_t data_block_header_bits; + uint8_t num_blocks; const char *name; } hdr_type_info[GprsCodingScheme::NUM_HEADER_TYPES] = { {{0}, {0}, 0, 0, "INVALID"}, @@ -134,12 +134,12 @@ return GprsCodingScheme(UNKNOWN); } -unsigned int GprsCodingScheme::sizeUL() const +uint8_t GprsCodingScheme::sizeUL() const { return mcs_info[m_scheme].uplink.bytes + (spareBitsUL() ? 1 : 0); } -unsigned int GprsCodingScheme::usedSizeUL() const +uint8_t GprsCodingScheme::usedSizeUL() const { if (mcs_info[m_scheme].data_hdr == HEADER_GPRS_DATA) return mcs_info[m_scheme].uplink.bytes; @@ -147,22 +147,22 @@ return sizeUL(); } -unsigned int GprsCodingScheme::maxBytesUL() const +uint8_t GprsCodingScheme::maxBytesUL() const { return mcs_info[m_scheme].uplink.bytes; } -unsigned int GprsCodingScheme::spareBitsUL() const +uint8_t GprsCodingScheme::spareBitsUL() const { return mcs_info[m_scheme].uplink.ext_bits; } -unsigned int GprsCodingScheme::sizeDL() const +uint8_t GprsCodingScheme::sizeDL() const { return mcs_info[m_scheme].downlink.bytes + (spareBitsDL() ? 1 : 0); } -unsigned int GprsCodingScheme::usedSizeDL() const +uint8_t GprsCodingScheme::usedSizeDL() const { if (mcs_info[m_scheme].data_hdr == HEADER_GPRS_DATA) return mcs_info[m_scheme].downlink.bytes; @@ -170,42 +170,42 @@ return sizeDL(); } -unsigned int GprsCodingScheme::maxBytesDL() const +uint8_t GprsCodingScheme::maxBytesDL() const { return mcs_info[m_scheme].downlink.bytes; } -unsigned int GprsCodingScheme::spareBitsDL() const +uint8_t GprsCodingScheme::spareBitsDL() const { return mcs_info[m_scheme].downlink.ext_bits; } -unsigned int GprsCodingScheme::maxDataBlockBytes() const +uint8_t GprsCodingScheme::maxDataBlockBytes() const { return mcs_info[m_scheme].data_bytes; } -unsigned int GprsCodingScheme::optionalPaddingBits() const +uint8_t GprsCodingScheme::optionalPaddingBits() const { return mcs_info[m_scheme].optional_padding_bits; } -unsigned int GprsCodingScheme::numDataBlocks() const +uint8_t GprsCodingScheme::numDataBlocks() const { return hdr_type_info[headerTypeData()].num_blocks; } -unsigned int GprsCodingScheme::numDataHeaderBitsUL() const +uint8_t GprsCodingScheme::numDataHeaderBitsUL() const { return hdr_type_info[headerTypeData()].uplink.data_header_bits; } -unsigned int GprsCodingScheme::numDataHeaderBitsDL() const +uint8_t GprsCodingScheme::numDataHeaderBitsDL() const { return hdr_type_info[headerTypeData()].downlink.data_header_bits; } -unsigned int GprsCodingScheme::numDataBlockHeaderBits() const +uint8_t GprsCodingScheme::numDataBlockHeaderBits() const { return hdr_type_info[headerTypeData()].data_block_header_bits; } diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h index dfad240..76cab0f 100644 --- a/src/gprs_coding_scheme.h +++ b/src/gprs_coding_scheme.h @@ -70,7 +70,7 @@ operator bool() const {return m_scheme != UNKNOWN;} operator Scheme() const {return m_scheme;} - unsigned int to_num() const; + uint8_t to_num() const; GprsCodingScheme& operator =(Scheme s); bool operator == (Scheme s) const; @@ -91,20 +91,20 @@ void dec(); void decToSingleBlock(bool *needStuffing); - unsigned int sizeUL() const; - unsigned int sizeDL() const; - unsigned int usedSizeUL() const; - unsigned int usedSizeDL() const; - unsigned int maxBytesUL() const; - unsigned int maxBytesDL() const; - unsigned int spareBitsUL() const; - unsigned int spareBitsDL() const; - unsigned int maxDataBlockBytes() const; - unsigned int numDataBlocks() const; - unsigned int numDataHeaderBitsUL() const; - unsigned int numDataHeaderBitsDL() const; - unsigned int numDataBlockHeaderBits() const; - unsigned int optionalPaddingBits() const; + uint8_t sizeUL() const; + uint8_t sizeDL() const; + uint8_t usedSizeUL() const; + uint8_t usedSizeDL() const; + uint8_t maxBytesUL() const; + uint8_t maxBytesDL() const; + uint8_t spareBitsUL() const; + uint8_t spareBitsDL() const; + uint8_t maxDataBlockBytes() const; + uint8_t numDataBlocks() const; + uint8_t numDataHeaderBitsUL() const; + uint8_t numDataHeaderBitsDL() const; + uint8_t numDataBlockHeaderBits() const; + uint8_t optionalPaddingBits() const; const char *name() const; HeaderType headerTypeData() const; HeaderType headerTypeControl() const; @@ -127,7 +127,7 @@ enum Scheme m_scheme; }; -inline unsigned int GprsCodingScheme::to_num() const +inline uint8_t GprsCodingScheme::to_num() const { if (isGprs()) return (m_scheme - CS1) + 1; diff --git a/src/rlc.cpp b/src/rlc.cpp index 37e83cd..d7f0609 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -375,7 +375,7 @@ unsigned int gprs_rlc_mcs_cps(GprsCodingScheme cs, enum egprs_puncturing_values punct, - enum egprs_puncturing_values punct2, int with_padding) + enum egprs_puncturing_values punct2, bool with_padding) { /* validate that punct and punct2 are as expected */ switch (GprsCodingScheme::Scheme(cs)) { diff --git a/src/rlc.h b/src/rlc.h index b62e3ac..a7e6cf3 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -163,7 +163,7 @@ unsigned int es_p; unsigned int rrbp; unsigned int pr; - unsigned int num_data_blocks; + uint8_t num_data_blocks; /* this can actually be only 0, 1, 2: enforced in gprs_rlc_data_header_init() */ unsigned int with_padding; unsigned int data_offs_bits[2]; struct gprs_rlc_data_block_info block_info[2]; @@ -218,7 +218,7 @@ void gprs_rlc_data_block_info_init(struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, bool with_padding, const unsigned int spb); unsigned int gprs_rlc_mcs_cps(GprsCodingScheme cs, enum egprs_puncturing_values - punct, enum egprs_puncturing_values punct2, int with_padding); + punct, enum egprs_puncturing_values punct2, bool with_padding); void gprs_rlc_mcs_cps_decode(unsigned int cps, GprsCodingScheme cs, int *punct, int *punct2, int *with_padding); enum egprs_puncturing_values gprs_get_punct_scheme(enum egprs_puncturing_values diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index b043989..3537e85 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -667,7 +667,7 @@ unsigned msg_len; bool need_poll; /* TODO: support MCS-7 - MCS-9, where data_block_idx can be 1 */ - unsigned int data_block_idx = 0; + uint8_t data_block_idx = 0; unsigned int rrbp; uint32_t new_poll_fn; int rc; @@ -753,8 +753,8 @@ LOGP(DRLCMACDL, LOGL_DEBUG, "- Copying %u RLC blocks, %u BSNs\n", rlc.num_data_blocks, num_bsns); - /* Copy block(s) to RLC message */ - for (data_block_idx = 0; data_block_idx < rlc.num_data_blocks; + /* Copy block(s) to RLC message: the num_data_blocks cannot be more than 2 - see assert above */ + for (data_block_idx = 0; data_block_idx < OSMO_MIN(rlc.num_data_blocks, 2); data_block_idx++) { int bsn; @@ -778,7 +778,7 @@ OSMO_ASSERT(m_rlc.block(bsn)->next_ps >= EGPRS_PS_1); OSMO_ASSERT(m_rlc.block(bsn)->next_ps <= EGPRS_PS_3); } - OSMO_ASSERT(data_block_idx < 2); /* punct defined above as 2-element array */ + punct[data_block_idx] = m_rlc.block(bsn)->next_ps; rdbi = &rlc.block_info[data_block_idx]; -- To view, visit https://gerrit.osmocom.org/5535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:38:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:38:28 +0000 Subject: osmo-pcu[master]: cosmetic: clarify coding scheme and puncturing In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5535/1/src/gprs_coding_scheme.h File src/gprs_coding_scheme.h: Line 94: uint8_t sizeUL() const; I don't understand what we gain by all those conversions? What's the benefit? I can only see the problem of creating more clashes with other patches :/ -- To view, visit https://gerrit.osmocom.org/5535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:40:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:40:32 +0000 Subject: osmo-pcu[master]: Fix warnings In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:40:33 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:40:33 +0000 Subject: [MERGED] osmo-pcu[master]: Fix warnings In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix warnings ...................................................................... Fix warnings Fix warnings detected by compiler and coverity scan. Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e Fixes: CID181479 --- M src/bts.cpp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 867658e..3655567 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -219,7 +219,7 @@ } /* The static allocator might have already registered the counter group. - If this happens and we still called explicitly (in tests/* for example) + If this happens and we still called explicitly (in tests/ for example) than just allocate the group with different index. This shall be removed once weget rid of BTS singleton */ if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0)) @@ -1439,7 +1439,7 @@ return; } LOGPTBFUL(ul_tbf, LOGL_ERROR, - "RX: [PCU <- BTS] %s FIXME: Packet resource request\n"); + "RX: [PCU <- BTS] FIXME: Packet resource request\n"); /* Reset N3101 counter: */ ul_tbf->m_n3101 = 0; -- To view, visit https://gerrit.osmocom.org/5534 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:41:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:41:40 +0000 Subject: osmo-pcu[master]: TBF: unify timer handling In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5234 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:42:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:42:16 +0000 Subject: osmo-pcu[master]: TBF: log timer invocation source In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5208 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:42:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:42:44 +0000 Subject: osmo-iuh[master]: compiler warning: asn1tostruct.py: return 0 at end of *_free... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:46:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 11:46:25 +0000 Subject: osmo-pcu[master]: cosmetic: clarify coding scheme and puncturing In-Reply-To: References: Message-ID: Patch Set 1: I've made it while tracking down possible values for rlc.num_data_blocks which is assigned using CS. The benefit is that stricter type immediately gives reader a hint at the value range which variable can take. It also increase the chance that errors will be spotted by compiler due to type mismatch or by coverity during scan. I can drop it from the patch if you think it's better. -- To view, visit https://gerrit.osmocom.org/5535 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:47:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:47:52 +0000 Subject: osmo-iuh[master]: vty: tweak / improve HNB and cnlink introspection In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5532/1/src/hnbgw_vty.c File src/hnbgw_vty.c: Line 120: whitespace Line 151: vty_out(vty, "%s:%u", inet_ntoa(addr.sin_addr), addr.sin_port); please don't introduce new IPv4-only-isms without good reason. Using inet_ntop would have not been any more difficult but more future proof. Also, we do have osmo_sock_get_name() in libosmocore/socket.c, which performs both getosckname and getpeername and provides you with a nice string representation. This is what's used in other places already, so I'd appreciate if we could use it here, too. If you really need only the local address, please refactor osmo_sock_get_name() in libosmocore and use it from here. -- To view, visit https://gerrit.osmocom.org/5532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:49:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:49:16 +0000 Subject: osmo-iuh[master]: hnbap, rua, ranap decode: fix segfault on decode error In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/5531/1//COMMIT_MSG Commit Message: Line 28: + HNBAP_DEBUG("Decoding of message HNBRegisterRequestIEs failed\n"); this should probably be more than just DEBUG level, but I'm not sure if this part of the code provides you with a related macro? It's more like a NOTICE event to me. -- To view, visit https://gerrit.osmocom.org/5531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6cb9cc9a88d22f03befa43f0968a874476fa079d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:49:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:49:36 +0000 Subject: osmo-iuh[master]: hnbgw: hnb info: record MCC, MNC, show on 'show hnb' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:49:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:49:42 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: hnb info: record MCC, MNC, show on 'show hnb' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: hnb info: record MCC, MNC, show on 'show hnb' ...................................................................... hnbgw: hnb info: record MCC, MNC, show on 'show hnb' Before, MCC and MNC were always reported as zero, now the output of 'show hnb all' looks like: OsmoHNBGW> show hnb all HNB "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 11111 RAC 99 SAC 65535 CID 1048575 HNBAP ID 0 RUA ID 0 Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b --- M src/Makefile.am M src/hnbgw_hnbap.c 2 files changed, 2 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index ab772a4..85bfad6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 7c1e239..058a42a 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -380,8 +380,7 @@ ctx->id.sac = asn1str_to_u16(&ies.sac); ctx->id.rac = asn1str_to_u8(&ies.rac); ctx->id.cid = asn1bitstr_to_u28(&ies.cellIdentity); - //ctx->id.mcc FIXME - //ctx->id.mnc FIXME + gsm48_mcc_mnc_from_bcd(ies.plmNidentity.buf, &ctx->id.mcc, &ctx->id.mnc); DEBUGP(DHNBAP, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); -- To view, visit https://gerrit.osmocom.org/5530 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:50:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:50:07 +0000 Subject: osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:50:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:50:12 +0000 Subject: [MERGED] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix paging: add timeout to discard unsuccessful paging ...................................................................... fix paging: add timeout to discard unsuccessful paging Currently, if there is no reply from the BSS / RNC, a subscriber will remain as "already paged" forever, and is never going to be paged again. Even on IMSI Detach, the pending request will keep a ref count on the vlr_subscr. Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the 'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' / 'T3113' in OsmoBSC, but to not confuse the two, give this a different name.) Add test_ms_timeout_paging() test to verify the timeout works. I hit this while testing Paging across multiple hNodeB, when a UE lost connection to the hNodeB. I noticed that no matter how long I wait, no Paging is sent out anymore, and found this embarrassing issue. Good grief... The choice of 10 seconds is taken from https://osmocom.org/issues/2756 Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 --- M include/osmocom/msc/gsm_data.h M include/osmocom/msc/vlr.h M src/libcommon-cs/common_cs.c M src/libmsc/gsm_subscriber.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 7 files changed, 298 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 6349fe0..1b0bff9 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -344,6 +344,7 @@ GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; +#define MSC_PAGING_RESPONSE_TIMER_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -408,6 +409,7 @@ unsigned int num_bts; struct llist_head bts_list; + unsigned int paging_response_timer; /* timer to expire old location updates */ struct osmo_timer_list subscr_expire_timer; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index b625608..1b365a9 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -157,6 +157,7 @@ struct { /* pending requests */ bool is_paging; + struct osmo_timer_list paging_response_timer; /* list of struct subscr_request */ struct llist_head requests; uint8_t lac; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index bad8262..4748865 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -60,6 +60,8 @@ /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; + net->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT; + INIT_LLIST_HEAD(&net->trans_list); INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->subscr_conns); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index a013e0e..b3d38d1 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -76,7 +76,10 @@ return -EINVAL; } - if (event == GSM_PAGING_SUCCEEDED) + osmo_timer_del(&vsub->cs.paging_response_timer); + + if (event == GSM_PAGING_SUCCEEDED + || event == GSM_PAGING_EXPIRED) msc_stop_paging(vsub); /* Inform parts of the system we don't know */ @@ -126,6 +129,12 @@ return -EINVAL; } +static void paging_response_timer_cb(void *data) +{ + struct vlr_subscr *vsub = data; + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); +} + /*! \brief Start a paging request for vsub, call cbfn(param) when done. * \param vsub subscriber to page. * \param cbfn function to call when the conn is established. @@ -138,6 +147,7 @@ { int rc; struct subscr_request *request; + struct gsm_network *net = vsub->vlr->user_ctx; /* Start paging.. we know it is async so we can do it before */ if (!vsub->cs.is_paging) { @@ -152,6 +162,8 @@ /* reduced on the first paging callback */ vlr_subscr_get(vsub); vsub->cs.is_paging = true; + osmo_timer_setup(&vsub->cs.paging_response_timer, paging_response_timer_cb, vsub); + osmo_timer_schedule(&vsub->cs.paging_response_timer, net->paging_response_timer, 0); } else { LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n", vlr_subscr_name(vsub)); diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 14ad19e..c1c9f6b 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -109,6 +109,22 @@ return CMD_SUCCESS; } +DEFUN(cfg_msc_paging_response_timer, cfg_msc_paging_response_timer_cmd, + "paging response-timer (default|<1-65535>)", + "Configure Paging\n" + "Set Paging timeout, the minimum time to pass between (unsuccessful) Pagings sent towards" + " BSS or RNC\n" + "Set to default timeout (" OSMO_STRINGIFY_VAL(MSC_PAGING_RESPONSE_TIMER_DEFAULT) " seconds)\n" + "Set paging timeout in seconds\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (!strcmp(argv[1], "default")) + gsmnet->paging_response_timer = MSC_PAGING_RESPONSE_TIMER_DEFAULT; + else + gsmnet->paging_response_timer = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_msc(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -129,6 +145,9 @@ if (gsmnet->vlr->cfg.auth_reuse_old_sets_on_error) vty_out(vty, " auth-tuple-reuse-on-error 1%s", VTY_NEWLINE); + + if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT) + vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE); mgcp_client_config_write(vty, " "); #ifdef BUILD_IU @@ -186,6 +205,7 @@ install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_a_cmd); install_element(MSC_NODE, &cfg_msc_cs7_instance_iu_cmd); + install_element(MSC_NODE, &cfg_msc_paging_response_timer_cmd); mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); #ifdef BUILD_IU diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index d8a3a31..4e0e27d 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,8 +182,101 @@ comment_end(); } +void test_ms_timeout_paging() +{ + struct vlr_subscr *vsub; + const char *imsi = "901700000004620"; + + rx_from_ran = RAN_GERAN_A; + + comment_start(); + + fake_time_start(); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0"); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1", + "12010809710000004026f0"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0", NULL); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + EXPECT_CONN_COUNT(0); + + BTW("an SMS is sent, MS is paged"); + paging_expect_imsi(imsi); + paging_sent = false; + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + + btw("time passes and no paging result is received"); + + fake_time_passes(MSC_PAGING_RESPONSE_TIMER_DEFAULT - 1, 0); + + btw("the paging timeout has not yet expired"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == true, "%d"); + btw("another request is added to the list but does not cause another paging"); + paging_sent = false; + paging_expect_imsi(NULL); + send_sms(vsub, vsub, + "One paging ought to be enough for anyone."); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 2, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + VERBOSE_ASSERT(paging_sent, == false, "%d"); + + btw("the paging timeout expires, the paging as well as the requests are canceled"); + fake_time_passes(2, 0); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(vsub); + VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + vlr_subscr_put(vsub); + vsub = NULL; + + BTW("subscriber detaches"); + expect_bssap_clear(); + ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); + OSMO_ASSERT(!vsub); + + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_ms_timeout_lu_auth_resp, test_ms_timeout_cm_auth_resp, + test_ms_timeout_paging, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index 50f60fd..c8b7e96 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -337,6 +337,173 @@ full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 +===== test_ms_timeout_paging +- Total time passed: 0.000000 s +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH +DMM LU/new-LAC: 1/23 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DREF VLR subscr IMSI:901700000004620 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0 +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000004620: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f1 +DVLR GSUP rx 17: 10010809710000004026f00804036470f1 +DREF VLR subscr IMSI:901700000004620 usage increases to: 2 +DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR GSUP tx: 12010809710000004026f0 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0 +DVLR GSUP rx 11: 06010809710000004026f0 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000004620) +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000004620) +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000004620) +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:46071, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:46071: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:46071: Freeing subscriber connection +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +--- +- an SMS is sent, MS is paged +DREF VLR subscr MSISDN:46071 usage increases to: 2 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +- time passes and no paging result is received +- Total time passed: 9.000000 s +- the paging timeout has not yet expired + paging_stopped == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + vsub->cs.is_paging == 1 +- another request is added to the list but does not cause another paging +DREF VLR subscr MSISDN:46071 usage increases to: 5 +DMM Subscriber MSISDN:46071 already paged. + llist_count(&vsub->cs.requests) == 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 4 + paging_sent == 0 +- the paging timeout expires, the paging as well as the requests are canceled +- Total time passed: 11.000000 s +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 2 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 + paging_stopped == 1 +DREF VLR subscr MSISDN:46071 usage increases to: 2 + vsub->cs.is_paging == 0 + llist_count(&vsub->cs.requests) == 0 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +--- +- subscriber detaches + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) +DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 +DREF VLR subscr MSISDN:46071 usage increases to: 2 +DMM IMSI DETACH for MSISDN:46071 +DREF VLR subscr MSISDN:46071 usage decreases to: 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 0 +DREF freeing VLR subscr MSISDN:46071 +DMM msc_subscr_conn_close(vsub=unknown, cause=0): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF unknown: MSC conn use - compl_l3 == 0 (0x0) +DRLL Freeing subscriber connection with NULL subscriber + bssap_clear_sent == 1 + llist_count(&net->subscr_conns) == 0 +===== test_ms_timeout_paging: SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 9 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 9 -- To view, visit https://gerrit.osmocom.org/5463 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5 Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 11:50:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 11:50:13 +0000 Subject: [MERGED] osmo-msc[master]: fix: properly cancel all Paging on IMSI Detach In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix: properly cancel all Paging on IMSI Detach ...................................................................... fix: properly cancel all Paging on IMSI Detach It's not clear cut which code is responsible for canceling pending requests, since the requests list is kept in vlr_subscr, but sending out Paging does certainly not belong in the VLR. Place the requests cleanup in gsm_04_08.c. Add to test_ms_timeout_paging() in msc_vlr_test_ms_timeout.c to verify that a pending paging is canceled on IMSI Detach. Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd --- M include/osmocom/msc/gsm_subscriber.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_subscriber.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err 5 files changed, 43 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/gsm_subscriber.h b/include/osmocom/msc/gsm_subscriber.h index 6b0e3da..4adfd41 100644 --- a/include/osmocom/msc/gsm_subscriber.h +++ b/include/osmocom/msc/gsm_subscriber.h @@ -62,6 +62,7 @@ int subscr_rx_paging_response(struct msgb *msg, struct gsm_subscriber_connection *conn); +void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event event); int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index e370962..26ac923 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -770,6 +770,10 @@ gsm48_mi_type_name(mi_type), mi_string); } else { LOGP(DMM, LOGL_INFO, "IMSI DETACH for %s\n", vlr_subscr_name(vsub)); + + if (vsub->cs.is_paging) + subscr_paging_cancel(vsub, GSM_PAGING_EXPIRED); + vlr_subscr_rx_imsi_detach(vsub); osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_DETACHED, vsub); vlr_subscr_put(vsub); diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c index b3d38d1..1a7bf59 100644 --- a/src/libmsc/gsm_subscriber.c +++ b/src/libmsc/gsm_subscriber.c @@ -52,6 +52,11 @@ #include #include +void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event event) +{ + subscr_paging_dispatch(GSM_HOOK_RR_PAGING, event, NULL, NULL, vsub); +} + int subscr_paging_dispatch(unsigned int hooknum, unsigned int event, struct msgb *msg, void *data, void *param) { @@ -132,7 +137,7 @@ static void paging_response_timer_cb(void *data) { struct vlr_subscr *vsub = data; - subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, NULL, vsub); + subscr_paging_cancel(vsub, GSM_PAGING_EXPIRED); } /*! \brief Start a paging request for vsub, call cbfn(param) when done. diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index 4e0e27d..4cfd035 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -258,13 +258,26 @@ OSMO_ASSERT(vsub); VERBOSE_ASSERT(vsub->cs.is_paging, == false, "%d"); VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d"); + + BTW("Now that the timeout has expired, another Paging is sent on request"); + paging_expect_imsi(imsi); + paging_sent = false; + + send_sms(vsub, vsub, + "Privacy in residential applications is a desirable" + " marketing option."); + + VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d"); vlr_subscr_put(vsub); vsub = NULL; + VERBOSE_ASSERT(paging_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == false, "%d"); - BTW("subscriber detaches"); + BTW("subscriber detaches, pagings are canceled"); expect_bssap_clear(); ms_sends_msg("050130089910070000006402"); VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + VERBOSE_ASSERT(paging_stopped, == true, "%d"); vsub = vlr_subscr_find_by_imsi(net->vlr, imsi); OSMO_ASSERT(!vsub); diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index c8b7e96..f0c4116 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -480,16 +480,30 @@ DREF VLR subscr MSISDN:46071 usage increases to: 2 vsub->cs.is_paging == 0 llist_count(&vsub->cs.requests) == 0 -DREF VLR subscr MSISDN:46071 usage decreases to: 1 --- -- subscriber detaches +- Now that the timeout has expired, another Paging is sent on request +DREF VLR subscr MSISDN:46071 usage increases to: 3 +DMM Subscriber MSISDN:46071 not paged yet, start paging. + RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23 + strcmp(paging_expecting_imsi, imsi) == 0 +DREF VLR subscr MSISDN:46071 usage increases to: 4 + llist_count(&vsub->cs.requests) == 1 +DREF VLR subscr MSISDN:46071 usage decreases to: 3 + paging_sent == 1 + paging_stopped == 0 +--- +- subscriber detaches, pagings are canceled MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND new conn DREF unknown: MSC conn use + compl_l3 == 1 (0x1) DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1) DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620 -DREF VLR subscr MSISDN:46071 usage increases to: 2 +DREF VLR subscr MSISDN:46071 usage increases to: 4 DMM IMSI DETACH for MSISDN:46071 +DPAG Paging failure for MSISDN:46071 (event=1) +DPAG Calling paging cbfn. +DREF VLR subscr MSISDN:46071 usage decreases to: 3 +DREF VLR subscr MSISDN:46071 usage decreases to: 2 DREF VLR subscr MSISDN:46071 usage decreases to: 1 DREF VLR subscr MSISDN:46071 usage decreases to: 0 DREF freeing VLR subscr MSISDN:46071 @@ -498,6 +512,7 @@ DREF unknown: MSC conn use - compl_l3 == 0 (0x0) DRLL Freeing subscriber connection with NULL subscriber bssap_clear_sent == 1 + paging_stopped == 1 llist_count(&net->subscr_conns) == 0 ===== test_ms_timeout_paging: SUCCESS -- To view, visit https://gerrit.osmocom.org/5464 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8874a9d92f02b0826525b55518332f6899688fd Gerrit-PatchSet: 4 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 12:04:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 12:04:01 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: cleanup state flag handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5367 to look at the new patch set (#2). TBF: cleanup state flag handling * introduce generic function to check whether particular flag was set for'a TBF and clear it if necessary. Use this instead of clear_poll_timeout_flag() * add function to explicitly set assignment and appropriate state flags Overall this makes the code easier to read and debug. Change-Id: Ic4560280c72f91700f2e19c6c7f6658dc29625c2 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 36 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/67/5367/2 diff --git a/src/bts.cpp b/src/bts.cpp index 867658e..12890f6 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1031,7 +1031,7 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_CCCH)) { /* We now know that the PACCH really existed */ LOGPTBF(new_tbf, LOGL_INFO, "The TBF has been confirmed on the PACCH, " @@ -1042,12 +1042,9 @@ new_tbf->set_state(GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ new_tbf->stop_timer("control acked (DL-TBF)"); - if ((new_tbf->state_flags & - (1 << GPRS_RLCMAC_FLAG_TO_DL_ASS))) { - new_tbf->state_flags &= - ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ASS); + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ASS)) LOGPTBF(new_tbf, LOGL_NOTICE, "Recovered downlink assignment\n"); - } + tbf_assign_control_ts(new_tbf); return; } @@ -1068,12 +1065,9 @@ tbf_free(tbf); new_tbf->set_state(GPRS_RLCMAC_FLOW); - if ((new_tbf->state_flags & - (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) { - new_tbf->state_flags &= - ~(1 << GPRS_RLCMAC_FLAG_TO_UL_ASS); + if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ASS)) LOGPTBF(new_tbf, LOGL_NOTICE, "Recovered uplink assignment for UL\n"); - } + tbf_assign_control_ts(new_tbf); /* there might be LLC packets waiting in the queue, but the DL * TBF might have been released while the UL TBF has been diff --git a/src/tbf.cpp b/src/tbf.cpp index dc0777f..8a59478 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -402,8 +402,7 @@ return NULL; } tbf->m_contention_resolution_done = 1; - tbf->set_state(GPRS_RLCMAC_ASSIGN); - tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + tbf->set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, false); tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); @@ -1537,8 +1536,7 @@ llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); ul_tbf->bts->tbf_ul_created(); - ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); - ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + ul_tbf->set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, false); ul_tbf->set_ms(ms); ul_tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); diff --git a/src/tbf.h b/src/tbf.h index 4489695..1d555d4 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -175,6 +175,8 @@ bool state_is(enum gprs_rlcmac_tbf_state rhs) const; bool state_is_not(enum gprs_rlcmac_tbf_state rhs) const; void set_state(enum gprs_rlcmac_tbf_state new_state); + bool check_n_clear(uint8_t state_flag); + void set_assigned_on(uint8_t state_flag, bool check_ccch); const char *state_name() const; const char *name() const; @@ -372,12 +374,33 @@ return tbf_state_name[state]; } +/* Set assignment state and corrsponding flags */ +inline void gprs_rlcmac_tbf::set_assigned_on(uint8_t state_flag, bool check_ccch) +{ + set_state(GPRS_RLCMAC_ASSIGN); + if (check_ccch) { + if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) + state_flags |= (1 << state_flag); + } else + state_flags |= (1 << state_flag); +} + inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state) { LOGP(DRLCMAC, LOGL_DEBUG, "%s changes state from %s to %s\n", tbf_name(this), tbf_state_name[state], tbf_state_name[new_state]); state = new_state; +} + +inline bool gprs_rlcmac_tbf::check_n_clear(uint8_t state_flag) +{ + if ((state_flags & (1 << state_flag))) { + state_flags &= ~(1 << state_flag); + return true; + } + + return false; } inline LListHead& gprs_rlcmac_tbf::list() @@ -455,7 +478,7 @@ int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb); struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts); void trigger_ass(struct gprs_rlcmac_tbf *old_tbf); - void clear_poll_timeout_flag(); + bool handle_ack_nack(); void request_dl_ack(); bool need_control_ts() const; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index b043989..49cda98 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -494,9 +494,7 @@ old_tbf->was_releasing = old_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); - if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) - state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); + set_assigned_on(GPRS_RLCMAC_FLAG_PACCH, true); /* start timer */ tbf_timer_start(this, 0, Tassign_pacch, "assignment (PACCH)"); @@ -506,8 +504,7 @@ was_releasing = state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); - state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); + set_assigned_on(GPRS_RLCMAC_FLAG_CCCH, false); /* send immediate assignment */ bts->snd_dl_ass(this, 0, imsi()); @@ -635,18 +632,12 @@ return bsn; } -void gprs_rlcmac_dl_tbf::clear_poll_timeout_flag() -{ - state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ACK); -} - bool gprs_rlcmac_dl_tbf::handle_ack_nack() { bool ack_recovered = false; state_flags |= (1 << GPRS_RLCMAC_FLAG_DL_ACK); - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_TO_DL_ACK))) { - clear_poll_timeout_flag(); + if (check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ACK)) { ack_recovered = true; } @@ -857,7 +848,7 @@ if (is_final) t_start(T3191, bts_data()->t3191, 0, "final block (DL-TBF)", true); - clear_poll_timeout_flag(); + state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_DL_ACK); /* clear poll timeout flag */ /* Clear request flag */ m_dl_ack_requested = false; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 8e4e57e..43589f5 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -96,10 +96,8 @@ bool gprs_rlcmac_ul_tbf::ctrl_ack_to_toggle() { - if ((state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK))) { - state_flags &= ~(1 << GPRS_RLCMAC_FLAG_TO_UL_ACK); + if (check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ACK)) return true; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was set, now cleared */ - } state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ACK); return false; /* GPRS_RLCMAC_FLAG_TO_UL_ACK was unset, now set */ -- To view, visit https://gerrit.osmocom.org/5367 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic4560280c72f91700f2e19c6c7f6658dc29625c2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 12:11:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 12:11:04 +0000 Subject: osmocom-bb[master]: bsic decoding of neighbour cells in dedicated mode and parti... In-Reply-To: References: Message-ID: Patch Set 1: > What do you think? I don't have strong opinion either way. It can stay in gerrit or in separate branch or both. Whatever is more convenient for the people wiling to work with it. -- To view, visit https://gerrit.osmocom.org/5490 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Muhammad Awais Aslam Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 12:55:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 12:55:08 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: log source of state transitions In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5209 to look at the new patch set (#2). TBF: log source of state transitions We use the same approach for osmo_fsm: when state transition happens, it's not very useful to always log the transition function itself, it's much more useful to see where the actual transition comes from. Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec Related: OS#2407 --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_ul.cpp M tests/tbf/TbfTest.cpp 6 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/5209/2 diff --git a/src/bts.cpp b/src/bts.cpp index 3655567..4e16f04 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -685,7 +685,7 @@ failure = true; } else { tbf->set_ta(ta); - tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(tbf, GPRS_RLCMAC_FLOW); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); tbf->t_start(T3169, m_bts.t3169, 0, "RACH (new UL-TBF)", true); LOGPTBF(tbf, LOGL_DEBUG, "[UPLINK] START\n"); @@ -1039,7 +1039,7 @@ new_tbf->state_flags &= ~(1 << GPRS_RLCMAC_FLAG_CCCH); new_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); } - new_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_tbf, GPRS_RLCMAC_FLOW); /* stop pending assignment timer */ new_tbf->stop_timer("control acked (DL-TBF)"); if ((new_tbf->state_flags & @@ -1067,7 +1067,7 @@ tbf->direction == new_tbf->direction) tbf_free(tbf); - new_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_tbf, GPRS_RLCMAC_FLOW); if ((new_tbf->state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) { new_tbf->state_flags &= diff --git a/src/tbf.cpp b/src/tbf.cpp index dc0777f..7fe8071 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -402,7 +402,7 @@ return NULL; } tbf->m_contention_resolution_done = 1; - tbf->set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(tbf, GPRS_RLCMAC_ASSIGN); tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); tbf->t_start(T3169, bts->t3169, 0, "allocation (UL-TBF)", true); tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); @@ -744,7 +744,7 @@ m_n3101++; if (m_n3101 == bts->bts_data()->n3101) { LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101); - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false); return; } @@ -762,7 +762,7 @@ LOGP(DRLCMAC, LOGL_NOTICE, "- N3103 exceeded\n"); bts->pkt_ul_ack_nack_poll_failed(); - ul_tbf->set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(ul_tbf, GPRS_RLCMAC_RELEASING); ul_tbf->t_start(T3169, ul_tbf->bts->bts_data()->t3169, 0, "MAX N3103 reached", false); return; } @@ -784,7 +784,7 @@ bts->pua_poll_timedout(); if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pua_poll_failed(); @@ -806,7 +806,7 @@ bts->pda_poll_timedout(); if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); t_start(T3195, bts_data()->t3195, 0, "MAX N3105 reached", true); bts->rlc_ass_failed(); bts->pda_poll_failed(); @@ -832,7 +832,7 @@ } if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); - dl_tbf->set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_RELEASING); dl_tbf->t_start(T3195, dl_tbf->bts_data()->t3195, 0, "MAX N3105 reached", true); bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); @@ -1128,7 +1128,7 @@ if (!dl_tbf->upgrade_to_multislot) { /* change state to FLOW, so scheduler * will start transmission */ - dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_FLOW); return; } @@ -1264,7 +1264,7 @@ set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_DL_ASS); } else { dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE; - new_dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(new_dl_tbf, GPRS_RLCMAC_FLOW); tbf_assign_control_ts(new_dl_tbf); /* stop pending assignment timer */ new_dl_tbf->stop_timer("assignment (DL-TBF)"); @@ -1537,7 +1537,7 @@ llist_add(&ul_tbf->list(), &bts->bts->ul_tbfs()); ul_tbf->bts->tbf_ul_created(); - ul_tbf->set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(ul_tbf, GPRS_RLCMAC_ASSIGN); ul_tbf->state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); ul_tbf->set_ms(ms); diff --git a/src/tbf.h b/src/tbf.h index 4489695..3b5f250 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -166,6 +166,8 @@ #define GPRS_RLCMAC_FLAG_TO_DL_ASS 7 #define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */ +#define TBF_SET_STATE(t, st) do { t->set_state(st, __FILE__, __LINE__); } while(0) + struct gprs_rlcmac_tbf { gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir); @@ -174,7 +176,7 @@ bool state_is(enum gprs_rlcmac_tbf_state rhs) const; bool state_is_not(enum gprs_rlcmac_tbf_state rhs) const; - void set_state(enum gprs_rlcmac_tbf_state new_state); + void set_state(enum gprs_rlcmac_tbf_state new_state, const char *file, int line); const char *state_name() const; const char *name() const; @@ -372,9 +374,9 @@ return tbf_state_name[state]; } -inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state) +inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state, const char *file, int line) { - LOGP(DRLCMAC, LOGL_DEBUG, "%s changes state from %s to %s\n", + LOGPSRC(DRLCMAC, LOGL_DEBUG, file, line, "%s changes state from %s to %s\n", tbf_name(this), tbf_state_name[state], tbf_state_name[new_state]); state = new_state; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index b043989..f7bb624 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -494,7 +494,7 @@ old_tbf->was_releasing = old_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(this, GPRS_RLCMAC_ASSIGN); if (!(state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) state_flags |= (1 << GPRS_RLCMAC_FLAG_PACCH); @@ -506,7 +506,7 @@ was_releasing = state_is(GPRS_RLCMAC_WAIT_RELEASE); /* change state */ - set_state(GPRS_RLCMAC_ASSIGN); + TBF_SET_STATE(this, GPRS_RLCMAC_ASSIGN); state_flags |= (1 << GPRS_RLCMAC_FLAG_CCCH); /* send immediate assignment */ @@ -618,7 +618,7 @@ if (is_final) { request_dl_ack(); - set_state(GPRS_RLCMAC_FINISHED); + TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED); } /* dequeue next LLC frame, if any */ @@ -1114,7 +1114,7 @@ /* report all outstanding packets as received */ gprs_rlcmac_received_lost(this, received, 0); - set_state(GPRS_RLCMAC_WAIT_RELEASE); + TBF_SET_STATE(this, GPRS_RLCMAC_WAIT_RELEASE); /* start T3193 */ t_start(T3193, bts_data()->t3193_msec / 1000, (bts_data()->t3193_msec % 1000) * 1000, @@ -1148,7 +1148,7 @@ * (partly) encoded in chunk 1 of block V(A). (optional) */ } - set_state(GPRS_RLCMAC_RELEASING); + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); /* reset rlc states */ m_window.reset(); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 8e4e57e..668fd45 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -332,7 +332,7 @@ if (rdbi->cv == 0) { LOGP(DRLCMACUL, LOGL_DEBUG, "- Finished with UL " "TBF\n"); - set_state(GPRS_RLCMAC_FINISHED); + TBF_SET_STATE(this, GPRS_RLCMAC_FINISHED); /* Reset N3103 counter. */ this->m_n3103 = 0; } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 18bbc76..94986f5 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -176,7 +176,7 @@ /* "Establish" the DL TBF */ dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_SEND_ASS; - dl_tbf->set_state(GPRS_RLCMAC_FLOW); + TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_FLOW); dl_tbf->m_wait_confirm = 0; check_tbf(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5209 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:23:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:23:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#6). Update ctrl command parsing for python3 * make parse() return command id in addition to variable name and value * introduce parse_kv() wrapper which ignores that id and use it instead of old parse() * make parse() compatible with python3 where we got bytes, not string from the socket so we have to decode it properly before using split() * expand test_py3.py with simply asyn server which verifies that osmo_ctrl.py works properly Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M contrib/jenkins.sh M osmopy/osmo_ipa.py M scripts/osmo_ctrl.py M scripts/twisted_ipa.py M tests/test_py3.py 5 files changed, 83 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/6 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index cd94868..74af1e4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -14,7 +14,6 @@ $PY2 $COM_FLAGS scripts/osmotestconfig.py rm -rf ./build -PY3=python3 $PY3 ./setup.py install $PY3 tests/test_py3.py $PY3 $COM_FLAGS osmopy @@ -27,7 +26,7 @@ $PY3 $COM_FLAGS scripts/soap.py $PY3 $COM_FLAGS scripts/twisted_ipa.py -cd scripts -./osmo_ctrl.py --help +# Run async server which tests scripts/osmo_ctrl.py interaction +$PY3 tests/test_py3.py # TODO: add more tests diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..afabf67 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,23 +231,33 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data): + """ + Parse Ctrl string returning (id, var, value) tuple + var could be None in case of ERROR message + value could be None in case of GET message + both could be None in case of TRAP with non-zero id + """ + data = self.rem_header(raw_data).decode('utf-8') + (s, i, v) = data.split(' ', 2) + if s == self.CTRL_ERR: + return i, None, v + if s == self.CTRL_GET: + return i, v, None + if s == self.CTRL_GET + '_' + self.CTRL_REP: + return i, v, None + (s, i, var, val) = data.split(' ', 3) + if s == self.CTRL_TRAP and i != '0': + return i, None, None + return i, var, val + + def parse_kv(self, raw_data): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) + (i, var, val) = self.parse(raw_data) return var, val def trap(self, var, val): @@ -265,11 +275,19 @@ return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) + def reply(self, op_id, var, val=None): + """ + Make SET/GET command reply: returns assembled message + """ + if val is not None: + return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, self.CTRL_REP, op_id, var, val)) + return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, op_id, var)) + def verify(self, reply, r, var, val=None): """ Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value """ - (k, v) = self.parse(reply) + (k, v) = self.parse_kv(reply) if k != var or (val is not None and v != val): return False, v return True, v diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 8c0608f..ac20050 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -40,8 +40,8 @@ def do_set_get(sck, var, value = None): (r, c) = Ctrl().cmd(var, value) sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + ret = sck.recv(4096) + return (Ctrl().rem_header(ret),) + Ctrl().verify(ret, r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..533bfae 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse_kv(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) diff --git a/tests/test_py3.py b/tests/test_py3.py index cac2f93..e109c63 100644 --- a/tests/test_py3.py +++ b/tests/test_py3.py @@ -1,7 +1,49 @@ #!/usr/bin/env python3 -# just import a smoke test for osmopy +# just a smoke test for osmopy -import osmopy +import asyncio +from osmopy.osmo_ipa import Ctrl +from osmopy import __version__ -print('[Python3] Smoke test PASSED.') +class CtrlProtocol(asyncio.Protocol): + def connection_made(self, transport): + peername = transport.get_extra_info('peername') + print('Connection from {}'.format(peername)) + self.transport = transport + + def data_received(self, data): + (i, v, k) = Ctrl().parse(data) + if not k: + print('Ctrl GET received: %s' % v) + else: + print('Ctrl SET received: %s :: %s' % (v, k)) + + message = Ctrl().reply(i, v, k) + self.transport.write(message) + + self.transport.close() + # quit the loop gracefully + print('Closing the loop...') + loop.stop() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + + # Each client connection will create a new protocol instance + server = loop.run_until_complete(loop.create_server(CtrlProtocol, '127.0.0.1', 4249)) + + print('Serving on {}...'.format(server.sockets[0].getsockname())) + + # Async client running in the subprocess plugged to the same event loop + loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d' 'localhost'), loop = loop)) + + loop.run_forever() + + # Cleanup after loop is finished + server.close() + loop.run_until_complete(server.wait_closed()) + loop.close() + + print('[Python3] Smoke test PASSED for v%s' % __version__) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:23:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:23:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5061 to look at the new patch set (#4). Use python3 for osmo_ctrl.py It's a standalone script illustrating the use of ctrl protocol from python. Since it's not used as a library and nothing depends on it, we can safely switch to python3. Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 --- M contrib/jenkins.sh M scripts/osmo_ctrl.py M setup.py 3 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/61/5061/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 1598836..cd94868 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -9,7 +9,6 @@ $PY2 ./setup.py install $PY2 tests/test_py2.py $PY2 $COM_FLAGS osmopy -$PY2 $COM_FLAGS scripts/osmo_ctrl.py $PY2 $COM_FLAGS scripts/osmodumpdoc.py $PY2 $COM_FLAGS scripts/osmotestvty.py $PY2 $COM_FLAGS scripts/osmotestconfig.py @@ -28,4 +27,7 @@ $PY3 $COM_FLAGS scripts/soap.py $PY3 $COM_FLAGS scripts/twisted_ipa.py +cd scripts +./osmo_ctrl.py --help + # TODO: add more tests diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index bec6d1d..8c0608f 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * Copyright (C) 2016-2017 sysmocom s.f.m.c. GmbH * * All Rights Reserved * @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ -from __future__ import print_function + from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket diff --git a/setup.py b/setup.py index 533272e..bab9c38 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ elif sys.version_info.major == 3: scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", + "scripts/osmo_ctrl.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:23:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:23:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#8). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M contrib/jenkins.sh A scripts/osmo_rate_ctr2csv.py M setup.py 4 files changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/8 diff --git a/README b/README index e85c1c4..2c04047 100644 --- a/README +++ b/README @@ -9,6 +9,7 @@ There are currently following scripts in this package: osmotestconfig.py - test that apps start/write with example configs soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa osmo_interact_vty.py - pipe stdin/stdout to a VTY session osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 74af1e4..90d9941 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,6 +18,7 @@ $PY3 tests/test_py3.py $PY3 $COM_FLAGS osmopy $PY3 $COM_FLAGS scripts/osmo_ctrl.py +$PY3 $COM_FLAGS scripts/osmo_rate_ctr2csv.py $PY3 $COM_FLAGS scripts/osmo_interact_common.py $PY3 $COM_FLAGS scripts/osmo_interact_ctrl.py $PY3 $COM_FLAGS scripts/osmo_interact_vty.py diff --git a/scripts/osmo_rate_ctr2csv.py b/scripts/osmo_rate_ctr2csv.py new file mode 100644 index 0000000..1e3fc9f --- /dev/null +++ b/scripts/osmo_rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse_kv(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index bab9c38..494f63f 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", + "scripts/osmo_rate_ctr2csv.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:23:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:23:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5482 to look at the new patch set (#4). Add scripts to compilation tests in jenkins Related: OS#2684 Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 --- M contrib/jenkins.sh 1 file changed, 22 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/82/5482/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a60438e..1598836 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,14 +2,30 @@ set -ex +COM_FLAGS='-m compileall' + # FIXME: remove once python 2 support is deprecated -python2 ./setup.py install -python2 tests/test_py2.py -python2 -m compileall osmopy +PY2=python2 +$PY2 ./setup.py install +$PY2 tests/test_py2.py +$PY2 $COM_FLAGS osmopy +$PY2 $COM_FLAGS scripts/osmo_ctrl.py +$PY2 $COM_FLAGS scripts/osmodumpdoc.py +$PY2 $COM_FLAGS scripts/osmotestvty.py +$PY2 $COM_FLAGS scripts/osmotestconfig.py rm -rf ./build -python3 ./setup.py install -python3 tests/test_py3.py -python3 -m compileall osmopy +PY3=python3 +$PY3 ./setup.py install +$PY3 tests/test_py3.py +$PY3 $COM_FLAGS osmopy +$PY3 $COM_FLAGS scripts/osmo_ctrl.py +$PY3 $COM_FLAGS scripts/osmo_interact_common.py +$PY3 $COM_FLAGS scripts/osmo_interact_ctrl.py +$PY3 $COM_FLAGS scripts/osmo_interact_vty.py +$PY3 $COM_FLAGS scripts/osmo_verify_transcript_ctrl.py +$PY3 $COM_FLAGS scripts/osmo_verify_transcript_vty.py +$PY3 $COM_FLAGS scripts/soap.py +$PY3 $COM_FLAGS scripts/twisted_ipa.py # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 4 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:23:01 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:23:01 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5038 to look at the new patch set (#5). Improve python3 compatibility Use proper print() function to make scripts compatible with both python 2 and 3. This paves the way to deprecating python 2 support altogether. Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M contrib/jenkins.sh M scripts/osmodumpdoc.py M scripts/osmotestconfig.py M scripts/osmotestvty.py M setup.py 5 files changed, 33 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/5 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 90d9941..b252fc0 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -17,6 +17,9 @@ $PY3 ./setup.py install $PY3 tests/test_py3.py $PY3 $COM_FLAGS osmopy +$PY3 $COM_FLAGS scripts/osmodumpdoc.py +$PY3 $COM_FLAGS scripts/osmotestvty.py +$PY3 $COM_FLAGS scripts/osmotestconfig.py $PY3 $COM_FLAGS scripts/osmo_ctrl.py $PY3 $COM_FLAGS scripts/osmo_rate_ctr2csv.py $PY3 $COM_FLAGS scripts/osmo_interact_common.py diff --git a/scripts/osmodumpdoc.py b/scripts/osmodumpdoc.py index 2464b05..d71edc8 100644 --- a/scripts/osmodumpdoc.py +++ b/scripts/osmodumpdoc.py @@ -4,7 +4,7 @@ # Fixes may need to be applied to both. """Start the process and dump the documentation to the doc dir.""" - +from __future__ import print_function import subprocess import time import os @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py index 2132c43..f227504 100644 --- a/scripts/osmotestconfig.py +++ b/scripts/osmotestconfig.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import os.path import time @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/scripts/osmotestvty.py b/scripts/osmotestvty.py index e513c05..55017a5 100644 --- a/scripts/osmotestvty.py +++ b/scripts/osmotestvty.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import time import unittest @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/setup.py b/setup.py index 494f63f..e1bdafe 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,10 @@ scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["scripts/osmo_interact_vty.py", + scripts = ["scripts/osmodumpdoc.py", + "scripts/osmotestconfig.py", + "scripts/osmotestvty.py", + "scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", "scripts/osmo_rate_ctr2csv.py", -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:35:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:35:28 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5482 to look at the new patch set (#5). Add scripts to compilation tests in jenkins Related: OS#2684 Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 --- M contrib/jenkins.sh 1 file changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/82/5482/5 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a60438e..c4ddf7d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,14 +2,26 @@ set -ex +COM_FLAGS='-m compileall' + # FIXME: remove once python 2 support is deprecated -python2 ./setup.py install -python2 tests/test_py2.py -python2 -m compileall osmopy +PY2=python2 +PY2_LIST="osmopy scripts/osmo_ctrl.py scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py" +$PY2 ./setup.py install +$PY2 tests/test_py2.py +for f in $PY2_LIST +do + $PY2 $COM_FLAGS $f +done rm -rf ./build -python3 ./setup.py install -python3 tests/test_py3.py -python3 -m compileall osmopy +PY3=python3 +PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" +$PY3 ./setup.py install +$PY3 tests/test_py3.py +for f in $PY3_LIST +do + $PY3 $COM_FLAGS $f +done # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:44:39 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#7). Update ctrl command parsing for python3 * make parse() return command id in addition to variable name and value * introduce parse_kv() wrapper which ignores that id and use it instead of old parse() * make parse() compatible with python3 where we got bytes, not string from the socket so we have to decode it properly before using split() * expand test_py3.py with simply asyn server which verifies that osmo_ctrl.py works properly Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M contrib/jenkins.sh M osmopy/osmo_ipa.py M scripts/osmo_ctrl.py M scripts/twisted_ipa.py M tests/test_py3.py 5 files changed, 83 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/7 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d18b19d..9734549 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -24,7 +24,7 @@ $PY3 $COM_FLAGS $f done -cd scripts -./osmo_ctrl.py --help +# Run async server which tests scripts/osmo_ctrl.py interaction +$PY3 tests/test_py3.py # TODO: add more tests diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..afabf67 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,23 +231,33 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data): + """ + Parse Ctrl string returning (id, var, value) tuple + var could be None in case of ERROR message + value could be None in case of GET message + both could be None in case of TRAP with non-zero id + """ + data = self.rem_header(raw_data).decode('utf-8') + (s, i, v) = data.split(' ', 2) + if s == self.CTRL_ERR: + return i, None, v + if s == self.CTRL_GET: + return i, v, None + if s == self.CTRL_GET + '_' + self.CTRL_REP: + return i, v, None + (s, i, var, val) = data.split(' ', 3) + if s == self.CTRL_TRAP and i != '0': + return i, None, None + return i, var, val + + def parse_kv(self, raw_data): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) + (i, var, val) = self.parse(raw_data) return var, val def trap(self, var, val): @@ -265,11 +275,19 @@ return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) + def reply(self, op_id, var, val=None): + """ + Make SET/GET command reply: returns assembled message + """ + if val is not None: + return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, self.CTRL_REP, op_id, var, val)) + return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, op_id, var)) + def verify(self, reply, r, var, val=None): """ Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value """ - (k, v) = self.parse(reply) + (k, v) = self.parse_kv(reply) if k != var or (val is not None and v != val): return False, v return True, v diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 8c0608f..ac20050 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -40,8 +40,8 @@ def do_set_get(sck, var, value = None): (r, c) = Ctrl().cmd(var, value) sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + ret = sck.recv(4096) + return (Ctrl().rem_header(ret),) + Ctrl().verify(ret, r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..533bfae 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse_kv(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) diff --git a/tests/test_py3.py b/tests/test_py3.py index cac2f93..e109c63 100644 --- a/tests/test_py3.py +++ b/tests/test_py3.py @@ -1,7 +1,49 @@ #!/usr/bin/env python3 -# just import a smoke test for osmopy +# just a smoke test for osmopy -import osmopy +import asyncio +from osmopy.osmo_ipa import Ctrl +from osmopy import __version__ -print('[Python3] Smoke test PASSED.') +class CtrlProtocol(asyncio.Protocol): + def connection_made(self, transport): + peername = transport.get_extra_info('peername') + print('Connection from {}'.format(peername)) + self.transport = transport + + def data_received(self, data): + (i, v, k) = Ctrl().parse(data) + if not k: + print('Ctrl GET received: %s' % v) + else: + print('Ctrl SET received: %s :: %s' % (v, k)) + + message = Ctrl().reply(i, v, k) + self.transport.write(message) + + self.transport.close() + # quit the loop gracefully + print('Closing the loop...') + loop.stop() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + + # Each client connection will create a new protocol instance + server = loop.run_until_complete(loop.create_server(CtrlProtocol, '127.0.0.1', 4249)) + + print('Serving on {}...'.format(server.sockets[0].getsockname())) + + # Async client running in the subprocess plugged to the same event loop + loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d' 'localhost'), loop = loop)) + + loop.run_forever() + + # Cleanup after loop is finished + server.close() + loop.run_until_complete(server.wait_closed()) + loop.close() + + print('[Python3] Smoke test PASSED for v%s' % __version__) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 7 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:44:39 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5061 to look at the new patch set (#5). Use python3 for osmo_ctrl.py It's a standalone script illustrating the use of ctrl protocol from python. Since it's not used as a library and nothing depends on it, we can safely switch to python3. Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 --- M contrib/jenkins.sh M scripts/osmo_ctrl.py M setup.py 3 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/61/5061/5 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index c4ddf7d..d18b19d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -6,7 +6,7 @@ # FIXME: remove once python 2 support is deprecated PY2=python2 -PY2_LIST="osmopy scripts/osmo_ctrl.py scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py" +PY2_LIST="osmopy scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py" $PY2 ./setup.py install $PY2 tests/test_py2.py for f in $PY2_LIST @@ -24,4 +24,7 @@ $PY3 $COM_FLAGS $f done +cd scripts +./osmo_ctrl.py --help + # TODO: add more tests diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index bec6d1d..8c0608f 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # -*- mode: python-mode; py-indent-tabs-mode: nil -*- """ /* - * Copyright (C) 2016 sysmocom s.f.m.c. GmbH + * Copyright (C) 2016-2017 sysmocom s.f.m.c. GmbH * * All Rights Reserved * @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ """ -from __future__ import print_function + from optparse import OptionParser from osmopy.osmo_ipa import Ctrl import socket diff --git a/setup.py b/setup.py index 533272e..bab9c38 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ elif sys.version_info.major == 3: scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", + "scripts/osmo_ctrl.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:44:39 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5029 to look at the new patch set (#9). Add rate counter dumper This simple tool dump all the rate counters available via ctrl interface to cvs file (or stdout). Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Fixes: OS#2550 --- M README M contrib/jenkins.sh A scripts/osmo_rate_ctr2csv.py M setup.py 4 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/29/5029/9 diff --git a/README b/README index e85c1c4..2c04047 100644 --- a/README +++ b/README @@ -9,6 +9,7 @@ There are currently following scripts in this package: osmotestconfig.py - test that apps start/write with example configs soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted +osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa osmo_interact_vty.py - pipe stdin/stdout to a VTY session osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 9734549..f1651dc 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ rm -rf ./build PY3=python3 -PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" +PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_rate_ctr2csv.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" $PY3 ./setup.py install $PY3 tests/test_py3.py for f in $PY3_LIST diff --git a/scripts/osmo_rate_ctr2csv.py b/scripts/osmo_rate_ctr2csv.py new file mode 100644 index 0000000..1e3fc9f --- /dev/null +++ b/scripts/osmo_rate_ctr2csv.py @@ -0,0 +1,86 @@ +#!/usr/bin/python3 +# -*- mode: python-mode; py-indent-tabs-mode: nil -*- +""" +/* + * Copyright (C) 2017 sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +""" + +from osmopy.osmo_ipa import Ctrl +import socket, argparse, sys, logging, csv + +__version__ = "0.0.1" # bump this on every non-trivial change + +def connect(host, port): + sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sck.setblocking(1) + sck.connect((host, port)) + return sck + +def get_var(sck, var): + (_, c) = Ctrl().cmd(var, None) + sck.send(c) + return Ctrl().parse_kv(sck.recv(4096)) + +def get_interval(group_name, group_counters, interval): + log.debug('Getting %s counter values: %s...' % (group_name, interval)) + (_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name)) + for ctr in c.split(';'): + if len(ctr): + (k, v) = ctr.split() + group_counters[k] = group_counters.get(k, (group_name,)) + (v,) + return len(group_counters) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description='Dump rate counters into csv via Osmocom CTRL protocol.') + p.add_argument('-v', '--version', action='version', version=("%(prog)s v" + __version__)) + p.add_argument('-p', '--port', type=int, default=4249, help="Port to use for CTRL interface, defaults to 4249") + p.add_argument('-c', '--ctrl', default='localhost', help="Adress to use for CTRL interface, defaults to localhost") + p.add_argument('-d', '--debug', action='store_true', help="Enable debug log") + p.add_argument('--header', action='store_true', help="Prepend column header to output") + p.add_argument('-o', '--output', nargs='?', type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to stdout") + args = p.parse_args() + + log = logging.getLogger('rate_ctr2csv') + log.setLevel(logging.DEBUG if args.debug else logging.INFO) + log.addHandler(logging.StreamHandler(sys.stderr)) + + log.info('Connecting to %s:%d...' % (args.ctrl, args.port)) + sock = connect(args.ctrl, args.port) + + log.info('Getting rate counter groups info...') + (_, g) = get_var(sock, 'rate_ctr.*') + + w = csv.writer(args.output, dialect='unix') + total_groups = 0 + total_rows = 0 + + if args.header: + w.writerow(['group', 'counter', 'absolute', 'second', 'minute', 'hour', 'day']) + + for group in g.split(';'): + if len(group): + g_counters = {} + total_groups += 1 + total_rows += list(map(lambda x: get_interval(group, g_counters, x), ('abs', 'per_sec', 'per_min', 'per_hour', 'per_day')))[0] + for (k, (gr, absolute, per_sec, per_min, per_hour, per_day)) in g_counters.items(): + w.writerow([gr, k, absolute, per_sec, per_min, per_hour, per_day]) + + log.info('Completed: %d counters from %d groups received.' % (total_rows, total_groups)) diff --git a/setup.py b/setup.py index bab9c38..494f63f 100755 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ scripts = ["scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", + "scripts/osmo_rate_ctr2csv.py", "scripts/soap.py", "scripts/twisted_ipa.py", "scripts/osmo_verify_transcript_vty.py", -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:44:39 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:44:39 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5038 to look at the new patch set (#6). Improve python3 compatibility Use proper print() function to make scripts compatible with both python 2 and 3. This paves the way to deprecating python 2 support altogether. Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 --- M contrib/jenkins.sh M scripts/osmodumpdoc.py M scripts/osmotestconfig.py M scripts/osmotestvty.py M setup.py 5 files changed, 31 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/38/5038/6 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f1651dc..08908a4 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -16,7 +16,7 @@ rm -rf ./build PY3=python3 -PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_rate_ctr2csv.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" +PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_rate_ctr2csv.py scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" $PY3 ./setup.py install $PY3 tests/test_py3.py for f in $PY3_LIST diff --git a/scripts/osmodumpdoc.py b/scripts/osmodumpdoc.py index 2464b05..d71edc8 100644 --- a/scripts/osmodumpdoc.py +++ b/scripts/osmodumpdoc.py @@ -4,7 +4,7 @@ # Fixes may need to be applied to both. """Start the process and dump the documentation to the doc dir.""" - +from __future__ import print_function import subprocess import time import os @@ -21,7 +21,7 @@ out = open(filename, 'w') out.write(xml) out.close() - print 'generated %r' % filename + print('generated %r' % filename) """Dump the config of all the apps. @@ -40,22 +40,22 @@ for app in apps: appname = app[3] - print "Starting app for %s" % appname + print("Starting app for %s" % appname) proc = None cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])] - print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd) + print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)) try: proc = subprocess.Popen(cmd, stdin=None, stdout=None) except OSError as e: # Probably a missing binary - print >> sys.stderr, e - print >> sys.stderr, "Skipping app %s" % appname + print(e, file=sys.stderr) + print("Skipping app %s" % appname, file=sys.stderr) failures += 1 else: try: dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname) successes += 1 except IOError: # Generally a socket issue - print >> sys.stderr, "%s: couldn't connect, skipping" % appname + print("%s: couldn't connect, skipping" % appname, file=sys.stderr) failures += 1 finally: osmoutil.end_proc(proc) @@ -90,7 +90,7 @@ num_fails, num_sucs = dump_configs( osmoappdesc.apps, osmoappdesc.app_configs, confpath) if num_fails > 0: - print >> sys.stderr, "Warning: Skipped %s apps" % num_fails + print("Warning: Skipped %s apps" % num_fails, file=sys.stderr) if 0 == num_sucs: - print >> sys.stderr, "Nothing run, wrong working dir? Set with -w" + print("Nothing run, wrong working dir? Set with -w", file=sys.stderr) sys.exit(num_fails) diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py index 2132c43..f227504 100644 --- a/scripts/osmotestconfig.py +++ b/scripts/osmotestconfig.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import os.path import time @@ -52,7 +52,7 @@ try: cmd = app_desc[1].split(' ') + [ "-c", config] if verbose: - print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__) + print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)) proc = osmoutil.popen_devnull(cmd) end = app_desc[2] @@ -61,10 +61,10 @@ ret = run_test(vty) except IOError as se: - print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Error was %s" % se - print >> sys.stderr, "Config was\n%s" % open(config).read() + print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr) + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Error was %s" % se, file=sys.stderr) + print("Config was\n%s" % open(config).read(), file=sys.stderr) raise se finally: @@ -125,9 +125,8 @@ all_errs.append(err_lines) - print >> sys.stderr, \ - "Documentation error (missing docs): \n%s\n%s\n" % ( - cmd_line, '\n'.join(err_lines)) + print("Documentation error (missing docs): \n%s\n%s\n" % ( + cmd_line, '\n'.join(err_lines)), file=sys.stderr) return (len(all_errs), all_errs) @@ -157,7 +156,7 @@ if config in app_configs[app]: found = True if not found: - print >> sys.stderr, "Warning: %s is not being tested" % config + print("Warning: %s is not being tested" % config, file=sys.stderr) def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True, @@ -166,7 +165,7 @@ errors = 0 for app in apps: if not app_exists(app): - print >> sys.stderr, "Skipping app %s (not found)" % app[1] + print("Skipping app %s (not found)" % app[1], file=sys.stderr) continue configs = app_configs[app[3]] @@ -178,7 +177,7 @@ remove_tmpdir(tmpdir) if errors: - print >> sys.stderr, "ERRORS: %d" % errors + print("ERRORS: %d" % errors, file=sys.stderr) return errors diff --git a/scripts/osmotestvty.py b/scripts/osmotestvty.py index e513c05..55017a5 100644 --- a/scripts/osmotestvty.py +++ b/scripts/osmotestvty.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +from __future__ import print_function import os import time import unittest @@ -36,11 +36,11 @@ osmo_vty_cmd[cfi] = os.path.join(confpath, osmo_vty_cmd[cfi]) try: - print "Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd()) + print("Launch: %s from %s" % (' '.join(osmo_vty_cmd), os.getcwd())) self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: - print >> sys.stderr, "Current directory: %s" % os.getcwd() - print >> sys.stderr, "Consider setting -b" + print("Current directory: %s" % os.getcwd(), file=sys.stderr) + print("Consider setting -b", file=sys.stderr) appstring = osmoappdesc.vty_app[2] appport = osmoappdesc.vty_app[0] @@ -94,9 +94,9 @@ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc", args.p) - print "confpath %s, workdir %s" % (confpath, workdir) + print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) - print "Running tests for specific VTY commands" + print("Running tests for specific VTY commands") suite = unittest.TestLoader().loadTestsFromTestCase(TestVTY) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/setup.py b/setup.py index 494f63f..e1bdafe 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,10 @@ scripts = ["scripts/osmodumpdoc.py", "scripts/osmotestconfig.py", "scripts/osmotestvty.py"] elif sys.version_info.major == 3: - scripts = ["scripts/osmo_interact_vty.py", + scripts = ["scripts/osmodumpdoc.py", + "scripts/osmotestconfig.py", + "scripts/osmotestvty.py", + "scripts/osmo_interact_vty.py", "scripts/osmo_interact_ctrl.py", "scripts/osmo_ctrl.py", "scripts/osmo_rate_ctr2csv.py", -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Thu Dec 21 13:51:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 13:51:00 +0000 Subject: [PATCH] osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3820 to look at the new patch set (#7). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 --- M configure.ac M debian/control M src/libmsc/Makefile.am M src/libmsc/auth.c M src/libmsc/db.c M src/libmsc/gsm_04_08.c M src/libvlr/Makefile.am M src/libvlr/vlr.c M src/osmo-msc/Makefile.am M tests/db/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/Makefile.am 13 files changed, 10 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/3820/7 diff --git a/configure.ac b/configure.ac index 49d06f5..feb3de9 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) diff --git a/debian/control b/debian/control index 60d468e..6219ea4 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,6 @@ pkg-config, libdbi-dev, libtalloc-dev, - libssl-dev (>= 0.9.5), libsmpp34-dev (>= 1.12), libasn1c-dev (>= 0.9.28), libosmocore-dev (>= 0.10.0), diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..7dfb047 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c index 7b5367b..7c78c6e 100644 --- a/src/libmsc/auth.c +++ b/src/libmsc/auth.c @@ -28,8 +28,6 @@ #include #include -#include - #include const struct value_string auth_action_names[] = { diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 0cb8ff3..28004f7 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -42,8 +42,6 @@ #include #include -#include - static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 26ac923..88472e0 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "bscconfig.h" diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 511dfc0..e3d5ced 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -7,7 +7,6 @@ $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(NULL) noinst_HEADERS = \ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 670ff83..8c6911a 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -31,8 +31,6 @@ #include #include -#include - #include #include #include @@ -275,12 +273,13 @@ { struct vlr_instance *vlr = vsub->vlr; uint32_t tmsi; - int tried; + int tried, rc; for (tried = 0; tried < 100; tried++) { - if (RAND_bytes((uint8_t *) &tmsi, sizeof(tmsi)) != 1) { - LOGP(DVLR, LOGL_ERROR, "RAND_bytes failed\n"); - return -1; + rc = osmo_get_rand_id((uint8_t *) &tmsi, sizeof(tmsi)); + if (rc < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return rc; } /* throw the dice again, if the TSMI doesn't fit */ if (tmsi == GSM_RESERVED_TMSI) diff --git a/src/osmo-msc/Makefile.am b/src/osmo-msc/Makefile.am index e296f97..1d8bfbd 100644 --- a/src/osmo-msc/Makefile.am +++ b/src/osmo-msc/Makefile.am @@ -13,7 +13,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -43,7 +42,6 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBSMPP34_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ -ldbi \ diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index bcb66ec..720e005 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -42,6 +42,5 @@ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ $(LIBOSMOVTY_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..3a2c859 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -9,7 +9,6 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -30,7 +29,7 @@ -Wl,--wrap=ranap_iu_page_cs \ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ -Wl,--wrap=msc_call_assignment \ -Wl,--wrap=msc_call_release \ $(NULL) @@ -43,7 +42,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 9cc61b1..ac850b3 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -257,11 +257,11 @@ } unsigned char next_rand_byte = 0; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int __wrap_RAND_bytes(unsigned char *buf, int num) +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *buf, size_t num); +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - int i; + size_t i; for (i = 0; i < num; i++) buf[i] = next_rand_byte++; return 1; diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index a912be1..8c538b0 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -38,7 +37,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 7 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 14:00:51 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 14:00:51 +0000 Subject: [PATCH] osmo-bsc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3819 to look at the new patch set (#6). Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Related: OS#1694 --- M configure.ac M contrib/jenkins.sh M debian/control M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_nat.c M tests/channel/Makefile.am 6 files changed, 8 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/3819/6 diff --git a/configure.ac b/configure.ac index 98f96bb..97b2e2f 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.3.2) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.2.0) PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 57954f0..6ae6732 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,7 +18,7 @@ mkdir "$deps" || true -osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false +osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") diff --git a/debian/control b/debian/control index 5e9ad60..fae280a 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ libtool, pkg-config, python-minimal, - libssl-dev (>= 0.9.5), libtalloc-dev, libosmocore-dev (>= 0.10.0), libosmo-sccp-dev (>= 0.0.2), diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index 1bee68e..a941b58 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -12,7 +12,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -49,7 +48,6 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBRARY_GSM) \ -lrt \ $(NULL) diff --git a/src/osmo-bsc_nat/bsc_nat.c b/src/osmo-bsc_nat/bsc_nat.c index 1548ea3..5569d2f 100644 --- a/src/osmo-bsc_nat/bsc_nat.c +++ b/src/osmo-bsc_nat/bsc_nat.c @@ -74,8 +74,6 @@ #include -#include - #include "../../bscconfig.h" #define SCCP_CLOSE_TIME 20 @@ -208,7 +206,7 @@ 0x01, IPAC_IDTAG_UNITNAME, 0x01, IPAC_IDTAG_SERNR, }; - + int rc; uint8_t *mrand; uint8_t id_req[sizeof(s_id_req) + (2+16)]; uint8_t *buf = &id_req[sizeof(s_id_req)]; @@ -221,19 +219,17 @@ buf = v_put(buf, 0x23); mrand = bsc->last_rand; - if (RAND_bytes(mrand, 16) != 1) - goto failed_random; + rc = osmo_get_rand_id(mrand, 16); + if (rc < 0) { + /* the timeout will trigger and close this connection */ + LOGP(DNAT, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return; + } memcpy(buf, mrand, 16); buf += 16; bsc_send_data(bsc, id_req, sizeof(id_req), IPAC_PROTO_IPACCESS); - return; - -failed_random: - /* the timeout will trigger and close this connection */ - LOGP(DNAT, LOGL_ERROR, "Failed to read from urandom.\n"); - return; } static struct msgb *nat_create_rlsd(struct nat_sccp_connection *conn) diff --git a/tests/channel/Makefile.am b/tests/channel/Makefile.am index 395daf7..12f18f8 100644 --- a/tests/channel/Makefile.am +++ b/tests/channel/Makefile.am @@ -29,5 +29,4 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/3819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 14:15:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 14:15:18 +0000 Subject: [MERGED] osmo-pcu[master]: Add function to get max supported MS class In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add function to get max supported MS class ...................................................................... Add function to get max supported MS class It's useful for allocation tests. Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Related: OS#2282 --- M src/mslot_class.c M src/mslot_class.h 2 files changed, 7 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/mslot_class.c b/src/mslot_class.c index 6d7c09d..19fea3e 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -82,6 +82,11 @@ return &gprs_ms_multislot_class[index]; } +uint8_t mslot_class_max() +{ + return ARRAY_SIZE(gprs_ms_multislot_class); +} + uint8_t mslot_class_get_ta(uint8_t ms_cl) { return get_mslot_table(ms_cl)->ta; diff --git a/src/mslot_class.h b/src/mslot_class.h index f26bd64..9e9dfba 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -28,7 +28,7 @@ /* 3GPP TS 05.02 Annex B.1 */ -#define MS_NA 255 /* N/A */// +#define MS_NA 255 /* N/A */ #define MS_A 254 /* 1 with hopping, 0 without */ #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ @@ -44,3 +44,4 @@ uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); uint8_t mslot_class_get_type(uint8_t ms_cl); +uint8_t mslot_class_max(); -- To view, visit https://gerrit.osmocom.org/4955 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:01:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:01:07 +0000 Subject: [PATCH] libosmocore[master]: Remove unused check Message-ID: Review at https://gerrit.osmocom.org/5536 Remove unused check We no longer use FreeBSD in jenkins so there's no point in checking for it. Change-Id: Ib5d9f9278af15f0fee0dc5537489de4469b692d2 --- M contrib/jenkins.sh 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/5536/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index c341d05..df0a512 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,10 +5,6 @@ ENABLE_SANITIZE="--enable-sanitize" -if [ "x$label" = "xFreeBSD_amd64" ]; then - ENABLE_SANITIZE="" -fi - src_dir="$PWD" build() { build_dir="$1" -- To view, visit https://gerrit.osmocom.org/5536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5d9f9278af15f0fee0dc5537489de4469b692d2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:04:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:04:18 +0000 Subject: [PATCH] libosmo-netif[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5537 Enable sanitize for CI tests Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/37/5537/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index ac898f7..c289d2d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ set -x autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:06:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:06:08 +0000 Subject: [PATCH] libosmo-sccp[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5538 Enable sanitize for CI tests Change-Id: Ida8cfcd9a9f86e65273452afa051381bc0c16421 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/38/5538/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index adc5db7..0d68f7c 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ set -x autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5538 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida8cfcd9a9f86e65273452afa051381bc0c16421 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:07:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:07:45 +0000 Subject: [PATCH] libsmpp34[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5539 Enable sanitize for CI tests Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/39/5539/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 6bf176a..4a31aef 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure +./configure --enable-sanitize $MAKE CFLAGS="-Werror" CPPFLAGS="-Werror" # currently broken $MAKE $PARALLEL_MAKE # currently broken $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/5539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:13:05 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:13:05 +0000 Subject: [PATCH] osmo-ggsn[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5540 Enable sanitize for CI tests Change-Id: I7559807d54bec5da45ea5c41b10d396d992cb1b7 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/40/5540/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 06c24e5..033eed7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,7 +38,7 @@ cd "$base" autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/5540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7559807d54bec5da45ea5c41b10d396d992cb1b7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:16:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:16:06 +0000 Subject: [PATCH] osmo-sgsn[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5541 Enable sanitize for CI tests While at it, also remove unsupported ./configure options remaining since before repo split. Change-Id: I77b3375fd680be269fd2df7db61ece6c5d1754ba --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/41/5541/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fa7c60e..d2db0c9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -46,7 +46,7 @@ cd "$base" autoreconf --install --force -./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests +./configure --enable-sanitize $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77b3375fd680be269fd2df7db61ece6c5d1754ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:18:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:18:54 +0000 Subject: [PATCH] osmo-msc[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5542 Enable sanitize for CI tests Change-Id: I23da6f9b836595d81b509c8a6fb4e46b5d675103 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/42/5542/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b0dde06..e4f90e6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -48,7 +48,7 @@ cd "$base" autoreconf --install --force -./configure --enable-smpp $IU --enable-external-tests +./configure --enable-sanitize --enable-smpp $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5542 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23da6f9b836595d81b509c8a6fb4e46b5d675103 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:20:09 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:20:09 +0000 Subject: [PATCH] osmo-bsc[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5543 Enable sanitize for CI tests Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/5543/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 57954f0..d7a41a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -40,7 +40,7 @@ cd "$base" autoreconf --install --force -./configure --enable-vty-tests --enable-external-tests +./configure --enable-sanitize --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:28:23 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:28:23 +0000 Subject: [PATCH] osmo-pcu[master]: Add --enable-sanitize configure option Message-ID: Review at https://gerrit.osmocom.org/5544 Add --enable-sanitize configure option Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/44/5544/1 diff --git a/configure.ac b/configure.ac index 3533af9..5867cbe 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,15 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) -- To view, visit https://gerrit.osmocom.org/5544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:30:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:30:18 +0000 Subject: [PATCH] osmo-bts[master]: Add --enable-sanitize configure option Message-ID: Review at https://gerrit.osmocom.org/5545 Add --enable-sanitize configure option Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1 --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/5545/1 diff --git a/configure.ac b/configure.ac index e3ea9ca..89443d0 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,15 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) -- To view, visit https://gerrit.osmocom.org/5545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 16:35:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 16:35:04 +0000 Subject: [PATCH] osmo-pcu[master]: Enable sanitize for CI test Message-ID: Review at https://gerrit.osmocom.org/5546 Enable sanitize for CI test Change-Id: Ia33ffb9b25df587706367bc24925cf9cead3b9a0 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/5546/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb529a4..05b9639 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -44,7 +44,8 @@ cd "$base" elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then - echo "Direct DSP access disabled" + echo "Direct DSP access disabled, sanitizer enabled" + PCU_CONFIG="$PCU_CONFIG --enable-sanitize" else echo 'Invalid $with_dsp value:' $with_dsp exit 1 -- To view, visit https://gerrit.osmocom.org/5546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia33ffb9b25df587706367bc24925cf9cead3b9a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:56:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:56:53 +0000 Subject: osmo-pcu[master]: Enable sanitize for CI test In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia33ffb9b25df587706367bc24925cf9cead3b9a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:05 +0000 Subject: osmo-pcu[master]: Add --enable-sanitize configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:09 +0000 Subject: [MERGED] osmo-pcu[master]: Add --enable-sanitize configure option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add --enable-sanitize configure option ...................................................................... Add --enable-sanitize configure option Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 3533af9..5867cbe 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,15 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) -- To view, visit https://gerrit.osmocom.org/5544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:24 +0000 Subject: osmo-bts[master]: Add --enable-sanitize configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:29 +0000 Subject: [MERGED] osmo-bts[master]: Add --enable-sanitize configure option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add --enable-sanitize configure option ...................................................................... Add --enable-sanitize configure option Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1 --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index e3ea9ca..89443d0 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,15 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) -- To view, visit https://gerrit.osmocom.org/5545 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:37 +0000 Subject: libosmo-netif[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:40 +0000 Subject: [MERGED] libosmo-netif[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index ac898f7..c289d2d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ set -x autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5537 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a888a415698db5a11d74422f7ccb2d94126f56e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:45 +0000 Subject: osmo-bsc[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:49 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:49 +0000 Subject: [MERGED] osmo-bsc[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 57954f0..d7a41a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -40,7 +40,7 @@ cd "$base" autoreconf --install --force -./configure --enable-vty-tests --enable-external-tests +./configure --enable-sanitize --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5543 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:55 +0000 Subject: osmo-msc[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5542 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I23da6f9b836595d81b509c8a6fb4e46b5d675103 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:57:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:57:59 +0000 Subject: [MERGED] osmo-msc[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: I23da6f9b836595d81b509c8a6fb4e46b5d675103 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b0dde06..e4f90e6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -48,7 +48,7 @@ cd "$base" autoreconf --install --force -./configure --enable-smpp $IU --enable-external-tests +./configure --enable-sanitize --enable-smpp $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5542 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23da6f9b836595d81b509c8a6fb4e46b5d675103 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:03 +0000 Subject: osmo-sgsn[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77b3375fd680be269fd2df7db61ece6c5d1754ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:07 +0000 Subject: [MERGED] osmo-sgsn[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests While at it, also remove unsupported ./configure options remaining since before repo split. Change-Id: I77b3375fd680be269fd2df7db61ece6c5d1754ba --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fa7c60e..d2db0c9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -46,7 +46,7 @@ cd "$base" autoreconf --install --force -./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests +./configure --enable-sanitize $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5541 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77b3375fd680be269fd2df7db61ece6c5d1754ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:14 +0000 Subject: osmo-ggsn[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7559807d54bec5da45ea5c41b10d396d992cb1b7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:21 +0000 Subject: [MERGED] osmo-ggsn[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: I7559807d54bec5da45ea5c41b10d396d992cb1b7 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 06c24e5..033eed7 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,7 +38,7 @@ cd "$base" autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/5540 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7559807d54bec5da45ea5c41b10d396d992cb1b7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:28 +0000 Subject: libsmpp34[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:31 +0000 Subject: [MERGED] libsmpp34[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 6bf176a..4a31aef 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure +./configure --enable-sanitize $MAKE CFLAGS="-Werror" CPPFLAGS="-Werror" # currently broken $MAKE $PARALLEL_MAKE # currently broken $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/5539 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:37 +0000 Subject: libosmo-sccp[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5538 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ida8cfcd9a9f86e65273452afa051381bc0c16421 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:41 +0000 Subject: [MERGED] libosmo-sccp[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI tests ...................................................................... Enable sanitize for CI tests Change-Id: Ida8cfcd9a9f86e65273452afa051381bc0c16421 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index adc5db7..0d68f7c 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ set -x autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5538 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida8cfcd9a9f86e65273452afa051381bc0c16421 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:58:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:58:53 +0000 Subject: [MERGED] osmo-pcu[master]: Enable sanitize for CI test In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Enable sanitize for CI test ...................................................................... Enable sanitize for CI test Change-Id: Ia33ffb9b25df587706367bc24925cf9cead3b9a0 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb529a4..05b9639 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -44,7 +44,8 @@ cd "$base" elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then - echo "Direct DSP access disabled" + echo "Direct DSP access disabled, sanitizer enabled" + PCU_CONFIG="$PCU_CONFIG --enable-sanitize" else echo 'Invalid $with_dsp value:' $with_dsp exit 1 -- To view, visit https://gerrit.osmocom.org/5546 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia33ffb9b25df587706367bc24925cf9cead3b9a0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:59:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:59:35 +0000 Subject: libosmocore[master]: Remove unused check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Wie might do it again some day -- To view, visit https://gerrit.osmocom.org/5536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib5d9f9278af15f0fee0dc5537489de4469b692d2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 21 17:59:40 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 21 Dec 2017 17:59:40 +0000 Subject: [ABANDON] libosmocore[master]: Remove unused check In-Reply-To: References: Message-ID: Harald Welte has abandoned this change. Change subject: Remove unused check ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/5536 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib5d9f9278af15f0fee0dc5537489de4469b692d2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 21 18:00:55 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 21 Dec 2017 18:00:55 +0000 Subject: [PATCH] osmo-pcu[master]: TBF: bail out for unknown timers Message-ID: Review at https://gerrit.osmocom.org/5547 TBF: bail out for unknown timers Return right after logging error if attempting to start or stop unknown timer. Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551 Fixes: CID181512, CID181514 --- M src/tbf.cpp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/5547/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 520f6c4..aec67e7 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -543,6 +543,7 @@ if (t >= T_MAX) { LOGPTBF(this, LOGL_ERROR, "attempting to stop unknown timer %s [%s]\n", get_value_string(tbf_timers_names, t), reason); + return; } if (osmo_timer_pending(&T[t])) { @@ -600,6 +601,7 @@ if (t >= T_MAX) { LOGPSRC(DRLCMAC, LOGL_ERROR, file, line, "%s attempting to start unknown timer %s [%s]\n", tbf_name(this), get_value_string(tbf_timers_names, t), reason); + return; } if (!force && osmo_timer_pending(&T[t])) -- To view, visit https://gerrit.osmocom.org/5547 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 22 13:23:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 22 Dec 2017 13:23:04 +0000 Subject: [PATCH] osmo-pcu[master]: Add tests for pcu_lsb() Message-ID: Review at https://gerrit.osmocom.org/5548 Add tests for pcu_lsb() This utility functions is used by TBF allocation routines and only tested indirectly through allocation test. Let's add proper exhaustive test which checks all uint8_t values. This also requires adding missing include to pcu_utils.h Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab --- M src/pcu_utils.h M tests/types/TypesTest.cpp M tests/types/TypesTest.ok 3 files changed, 279 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/48/5548/1 diff --git a/src/pcu_utils.h b/src/pcu_utils.h index 3a64a47..767771c 100644 --- a/src/pcu_utils.h +++ b/src/pcu_utils.h @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +extern "C" { +#include +} + inline int msecs_to_frames(int msecs) { return (msecs * (1024 * 1000 / 4615)) / 1024; } diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 7d09108..ff78c87 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -21,6 +21,7 @@ */ #include "bts.h" #include "tbf.h" +#include "pcu_utils.h" #include "gprs_debug.h" #include "encoding.h" #include "decoding.h" @@ -30,6 +31,7 @@ #include #include #include +#include } #define OSMO_ASSERT_STR_EQ(a, b) \ @@ -463,6 +465,20 @@ } +static void test_lsb() +{ + uint8_t u = 0; + + printf("Testing LBS utility...\n"); + + do { + uint8_t x = pcu_lsb(u); /* equivalent of (1 << ffs(u)) / 2 */ + printf("%2X " OSMO_BIT_SPEC ": {%d} %3d\n", + u, OSMO_BIT_PRINT(u), pcu_bitcount(u), x); + u++; + } while (u); +} + int main(int argc, char **argv) { osmo_init_logging(&gprs_log_info); @@ -476,6 +492,8 @@ test_rlc_v_n(); test_rlc_dl_ul_basic(); test_immediate_assign_rej(); + test_lsb(); + return EXIT_SUCCESS; } diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok index fe5162c..4bdd917 100644 --- a/tests/types/TypesTest.ok +++ b/tests/types/TypesTest.ok @@ -8,3 +8,260 @@ show_rbb: IIRRIIIR assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b +Testing LBS utility... + 0 ........: {0} 0 + 1 .......1: {1} 1 + 2 ......1.: {1} 2 + 3 ......11: {2} 1 + 4 .....1..: {1} 4 + 5 .....1.1: {2} 1 + 6 .....11.: {2} 2 + 7 .....111: {3} 1 + 8 ....1...: {1} 8 + 9 ....1..1: {2} 1 + A ....1.1.: {2} 2 + B ....1.11: {3} 1 + C ....11..: {2} 4 + D ....11.1: {3} 1 + E ....111.: {3} 2 + F ....1111: {4} 1 +10 ...1....: {1} 16 +11 ...1...1: {2} 1 +12 ...1..1.: {2} 2 +13 ...1..11: {3} 1 +14 ...1.1..: {2} 4 +15 ...1.1.1: {3} 1 +16 ...1.11.: {3} 2 +17 ...1.111: {4} 1 +18 ...11...: {2} 8 +19 ...11..1: {3} 1 +1A ...11.1.: {3} 2 +1B ...11.11: {4} 1 +1C ...111..: {3} 4 +1D ...111.1: {4} 1 +1E ...1111.: {4} 2 +1F ...11111: {5} 1 +20 ..1.....: {1} 32 +21 ..1....1: {2} 1 +22 ..1...1.: {2} 2 +23 ..1...11: {3} 1 +24 ..1..1..: {2} 4 +25 ..1..1.1: {3} 1 +26 ..1..11.: {3} 2 +27 ..1..111: {4} 1 +28 ..1.1...: {2} 8 +29 ..1.1..1: {3} 1 +2A ..1.1.1.: {3} 2 +2B ..1.1.11: {4} 1 +2C ..1.11..: {3} 4 +2D ..1.11.1: {4} 1 +2E ..1.111.: {4} 2 +2F ..1.1111: {5} 1 +30 ..11....: {2} 16 +31 ..11...1: {3} 1 +32 ..11..1.: {3} 2 +33 ..11..11: {4} 1 +34 ..11.1..: {3} 4 +35 ..11.1.1: {4} 1 +36 ..11.11.: {4} 2 +37 ..11.111: {5} 1 +38 ..111...: {3} 8 +39 ..111..1: {4} 1 +3A ..111.1.: {4} 2 +3B ..111.11: {5} 1 +3C ..1111..: {4} 4 +3D ..1111.1: {5} 1 +3E ..11111.: {5} 2 +3F ..111111: {6} 1 +40 .1......: {1} 64 +41 .1.....1: {2} 1 +42 .1....1.: {2} 2 +43 .1....11: {3} 1 +44 .1...1..: {2} 4 +45 .1...1.1: {3} 1 +46 .1...11.: {3} 2 +47 .1...111: {4} 1 +48 .1..1...: {2} 8 +49 .1..1..1: {3} 1 +4A .1..1.1.: {3} 2 +4B .1..1.11: {4} 1 +4C .1..11..: {3} 4 +4D .1..11.1: {4} 1 +4E .1..111.: {4} 2 +4F .1..1111: {5} 1 +50 .1.1....: {2} 16 +51 .1.1...1: {3} 1 +52 .1.1..1.: {3} 2 +53 .1.1..11: {4} 1 +54 .1.1.1..: {3} 4 +55 .1.1.1.1: {4} 1 +56 .1.1.11.: {4} 2 +57 .1.1.111: {5} 1 +58 .1.11...: {3} 8 +59 .1.11..1: {4} 1 +5A .1.11.1.: {4} 2 +5B .1.11.11: {5} 1 +5C .1.111..: {4} 4 +5D .1.111.1: {5} 1 +5E .1.1111.: {5} 2 +5F .1.11111: {6} 1 +60 .11.....: {2} 32 +61 .11....1: {3} 1 +62 .11...1.: {3} 2 +63 .11...11: {4} 1 +64 .11..1..: {3} 4 +65 .11..1.1: {4} 1 +66 .11..11.: {4} 2 +67 .11..111: {5} 1 +68 .11.1...: {3} 8 +69 .11.1..1: {4} 1 +6A .11.1.1.: {4} 2 +6B .11.1.11: {5} 1 +6C .11.11..: {4} 4 +6D .11.11.1: {5} 1 +6E .11.111.: {5} 2 +6F .11.1111: {6} 1 +70 .111....: {3} 16 +71 .111...1: {4} 1 +72 .111..1.: {4} 2 +73 .111..11: {5} 1 +74 .111.1..: {4} 4 +75 .111.1.1: {5} 1 +76 .111.11.: {5} 2 +77 .111.111: {6} 1 +78 .1111...: {4} 8 +79 .1111..1: {5} 1 +7A .1111.1.: {5} 2 +7B .1111.11: {6} 1 +7C .11111..: {5} 4 +7D .11111.1: {6} 1 +7E .111111.: {6} 2 +7F .1111111: {7} 1 +80 1.......: {1} 128 +81 1......1: {2} 1 +82 1.....1.: {2} 2 +83 1.....11: {3} 1 +84 1....1..: {2} 4 +85 1....1.1: {3} 1 +86 1....11.: {3} 2 +87 1....111: {4} 1 +88 1...1...: {2} 8 +89 1...1..1: {3} 1 +8A 1...1.1.: {3} 2 +8B 1...1.11: {4} 1 +8C 1...11..: {3} 4 +8D 1...11.1: {4} 1 +8E 1...111.: {4} 2 +8F 1...1111: {5} 1 +90 1..1....: {2} 16 +91 1..1...1: {3} 1 +92 1..1..1.: {3} 2 +93 1..1..11: {4} 1 +94 1..1.1..: {3} 4 +95 1..1.1.1: {4} 1 +96 1..1.11.: {4} 2 +97 1..1.111: {5} 1 +98 1..11...: {3} 8 +99 1..11..1: {4} 1 +9A 1..11.1.: {4} 2 +9B 1..11.11: {5} 1 +9C 1..111..: {4} 4 +9D 1..111.1: {5} 1 +9E 1..1111.: {5} 2 +9F 1..11111: {6} 1 +A0 1.1.....: {2} 32 +A1 1.1....1: {3} 1 +A2 1.1...1.: {3} 2 +A3 1.1...11: {4} 1 +A4 1.1..1..: {3} 4 +A5 1.1..1.1: {4} 1 +A6 1.1..11.: {4} 2 +A7 1.1..111: {5} 1 +A8 1.1.1...: {3} 8 +A9 1.1.1..1: {4} 1 +AA 1.1.1.1.: {4} 2 +AB 1.1.1.11: {5} 1 +AC 1.1.11..: {4} 4 +AD 1.1.11.1: {5} 1 +AE 1.1.111.: {5} 2 +AF 1.1.1111: {6} 1 +B0 1.11....: {3} 16 +B1 1.11...1: {4} 1 +B2 1.11..1.: {4} 2 +B3 1.11..11: {5} 1 +B4 1.11.1..: {4} 4 +B5 1.11.1.1: {5} 1 +B6 1.11.11.: {5} 2 +B7 1.11.111: {6} 1 +B8 1.111...: {4} 8 +B9 1.111..1: {5} 1 +BA 1.111.1.: {5} 2 +BB 1.111.11: {6} 1 +BC 1.1111..: {5} 4 +BD 1.1111.1: {6} 1 +BE 1.11111.: {6} 2 +BF 1.111111: {7} 1 +C0 11......: {2} 64 +C1 11.....1: {3} 1 +C2 11....1.: {3} 2 +C3 11....11: {4} 1 +C4 11...1..: {3} 4 +C5 11...1.1: {4} 1 +C6 11...11.: {4} 2 +C7 11...111: {5} 1 +C8 11..1...: {3} 8 +C9 11..1..1: {4} 1 +CA 11..1.1.: {4} 2 +CB 11..1.11: {5} 1 +CC 11..11..: {4} 4 +CD 11..11.1: {5} 1 +CE 11..111.: {5} 2 +CF 11..1111: {6} 1 +D0 11.1....: {3} 16 +D1 11.1...1: {4} 1 +D2 11.1..1.: {4} 2 +D3 11.1..11: {5} 1 +D4 11.1.1..: {4} 4 +D5 11.1.1.1: {5} 1 +D6 11.1.11.: {5} 2 +D7 11.1.111: {6} 1 +D8 11.11...: {4} 8 +D9 11.11..1: {5} 1 +DA 11.11.1.: {5} 2 +DB 11.11.11: {6} 1 +DC 11.111..: {5} 4 +DD 11.111.1: {6} 1 +DE 11.1111.: {6} 2 +DF 11.11111: {7} 1 +E0 111.....: {3} 32 +E1 111....1: {4} 1 +E2 111...1.: {4} 2 +E3 111...11: {5} 1 +E4 111..1..: {4} 4 +E5 111..1.1: {5} 1 +E6 111..11.: {5} 2 +E7 111..111: {6} 1 +E8 111.1...: {4} 8 +E9 111.1..1: {5} 1 +EA 111.1.1.: {5} 2 +EB 111.1.11: {6} 1 +EC 111.11..: {5} 4 +ED 111.11.1: {6} 1 +EE 111.111.: {6} 2 +EF 111.1111: {7} 1 +F0 1111....: {4} 16 +F1 1111...1: {5} 1 +F2 1111..1.: {5} 2 +F3 1111..11: {6} 1 +F4 1111.1..: {5} 4 +F5 1111.1.1: {6} 1 +F6 1111.11.: {6} 2 +F7 1111.111: {7} 1 +F8 11111...: {5} 8 +F9 11111..1: {6} 1 +FA 11111.1.: {6} 2 +FB 11111.11: {7} 1 +FC 111111..: {6} 4 +FD 111111.1: {7} 1 +FE 1111111.: {7} 2 +FF 11111111: {8} 1 -- To view, visit https://gerrit.osmocom.org/5548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 22 13:39:38 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 22 Dec 2017 13:39:38 +0000 Subject: [ABANDON] osmo-pcu[master]: TS alloc: use standard function In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: TS alloc: use standard function ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/3896 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2d14ef327b09173d56ee3bca7e3ca85897d381c7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 22 15:48:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 15:48:35 +0000 Subject: [PATCH] libosmocore[master]: timer: fixup whitespace issues Message-ID: Review at https://gerrit.osmocom.org/5549 timer: fixup whitespace issues Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b --- M src/timer.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/5549/1 diff --git a/src/timer.c b/src/timer.c index 9ec7a00..02160a1 100644 --- a/src/timer.c +++ b/src/timer.c @@ -60,10 +60,10 @@ new = &((*new)->rb_left); else new = &((*new)->rb_right); - } + } - rb_link_node(&timer->node, parent, new); - rb_insert_color(&timer->node, &timer_root); + rb_link_node(&timer->node, parent, new); + rb_insert_color(&timer->node, &timer_root); } /*! set up timer callback and data -- To view, visit https://gerrit.osmocom.org/5549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 15:48:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 15:48:35 +0000 Subject: [PATCH] libosmocore[master]: control_if: Close control connection socket/fd on read/write... Message-ID: Review at https://gerrit.osmocom.org/5550 control_if: Close control connection socket/fd on read/write == 0 When read() or write() system calls return '0' on a stream socket, it means that the connection has been closed ("EOF"). We must accordingly close this socket and remove all related state. Before this patch, every new CTRL connection would introduce a leak of both some memory/state, as well as a file descriptor :( Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf --- M src/ctrl/control_if.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/5550/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 17a012a..6293ff5 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -341,6 +341,7 @@ /* msg was already discarded. */ if (ret == 0) { LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); + control_close_conn(ccon); ret = -EIO; } else @@ -414,10 +415,17 @@ static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) { + struct osmo_wqueue *queue; + struct ctrl_connection *ccon; int rc; + queue = container_of(bfd, struct osmo_wqueue, bfd); + ccon = container_of(queue, struct ctrl_connection, write_queue); + rc = write(bfd->fd, msg->data, msg->len); - if (rc != msg->len) + if (rc == 0) + control_close_conn(ccon); + else if (rc != msg->len) LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the control connection.\n"); return rc; -- To view, visit https://gerrit.osmocom.org/5550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 15:48:35 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 15:48:35 +0000 Subject: [PATCH] libosmocore[master]: control_if: Log the disconnect of a CTRL client Message-ID: Review at https://gerrit.osmocom.org/5551 control_if: Log the disconnect of a CTRL client We are logging new CTRL connections at LOGL_INFO, so we should also log disconnects for symmetry. Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba --- M src/ctrl/control_if.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/5551/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 6293ff5..4f14f49 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -168,6 +168,9 @@ static void control_close_conn(struct ctrl_connection *ccon) { struct ctrl_cmd_def *cd, *cd2; + char *name = osmo_sock_get_name(ccon, ccon->write_queue.bfd.fd); + + LOGP(DLCTRL, LOGL_INFO, "close()d control connection %s\n", name); osmo_wqueue_clear(&ccon->write_queue); close(ccon->write_queue.bfd.fd); -- To view, visit https://gerrit.osmocom.org/5551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 15:49:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 15:49:43 +0000 Subject: libosmocore[master]: control_if: Close control connection socket/fd on read/write... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 15:49:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 15:49:59 +0000 Subject: libosmocore[master]: timer: fixup whitespace issues In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 16:30:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 16:30:03 +0000 Subject: [MERGED] libosmocore[master]: control_if: Close control connection socket/fd on read/write... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: control_if: Close control connection socket/fd on read/write == 0 ...................................................................... control_if: Close control connection socket/fd on read/write == 0 When read() or write() system calls return '0' on a stream socket, it means that the connection has been closed ("EOF"). We must accordingly close this socket and remove all related state. Before this patch, every new CTRL connection would introduce a leak of both some memory/state, as well as a file descriptor :( Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf --- M src/ctrl/control_if.c 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 17a012a..6293ff5 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -341,6 +341,7 @@ /* msg was already discarded. */ if (ret == 0) { LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); + control_close_conn(ccon); ret = -EIO; } else @@ -414,10 +415,17 @@ static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg) { + struct osmo_wqueue *queue; + struct ctrl_connection *ccon; int rc; + queue = container_of(bfd, struct osmo_wqueue, bfd); + ccon = container_of(queue, struct ctrl_connection, write_queue); + rc = write(bfd->fd, msg->data, msg->len); - if (rc != msg->len) + if (rc == 0) + control_close_conn(ccon); + else if (rc != msg->len) LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the control connection.\n"); return rc; -- To view, visit https://gerrit.osmocom.org/5550 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 16:30:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 16:30:04 +0000 Subject: [MERGED] libosmocore[master]: timer: fixup whitespace issues In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: timer: fixup whitespace issues ...................................................................... timer: fixup whitespace issues Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b --- M src/timer.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/timer.c b/src/timer.c index 9ec7a00..02160a1 100644 --- a/src/timer.c +++ b/src/timer.c @@ -60,10 +60,10 @@ new = &((*new)->rb_left); else new = &((*new)->rb_right); - } + } - rb_link_node(&timer->node, parent, new); - rb_insert_color(&timer->node, &timer_root); + rb_link_node(&timer->node, parent, new); + rb_insert_color(&timer->node, &timer_root); } /*! set up timer callback and data -- To view, visit https://gerrit.osmocom.org/5549 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 17:06:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 17:06:52 +0000 Subject: [PATCH] libosmocore[master]: control_if: Log the disconnect of a CTRL client In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5551 to look at the new patch set (#2). control_if: Log the disconnect of a CTRL client We are logging new CTRL connections at LOGL_INFO, so we should also log disconnects for symmetry. Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba --- M src/ctrl/control_if.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/5551/2 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 6293ff5..a4382fa 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -168,6 +168,10 @@ static void control_close_conn(struct ctrl_connection *ccon) { struct ctrl_cmd_def *cd, *cd2; + char *name = osmo_sock_get_name(ccon, ccon->write_queue.bfd.fd); + + LOGP(DLCTRL, LOGL_INFO, "close()d CTRL connection %s\n", name); + talloc_free(name); osmo_wqueue_clear(&ccon->write_queue); close(ccon->write_queue.bfd.fd); @@ -340,7 +344,6 @@ return 0; /* msg was already discarded. */ if (ret == 0) { - LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); control_close_conn(ccon); ret = -EIO; } -- To view, visit https://gerrit.osmocom.org/5551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 17:06:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 17:06:54 +0000 Subject: [PATCH] libosmocore[master]: CTRL: Ensure peer/connection info is always printed the same... Message-ID: Review at https://gerrit.osmocom.org/5552 CTRL: Ensure peer/connection info is always printed the same way Now that we use osmo_sock_get_name() to print connection information at disconnect, let's use the same also at accept() time. Furthermore, let's call it CTRL connection everywhere for consistency. Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea --- M src/ctrl/control_if.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/5552/1 diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index a4382fa..07de0d4 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -429,7 +429,7 @@ if (rc == 0) control_close_conn(ccon); else if (rc != msg->len) - LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the control connection.\n"); + LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the CTRL connection.\n"); return rc; } @@ -464,20 +464,17 @@ int ret, fd, on; struct ctrl_handle *ctrl; struct ctrl_connection *ccon; - struct sockaddr_in sa; - socklen_t sa_len = sizeof(sa); + char *name; if (!(what & BSC_FD_READ)) return 0; - fd = accept(listen_bfd->fd, (struct sockaddr *) &sa, &sa_len); + fd = accept(listen_bfd->fd, NULL, NULL); if (fd < 0) { perror("accept"); return fd; } - LOGP(DLCTRL, LOGL_INFO, "accept()ed new control connection from %s\n", - inet_ntoa(sa.sin_addr)); #ifdef TCP_NODELAY on = 1; @@ -496,6 +493,9 @@ return -1; } + name = osmo_sock_get_name(ccon, fd); + LOGP(DLCTRL, LOGL_INFO, "accept()ed new CTRL connection from %s\n", name); + ccon->write_queue.bfd.fd = fd; ccon->write_queue.bfd.when = BSC_FD_READ; -- To view, visit https://gerrit.osmocom.org/5552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 17:08:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 17:08:14 +0000 Subject: libosmocore[master]: control_if: Log the disconnect of a CTRL client In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 17:08:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 17:08:29 +0000 Subject: libosmocore[master]: CTRL: Ensure peer/connection info is always printed the same... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:13:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:13:21 +0000 Subject: [MERGED] libosmocore[master]: CTRL: Ensure peer/connection info is always printed the same... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: CTRL: Ensure peer/connection info is always printed the same way ...................................................................... CTRL: Ensure peer/connection info is always printed the same way Now that we use osmo_sock_get_name() to print connection information at disconnect, let's use the same also at accept() time. Furthermore, let's call it CTRL connection everywhere for consistency. Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea --- M src/ctrl/control_if.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index a4382fa..07de0d4 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -429,7 +429,7 @@ if (rc == 0) control_close_conn(ccon); else if (rc != msg->len) - LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the control connection.\n"); + LOGP(DLCTRL, LOGL_ERROR, "Failed to write message to the CTRL connection.\n"); return rc; } @@ -464,20 +464,17 @@ int ret, fd, on; struct ctrl_handle *ctrl; struct ctrl_connection *ccon; - struct sockaddr_in sa; - socklen_t sa_len = sizeof(sa); + char *name; if (!(what & BSC_FD_READ)) return 0; - fd = accept(listen_bfd->fd, (struct sockaddr *) &sa, &sa_len); + fd = accept(listen_bfd->fd, NULL, NULL); if (fd < 0) { perror("accept"); return fd; } - LOGP(DLCTRL, LOGL_INFO, "accept()ed new control connection from %s\n", - inet_ntoa(sa.sin_addr)); #ifdef TCP_NODELAY on = 1; @@ -496,6 +493,9 @@ return -1; } + name = osmo_sock_get_name(ccon, fd); + LOGP(DLCTRL, LOGL_INFO, "accept()ed new CTRL connection from %s\n", name); + ccon->write_queue.bfd.fd = fd; ccon->write_queue.bfd.when = BSC_FD_READ; -- To view, visit https://gerrit.osmocom.org/5552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:13:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:13:22 +0000 Subject: [MERGED] libosmocore[master]: control_if: Log the disconnect of a CTRL client In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: control_if: Log the disconnect of a CTRL client ...................................................................... control_if: Log the disconnect of a CTRL client We are logging new CTRL connections at LOGL_INFO, so we should also log disconnects for symmetry. Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba --- M src/ctrl/control_if.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 6293ff5..a4382fa 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -168,6 +168,10 @@ static void control_close_conn(struct ctrl_connection *ccon) { struct ctrl_cmd_def *cd, *cd2; + char *name = osmo_sock_get_name(ccon, ccon->write_queue.bfd.fd); + + LOGP(DLCTRL, LOGL_INFO, "close()d CTRL connection %s\n", name); + talloc_free(name); osmo_wqueue_clear(&ccon->write_queue); close(ccon->write_queue.bfd.fd); @@ -340,7 +344,6 @@ return 0; /* msg was already discarded. */ if (ret == 0) { - LOGP(DLCTRL, LOGL_INFO, "The control connection was closed\n"); control_close_conn(ccon); ret = -EIO; } -- To view, visit https://gerrit.osmocom.org/5551 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:14:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:14:14 +0000 Subject: osmo-pcu[master]: Add tests for pcu_lsb() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:14:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:14:16 +0000 Subject: [MERGED] osmo-pcu[master]: Add tests for pcu_lsb() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add tests for pcu_lsb() ...................................................................... Add tests for pcu_lsb() This utility functions is used by TBF allocation routines and only tested indirectly through allocation test. Let's add proper exhaustive test which checks all uint8_t values. This also requires adding missing include to pcu_utils.h Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab --- M src/pcu_utils.h M tests/types/TypesTest.cpp M tests/types/TypesTest.ok 3 files changed, 279 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pcu_utils.h b/src/pcu_utils.h index 3a64a47..767771c 100644 --- a/src/pcu_utils.h +++ b/src/pcu_utils.h @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +extern "C" { +#include +} + inline int msecs_to_frames(int msecs) { return (msecs * (1024 * 1000 / 4615)) / 1024; } diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp index 7d09108..ff78c87 100644 --- a/tests/types/TypesTest.cpp +++ b/tests/types/TypesTest.cpp @@ -21,6 +21,7 @@ */ #include "bts.h" #include "tbf.h" +#include "pcu_utils.h" #include "gprs_debug.h" #include "encoding.h" #include "decoding.h" @@ -30,6 +31,7 @@ #include #include #include +#include } #define OSMO_ASSERT_STR_EQ(a, b) \ @@ -463,6 +465,20 @@ } +static void test_lsb() +{ + uint8_t u = 0; + + printf("Testing LBS utility...\n"); + + do { + uint8_t x = pcu_lsb(u); /* equivalent of (1 << ffs(u)) / 2 */ + printf("%2X " OSMO_BIT_SPEC ": {%d} %3d\n", + u, OSMO_BIT_PRINT(u), pcu_bitcount(u), x); + u++; + } while (u); +} + int main(int argc, char **argv) { osmo_init_logging(&gprs_log_info); @@ -476,6 +492,8 @@ test_rlc_v_n(); test_rlc_dl_ul_basic(); test_immediate_assign_rej(); + test_lsb(); + return EXIT_SUCCESS; } diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok index fe5162c..4bdd917 100644 --- a/tests/types/TypesTest.ok +++ b/tests/types/TypesTest.ok @@ -8,3 +8,260 @@ show_rbb: IIRRIIIR assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b +Testing LBS utility... + 0 ........: {0} 0 + 1 .......1: {1} 1 + 2 ......1.: {1} 2 + 3 ......11: {2} 1 + 4 .....1..: {1} 4 + 5 .....1.1: {2} 1 + 6 .....11.: {2} 2 + 7 .....111: {3} 1 + 8 ....1...: {1} 8 + 9 ....1..1: {2} 1 + A ....1.1.: {2} 2 + B ....1.11: {3} 1 + C ....11..: {2} 4 + D ....11.1: {3} 1 + E ....111.: {3} 2 + F ....1111: {4} 1 +10 ...1....: {1} 16 +11 ...1...1: {2} 1 +12 ...1..1.: {2} 2 +13 ...1..11: {3} 1 +14 ...1.1..: {2} 4 +15 ...1.1.1: {3} 1 +16 ...1.11.: {3} 2 +17 ...1.111: {4} 1 +18 ...11...: {2} 8 +19 ...11..1: {3} 1 +1A ...11.1.: {3} 2 +1B ...11.11: {4} 1 +1C ...111..: {3} 4 +1D ...111.1: {4} 1 +1E ...1111.: {4} 2 +1F ...11111: {5} 1 +20 ..1.....: {1} 32 +21 ..1....1: {2} 1 +22 ..1...1.: {2} 2 +23 ..1...11: {3} 1 +24 ..1..1..: {2} 4 +25 ..1..1.1: {3} 1 +26 ..1..11.: {3} 2 +27 ..1..111: {4} 1 +28 ..1.1...: {2} 8 +29 ..1.1..1: {3} 1 +2A ..1.1.1.: {3} 2 +2B ..1.1.11: {4} 1 +2C ..1.11..: {3} 4 +2D ..1.11.1: {4} 1 +2E ..1.111.: {4} 2 +2F ..1.1111: {5} 1 +30 ..11....: {2} 16 +31 ..11...1: {3} 1 +32 ..11..1.: {3} 2 +33 ..11..11: {4} 1 +34 ..11.1..: {3} 4 +35 ..11.1.1: {4} 1 +36 ..11.11.: {4} 2 +37 ..11.111: {5} 1 +38 ..111...: {3} 8 +39 ..111..1: {4} 1 +3A ..111.1.: {4} 2 +3B ..111.11: {5} 1 +3C ..1111..: {4} 4 +3D ..1111.1: {5} 1 +3E ..11111.: {5} 2 +3F ..111111: {6} 1 +40 .1......: {1} 64 +41 .1.....1: {2} 1 +42 .1....1.: {2} 2 +43 .1....11: {3} 1 +44 .1...1..: {2} 4 +45 .1...1.1: {3} 1 +46 .1...11.: {3} 2 +47 .1...111: {4} 1 +48 .1..1...: {2} 8 +49 .1..1..1: {3} 1 +4A .1..1.1.: {3} 2 +4B .1..1.11: {4} 1 +4C .1..11..: {3} 4 +4D .1..11.1: {4} 1 +4E .1..111.: {4} 2 +4F .1..1111: {5} 1 +50 .1.1....: {2} 16 +51 .1.1...1: {3} 1 +52 .1.1..1.: {3} 2 +53 .1.1..11: {4} 1 +54 .1.1.1..: {3} 4 +55 .1.1.1.1: {4} 1 +56 .1.1.11.: {4} 2 +57 .1.1.111: {5} 1 +58 .1.11...: {3} 8 +59 .1.11..1: {4} 1 +5A .1.11.1.: {4} 2 +5B .1.11.11: {5} 1 +5C .1.111..: {4} 4 +5D .1.111.1: {5} 1 +5E .1.1111.: {5} 2 +5F .1.11111: {6} 1 +60 .11.....: {2} 32 +61 .11....1: {3} 1 +62 .11...1.: {3} 2 +63 .11...11: {4} 1 +64 .11..1..: {3} 4 +65 .11..1.1: {4} 1 +66 .11..11.: {4} 2 +67 .11..111: {5} 1 +68 .11.1...: {3} 8 +69 .11.1..1: {4} 1 +6A .11.1.1.: {4} 2 +6B .11.1.11: {5} 1 +6C .11.11..: {4} 4 +6D .11.11.1: {5} 1 +6E .11.111.: {5} 2 +6F .11.1111: {6} 1 +70 .111....: {3} 16 +71 .111...1: {4} 1 +72 .111..1.: {4} 2 +73 .111..11: {5} 1 +74 .111.1..: {4} 4 +75 .111.1.1: {5} 1 +76 .111.11.: {5} 2 +77 .111.111: {6} 1 +78 .1111...: {4} 8 +79 .1111..1: {5} 1 +7A .1111.1.: {5} 2 +7B .1111.11: {6} 1 +7C .11111..: {5} 4 +7D .11111.1: {6} 1 +7E .111111.: {6} 2 +7F .1111111: {7} 1 +80 1.......: {1} 128 +81 1......1: {2} 1 +82 1.....1.: {2} 2 +83 1.....11: {3} 1 +84 1....1..: {2} 4 +85 1....1.1: {3} 1 +86 1....11.: {3} 2 +87 1....111: {4} 1 +88 1...1...: {2} 8 +89 1...1..1: {3} 1 +8A 1...1.1.: {3} 2 +8B 1...1.11: {4} 1 +8C 1...11..: {3} 4 +8D 1...11.1: {4} 1 +8E 1...111.: {4} 2 +8F 1...1111: {5} 1 +90 1..1....: {2} 16 +91 1..1...1: {3} 1 +92 1..1..1.: {3} 2 +93 1..1..11: {4} 1 +94 1..1.1..: {3} 4 +95 1..1.1.1: {4} 1 +96 1..1.11.: {4} 2 +97 1..1.111: {5} 1 +98 1..11...: {3} 8 +99 1..11..1: {4} 1 +9A 1..11.1.: {4} 2 +9B 1..11.11: {5} 1 +9C 1..111..: {4} 4 +9D 1..111.1: {5} 1 +9E 1..1111.: {5} 2 +9F 1..11111: {6} 1 +A0 1.1.....: {2} 32 +A1 1.1....1: {3} 1 +A2 1.1...1.: {3} 2 +A3 1.1...11: {4} 1 +A4 1.1..1..: {3} 4 +A5 1.1..1.1: {4} 1 +A6 1.1..11.: {4} 2 +A7 1.1..111: {5} 1 +A8 1.1.1...: {3} 8 +A9 1.1.1..1: {4} 1 +AA 1.1.1.1.: {4} 2 +AB 1.1.1.11: {5} 1 +AC 1.1.11..: {4} 4 +AD 1.1.11.1: {5} 1 +AE 1.1.111.: {5} 2 +AF 1.1.1111: {6} 1 +B0 1.11....: {3} 16 +B1 1.11...1: {4} 1 +B2 1.11..1.: {4} 2 +B3 1.11..11: {5} 1 +B4 1.11.1..: {4} 4 +B5 1.11.1.1: {5} 1 +B6 1.11.11.: {5} 2 +B7 1.11.111: {6} 1 +B8 1.111...: {4} 8 +B9 1.111..1: {5} 1 +BA 1.111.1.: {5} 2 +BB 1.111.11: {6} 1 +BC 1.1111..: {5} 4 +BD 1.1111.1: {6} 1 +BE 1.11111.: {6} 2 +BF 1.111111: {7} 1 +C0 11......: {2} 64 +C1 11.....1: {3} 1 +C2 11....1.: {3} 2 +C3 11....11: {4} 1 +C4 11...1..: {3} 4 +C5 11...1.1: {4} 1 +C6 11...11.: {4} 2 +C7 11...111: {5} 1 +C8 11..1...: {3} 8 +C9 11..1..1: {4} 1 +CA 11..1.1.: {4} 2 +CB 11..1.11: {5} 1 +CC 11..11..: {4} 4 +CD 11..11.1: {5} 1 +CE 11..111.: {5} 2 +CF 11..1111: {6} 1 +D0 11.1....: {3} 16 +D1 11.1...1: {4} 1 +D2 11.1..1.: {4} 2 +D3 11.1..11: {5} 1 +D4 11.1.1..: {4} 4 +D5 11.1.1.1: {5} 1 +D6 11.1.11.: {5} 2 +D7 11.1.111: {6} 1 +D8 11.11...: {4} 8 +D9 11.11..1: {5} 1 +DA 11.11.1.: {5} 2 +DB 11.11.11: {6} 1 +DC 11.111..: {5} 4 +DD 11.111.1: {6} 1 +DE 11.1111.: {6} 2 +DF 11.11111: {7} 1 +E0 111.....: {3} 32 +E1 111....1: {4} 1 +E2 111...1.: {4} 2 +E3 111...11: {5} 1 +E4 111..1..: {4} 4 +E5 111..1.1: {5} 1 +E6 111..11.: {5} 2 +E7 111..111: {6} 1 +E8 111.1...: {4} 8 +E9 111.1..1: {5} 1 +EA 111.1.1.: {5} 2 +EB 111.1.11: {6} 1 +EC 111.11..: {5} 4 +ED 111.11.1: {6} 1 +EE 111.111.: {6} 2 +EF 111.1111: {7} 1 +F0 1111....: {4} 16 +F1 1111...1: {5} 1 +F2 1111..1.: {5} 2 +F3 1111..11: {6} 1 +F4 1111.1..: {5} 4 +F5 1111.1.1: {6} 1 +F6 1111.11.: {6} 2 +F7 1111.111: {7} 1 +F8 11111...: {5} 8 +F9 11111..1: {6} 1 +FA 11111.1.: {6} 2 +FB 11111.11: {7} 1 +FC 111111..: {6} 4 +FD 111111.1: {7} 1 +FE 1111111.: {7} 2 +FF 11111111: {8} 1 -- To view, visit https://gerrit.osmocom.org/5548 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:14:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:14:42 +0000 Subject: python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:18:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:18:44 +0000 Subject: python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Patch Set 7: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/5028/7/tests/test_py3.py File tests/test_py3.py: Line 35: server = loop.run_until_complete(loop.create_server(CtrlProtocol, '127.0.0.1', 4249)) this test assumes that this particular port is available at runtime of the test. Particularly since it's a port used by some real osmocom program, chances are high that a jenkins job will execute in parallel on a given build note which also uses that port. Best idea might be to chose a random port here, and/or deal with failure to bind and re-attempt for a couple of times? clashes of random ports are unlikely. Line 40: loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d' 'localhost'), loop = loop)) you bind the server to 127.0.0.1 but you connect the client to localhost. Localhost also resolves to e.g. ::1 so best to be consistent on client and server. -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 7 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:19:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:19:17 +0000 Subject: python/osmo-python-tests[master]: Add rate counter dumper In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2 Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 18:19:41 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 18:19:41 +0000 Subject: osmo-bsc[master]: remove obsolete gsm_subscriber_connection.bts member In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5511 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 19:41:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 19:41:01 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() Message-ID: Review at https://gerrit.osmocom.org/5553 BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() The as_reset_ack() exists to acknowledge any incoming RESET without every test case having to deal with it explicitly. However, of course, the processing of an inbound RESET should not abort but the alt clause shall continue. Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730 --- M bsc/BSSAP_Adapter.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/5553/1 diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn index f1ff5b6..4268b29 100644 --- a/bsc/BSSAP_Adapter.ttcn +++ b/bsc/BSSAP_Adapter.ttcn @@ -120,6 +120,7 @@ log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, ts_BSSMAP_ResetAck)); + repeat; } } -- To view, visit https://gerrit.osmocom.org/5553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 19:41:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 19:41:21 +0000 Subject: osmo-ttcn3-hacks[master]: BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 19:41:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 19:41:23 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() ...................................................................... BSSAP_Adapter: Fix missing 'repeat' in as_reset_ack() The as_reset_ack() exists to acknowledge any incoming RESET without every test case having to deal with it explicitly. However, of course, the processing of an inbound RESET should not abort but the alt clause shall continue. Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730 --- M bsc/BSSAP_Adapter.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSSAP_Adapter.ttcn b/bsc/BSSAP_Adapter.ttcn index f1ff5b6..4268b29 100644 --- a/bsc/BSSAP_Adapter.ttcn +++ b/bsc/BSSAP_Adapter.ttcn @@ -120,6 +120,7 @@ log("Respoding to inbound RESET with RESET-ACK"); BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, ud_ind.calledAddress, ts_BSSMAP_ResetAck)); + repeat; } } -- To view, visit https://gerrit.osmocom.org/5553 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94dc72b5788ccc8dff2c4b80599c9fbf7e90e730 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 20:50:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 20:50:04 +0000 Subject: [PATCH] osmo-bsc[master]: BSC: Add "show subscriber all" command Message-ID: Review at https://gerrit.osmocom.org/5554 BSC: Add "show subscriber all" command This command lists the currently-active bsc_subscr and their contents, the format looks like this: OsmoBSC> show subscriber all IMSI TMSI LAC Use 001010123456789 ffffffff 65534 3 001010100000001 a1b2c301 65534 1 Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733 --- M src/osmo-bsc/osmo_bsc_vty.c 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/5554/1 diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f01e6f7..fb8b275 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -929,6 +929,28 @@ return CMD_SUCCESS; } +static void dump_one_sub(struct vty *vty, struct bsc_subscr *bsub) +{ + vty_out(vty, " %15s %08x %5u %d%s", bsub->imsi, bsub->tmsi, bsub->lac, bsub->use_count, + VTY_NEWLINE); +} + +DEFUN(show_subscr_all, + show_subscr_all_cmd, + "show subscriber all", + SHOW_STR "Display information about subscribers\n" "All Subscribers\n") +{ + struct bsc_subscr *bsc_subscr; + + vty_out(vty, " IMSI TMSI LAC Use%s", VTY_NEWLINE); + /* " 001010123456789 ffffffff 65534 1" */ + + llist_for_each_entry(bsc_subscr, bsc_gsmnet->bsc_subscribers, entry) + dump_one_sub(vty, bsc_subscr); + + return CMD_SUCCESS; +} + int bsc_vty_init_extra(void) { struct gsm_network *net = bsc_gsmnet; @@ -987,6 +1009,7 @@ install_element_ve(&show_mscs_cmd); install_element_ve(&show_pos_cmd); install_element_ve(&logging_fltr_imsi_cmd); + install_element_ve(&show_subscr_all_cmd); install_element(ENABLE_NODE, &gen_position_trap_cmd); -- To view, visit https://gerrit.osmocom.org/5554 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 21:16:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 21:16:29 +0000 Subject: [PATCH] osmo-bsc[master]: BSC: Fix bsc_subsc leak on paging Message-ID: Review at https://gerrit.osmocom.org/5555 BSC: Fix bsc_subsc leak on paging The OsmoBSC code contained a refcount leak on bsc_subscr in the paging code. For every PAGING command received from the MSC we consistently leaked one refcount, resulting in a resulting memory leak. Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Closes: OS#2780 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/55/5555/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f2d0f4..5a4031c 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -333,6 +333,10 @@ LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac); bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, subscr, chan_needed, msc); + + /* the paging code has grabbed its own references */ + bsc_subscr_put(subscr); + return 0; } -- To view, visit https://gerrit.osmocom.org/5555 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Dec 22 21:24:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 21:24:21 +0000 Subject: osmo-bsc[master]: BSC: Add "show subscriber all" command In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5554 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 21:24:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 21:24:22 +0000 Subject: osmo-bsc[master]: BSC: Fix bsc_subsc leak on paging In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5555 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 21:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 21:24:24 +0000 Subject: [MERGED] osmo-bsc[master]: BSC: Fix bsc_subsc leak on paging In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC: Fix bsc_subsc leak on paging ...................................................................... BSC: Fix bsc_subsc leak on paging The OsmoBSC code contained a refcount leak on bsc_subscr in the paging code. For every PAGING command received from the MSC we consistently leaked one refcount, resulting in a resulting memory leak. Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Closes: OS#2780 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f2d0f4..5a4031c 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -333,6 +333,10 @@ LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: '0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac); bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy, subscr, chan_needed, msc); + + /* the paging code has grabbed its own references */ + bsc_subscr_put(subscr); + return 0; } -- To view, visit https://gerrit.osmocom.org/5555 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 21:24:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 21:24:24 +0000 Subject: [MERGED] osmo-bsc[master]: BSC: Add "show subscriber all" command In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC: Add "show subscriber all" command ...................................................................... BSC: Add "show subscriber all" command This command lists the currently-active bsc_subscr and their contents, the format looks like this: OsmoBSC> show subscriber all IMSI TMSI LAC Use 001010123456789 ffffffff 65534 3 001010100000001 a1b2c301 65534 1 Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733 --- M src/osmo-bsc/osmo_bsc_vty.c 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f01e6f7..fb8b275 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -929,6 +929,28 @@ return CMD_SUCCESS; } +static void dump_one_sub(struct vty *vty, struct bsc_subscr *bsub) +{ + vty_out(vty, " %15s %08x %5u %d%s", bsub->imsi, bsub->tmsi, bsub->lac, bsub->use_count, + VTY_NEWLINE); +} + +DEFUN(show_subscr_all, + show_subscr_all_cmd, + "show subscriber all", + SHOW_STR "Display information about subscribers\n" "All Subscribers\n") +{ + struct bsc_subscr *bsc_subscr; + + vty_out(vty, " IMSI TMSI LAC Use%s", VTY_NEWLINE); + /* " 001010123456789 ffffffff 65534 1" */ + + llist_for_each_entry(bsc_subscr, bsc_gsmnet->bsc_subscribers, entry) + dump_one_sub(vty, bsc_subscr); + + return CMD_SUCCESS; +} + int bsc_vty_init_extra(void) { struct gsm_network *net = bsc_gsmnet; @@ -987,6 +1009,7 @@ install_element_ve(&show_mscs_cmd); install_element_ve(&show_pos_cmd); install_element_ve(&logging_fltr_imsi_cmd); + install_element_ve(&show_subscr_all_cmd); install_element(ENABLE_NODE, &gen_position_trap_cmd); -- To view, visit https://gerrit.osmocom.org/5554 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 23:14:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 23:14:58 +0000 Subject: [PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5509 to look at the new patch set (#7). bsc_test.c: Use proper network/bts/lchan structures don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce --- M tests/bsc/bsc_test.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/7 diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 1d7baa1..1fb51aa 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -121,14 +122,12 @@ { int i; - struct gsm_network *net; - struct gsm_bts *bts; + struct gsm_network *net = bsc_network_init(NULL, 1, 1); + struct gsm_bts *bts = gsm_bts_alloc(net, 0); struct osmo_bsc_sccp_con *sccp_con; struct bsc_msc_data *msc; struct gsm_subscriber_connection *conn; - net = talloc_zero(NULL, struct gsm_network); - bts = talloc_zero(net, struct gsm_bts); sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con); msc = talloc_zero(net, struct bsc_msc_data); conn = talloc_zero(net, struct gsm_subscriber_connection); @@ -137,6 +136,7 @@ sccp_con->msc = msc; conn->bts = bts; conn->sccp_con = sccp_con; + conn->lchan = &bts->c0->ts[1].lchan[0]; /* start testing with proper messages */ printf("Testing BTS<->MSC message scan.\n"); -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 23:21:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 23:21:45 +0000 Subject: osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 23:21:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 23:21:46 +0000 Subject: [MERGED] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc_test.c: Use proper network/bts/lchan structures ...................................................................... bsc_test.c: Use proper network/bts/lchan structures don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce --- M tests/bsc/bsc_test.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 1d7baa1..1fb51aa 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -121,14 +122,12 @@ { int i; - struct gsm_network *net; - struct gsm_bts *bts; + struct gsm_network *net = bsc_network_init(NULL, 1, 1); + struct gsm_bts *bts = gsm_bts_alloc(net, 0); struct osmo_bsc_sccp_con *sccp_con; struct bsc_msc_data *msc; struct gsm_subscriber_connection *conn; - net = talloc_zero(NULL, struct gsm_network); - bts = talloc_zero(net, struct gsm_bts); sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con); msc = talloc_zero(net, struct bsc_msc_data); conn = talloc_zero(net, struct gsm_subscriber_connection); @@ -137,6 +136,7 @@ sccp_con->msc = msc; conn->bts = bts; conn->sccp_con = sccp_con; + conn->lchan = &bts->c0->ts[1].lchan[0]; /* start testing with proper messages */ printf("Testing BTS<->MSC message scan.\n"); -- To view, visit https://gerrit.osmocom.org/5509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Dec 22 23:43:53 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 23:43:53 +0000 Subject: osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 22 23:43:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 22 Dec 2017 23:43:58 +0000 Subject: [MERGED] osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: Hide all accesses to conn->bts behind conn_get_bts() ...................................................................... cosmetic: Hide all accesses to conn->bts behind conn_get_bts() This is a new inline function that hides all accesses to conn->bts. A follow-up patch will then point this to conn->lchan->ts->trx->bts to get rid of the bts field. Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c M src/libbsc/bsc_vty.c M src/osmo-bsc/osmo_bsc_api.c M src/osmo-bsc/osmo_bsc_audio.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_filter.c M src/osmo-bsc/osmo_bsc_sigtran.c 8 files changed, 29 insertions(+), 22 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 3cc3794..45fbcd2 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -98,6 +98,10 @@ struct gsm_classmark classmark; }; +static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { + return conn->bts; +} + #include "gsm_data_shared.h" diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 9ec51af..bd55dfc 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -214,7 +214,7 @@ chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H; - new_lchan = lchan_alloc(conn->bts, chan_type, 0); + new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0); if (!new_lchan) { LOGP(DMSC, LOGL_NOTICE, "No free channel.\n"); @@ -451,7 +451,7 @@ conn->lchan = conn->secondary_lchan; conn->secondary_lchan = NULL; - if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) rsl_ipacc_crcx(conn->lchan); api->assign_compl(conn, gh->data[0], diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c index 7612eda..6d01109 100644 --- a/src/libbsc/bsc_vty.c +++ b/src/libbsc/bsc_vty.c @@ -1378,7 +1378,7 @@ /* Find the connection/lchan that we want to handover */ llist_for_each_entry(conn, &net->subscr_conns, entry) { - if (conn->bts->nr == bts_nr && + if (conn_get_bts(conn)->nr == bts_nr && conn->lchan->ts->trx->nr == trx_nr && conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) { vty_out(vty, "starting handover for lchan %s...%s", diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index a2a8630..1caaeee 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -115,7 +115,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_initial(gh, msgb_l3len(msg), &req, @@ -136,7 +136,7 @@ req.black_list = NULL; req.access_lists = bsc_access_lists(); req.local_lst_name = conn->sccp_con->msc->acc_lst_name; - req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name; + req.global_lst_name = conn_get_bts(conn)->network->bsc_data->acc_lst_name; req.bsc_nr = 0; rc = bsc_msg_filter_data(gh, msgb_l3len(msg), &req, @@ -228,7 +228,7 @@ if (!msc) { LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n"); bsc_send_ussd_no_srv(conn, msg, - conn->bts->network->bsc_data->ussd_no_msc_txt); + conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt); return -1; } @@ -287,8 +287,8 @@ network_code = get_network_code_for_msc(conn->sccp_con->msc); country_code = get_country_code_for_msc(conn->sccp_con->msc); - lac = get_lac_for_msc(conn->sccp_con->msc, conn->bts); - ci = get_ci_for_msc(conn->sccp_con->msc, conn->bts); + lac = get_lac_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); + ci = get_ci_for_msc(conn->sccp_con->msc, conn_get_bts(conn)); bsc_scan_bts_msg(conn, msg); @@ -383,7 +383,7 @@ /* * Check if the connection should be moved... */ - llist_for_each_entry(msc, &conn->bts->network->bsc_data->mscs, entry) { + llist_for_each_entry(msc, &conn_get_bts(conn)->network->bsc_data->mscs, entry) { if (msc->type != MSC_CON_TYPE_LOCAL) continue; if (!msc->local_pref) @@ -435,7 +435,7 @@ struct msgb *resp; return_when_not_connected(conn); - if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) { + if (is_ipaccess_bts(conn_get_bts(conn)) && conn->sccp_con->user_plane.rtp_ip) { /* NOTE: In a network that makes use of an IPA base station * and AoIP, we have to wait until the BTS reports its RTP * IP/Port combination back to BSC via RSL. Unfortunately, the diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c index 82367f0..433dc6c 100644 --- a/src/osmo-bsc/osmo_bsc_audio.c +++ b/src/osmo-bsc/osmo_bsc_audio.c @@ -85,7 +85,7 @@ * connection info */ LOGP(DMSC, LOGL_INFO,"RTP connection handover initiated...\n"); mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, con->ho_lchan); - } else if (is_ipaccess_bts(con->bts) && con->sccp_con->user_plane.rtp_ip) { + } else if (is_ipaccess_bts(conn_get_bts(con)) && con->sccp_con->user_plane.rtp_ip) { /* NOTE: This is only relevant on AoIP networks with * IPA based base stations. See also osmo_bsc_api.c, * function bsc_assign_compl() */ diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 5a4031c..45861cc 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -436,7 +436,7 @@ goto reject; } - network = conn->conn->bts->network; + network = conn_get_bts(conn->conn)->network; data = TLVP_VAL(&tp, GSM0808_IE_ENCRYPTION_INFORMATION); enc_bits_msc = data[0]; enc_key = &data[1]; diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c index 17dddf8..56c0a9c 100644 --- a/src/osmo-bsc/osmo_bsc_filter.c +++ b/src/osmo-bsc/osmo_bsc_filter.c @@ -35,19 +35,20 @@ struct gsm48_loc_upd_req *lu; struct gsm48_loc_area_id lai; struct gsm_network *net; + struct gsm_bts *bts = conn_get_bts(conn); if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu)) { LOGP(DMSC, LOGL_ERROR, "LU too small to look at: %u\n", msgb_l3len(msg)); return; } - net = conn->bts->network; + net = bts->network; gh = msgb_l3(msg); lu = (struct gsm48_loc_upd_req *) gh->data; gsm48_generate_lai(&lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) { LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n"); @@ -105,7 +106,7 @@ return -1; } - paging_request_stop(&conn->network->bts_list, conn->bts, subscr, conn, + paging_request_stop(&conn->network->bts_list, conn_get_bts(conn), subscr, conn, msg); bsc_subscr_put(subscr); return 0; @@ -136,7 +137,7 @@ struct bsc_subscr *subscr; int is_emerg = 0; - bsc = conn->bts->network->bsc_data; + bsc = conn->network->bsc_data; if (msgb_l3len(msg) < sizeof(*gh)) { LOGP(DMSC, LOGL_ERROR, "There is no GSM48 header here.\n"); @@ -185,7 +186,7 @@ return NULL; } - pag_msc = paging_get_msc(conn->bts, subscr); + pag_msc = paging_get_msc(conn_get_bts(conn), subscr); bsc_subscr_put(subscr); llist_for_each_entry(msc, &bsc->mscs, entry) { @@ -260,7 +261,7 @@ { struct tlv_parsed tp; int parse_res; - struct gsm_bts *bts = conn->bts; + struct gsm_bts *bts = conn_get_bts(conn); int tzunits; uint8_t tzbsd = 0; uint8_t dst = 0; @@ -337,6 +338,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct bsc_msc_data *msc; + struct gsm_bts *bts = conn_get_bts(conn); struct gsm_network *net; struct gsm48_loc_area_id *lai; struct gsm48_hdr *gh; @@ -357,7 +359,7 @@ return 0; mtype = gsm48_hdr_msg_type(gh); - net = conn->bts->network; + net = bts->network; msc = conn->sccp_con->msc; if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) { @@ -367,7 +369,7 @@ lai = (struct gsm48_loc_area_id *) &gh->data[0]; gsm48_generate_lai(lai, net->country_code, net->network_code, - conn->bts->location_area_code); + bts->location_area_code); } } diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 67f8703..19a36da 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -244,6 +244,7 @@ { struct osmo_ss7_instance *ss7; struct osmo_bsc_sccp_con *bsc_con; + struct gsm_bts *bts = conn_get_bts(conn); int conn_id; OSMO_ASSERT(conn); @@ -259,12 +260,12 @@ return BSC_CON_REJECT_NO_LINK; } - if (!bsc_grace_allow_new_connection(conn->bts->network, conn->bts)) { + if (!bsc_grace_allow_new_connection(bts->network, bts)) { LOGP(DMSC, LOGL_NOTICE, "BSC in grace period. No new connections.\n"); return BSC_CON_REJECT_RF_GRACE; } - bsc_con = talloc_zero(conn->bts, struct osmo_bsc_sccp_con); + bsc_con = talloc_zero(bts, struct osmo_bsc_sccp_con); if (!bsc_con) { LOGP(DMSC, LOGL_ERROR, "Failed to allocate new SIGTRAN connection.\n"); return BSC_CON_NO_MEM; -- To view, visit https://gerrit.osmocom.org/5510 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:29:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:29:57 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: convert TC_assignment_sign to 'new style' tests Message-ID: Review at https://gerrit.osmocom.org/5556 convert TC_assignment_sign to 'new style' tests the use of the MSC_ConnHdlr automatically handles the MODIFY on both RR and RSL level. Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b --- M bsc/BSC_Tests.ttcn 1 file changed, 19 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/5556/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b530db2..4c88788 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -526,15 +526,6 @@ f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for Speech+CTM"); } -testcase TC_assignment_sign() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); -} - type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -1371,6 +1362,25 @@ } +private function f_tc_assignment_sign(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, omit)); + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_sign() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(1, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_sign), testcasename()); + vc_conn.done; +} + control { -- To view, visit https://gerrit.osmocom.org/5556 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:29:58 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:29:58 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD Message-ID: Review at https://gerrit.osmocom.org/5557 MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD For some weird reason the link_id is *not* the second IE in RSL_MT_ENCR_CMD, while it is in all other RSL RLL or DCHAN messages. Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4 --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/57/5557/1 diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 028f1b4..51ac650 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -95,7 +95,7 @@ function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; - var RslLinkId link_id := orig.ies[1].body.link_id; + var RslLinkId link_id; if (orig.msg_type == RSL_MT_ENCR_CMD) { link_id := orig.ies[2].body.link_id; } else { -- To view, visit https://gerrit.osmocom.org/5557 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:55:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:55:18 +0000 Subject: osmo-ttcn3-hacks[master]: convert TC_assignment_sign to 'new style' tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5556 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:55:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:55:20 +0000 Subject: osmo-ttcn3-hacks[master]: MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5557 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:55:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:55:22 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD ...................................................................... MSC_ConnectionHandler: fix f_rsl_reply() for RSL_MT_ENCR_CMD For some weird reason the link_id is *not* the second IE in RSL_MT_ENCR_CMD, while it is in all other RSL RLL or DCHAN messages. Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4 --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 028f1b4..51ac650 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -95,7 +95,7 @@ function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr { var RslChannelNr chan_nr := orig.ies[0].body.chan_nr; - var RslLinkId link_id := orig.ies[1].body.link_id; + var RslLinkId link_id; if (orig.msg_type == RSL_MT_ENCR_CMD) { link_id := orig.ies[2].body.link_id; } else { -- To view, visit https://gerrit.osmocom.org/5557 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea93aa8dba74d25c74a257d011ba43308ee375e4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 23 01:55:22 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 01:55:22 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: convert TC_assignment_sign to 'new style' tests In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: convert TC_assignment_sign to 'new style' tests ...................................................................... convert TC_assignment_sign to 'new style' tests the use of the MSC_ConnHdlr automatically handles the MODIFY on both RR and RSL level. Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b --- M bsc/BSC_Tests.ttcn 1 file changed, 19 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b530db2..4c88788 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -526,15 +526,6 @@ f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for Speech+CTM"); } -testcase TC_assignment_sign() runs on test_CT { - var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); - var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); - var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); - - ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); - f_assignment_exp(ass_cmd, exp_compl, "BSC failed SIGNALLING assignment"); -} - type record DchanTuple { integer sccp_conn_id, RslChannelNr rsl_chan_nr @@ -1371,6 +1362,25 @@ } +private function f_tc_assignment_sign(charstring id) runs on MSC_ConnHdlr { + var TestHdlrParams pars := valueof(t_def_TestHdlrPars); + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, omit); + var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, omit)); + + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); + f_establish_fully(pars, ass_cmd, exp_compl); +} + +testcase TC_assignment_sign() runs on test_CT { + var MSC_ConnHdlr vc_conn; + + f_init(1, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_assignment_sign), testcasename()); + vc_conn.done; +} + control { -- To view, visit https://gerrit.osmocom.org/5556 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iad7122ff5220ffc1640d802db47b1aa97986ed5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 23 11:23:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sat, 23 Dec 2017 11:23:42 +0000 Subject: [MERGED] python/osmo-python-tests[master]: Add scripts to compilation tests in jenkins In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add scripts to compilation tests in jenkins ...................................................................... Add scripts to compilation tests in jenkins Related: OS#2684 Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 --- M contrib/jenkins.sh 1 file changed, 18 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a60438e..c4ddf7d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,14 +2,26 @@ set -ex +COM_FLAGS='-m compileall' + # FIXME: remove once python 2 support is deprecated -python2 ./setup.py install -python2 tests/test_py2.py -python2 -m compileall osmopy +PY2=python2 +PY2_LIST="osmopy scripts/osmo_ctrl.py scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py" +$PY2 ./setup.py install +$PY2 tests/test_py2.py +for f in $PY2_LIST +do + $PY2 $COM_FLAGS $f +done rm -rf ./build -python3 ./setup.py install -python3 tests/test_py3.py -python3 -m compileall osmopy +PY3=python3 +PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" +$PY3 ./setup.py install +$PY3 tests/test_py3.py +for f in $PY3_LIST +do + $PY3 $COM_FLAGS $f +done # TODO: add more tests -- To view, visit https://gerrit.osmocom.org/5482 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If098c20b1ad17c3868073b9fe07fd3795217c526 Gerrit-PatchSet: 5 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sat Dec 23 19:05:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 19:05:17 +0000 Subject: [PATCH] osmo-msc[master]: Shift ciphering algorithm selection from VLR to MSC Message-ID: Review at https://gerrit.osmocom.org/5558 Shift ciphering algorithm selection from VLR to MSC The VLR code seems to have the assumption that there is one particular algorithm to be used, as opposed to one of a set of algorithms. What's missing is basically to decide when/where to pick the best algorithm within the capabilities of the phone (classmark) and the network configuration (net->a5_encryption_mask). So far, libvlr has no notion of classmark. Rather, libmsc has. Why does the VLR care about the particular algorithm at all? The VLR should probably simply decide if it should use encryption or not, and if so, the MSC will figure which algorithm to use. Change-Id: I5ed80ca2086560a5975a758ec568a034a9a8ab89 --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c 10 files changed, 47 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/58/5558/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 1b365a9..d0250a7 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -207,8 +207,7 @@ int (*tx_cm_serv_acc)(void *msc_conn_ref); int (*tx_cm_serv_rej)(void *msc_conn_ref, enum vlr_proc_arq_result result); - int (*set_ciph_mode)(void *msc_conn_ref, enum vlr_ciph ciph_mode, - bool umts_aka, bool retrieve_imeisv); + int (*set_ciph_mode)(void *msc_conn_ref, bool umts_aka, bool retrieve_imeisv); /* UTRAN: send Common Id (when auth+ciph are complete) */ int (*tx_common_id)(void *msc_conn_ref); @@ -266,7 +265,7 @@ const struct osmo_location_area_id *old_lai, const struct osmo_location_area_id *new_lai, bool authentication_required, - enum vlr_ciph ciphering_required, + bool ciphering_required, bool is_r99, bool is_utran, bool assign_tmsi); @@ -423,7 +422,7 @@ enum vlr_parq_type type, const uint8_t *mi_lv, const struct osmo_location_area_id *lai, bool authentication_required, - enum vlr_ciph ciphering_required, + bool ciphering_required, bool is_r99, bool is_utran); void vlr_parq_conn_timeout(struct osmo_fsm_inst *fi); @@ -433,7 +432,7 @@ int vlr_set_ciph_mode(struct vlr_instance *vlr, struct osmo_fsm_inst *fi, void *msc_conn_ref, - enum vlr_ciph ciph_mode, + bool ciph_required, bool umts_aka, bool retrieve_imeisv); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 26ac923..d934db6 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -348,8 +348,7 @@ net->vlr, conn, vlr_lu_type, tmsi, imsi, &old_lai, &new_lai, is_utran || conn->network->authentication_required, - is_utran? VLR_CIPH_A5_3 - : conn->network->a5_encryption, + is_utran || conn->network->a5_encryption, classmark_is_r99(&conn->classmark), is_utran, net->vlr->cfg.assign_tmsi); @@ -716,8 +715,7 @@ net->vlr, conn, VLR_PR_ARQ_T_CM_SERV_REQ, mi-1, &lai, is_utran || conn->network->authentication_required, - is_utran? VLR_CIPH_A5_3 - : conn->network->a5_encryption, + is_utran || conn->network->a5_encryption, classmark_is_r99(&conn->classmark), is_utran); @@ -1101,8 +1099,7 @@ net->vlr, conn, VLR_PR_ARQ_T_PAGING_RESP, mi_lv, &lai, is_utran || conn->network->authentication_required, - is_utran? VLR_CIPH_A5_3 - : conn->network->a5_encryption, + is_utran || conn->network->a5_encryption, classmark_is_r99(&conn->classmark), is_utran); @@ -3391,7 +3388,6 @@ /* VLR asks us to start using ciphering */ static int msc_vlr_set_ciph_mode(void *msc_conn_ref, - enum vlr_ciph ciph, bool umts_aka, bool retrieve_imeisv) { @@ -3422,7 +3418,7 @@ { struct gsm0808_encrypt_info ei; - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(ciph); + ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(conn->network->a5_encryption); ei.perm_algo_len = 1; /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 670ff83..f9fa33e 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -1095,33 +1095,15 @@ int vlr_set_ciph_mode(struct vlr_instance *vlr, struct osmo_fsm_inst *fi, void *msc_conn_ref, - enum vlr_ciph ciph_mode, + bool ciph_required, bool umts_aka, bool retrieve_imeisv) { - switch (ciph_mode) { - case VLR_CIPH_NONE: + if (!ciph_required) return 0; - case VLR_CIPH_A5_1: - case VLR_CIPH_A5_3: - LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode: %d=%s\n", - ciph_mode, vlr_ciph_name(ciph_mode)); - return vlr->ops.set_ciph_mode(msc_conn_ref, - ciph_mode, - umts_aka, - retrieve_imeisv); - - case VLR_CIPH_A5_2: - /* TODO policy by user config? */ - LOGPFSML(fi, LOGL_ERROR, "A5/2 ciphering is not allowed\n"); - return -EINVAL; - - default: - LOGPFSML(fi, LOGL_ERROR, "unknown ciphering value: %d\n", - ciph_mode); - return -EINVAL; - } + LOGPFSML(fi, LOGL_DEBUG, "Set Ciphering Mode\n"); + return vlr->ops.set_ciph_mode(msc_conn_ref, umts_aka, retrieve_imeisv); } /* Decide whether UMTS AKA should be used. diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 41e629e..556e694 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -79,7 +79,7 @@ uint32_t tmsi; struct osmo_location_area_id lai; bool authentication_required; - enum vlr_ciph ciphering_required; + bool ciphering_required; bool is_r99; bool is_utran; bool implicitly_accepted_parq_by_ciphering_cmd; @@ -277,7 +277,7 @@ static bool is_ciph_required(struct proc_arq_priv *par) { - return par->ciphering_required != VLR_CIPH_NONE; + return par->ciphering_required; } static void _proc_arq_vlr_node2(struct osmo_fsm_inst *fi) @@ -311,8 +311,7 @@ /* The cases where the authentication procedure should be used * are defined in 3GPP TS 33.102 */ /* For now we use a default value passed in to vlr_lu_fsm(). */ - return par->authentication_required - || (par->ciphering_required != VLR_CIPH_NONE); + return par->authentication_required || par->ciphering_required; } /* after the IMSI is known */ @@ -654,7 +653,7 @@ enum vlr_parq_type type, const uint8_t *mi_lv, const struct osmo_location_area_id *lai, bool authentication_required, - enum vlr_ciph ciphering_required, + bool ciphering_required, bool is_r99, bool is_utran) { struct osmo_fsm_inst *fi; diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index e540e2a..6c8b53a 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -644,7 +644,7 @@ struct osmo_location_area_id old_lai; struct osmo_location_area_id new_lai; bool authentication_required; - enum vlr_ciph ciphering_required; + bool ciphering_required; bool is_r99; bool is_utran; bool assign_tmsi; @@ -665,14 +665,13 @@ /* The cases where the authentication procedure should be used * are defined in 3GPP TS 33.102 */ /* For now we use a default value passed in to vlr_lu_fsm(). */ - return lfp->authentication_required - || (lfp->ciphering_required != VLR_CIPH_NONE); + return lfp->authentication_required || lfp->ciphering_required; } /* Determine if ciphering is required */ static bool is_ciph_required(struct lu_fsm_priv *lfp) { - return lfp->ciphering_required != VLR_CIPH_NONE; + return lfp->ciphering_required; } /* Determine if a HLR Update is required */ @@ -1391,7 +1390,7 @@ const struct osmo_location_area_id *old_lai, const struct osmo_location_area_id *new_lai, bool authentication_required, - enum vlr_ciph ciphering_required, + bool ciphering_required, bool is_r99, bool is_utran, bool assign_tmsi) { diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 662074d..17b5b8f 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -489,7 +489,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -666,7 +666,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -795,7 +795,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1462,7 +1462,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1639,7 +1639,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1754,7 +1754,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1869,7 +1869,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2336,7 +2336,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -2527,7 +2527,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index c7c7d8d..8130e89 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -63,7 +63,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -226,7 +226,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -411,7 +411,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -582,7 +582,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 711ca48..e016ab6 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -61,7 +61,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -223,7 +223,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -368,7 +368,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -545,7 +545,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -744,7 +744,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -889,7 +889,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1066,7 +1066,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1286,7 +1286,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1495,7 +1495,7 @@ DVLR VLR_Authenticate(901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 1=VLR_CIPH_A5_1 +DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 41bdf49..9173468 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -523,7 +523,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -706,7 +706,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -842,7 +842,7 @@ DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() -DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for MSISDN:42342 DVLR Process_Access_Request_VLR(901700000010650){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW) @@ -1252,7 +1252,7 @@ DVLR VLR_Authenticate(901700000010650){VLR_SUB_AS_AUTHENTICATED}: Deallocated DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() -DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode: 3=VLR_CIPH_A5_3 +DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode - sending SecurityModeControl for IMSI:901700000010650 DVLR vlr_lu_fsm(901700000010650){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000010650: bump: conn still being established (SUBSCR_CONN_S_NEW) diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 9cc61b1..26fcd51 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -664,8 +664,7 @@ return 0; } -static int fake_vlr_tx_ciph_mode_cmd(void *msc_conn_ref, enum vlr_ciph ciph, - bool umts_aka, bool retrieve_imeisv) +static int fake_vlr_tx_ciph_mode_cmd(void *msc_conn_ref, bool umts_aka, bool retrieve_imeisv) { /* FIXME: we actually would like to see the message bytes checked here, * not possible while msc_vlr_set_ciph_mode() calls -- To view, visit https://gerrit.osmocom.org/5558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ed80ca2086560a5975a758ec568a034a9a8ab89 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 23 19:05:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 19:05:17 +0000 Subject: [PATCH] osmo-msc[master]: Permit a set of multiple different A5 ciphers Message-ID: Review at https://gerrit.osmocom.org/5559 Permit a set of multiple different A5 ciphers So far, the administrator had to pick one particular cipher which would then be used throughout all subscribers/phones. This is a bit impractical, as e.g. not all phones support A5/3. Extend the VTY command syntax in a backwards-compatible way to permit for multiple ciphers. NOTE: Like the previous code, OsmoMSC does *not yet check* whether the configured cipher is compatible with the MS capabilities as reported in CLASSMARK! The network hence might choose an algorithm not supported by the phone. Fixing this is subject to another patch. Closes: OS#2460 Change-Id: I79a4e2892eb5fbecc3d84e11dceffb7149db264b --- M include/osmocom/msc/gsm_data.h M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libmsc/gsm_04_08.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_tests.c 8 files changed, 48 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/5559/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 1b0bff9..cb6b3c0 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -369,7 +369,8 @@ regex_t authorized_regexp; char *authorized_reg_str; enum gsm48_reject_value reject_cause; - int a5_encryption; + /* bit-mask of permitted encryption algorithms. LSB=A5/0, MSB=A5/7 */ + uint8_t a5_encryption_mask; bool authentication_required; int neci; int send_mm_info; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 4748865..9edf7c5 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -56,6 +56,8 @@ net->country_code = country_code; net->network_code = network_code; + /* Permit a compile-time default of A5/3 and A5/1 */ + net->a5_encryption_mask = (1 << 3) | (1 << 1); /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 4754531..8c9f127 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -155,15 +155,20 @@ DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, - "encryption a5 (0|1|2|3)", + "encryption a5 <0-3> [<0-3>] [<0-3>] [<0-3>]", "Encryption options\n" - "A5 encryption\n" "A5/0: No encryption\n" - "A5/1: Encryption\n" "A5/2: Export-grade Encryption\n" - "A5/3: 'New' Secure Encryption\n") + "GSM A5 Air Interface Encryption\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + unsigned int i; - gsmnet->a5_encryption = atoi(argv[0]); + gsmnet->a5_encryption_mask = 0; + for (i = 0; i < argc; i++) + gsmnet->a5_encryption_mask |= (1 << atoi(argv[i])); return CMD_SUCCESS; } diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d934db6..5fd1607 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -348,7 +348,7 @@ net->vlr, conn, vlr_lu_type, tmsi, imsi, &old_lai, &new_lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran, net->vlr->cfg.assign_tmsi); @@ -715,7 +715,7 @@ net->vlr, conn, VLR_PR_ARQ_T_CM_SERV_REQ, mi-1, &lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran); @@ -1099,7 +1099,7 @@ net->vlr, conn, VLR_PR_ARQ_T_PAGING_RESP, mi_lv, &lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran); @@ -3416,10 +3416,15 @@ DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); { + struct gsm_network *net = conn->network; struct gsm0808_encrypt_info ei; + int i, j = 0; - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(conn->network->a5_encryption); - ei.perm_algo_len = 1; + for (i = 0; i < 8; i++) { + if (net->a5_encryption_mask & (1 << i)) + ei.perm_algo[j++] = vlr_ciph_to_gsm0808_alg_id(i); + } + ei.perm_algo_len = j; /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth * tokens. tuple->vec.kc was calculated from the GSM algorithm and is not diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index c1c9f6b..3c0c995 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1,7 +1,7 @@ /* MSC interface to quagga VTY */ /* (C) 2016 by sysmocom s.m.f.c. GmbH * Based on OpenBSC interface to quagga VTY (libmsc/vty_interface_layer3.c) - * (C) 2009 by Harald Welte + * (C) 2009-2017 by Harald Welte * (C) 2009-2011 by Holger Hans Peter Freyther * All Rights Reserved * @@ -169,7 +169,12 @@ vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); - vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); + vty_out(vty, " encryption a5"); + for (int i = 0; i < 8; i++) { + if (gsmnet->a5_encryption_mask & (1 << i)) + vty_out(vty, " %u", i); + } + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " authentication %s%s", gsmnet->authentication_required ? "required" : "optional", VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index e0bd967..42e620a 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -31,7 +31,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); btw("Location Update request causes a GSUP Send Auth Info request to HLR"); lu_result_sent = RES_NONE; @@ -243,7 +243,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.assign_tmsi = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -482,7 +482,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.check_imei_rqd = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -584,7 +584,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.retrieve_imeisv_ciphered = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -682,7 +682,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.assign_tmsi = true; net->vlr->cfg.check_imei_rqd = true; diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index e016ab6..647b25c 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -62,7 +62,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -224,7 +224,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -369,7 +369,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -546,7 +546,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -745,7 +745,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -890,7 +890,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -1067,7 +1067,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -1287,7 +1287,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -1496,7 +1496,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 26fcd51..cf5c757 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -336,7 +336,7 @@ } net->authentication_required = false; - net->a5_encryption = VLR_CIPH_NONE; + net->a5_encryption_mask = (1 << 0); net->vlr->cfg.check_imei_rqd = false; net->vlr->cfg.assign_tmsi = false; net->vlr->cfg.retrieve_imeisv_early = false; @@ -673,10 +673,10 @@ struct gsm_subscriber_connection *conn = msc_conn_ref; switch (conn->via_ran) { case RAN_GERAN_A: - btw("sending Ciphering Mode Command for %s: cipher=%s kc=%s" + btw("sending Ciphering Mode Command for %s: ciphers=0x%02x kc=%s" " retrieve_imeisv=%d", vlr_subscr_name(conn->vsub), - vlr_ciph_name(conn->network->a5_encryption), + conn->network->a5_encryption_mask, osmo_hexdump_nospc(conn->vsub->last_tuple->vec.kc, 8), retrieve_imeisv); break; -- To view, visit https://gerrit.osmocom.org/5559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79a4e2892eb5fbecc3d84e11dceffb7149db264b Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 23 19:05:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 19:05:17 +0000 Subject: [PATCH] osmo-msc[master]: MSC: Intersect configured A5 algorithms with MS-supported ones Message-ID: Review at https://gerrit.osmocom.org/5560 MSC: Intersect configured A5 algorithms with MS-supported ones There's no point of ever asking a MS to perform ciphering using an algorithm it advertises no support for. Let's hence use CLASSMARK information to figure out the intersection between MSC policy (VTY command) and MS-reported CLASSMARK. Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3 --- M src/libmsc/gsm_04_08.c 1 file changed, 65 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/60/5560/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 5fd1607..95dfc14 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -98,6 +98,62 @@ static uint32_t new_callref = 0x80000001; +/* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher */ +static bool classmark_supports_a5(const struct gsm_classmark *cm, uint8_t a5) +{ + switch (a5) { + case 0: + /* all phones must implement A5/0, see 3GPP TS 43.020 4.9 */ + return true; + case 1: + /* 3GPP TS 43.020 4.9 requires A5/1 to be suppored by all phones and actually states: + * "The network shall not provide service to an MS which indicates that it does not + * support the ciphering algorithm A5/1.". However, let's be more tolerant based + * on policy here */ + /* See 3GPP TS 24.008 10.5.1.7 */ + if (!cm->classmark1_set) { + DEBUGP(DMSC, "CLASSMARK 1 unknown, assuming MS supports A5/1\n"); + return true; + } else { + if (cm->classmark1.a5_1) + return false; /* Inverted logic for this bit! */ + else + return true; + } + break; + case 2: + case 3: + /* See 3GPP TS 24.008 10.5.1.6 */ + if (cm->classmark2_len < 3) { + DEBUGP(DMSC, "CLASSMARK 2 unknown, assuming MS doesn't support A5/%u\n", a5); + return false; + } else { + if (cm->classmark2[2] & (1 << (a5-2))) + return true; + else + return false; + } + break; + case 4: + case 5: + case 6: + case 7: + /* See 3GPP TS 24.008 10.5.1.7 */ + if (cm->classmark3_len < 1) { + DEBUGP(DMSC, "CLASSMARK 3 unknown, assuming MS doesn't support A5/%u\n", a5); + return false; + } else { + if (cm->classmark3[0] & (1 << (a5-4))) + return true; + else + return false; + } + break; + default: + return false; + } +} + void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg) { net->mncc_recv(net, msg); @@ -3421,11 +3477,19 @@ int i, j = 0; for (i = 0; i < 8; i++) { - if (net->a5_encryption_mask & (1 << i)) + if (net->a5_encryption_mask & (1 << i) && + classmark_supports_a5(&conn->classmark, i)) ei.perm_algo[j++] = vlr_ciph_to_gsm0808_alg_id(i); } ei.perm_algo_len = j; + if (ei.perm_algo_len == 0) { + LOGP(DMM, LOGL_ERROR, "%s: cannot start ciphering, no intersection " + "between MSC-configured and MS-supported A5 algorithms\n", + vlr_subscr_name(conn->vsub)); + return -ENOTSUP; + } + /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth * tokens. tuple->vec.kc was calculated from the GSM algorithm and is not * necessarily a match for the UMTS AKA tokens. */ -- To view, visit https://gerrit.osmocom.org/5560 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat Dec 23 19:28:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 23 Dec 2017 19:28:46 +0000 Subject: [PATCH] osmo-msc[master]: Permit a set of multiple different A5 ciphers In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5559 to look at the new patch set (#2). Permit a set of multiple different A5 ciphers So far, the administrator had to pick one particular cipher which would then be used throughout all subscribers/phones. This is a bit impractical, as e.g. not all phones support A5/3. Extend the VTY command syntax in a backwards-compatible way to permit for multiple ciphers. NOTE: Like the previous code, OsmoMSC does *not yet check* whether the configured cipher is compatible with the MS capabilities as reported in CLASSMARK! The network hence might choose an algorithm not supported by the phone. Fixing this is subject to another patch. Closes: OS#2460 Change-Id: I79a4e2892eb5fbecc3d84e11dceffb7149db264b --- M include/osmocom/msc/gsm_data.h M src/libcommon-cs/common_cs.c M src/libcommon-cs/common_cs_vty.c M src/libmsc/gsm_04_08.c M src/libmsc/msc_vty.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_tests.c 8 files changed, 49 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/5559/2 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 1b0bff9..cb6b3c0 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -369,7 +369,8 @@ regex_t authorized_regexp; char *authorized_reg_str; enum gsm48_reject_value reject_cause; - int a5_encryption; + /* bit-mask of permitted encryption algorithms. LSB=A5/0, MSB=A5/7 */ + uint8_t a5_encryption_mask; bool authentication_required; int neci; int send_mm_info; diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c index 4748865..9edf7c5 100644 --- a/src/libcommon-cs/common_cs.c +++ b/src/libcommon-cs/common_cs.c @@ -56,6 +56,8 @@ net->country_code = country_code; net->network_code = network_code; + /* Permit a compile-time default of A5/3 and A5/1 */ + net->a5_encryption_mask = (1 << 3) | (1 << 1); /* Use 30 min periodic update interval as sane default */ net->t3212 = 5; diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c index 4754531..8c9f127 100644 --- a/src/libcommon-cs/common_cs_vty.c +++ b/src/libcommon-cs/common_cs_vty.c @@ -155,15 +155,20 @@ DEFUN(cfg_net_encryption, cfg_net_encryption_cmd, - "encryption a5 (0|1|2|3)", + "encryption a5 <0-3> [<0-3>] [<0-3>] [<0-3>]", "Encryption options\n" - "A5 encryption\n" "A5/0: No encryption\n" - "A5/1: Encryption\n" "A5/2: Export-grade Encryption\n" - "A5/3: 'New' Secure Encryption\n") + "GSM A5 Air Interface Encryption\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n" + "A5/n Algorithm Number\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + unsigned int i; - gsmnet->a5_encryption = atoi(argv[0]); + gsmnet->a5_encryption_mask = 0; + for (i = 0; i < argc; i++) + gsmnet->a5_encryption_mask |= (1 << atoi(argv[i])); return CMD_SUCCESS; } diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index d934db6..5fd1607 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -348,7 +348,7 @@ net->vlr, conn, vlr_lu_type, tmsi, imsi, &old_lai, &new_lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran, net->vlr->cfg.assign_tmsi); @@ -715,7 +715,7 @@ net->vlr, conn, VLR_PR_ARQ_T_CM_SERV_REQ, mi-1, &lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran); @@ -1099,7 +1099,7 @@ net->vlr, conn, VLR_PR_ARQ_T_PAGING_RESP, mi_lv, &lai, is_utran || conn->network->authentication_required, - is_utran || conn->network->a5_encryption, + is_utran || conn->network->a5_encryption_mask > 0x01, classmark_is_r99(&conn->classmark), is_utran); @@ -3416,10 +3416,15 @@ DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub)); { + struct gsm_network *net = conn->network; struct gsm0808_encrypt_info ei; + int i, j = 0; - ei.perm_algo[0] = vlr_ciph_to_gsm0808_alg_id(conn->network->a5_encryption); - ei.perm_algo_len = 1; + for (i = 0; i < 8; i++) { + if (net->a5_encryption_mask & (1 << i)) + ei.perm_algo[j++] = vlr_ciph_to_gsm0808_alg_id(i); + } + ei.perm_algo_len = j; /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth * tokens. tuple->vec.kc was calculated from the GSM algorithm and is not diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index c1c9f6b..44ea2e0 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1,7 +1,7 @@ /* MSC interface to quagga VTY */ /* (C) 2016 by sysmocom s.m.f.c. GmbH * Based on OpenBSC interface to quagga VTY (libmsc/vty_interface_layer3.c) - * (C) 2009 by Harald Welte + * (C) 2009-2017 by Harald Welte * (C) 2009-2011 by Holger Hans Peter Freyther * All Rights Reserved * @@ -160,6 +160,7 @@ static int config_write_net(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + int i; vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); @@ -169,7 +170,12 @@ vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); - vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); + vty_out(vty, " encryption a5"); + for (i = 0; i < 8; i++) { + if (gsmnet->a5_encryption_mask & (1 << i)) + vty_out(vty, " %u", i); + } + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " authentication %s%s", gsmnet->authentication_required ? "required" : "optional", VTY_NEWLINE); vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode), diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index e0bd967..42e620a 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -31,7 +31,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); btw("Location Update request causes a GSUP Send Auth Info request to HLR"); lu_result_sent = RES_NONE; @@ -243,7 +243,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.assign_tmsi = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -482,7 +482,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.check_imei_rqd = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -584,7 +584,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.retrieve_imeisv_ciphered = true; btw("Location Update request causes a GSUP Send Auth Info request to HLR"); @@ -682,7 +682,7 @@ comment_start(); /* implicit: net->authentication_required = true; */ - net->a5_encryption = VLR_CIPH_A5_1; + net->a5_encryption_mask = (1 << 1); net->vlr->cfg.assign_tmsi = true; net->vlr->cfg.check_imei_rqd = true; diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index e016ab6..647b25c 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -62,7 +62,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -224,7 +224,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -369,7 +369,7 @@ DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -546,7 +546,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -745,7 +745,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=07fa7502e07e1c00 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=07fa7502e07e1c00 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -890,7 +890,7 @@ DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: got VLR_AUTH_RES_PASSED DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2() DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for MSISDN:46071: cipher=VLR_CIPH_A5_1 kc=e2b234f807886400 retrieve_imeisv=0 +- sending Ciphering Mode Command for MSISDN:46071: ciphers=0x02 kc=e2b234f807886400 retrieve_imeisv=0 DVLR Process_Access_Request_VLR(50462976){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH DMM MSISDN:46071: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF MSISDN:46071: MSC conn use - dtap == 1 (0x4) @@ -1067,7 +1067,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -1287,7 +1287,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=1 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=1 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) @@ -1496,7 +1496,7 @@ DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth() DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode -- sending Ciphering Mode Command for IMSI:901700000004620: cipher=VLR_CIPH_A5_1 kc=61855fb81fc2a800 retrieve_imeisv=0 +- sending Ciphering Mode Command for IMSI:901700000004620: ciphers=0x02 kc=61855fb81fc2a800 retrieve_imeisv=0 DVLR vlr_lu_fsm(901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH DMM IMSI:901700000004620: bump: conn still being established (SUBSCR_CONN_S_NEW) DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x4) diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 26fcd51..cf5c757 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -336,7 +336,7 @@ } net->authentication_required = false; - net->a5_encryption = VLR_CIPH_NONE; + net->a5_encryption_mask = (1 << 0); net->vlr->cfg.check_imei_rqd = false; net->vlr->cfg.assign_tmsi = false; net->vlr->cfg.retrieve_imeisv_early = false; @@ -673,10 +673,10 @@ struct gsm_subscriber_connection *conn = msc_conn_ref; switch (conn->via_ran) { case RAN_GERAN_A: - btw("sending Ciphering Mode Command for %s: cipher=%s kc=%s" + btw("sending Ciphering Mode Command for %s: ciphers=0x%02x kc=%s" " retrieve_imeisv=%d", vlr_subscr_name(conn->vsub), - vlr_ciph_name(conn->network->a5_encryption), + conn->network->a5_encryption_mask, osmo_hexdump_nospc(conn->vsub->last_tuple->vec.kc, 8), retrieve_imeisv); break; -- To view, visit https://gerrit.osmocom.org/5559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I79a4e2892eb5fbecc3d84e11dceffb7149db264b Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 05:38:49 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 24 Dec 2017 05:38:49 +0000 Subject: osmo-msc[master]: MSC: Intersect configured A5 algorithms with MS-supported ones In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5560 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 05:51:22 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 24 Dec 2017 05:51:22 +0000 Subject: osmo-msc[master]: Permit a set of multiple different A5 ciphers In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5559 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79a4e2892eb5fbecc3d84e11dceffb7149db264b Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 05:53:55 2017 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 24 Dec 2017 05:53:55 +0000 Subject: osmo-msc[master]: Shift ciphering algorithm selection from VLR to MSC In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5558 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ed80ca2086560a5975a758ec568a034a9a8ab89 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:16 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Fix TC_assignment_fr_a5_4 Message-ID: Review at https://gerrit.osmocom.org/5561 BSC_Tests: Fix TC_assignment_fr_a5_4 Don't expect the ASSIGNMENT to fail in case of unsupported A5/4, but expect a CIPHERING MODE REJECT. Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 15 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/61/5561/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 4c88788..4cf418e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1338,7 +1338,7 @@ private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); const OCT8 kc := '0001020304050607'O; @@ -1346,9 +1346,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('10'O, kc, kc128, true); /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ - f_establish_fully(pars, ass_cmd, exp_fail); - f_cipher_mode('10'O, kc, kc128); } testcase TC_assignment_fr_a5_4() runs on test_CT { diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 51ac650..f683ef4 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -104,7 +104,8 @@ RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } -function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr { +function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit, boolean exp_fail := false) +runs on MSC_ConnHdlr { var PDU_BSSAP bssap; var RSL_Message rsl; @@ -125,10 +126,18 @@ } [] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap { // bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier - setverdict(pass); + if (exp_fail == true) { + setverdict(fail, "Unexpected Cipher Mode Complete"); + } else { + setverdict(pass); + } } [] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap { - setverdict(fail, "Ciphering Mode Reject"); + if (exp_fail == false) { + setverdict(fail, "Ciphering Mode Reject"); + } else { + setverdict(pass); + } } } } -- To view, visit https://gerrit.osmocom.org/5561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:16 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:16 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: Add 3GPP TS 25.415 IuUP encoder/decoder Message-ID: Review at https://gerrit.osmocom.org/5562 Add 3GPP TS 25.415 IuUP encoder/decoder Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd --- A library/IuUP_Emulation.ttcn A library/IuUP_EncDec.cc A library/IuUP_Types.ttcn 3 files changed, 725 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/5562/1 diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn new file mode 100644 index 0000000..ec25e49 --- /dev/null +++ b/library/IuUP_Emulation.ttcn @@ -0,0 +1,137 @@ +module IuUP_Emulation { + +import from Osmocom_Types all; +import from IuUP_Types all; + + +type record IuUP_RabFlowCombination { + IuUP_RFCI rfci, + /* number of bits per sub-flow */ + RecOfU8 sub_flow_bits, + /* IPTI value in number of ITIs for the corresponding RFCI */ + uint8_t ipti +}; + +template (value) IuUP_RabFlowCombination t_IuUP_RFC(IuUP_RFCI rfci, RecOfU8 subflow_bits, uint8_t ipti) := { + rfci := rfci, + sub_flow_bits := subflow_bits, + ipti := ipti +} + +template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_12_2(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {81, 103, 60}, 1); +template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_SID(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {34, 0, 0}, 7); + +type record IuUP_Config { + /* actively send INIT (true) or only passively respond (false) */ + boolean active_init, + boolean data_pdu_type_0, + /* RAB Flow Combinations */ + record of IuUP_RabFlowCombination rab_flow_combs +}; + +type enumerated IuUP_Em_State { + ST_INIT, + ST_DATA_TRANSFER_READY +}; + + + +type record IuUP_Entity { + IuUP_Config cfg, + IuUP_Em_State state, + IuUP_FrameNr tx_next_frame_nr, + IuUP_FrameNr rx_last_frame_nr optional, + IuUP_PDU pending_tx_pdu optional +}; + +template (value) IuUP_Entity t_IuUP_Entity(boolean act_init) := { + cfg := { + active_init := act_init, + data_pdu_type_0 := true, + rab_flow_combs := { t_IuUP_RFC_AMR_12_2(0), t_IuUP_RFC_AMR_SID(1) } + }, + state := ST_INIT, + tx_next_frame_nr := 0, + rx_last_frame_nr := omit, + pending_tx_pdu := omit +} + + +function f_IuUP_Em_rx_decaps(inout IuUP_Entity st, octetstring inp) return octetstring { + var IuUP_PDU pdu := dec_IuUP_PDU(inp); + if (ischosen(pdu.type_0)) { + if (st.cfg.data_pdu_type_0) { + /* FIXME: check header / CRC */ + st.rx_last_frame_nr := pdu.type_0.frame_nr; + return pdu.type_0.payload; + } else { + setverdict(fail, "PDU Type 0 received but 1 configured"); + } + } else if (ischosen(pdu.type_1)) { + if (st.cfg.data_pdu_type_0 == false) { + /* FIXME: check header / CRC */ + st.rx_last_frame_nr := pdu.type_1.frame_nr; + return pdu.type_1.payload; + } else { + setverdict(fail, "PDU Type 1 received but 0 configured"); + } + } else if (ischosen(pdu.type_14)) { + if (match(pdu, tr_IuUP_INIT)) { + if (st.cfg.active_init == true) { + setverdict(fail, "INIT received in ACTIVE role"); + } else { + /* store an INIT_ACK to be transmitted later */ + st.pending_tx_pdu := valueof(ts_IuUP_INIT_ACK(pdu.type_14.frame_nr, + pdu.type_14.iuup_version)); + } + } else if (match(pdu, tr_IuUP_INIT_ACK)) { + if (st.cfg.active_init == true) { + log("IuUP INIT_ACK Received"); + st.state := ST_DATA_TRANSFER_READY; + } else { + setverdict(fail, "INIT_ACK received in PASSIVE role"); + } + } + return ''O; + } else { + setverdict(fail, "Impossible IuUP PDU decoded from ", inp); + } + self.stop; +} + +function f_IuUP_Em_tx_encap(inout IuUP_Entity st, in octetstring payload) return octetstring { + var IuUP_PDU pdu; + select (st.state) { + case (ST_INIT) { + if (st.cfg.active_init) { + /* send INIT */ + pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O)); + } else { + /* wait for INIT */ + if (isvalue(st.pending_tx_pdu)) { + /* we're waiting to transmit the INIT_ACK in response to an + * init (passive) */ + pdu := st.pending_tx_pdu; + st.pending_tx_pdu := omit; + st.state := ST_DATA_TRANSFER_READY; + } + } + } + case (ST_DATA_TRANSFER_READY) { + if (st.cfg.data_pdu_type_0) { + pdu := valueof(ts_IuUP_Type0(st.tx_next_frame_nr, 0, payload)); + } else { + pdu := valueof(ts_IuUP_Type1(st.tx_next_frame_nr, 0, payload)); + } + st.tx_next_frame_nr := st.tx_next_frame_nr + 1; + } + } + if (isvalue(pdu)) { + return f_enc_IuUP_PDU(pdu); + } else { + return ''O; + } +} + + +} diff --git a/library/IuUP_EncDec.cc b/library/IuUP_EncDec.cc new file mode 100644 index 0000000..81742e8 --- /dev/null +++ b/library/IuUP_EncDec.cc @@ -0,0 +1,250 @@ + +#include "Octetstring.hh" +#include "Error.hh" +#include "Logger.hh" + +#include "IuUP_Types.hh" + +#include + +extern "C" { + +typedef uint8_t ubit_t; +typedef uint8_t pbit_t; + +static int osmo_pbit2ubit(ubit_t *out, const pbit_t *in, unsigned int num_bits) +{ + unsigned int i; + ubit_t *cur = out; + ubit_t *limit = out + num_bits; + + for (i = 0; i < (num_bits/8)+1; i++) { + pbit_t byte = in[i]; + *cur++ = (byte >> 7) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 6) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 5) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 4) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 3) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 2) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 1) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 0) & 1; + if (cur >= limit) + break; + } + return cur - out; +} + + +struct osmo_crc8gen_code { + int bits; /*!< Actual number of bits of the CRC */ + uint8_t poly; /*!< Polynom (normal representation, MSB omitted */ + uint8_t init; /*!< Initialization value of the CRC state */ + uint8_t remainder; /*!< Remainder of the CRC (final XOR) */ +}; + +static uint8_t +osmo_crc8gen_compute_bits(const struct osmo_crc8gen_code *code, + const ubit_t *in, int len) +{ + const uint8_t poly = code->poly; + uint8_t crc = code->init; + int i, n = code->bits-1; + + for (i=0; ibits) - 1; + } + + crc ^= code->remainder; + + return crc; +} + +struct osmo_crc16gen_code { + int bits; /*!< Actual number of bits of the CRC */ + uint16_t poly; /*!< Polynom (normal representation, MSB omitted */ + uint16_t init; /*!< Initialization value of the CRC state */ + uint16_t remainder; /*!< Remainder of the CRC (final XOR) */ +}; + +static uint16_t +osmo_crc16gen_compute_bits(const struct osmo_crc16gen_code *code, + const ubit_t *in, int len) +{ + const uint16_t poly = code->poly; + uint16_t crc = code->init; + int i, n = code->bits-1; + + for (i=0; ibits) - 1; + } + + crc ^= code->remainder; + + return crc; +} + +} + + +static const struct osmo_crc8gen_code iuup_hdr_crc_code = { + .bits = 6, + .poly = 47, + .init = 0, + .remainder = 0, +}; + +static const struct osmo_crc16gen_code iuup_data_crc_code = { + .bits = 10, + .poly = 563, + .init = 0, + .remainder = 0, +}; + +static int iuup_get_payload_offset(const uint8_t *iuup_pdu) +{ + uint8_t pdu_type = iuup_pdu[0] >> 4; + switch (pdu_type) { + case 0: + case 14: + return 4; + case 1: + return 3; + default: + return -1; + } +} + +int osmo_iuup_compute_payload_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[1024*8]; + uint8_t pdu_type; + int offset, payload_len_bytes; + + if (pdu_len < 1) + return -1; + + pdu_type = iuup_pdu[0] >> 4; + + /* Type 1 has no CRC */ + if (pdu_type == 1) + return 0; + + offset = iuup_get_payload_offset(iuup_pdu); + if (offset < 0) + return offset; + + if (pdu_len < (unsigned int)offset) + return -1; + + payload_len_bytes = pdu_len - offset; + osmo_pbit2ubit(buf, iuup_pdu+offset, payload_len_bytes*8); + return osmo_crc16gen_compute_bits(&iuup_data_crc_code, buf, payload_len_bytes*8); +} + +int osmo_iuup_compute_header_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[2*8]; + + if (pdu_len < 2) + return -1; + + osmo_pbit2ubit(buf, iuup_pdu, 2*8); + return osmo_crc8gen_compute_bits(&iuup_hdr_crc_code, buf, 2*8); +} +/* IuUP CRC Implementation */ + +/* (C) 2017 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace IuUP__Types { + + +INTEGER f__IuUP__compute__crc__payload(OCTETSTRING const &in) +{ + int crc_calc; + const unsigned char *data = (const unsigned char *)in; + int len = in.lengthof(); + + crc_calc = osmo_iuup_compute_payload_crc(data, len); + + return INTEGER(crc_calc); +} + +INTEGER f__IuUP__compute__crc__header(OCTETSTRING const &in) +{ + int crc_calc; + const unsigned char *data = (const unsigned char *)in; + int len = in.lengthof(); + + crc_calc = osmo_iuup_compute_header_crc(data, len); + + return INTEGER(crc_calc); +} + +OCTETSTRING f__enc__IuUP__PDU(const IuUP__PDU& pdu) +{ + TTCN_Buffer buf; + int crc_hdr, crc_payload; + uint8_t in[2]; + pdu.encode(IuUP__PDU_descr_, buf, TTCN_EncDec::CT_RAW); + OCTETSTRING ret_val(buf.get_len(), buf.get_data()); + + crc_hdr = osmo_iuup_compute_header_crc(buf.get_data(), buf.get_len()); + crc_payload = osmo_iuup_compute_payload_crc(buf.get_data(), buf.get_len()); + in[0] = (crc_hdr & 0x3f) << 2; + in[0] |= (crc_payload & 0x3ff) >> 8; + in[1] = crc_payload & 0xff; + OCTETSTRING CHECKSUM(2, in); + + ret_val = substr(ret_val, 0, 2) + CHECKSUM + substr(ret_val, 4, ret_val.lengthof()-4); + + return ret_val; +} + +} diff --git a/library/IuUP_Types.ttcn b/library/IuUP_Types.ttcn new file mode 100644 index 0000000..933b64f --- /dev/null +++ b/library/IuUP_Types.ttcn @@ -0,0 +1,338 @@ +module IuUP_Types { + +import from Osmocom_Types all; +import from General_Types all; + +/* See TS 25.415 6.6.3.1 */ +type uint4_t IuUP_PDU_Type; + +/* See TS 25.415 6.6.3.2 */ +type enumerated IuUP_AckNack { + IuUP_ACKNACK_CTRL (0), + IuUP_ACKNACK_ACK (1), + IuUP_ACKNACK_NACK (2), + IuUP_ACKNACK_RESERVED (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.3 */ +type uint4_t IuUP_FrameNr; + +/* See TS 25.415 6.6.3.5 */ +type enumerated IuUP_FQC { + IuUP_FQC_GOOD (0), + IuUP_FQC_BAD (1), + IuUP_FQC_BAD_RADIO (2), + IuUP_FQC_SPARE (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.6 */ +type uint6_t IuUP_RFCI; + +/* See TS 25.415 6.6.3.7 */ +type enumerated IuUP_ProcedureIndicator { + IuUP_PRI_INITIALIZATION (0), + IuUP_PRI_RATE_CONTROL (1), + IuUP_PRI_TIME_ALIGNMENT (2), + IuUP_PRI_ERROR_EVENT (3) + /* reserved */ +} with { variant "FIELDLENGTH(4)" }; + +/* See TS 25.415 6.6.3.13 */ +type uint6_t IuUP_NumOfRfciInd; + +/* See TS 25.415 6.6.3.15 */ +type enumerated IuUP_ErrorDistance { + IuUP_ERR_DIST_LOCAL (0), + IuUP_ERR_DIST_FIRST_FW (1), + IuUP_ERR_DIST_SECOND_FW (2), + IuUP_ERR_DIST_RESERVED (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.16 */ +type enumerated IuUP_ErrorCause { + /* Syntactical protocol errors */ + IuUP_CAUSE_CRC_ERROR_HEADER (0), + IuUP_CAUSE_CRC_ERROR_PAYLOAD (1), + IuUP_CAUSE_UNEXP_FRAME_NR (2), + IuUP_CAUSE_FRAME_LOSS (3), + IuUP_CAUSE_PDU_TYPE_UNKNOWN (4), + IuUP_CAUSE_UNKNOWN_PROCEDURE (5), + IuUP_CAUSE_UNKNOWN_RES_VAL (6), + IuUP_CAUSE_UNKNOWN_FIELD (7), + IuUP_CAUSE_FRAME_TOO_SHORT (8), + IuUP_CAUSE_MISSING_FIELD (9), + /* Semantical protocol errors */ + IuUP_CAUSE_UNEXPECTED_PDU_TYPE (16), + IuUP_CAUSE_UNEXPECTED_PROCEDURE (18), + IuUP_CAUSE_UNEXPECTED_RFCI (19), + IuUP_CAUSE_UNEXPECTED_VALUE (20), + /* Other Errors */ + IuUP_CAUSE_INIT_FAIL (42), + IuUP_CAUSE_INIT_FAIL_NET_TMR_EXP (43), + IuUP_CAUSE_INIT_FAIL_FERR_REP_NACK (44), + IuUP_CAUSE_RATE_CONTROL_FAIL (45), + IuUP_CAUSE_ERROR_EVENT_FAIL (46), + IuUP_CAUSE_TIME_ALIGN_NOTSUPP (47), + IuUP_CAUSE_REQ_ALIGN_NOTPOSS (48), + IuUP_CAUSE_IU_UP_VERS_NOTSUPP (49) +} with { variant "FIELDLENGTH(6)" }; + +/* See TS 25.415 6.6.3.18 */ +type uint8_t IuUP_TimeAlignment; + + +/* See TS 25.415 6.6.2.1 */ +type record IuUP_PDU_Type_0 { + IuUP_PDU_Type pdu_type, /* 0 */ + IuUP_FrameNr frame_nr, + IuUP_FQC fqc, + IuUP_RFCI rfci, + uint6_t header_crc, + uint10_t payload_crc, + octetstring payload +}; + +/* See TS 25.415 6.6.2.2 */ +type record IuUP_PDU_Type_1 { + IuUP_PDU_Type pdu_type, /* 1 */ + IuUP_FrameNr frame_nr, + IuUP_FQC fqc, + IuUP_RFCI rfci, + uint6_t header_crc, + BIT2 spare, + octetstring payload +}; + +/* See TS 25.415 6.6.6.2.3 */ +type record IuUP_PDU_Type_14 { + IuUP_PDU_Type pdu_type, + IuUP_AckNack ack_nack, + uint2_t frame_nr, + uint4_t iuup_version, + IuUP_ProcedureIndicator procedure_ind, + uint6_t header_crc, + uint10_t payload_crc, + IuUP_PDU14_Union u +} with { variant (u) "CROSSTAG( proc_sending, ack_nack=IuUP_ACKNACK_CTRL; + ack, ack_nack=IuUP_ACKNACK_ACK; + nack, ack_nack=IuUP_ACKNACK_NACK)" +}; + +/* 6.6.2.3.1 Figure 21 */ +type record IuUP_PDU14_ProcSending { + octetstring payload +}; + +/* 6.6.2.3.2 Figure 22 */ +type record IuUP_PDU14_ACK { + octetstring spare_ext optional +}; + +/* 6.6.2.3.3 Figure 23 */ +type record IuUP_PDU14_NACK { + IuUP_ErrorCause err_cause, + BIT2 spare, + octetstring spare_ext optional +}; + +type union IuUP_PDU14_Union { + IuUP_PDU14_ProcSending proc_sending, + IuUP_PDU14_ACK ack, + IuUP_PDU14_NACK nack +}; + +type union IuUP_PDU14_ProcSendingUnion { + IuUP_PDU14_ProcSending_INIT init, + IuUP_PDU14_ProcSending_RATE_CTRL rate_ctrl, + IuUP_PDU14_ProcSending_RATE_CTRL rate_ctrl_ack, + IuUP_PDU14_ProcSending_TIME_ALIGNMENT time_alignment, + IuUP_PDU14_ProcSending_ERROR_EVENT error_event +}; + +/* 6.6.2.3.4.1 Initialisation */ +type record IuUP_PDU14_ProcSending_INIT { + BIT3 spare, + boolean ti, + uint3_t subflows_per_rfci, + boolean chain_ind, + + /* FIXME: Further decode */ + octetstring payload +}; +type record IuUP_InitRfci { + boolean lri, + boolean li, + IuUP_RFCI rfci, + RecOfU8 len8 optional, + RecOfU16 len16 optional +} with { variant (len8) "PRESENCE(li=false)"; + variant (len16) "PRESENCE(li=true)" +}; +type record of uint8_t RecOfU8; +type record of uint16_t RecOfU16; + +/* 6.6.2.3.4.2.1 Rate Control procedure */ +type record IuUP_PDU14_ProcSending_RATE_CTRL { + BIT2 spare, + uint6_t nr_of_rfci_ind, + bitstring rfci_ind +} with { variant (nr_of_rfci_ind) "LENGTHTO(rfci_ind)" + variant (nr_of_rfci_ind) "UNIT(bits)" +}; + +/* 6.6.2.3.4.3 Time Alignment */ +type record IuUP_PDU14_ProcSending_TIME_ALIGNMENT { + uint8_t time_alignment, + octetstring spare optional +}; + +/* 6.6.2.3.4.4 Error Event */ +type record IuUP_PDU14_ProcSending_ERROR_EVENT { + IuUP_ErrorDistance distance, + IuUP_ErrorCause cause +}; + + +type union IuUP_PDU { + IuUP_PDU_Type_0 type_0, + IuUP_PDU_Type_1 type_1, + IuUP_PDU_Type_14 type_14 +} with { variant "TAG( type_0, pdu_type = 0; + type_1, pdu_type = 1; + type_14, pdu_type = 14;)" }; + +/* hand-written C++ functions */ +external function f_enc_IuUP_PDU(in IuUP_PDU msg) return octetstring; +external function f_IuUP_compute_crc_header(in octetstring inp) return uint6_t; +external function f_IuUP_compute_crc_payload(in octetstring inp) return uint10_t; + +/* auto-generated */ +external function dec_IuUP_PDU(in octetstring stream) return IuUP_PDU + with { extension "prototype(convert) decode(RAW)" }; + +template IuUP_PDU ts_IuUP_INIT_ACK(uint2_t frame_nr, uint4_t version) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_ACK, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := 0, + payload_crc := 0, + u := { + ack := { + spare_ext := omit + } + } + } +}; + +template IuUP_PDU tr_IuUP_INIT_ACK(template uint2_t frame_nr := ?, template uint4_t version := ?) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_ACK, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := ?, + payload_crc := ?, + u := { + ack := { + spare_ext := omit + } + } + } +}; + +template IuUP_PDU ts_IuUP_INIT(octetstring payload, uint2_t frame_nr := 0, uint4_t version := 0) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_CTRL, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := 0, + payload_crc := 0, + u := { + proc_sending := { + payload := payload + } + } + } +}; + +template IuUP_PDU tr_IuUP_INIT(template octetstring payload := ?, template uint2_t frame_nr := ?, + template uint4_t version := ?) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_CTRL, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := ?, + payload_crc := ?, + u := { + proc_sending := { + payload := payload + } + } + } +}; + + +template IuUP_PDU ts_IuUP_Type0(IuUP_FrameNr frame_nr, IuUP_RFCI rfci, octetstring payload, + IuUP_FQC fqc := IuUP_FQC_GOOD) := { + type_0 := { + pdu_type := 0, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := 0, + payload_crc := 0, + payload := payload + } +}; + +template IuUP_PDU tr_IuUP_Type0(template IuUP_FrameNr frame_nr := ?, template IuUP_RFCI rfci := ?, + template IuUP_FQC fqc := ?) := { + type_0 := { + pdu_type := 0, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := ?, + payload_crc := ?, + payload := ? + } +}; + +template IuUP_PDU ts_IuUP_Type1(IuUP_FrameNr frame_nr, IuUP_RFCI rfci, octetstring payload, + IuUP_FQC fqc := IuUP_FQC_GOOD) := { + type_1 := { + pdu_type := 1, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := 0, + spare := '00'B, + payload := payload + } +}; + + +template IuUP_PDU tr_IuUP_Type1(template IuUP_FrameNr frame_nr := ?, template IuUP_RFCI rfci := ?, + template IuUP_FQC fqc := ?) := { + type_1 := { + pdu_type := 1, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := ?, + spare := ?, + payload := ? + } +}; + + + +} with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/5562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:17 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Fix encoding of timestamp; int2bit counts in ... Message-ID: Review at https://gerrit.osmocom.org/5563 RTP_Emulation: Fix encoding of timestamp; int2bit counts in bits! Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d --- M library/RTP_Emulation.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/5563/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index b8b1dbe..e4a3029 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -76,7 +76,7 @@ marker_bit := marker, payload_type := pt, sequence_number := seq, - time_stamp := int2bit(ts, 4), + time_stamp := int2bit(ts, 32), SSRC_id := ssrc, CSRCs := omit, ext_header := omit, -- To view, visit https://gerrit.osmocom.org/5563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:17 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Fix calculation of timer + timestamp increment Message-ID: Review at https://gerrit.osmocom.org/5564 RTP_Emulation: Fix calculation of timer + timestamp increment Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88 --- M library/RTP_Emulation.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/5564/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e4a3029..10cf683 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -89,14 +89,14 @@ RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); /* increment sequence + timestamp for next transmit */ g_tx_next_seq := g_tx_next_seq + 1; - g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod g_tx_duration_ms)); + g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz / (1000 / g_tx_duration_ms)); } function f_main() runs on RTP_Emulation_CT { var Result res; - timer T_transmit := 1000.0/int2float(g_tx_duration_ms); + timer T_transmit := int2float(g_tx_duration_ms)/1000.0; var RTP_RecvFrom rx_rtp; var template RTP_RecvFrom tr := { connId := ?, -- To view, visit https://gerrit.osmocom.org/5564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:17 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Add RtpemConfig / RTPEM_configure() call Message-ID: Review at https://gerrit.osmocom.org/5565 RTP_Emulation: Add RtpemConfig / RTPEM_configure() call Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb --- M library/RTP_Emulation.ttcn 1 file changed, 27 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/5565/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 10cf683..e55890e 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -32,10 +32,7 @@ port RTPEM_CTRL_PT CTRL; /* configurable by user, should be fixed */ - var INT7b g_tx_payload_type := 0; - var integer g_tx_samplerate_hz := 8000; - var integer g_tx_duration_ms := 20; - var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H); + var RtpemConfig g_cfg := c_default_cfg; var HostName g_remote_host; var PortNumber g_remote_port; @@ -59,12 +56,29 @@ RTPEM_MODE_BIDIR }; +type record RtpemConfig { + INT7b tx_payload_type, + integer tx_samplerate_hz, + integer tx_duration_ms, + BIT32_BO_LAST tx_ssrc, + octetstring tx_fixed_payload optional +}; + +const RtpemConfig c_default_cfg := { + tx_payload_type := 0, + tx_samplerate_hz := 8000, + tx_duration_ms := 20, + tx_ssrc := '11011110101011011011111011101111'B, + tx_fixed_payload := '01020304'O +} + signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port); signature RTPEM_mode(in RtpemMode mode); +signature RTPEM_configure(in RtpemConfig cfg); type port RTPEM_CTRL_PT procedure { - inout RTPEM_bind, RTPEM_connect, RTPEM_mode; + inout RTPEM_bind, RTPEM_connect, RTPEM_mode, RTPEM_configure; } with { extension "internal" }; template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts, @@ -84,20 +98,21 @@ } private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { - var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, g_tx_next_seq, + var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq, g_tx_next_ts, payload, marker)); RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); /* increment sequence + timestamp for next transmit */ g_tx_next_seq := g_tx_next_seq + 1; - g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz / (1000 / g_tx_duration_ms)); + g_tx_next_ts := g_tx_next_ts + (g_cfg.tx_samplerate_hz / (1000 / g_cfg.tx_duration_ms)); } function f_main() runs on RTP_Emulation_CT { var Result res; - timer T_transmit := int2float(g_tx_duration_ms)/1000.0; + timer T_transmit := int2float(g_cfg.tx_duration_ms)/1000.0; var RTP_RecvFrom rx_rtp; + var RtpemConfig cfg; var template RTP_RecvFrom tr := { connId := ?, remName := ?, @@ -174,6 +189,9 @@ g_rx_enabled := true; } } + [] CTRL.getcall(RTPEM_configure:{?}) -> param (cfg) { + g_cfg := cfg; + } /* simply ignore any RTTP/RTCP if receiver not enabled */ [g_rx_enabled==false] RTP.receive(tr_rtp) { } @@ -190,7 +208,7 @@ /* transmit if timer has expired */ [] T_transmit.timeout { /* send one RTP frame, re-start timer */ - f_tx_rtp('01020304'O); + f_tx_rtp(g_cfg.tx_fixed_payload); T_transmit.start; } -- To view, visit https://gerrit.osmocom.org/5565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:01:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:01:17 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Integrate IuUP support Message-ID: Review at https://gerrit.osmocom.org/5566 RTP_Emulation: Integrate IuUP support Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 --- M library/RTP_Emulation.ttcn 1 file changed, 27 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5566/1 diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e55890e..f952510 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -21,6 +21,9 @@ import from RTP_CodecPort all; import from RTP_CodecPort_CtrlFunct all; +import from IuUP_Types all; +import from IuUP_Emulation all; + type component RTP_Emulation_CT { /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */ port RTP_CODEC_PT RTP; @@ -32,7 +35,7 @@ port RTPEM_CTRL_PT CTRL; /* configurable by user, should be fixed */ - var RtpemConfig g_cfg := c_default_cfg; + var RtpemConfig g_cfg := c_RtpemDefaultCfg; var HostName g_remote_host; var PortNumber g_remote_port; @@ -47,6 +50,8 @@ var INT7b g_rx_payload_type := 0; var LIN2_BO_LAST g_rx_last_seq; var uint32_t g_rx_last_ts; + + var IuUP_Entity g_iuup_ent; // := valueof(t_IuUP_Entity(1)); } type enumerated RtpemMode { @@ -61,15 +66,19 @@ integer tx_samplerate_hz, integer tx_duration_ms, BIT32_BO_LAST tx_ssrc, - octetstring tx_fixed_payload optional + octetstring tx_fixed_payload optional, + boolean iuup_mode, + boolean iuup_tx_init }; -const RtpemConfig c_default_cfg := { +const RtpemConfig c_RtpemDefaultCfg := { tx_payload_type := 0, tx_samplerate_hz := 8000, tx_duration_ms := 20, tx_ssrc := '11011110101011011011111011101111'B, - tx_fixed_payload := '01020304'O + tx_fixed_payload := '01020304'O, + iuup_mode := false, + iuup_tx_init := true } signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); @@ -98,6 +107,9 @@ } private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { + if (g_cfg.iuup_mode) { + payload := f_IuUP_Em_tx_encap(g_iuup_ent, payload); + } var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq, g_tx_next_ts, payload, marker)); RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); @@ -127,6 +139,8 @@ tr_rtp.msg := { rtp := ? }; tr_rtp.connId := g_rtcp_conn_id; tr_rtcp.msg := { rtcp := ? }; + + g_iuup_ent := valueof(t_IuUP_Entity(g_cfg.iuup_tx_init)); while (true) { alt { @@ -164,11 +178,13 @@ [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { T_transmit.stop; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_NONE}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_TXONLY}) { /* start transmit timer */ T_transmit.start; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_TXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_RXONLY}) { @@ -179,6 +195,7 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_RXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_BIDIR}) { T_transmit.start; @@ -188,9 +205,12 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_BIDIR}); } [] CTRL.getcall(RTPEM_configure:{?}) -> param (cfg) { g_cfg := cfg; + g_iuup_ent.cfg.active_init := g_cfg.iuup_tx_init; + CTRL.reply(RTPEM_configure:{cfg}); } /* simply ignore any RTTP/RTCP if receiver not enabled */ @@ -200,6 +220,9 @@ /* process received RTCP/RTP if receiver enabled */ [g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp { log("RX RTP: ", rx_rtp); + if (g_cfg.iuup_mode) { + rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data); + } } [g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp { log("RX RTCP: ", rx_rtp); -- To view, visit https://gerrit.osmocom.org/5566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:03:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:03:37 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Integrate IuUP support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5566 to look at the new patch set (#2). RTP_Emulation: Integrate IuUP support Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 --- M bsc/gen_links.sh M library/RTP_Emulation.ttcn 2 files changed, 28 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/5566/2 diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 5d8555a..4316966 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn" gen_links $DIR $FILES diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e55890e..f952510 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -21,6 +21,9 @@ import from RTP_CodecPort all; import from RTP_CodecPort_CtrlFunct all; +import from IuUP_Types all; +import from IuUP_Emulation all; + type component RTP_Emulation_CT { /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */ port RTP_CODEC_PT RTP; @@ -32,7 +35,7 @@ port RTPEM_CTRL_PT CTRL; /* configurable by user, should be fixed */ - var RtpemConfig g_cfg := c_default_cfg; + var RtpemConfig g_cfg := c_RtpemDefaultCfg; var HostName g_remote_host; var PortNumber g_remote_port; @@ -47,6 +50,8 @@ var INT7b g_rx_payload_type := 0; var LIN2_BO_LAST g_rx_last_seq; var uint32_t g_rx_last_ts; + + var IuUP_Entity g_iuup_ent; // := valueof(t_IuUP_Entity(1)); } type enumerated RtpemMode { @@ -61,15 +66,19 @@ integer tx_samplerate_hz, integer tx_duration_ms, BIT32_BO_LAST tx_ssrc, - octetstring tx_fixed_payload optional + octetstring tx_fixed_payload optional, + boolean iuup_mode, + boolean iuup_tx_init }; -const RtpemConfig c_default_cfg := { +const RtpemConfig c_RtpemDefaultCfg := { tx_payload_type := 0, tx_samplerate_hz := 8000, tx_duration_ms := 20, tx_ssrc := '11011110101011011011111011101111'B, - tx_fixed_payload := '01020304'O + tx_fixed_payload := '01020304'O, + iuup_mode := false, + iuup_tx_init := true } signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); @@ -98,6 +107,9 @@ } private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { + if (g_cfg.iuup_mode) { + payload := f_IuUP_Em_tx_encap(g_iuup_ent, payload); + } var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq, g_tx_next_ts, payload, marker)); RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); @@ -127,6 +139,8 @@ tr_rtp.msg := { rtp := ? }; tr_rtp.connId := g_rtcp_conn_id; tr_rtcp.msg := { rtcp := ? }; + + g_iuup_ent := valueof(t_IuUP_Entity(g_cfg.iuup_tx_init)); while (true) { alt { @@ -164,11 +178,13 @@ [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { T_transmit.stop; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_NONE}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_TXONLY}) { /* start transmit timer */ T_transmit.start; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_TXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_RXONLY}) { @@ -179,6 +195,7 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_RXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_BIDIR}) { T_transmit.start; @@ -188,9 +205,12 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_BIDIR}); } [] CTRL.getcall(RTPEM_configure:{?}) -> param (cfg) { g_cfg := cfg; + g_iuup_ent.cfg.active_init := g_cfg.iuup_tx_init; + CTRL.reply(RTPEM_configure:{cfg}); } /* simply ignore any RTTP/RTCP if receiver not enabled */ @@ -200,6 +220,9 @@ /* process received RTCP/RTP if receiver enabled */ [g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp { log("RX RTP: ", rx_rtp); + if (g_cfg.iuup_mode) { + rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data); + } } [g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp { log("RX RTCP: ", rx_rtp); -- To view, visit https://gerrit.osmocom.org/5566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:13 +0000 Subject: osmo-ttcn3-hacks[master]: BSC_Tests: Fix TC_assignment_fr_a5_4 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:29 +0000 Subject: osmo-ttcn3-hacks[master]: Add 3GPP TS 25.415 IuUP encoder/decoder In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:31 +0000 Subject: osmo-ttcn3-hacks[master]: RTP_Emulation: Fix encoding of timestamp; int2bit counts in ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:34 +0000 Subject: osmo-ttcn3-hacks[master]: RTP_Emulation: Fix calculation of timer + timestamp increment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:36 +0000 Subject: osmo-ttcn3-hacks[master]: RTP_Emulation: Add RtpemConfig / RTPEM_configure() call In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:38 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:38 +0000 Subject: osmo-ttcn3-hacks[master]: RTP_Emulation: Integrate IuUP support In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:04:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:04:59 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RTP_Emulation: Integrate IuUP support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RTP_Emulation: Integrate IuUP support ...................................................................... RTP_Emulation: Integrate IuUP support Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 --- M bsc/gen_links.sh M library/RTP_Emulation.ttcn 2 files changed, 28 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 5d8555a..4316966 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn" gen_links $DIR $FILES diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e55890e..f952510 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -21,6 +21,9 @@ import from RTP_CodecPort all; import from RTP_CodecPort_CtrlFunct all; +import from IuUP_Types all; +import from IuUP_Emulation all; + type component RTP_Emulation_CT { /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */ port RTP_CODEC_PT RTP; @@ -32,7 +35,7 @@ port RTPEM_CTRL_PT CTRL; /* configurable by user, should be fixed */ - var RtpemConfig g_cfg := c_default_cfg; + var RtpemConfig g_cfg := c_RtpemDefaultCfg; var HostName g_remote_host; var PortNumber g_remote_port; @@ -47,6 +50,8 @@ var INT7b g_rx_payload_type := 0; var LIN2_BO_LAST g_rx_last_seq; var uint32_t g_rx_last_ts; + + var IuUP_Entity g_iuup_ent; // := valueof(t_IuUP_Entity(1)); } type enumerated RtpemMode { @@ -61,15 +66,19 @@ integer tx_samplerate_hz, integer tx_duration_ms, BIT32_BO_LAST tx_ssrc, - octetstring tx_fixed_payload optional + octetstring tx_fixed_payload optional, + boolean iuup_mode, + boolean iuup_tx_init }; -const RtpemConfig c_default_cfg := { +const RtpemConfig c_RtpemDefaultCfg := { tx_payload_type := 0, tx_samplerate_hz := 8000, tx_duration_ms := 20, tx_ssrc := '11011110101011011011111011101111'B, - tx_fixed_payload := '01020304'O + tx_fixed_payload := '01020304'O, + iuup_mode := false, + iuup_tx_init := true } signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); @@ -98,6 +107,9 @@ } private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { + if (g_cfg.iuup_mode) { + payload := f_IuUP_Em_tx_encap(g_iuup_ent, payload); + } var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq, g_tx_next_ts, payload, marker)); RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); @@ -127,6 +139,8 @@ tr_rtp.msg := { rtp := ? }; tr_rtp.connId := g_rtcp_conn_id; tr_rtcp.msg := { rtcp := ? }; + + g_iuup_ent := valueof(t_IuUP_Entity(g_cfg.iuup_tx_init)); while (true) { alt { @@ -164,11 +178,13 @@ [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_NONE}) { T_transmit.stop; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_NONE}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_TXONLY}) { /* start transmit timer */ T_transmit.start; g_rx_enabled := false; + CTRL.reply(RTPEM_mode:{RTPEM_MODE_TXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_RXONLY}) { @@ -179,6 +195,7 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_RXONLY}); } [] CTRL.getcall(RTPEM_mode:{RTPEM_MODE_BIDIR}) { T_transmit.start; @@ -188,9 +205,12 @@ RTCP.clear; g_rx_enabled := true; } + CTRL.reply(RTPEM_mode:{RTPEM_MODE_BIDIR}); } [] CTRL.getcall(RTPEM_configure:{?}) -> param (cfg) { g_cfg := cfg; + g_iuup_ent.cfg.active_init := g_cfg.iuup_tx_init; + CTRL.reply(RTPEM_configure:{cfg}); } /* simply ignore any RTTP/RTCP if receiver not enabled */ @@ -200,6 +220,9 @@ /* process received RTCP/RTP if receiver enabled */ [g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp { log("RX RTP: ", rx_rtp); + if (g_cfg.iuup_mode) { + rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data); + } } [g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp { log("RX RTCP: ", rx_rtp); -- To view, visit https://gerrit.osmocom.org/5566 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46de7fb9c324654275a27aa5f8c1be70340e3229 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:05:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:05:00 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RTP_Emulation: Add RtpemConfig / RTPEM_configure() call In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RTP_Emulation: Add RtpemConfig / RTPEM_configure() call ...................................................................... RTP_Emulation: Add RtpemConfig / RTPEM_configure() call Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb --- M library/RTP_Emulation.ttcn 1 file changed, 27 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index 10cf683..e55890e 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -32,10 +32,7 @@ port RTPEM_CTRL_PT CTRL; /* configurable by user, should be fixed */ - var INT7b g_tx_payload_type := 0; - var integer g_tx_samplerate_hz := 8000; - var integer g_tx_duration_ms := 20; - var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H); + var RtpemConfig g_cfg := c_default_cfg; var HostName g_remote_host; var PortNumber g_remote_port; @@ -59,12 +56,29 @@ RTPEM_MODE_BIDIR }; +type record RtpemConfig { + INT7b tx_payload_type, + integer tx_samplerate_hz, + integer tx_duration_ms, + BIT32_BO_LAST tx_ssrc, + octetstring tx_fixed_payload optional +}; + +const RtpemConfig c_default_cfg := { + tx_payload_type := 0, + tx_samplerate_hz := 8000, + tx_duration_ms := 20, + tx_ssrc := '11011110101011011011111011101111'B, + tx_fixed_payload := '01020304'O +} + signature RTPEM_bind(in HostName local_host, inout PortNumber local_port); signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port); signature RTPEM_mode(in RtpemMode mode); +signature RTPEM_configure(in RtpemConfig cfg); type port RTPEM_CTRL_PT procedure { - inout RTPEM_bind, RTPEM_connect, RTPEM_mode; + inout RTPEM_bind, RTPEM_connect, RTPEM_mode, RTPEM_configure; } with { extension "internal" }; template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts, @@ -84,20 +98,21 @@ } private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT { - var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, g_tx_next_seq, + var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq, g_tx_next_ts, payload, marker)); RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); /* increment sequence + timestamp for next transmit */ g_tx_next_seq := g_tx_next_seq + 1; - g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz / (1000 / g_tx_duration_ms)); + g_tx_next_ts := g_tx_next_ts + (g_cfg.tx_samplerate_hz / (1000 / g_cfg.tx_duration_ms)); } function f_main() runs on RTP_Emulation_CT { var Result res; - timer T_transmit := int2float(g_tx_duration_ms)/1000.0; + timer T_transmit := int2float(g_cfg.tx_duration_ms)/1000.0; var RTP_RecvFrom rx_rtp; + var RtpemConfig cfg; var template RTP_RecvFrom tr := { connId := ?, remName := ?, @@ -174,6 +189,9 @@ g_rx_enabled := true; } } + [] CTRL.getcall(RTPEM_configure:{?}) -> param (cfg) { + g_cfg := cfg; + } /* simply ignore any RTTP/RTCP if receiver not enabled */ [g_rx_enabled==false] RTP.receive(tr_rtp) { } @@ -190,7 +208,7 @@ /* transmit if timer has expired */ [] T_transmit.timeout { /* send one RTP frame, re-start timer */ - f_tx_rtp('01020304'O); + f_tx_rtp(g_cfg.tx_fixed_payload); T_transmit.start; } -- To view, visit https://gerrit.osmocom.org/5565 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie60b750fc009a3d8aa044e4fd450873aa19086bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:05:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:05:00 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RTP_Emulation: Fix calculation of timer + timestamp increment In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RTP_Emulation: Fix calculation of timer + timestamp increment ...................................................................... RTP_Emulation: Fix calculation of timer + timestamp increment Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88 --- M library/RTP_Emulation.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e4a3029..10cf683 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -89,14 +89,14 @@ RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp})); /* increment sequence + timestamp for next transmit */ g_tx_next_seq := g_tx_next_seq + 1; - g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod g_tx_duration_ms)); + g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz / (1000 / g_tx_duration_ms)); } function f_main() runs on RTP_Emulation_CT { var Result res; - timer T_transmit := 1000.0/int2float(g_tx_duration_ms); + timer T_transmit := int2float(g_tx_duration_ms)/1000.0; var RTP_RecvFrom rx_rtp; var template RTP_RecvFrom tr := { connId := ?, -- To view, visit https://gerrit.osmocom.org/5564 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:05:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:05:01 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: RTP_Emulation: Fix encoding of timestamp; int2bit counts in ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: RTP_Emulation: Fix encoding of timestamp; int2bit counts in bits! ...................................................................... RTP_Emulation: Fix encoding of timestamp; int2bit counts in bits! Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d --- M library/RTP_Emulation.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index b8b1dbe..e4a3029 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -76,7 +76,7 @@ marker_bit := marker, payload_type := pt, sequence_number := seq, - time_stamp := int2bit(ts, 4), + time_stamp := int2bit(ts, 32), SSRC_id := ssrc, CSRCs := omit, ext_header := omit, -- To view, visit https://gerrit.osmocom.org/5563 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e8b8faff362536c46b188eb9bbb77bf0ceb866d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:05:01 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:05:01 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: Add 3GPP TS 25.415 IuUP encoder/decoder In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add 3GPP TS 25.415 IuUP encoder/decoder ...................................................................... Add 3GPP TS 25.415 IuUP encoder/decoder Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd --- A library/IuUP_Emulation.ttcn A library/IuUP_EncDec.cc A library/IuUP_Types.ttcn 3 files changed, 725 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn new file mode 100644 index 0000000..ec25e49 --- /dev/null +++ b/library/IuUP_Emulation.ttcn @@ -0,0 +1,137 @@ +module IuUP_Emulation { + +import from Osmocom_Types all; +import from IuUP_Types all; + + +type record IuUP_RabFlowCombination { + IuUP_RFCI rfci, + /* number of bits per sub-flow */ + RecOfU8 sub_flow_bits, + /* IPTI value in number of ITIs for the corresponding RFCI */ + uint8_t ipti +}; + +template (value) IuUP_RabFlowCombination t_IuUP_RFC(IuUP_RFCI rfci, RecOfU8 subflow_bits, uint8_t ipti) := { + rfci := rfci, + sub_flow_bits := subflow_bits, + ipti := ipti +} + +template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_12_2(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {81, 103, 60}, 1); +template (value) IuUP_RabFlowCombination t_IuUP_RFC_AMR_SID(IuUP_RFCI rfci) := t_IuUP_RFC(rfci, {34, 0, 0}, 7); + +type record IuUP_Config { + /* actively send INIT (true) or only passively respond (false) */ + boolean active_init, + boolean data_pdu_type_0, + /* RAB Flow Combinations */ + record of IuUP_RabFlowCombination rab_flow_combs +}; + +type enumerated IuUP_Em_State { + ST_INIT, + ST_DATA_TRANSFER_READY +}; + + + +type record IuUP_Entity { + IuUP_Config cfg, + IuUP_Em_State state, + IuUP_FrameNr tx_next_frame_nr, + IuUP_FrameNr rx_last_frame_nr optional, + IuUP_PDU pending_tx_pdu optional +}; + +template (value) IuUP_Entity t_IuUP_Entity(boolean act_init) := { + cfg := { + active_init := act_init, + data_pdu_type_0 := true, + rab_flow_combs := { t_IuUP_RFC_AMR_12_2(0), t_IuUP_RFC_AMR_SID(1) } + }, + state := ST_INIT, + tx_next_frame_nr := 0, + rx_last_frame_nr := omit, + pending_tx_pdu := omit +} + + +function f_IuUP_Em_rx_decaps(inout IuUP_Entity st, octetstring inp) return octetstring { + var IuUP_PDU pdu := dec_IuUP_PDU(inp); + if (ischosen(pdu.type_0)) { + if (st.cfg.data_pdu_type_0) { + /* FIXME: check header / CRC */ + st.rx_last_frame_nr := pdu.type_0.frame_nr; + return pdu.type_0.payload; + } else { + setverdict(fail, "PDU Type 0 received but 1 configured"); + } + } else if (ischosen(pdu.type_1)) { + if (st.cfg.data_pdu_type_0 == false) { + /* FIXME: check header / CRC */ + st.rx_last_frame_nr := pdu.type_1.frame_nr; + return pdu.type_1.payload; + } else { + setverdict(fail, "PDU Type 1 received but 0 configured"); + } + } else if (ischosen(pdu.type_14)) { + if (match(pdu, tr_IuUP_INIT)) { + if (st.cfg.active_init == true) { + setverdict(fail, "INIT received in ACTIVE role"); + } else { + /* store an INIT_ACK to be transmitted later */ + st.pending_tx_pdu := valueof(ts_IuUP_INIT_ACK(pdu.type_14.frame_nr, + pdu.type_14.iuup_version)); + } + } else if (match(pdu, tr_IuUP_INIT_ACK)) { + if (st.cfg.active_init == true) { + log("IuUP INIT_ACK Received"); + st.state := ST_DATA_TRANSFER_READY; + } else { + setverdict(fail, "INIT_ACK received in PASSIVE role"); + } + } + return ''O; + } else { + setverdict(fail, "Impossible IuUP PDU decoded from ", inp); + } + self.stop; +} + +function f_IuUP_Em_tx_encap(inout IuUP_Entity st, in octetstring payload) return octetstring { + var IuUP_PDU pdu; + select (st.state) { + case (ST_INIT) { + if (st.cfg.active_init) { + /* send INIT */ + pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O)); + } else { + /* wait for INIT */ + if (isvalue(st.pending_tx_pdu)) { + /* we're waiting to transmit the INIT_ACK in response to an + * init (passive) */ + pdu := st.pending_tx_pdu; + st.pending_tx_pdu := omit; + st.state := ST_DATA_TRANSFER_READY; + } + } + } + case (ST_DATA_TRANSFER_READY) { + if (st.cfg.data_pdu_type_0) { + pdu := valueof(ts_IuUP_Type0(st.tx_next_frame_nr, 0, payload)); + } else { + pdu := valueof(ts_IuUP_Type1(st.tx_next_frame_nr, 0, payload)); + } + st.tx_next_frame_nr := st.tx_next_frame_nr + 1; + } + } + if (isvalue(pdu)) { + return f_enc_IuUP_PDU(pdu); + } else { + return ''O; + } +} + + +} diff --git a/library/IuUP_EncDec.cc b/library/IuUP_EncDec.cc new file mode 100644 index 0000000..81742e8 --- /dev/null +++ b/library/IuUP_EncDec.cc @@ -0,0 +1,250 @@ + +#include "Octetstring.hh" +#include "Error.hh" +#include "Logger.hh" + +#include "IuUP_Types.hh" + +#include + +extern "C" { + +typedef uint8_t ubit_t; +typedef uint8_t pbit_t; + +static int osmo_pbit2ubit(ubit_t *out, const pbit_t *in, unsigned int num_bits) +{ + unsigned int i; + ubit_t *cur = out; + ubit_t *limit = out + num_bits; + + for (i = 0; i < (num_bits/8)+1; i++) { + pbit_t byte = in[i]; + *cur++ = (byte >> 7) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 6) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 5) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 4) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 3) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 2) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 1) & 1; + if (cur >= limit) + break; + *cur++ = (byte >> 0) & 1; + if (cur >= limit) + break; + } + return cur - out; +} + + +struct osmo_crc8gen_code { + int bits; /*!< Actual number of bits of the CRC */ + uint8_t poly; /*!< Polynom (normal representation, MSB omitted */ + uint8_t init; /*!< Initialization value of the CRC state */ + uint8_t remainder; /*!< Remainder of the CRC (final XOR) */ +}; + +static uint8_t +osmo_crc8gen_compute_bits(const struct osmo_crc8gen_code *code, + const ubit_t *in, int len) +{ + const uint8_t poly = code->poly; + uint8_t crc = code->init; + int i, n = code->bits-1; + + for (i=0; ibits) - 1; + } + + crc ^= code->remainder; + + return crc; +} + +struct osmo_crc16gen_code { + int bits; /*!< Actual number of bits of the CRC */ + uint16_t poly; /*!< Polynom (normal representation, MSB omitted */ + uint16_t init; /*!< Initialization value of the CRC state */ + uint16_t remainder; /*!< Remainder of the CRC (final XOR) */ +}; + +static uint16_t +osmo_crc16gen_compute_bits(const struct osmo_crc16gen_code *code, + const ubit_t *in, int len) +{ + const uint16_t poly = code->poly; + uint16_t crc = code->init; + int i, n = code->bits-1; + + for (i=0; ibits) - 1; + } + + crc ^= code->remainder; + + return crc; +} + +} + + +static const struct osmo_crc8gen_code iuup_hdr_crc_code = { + .bits = 6, + .poly = 47, + .init = 0, + .remainder = 0, +}; + +static const struct osmo_crc16gen_code iuup_data_crc_code = { + .bits = 10, + .poly = 563, + .init = 0, + .remainder = 0, +}; + +static int iuup_get_payload_offset(const uint8_t *iuup_pdu) +{ + uint8_t pdu_type = iuup_pdu[0] >> 4; + switch (pdu_type) { + case 0: + case 14: + return 4; + case 1: + return 3; + default: + return -1; + } +} + +int osmo_iuup_compute_payload_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[1024*8]; + uint8_t pdu_type; + int offset, payload_len_bytes; + + if (pdu_len < 1) + return -1; + + pdu_type = iuup_pdu[0] >> 4; + + /* Type 1 has no CRC */ + if (pdu_type == 1) + return 0; + + offset = iuup_get_payload_offset(iuup_pdu); + if (offset < 0) + return offset; + + if (pdu_len < (unsigned int)offset) + return -1; + + payload_len_bytes = pdu_len - offset; + osmo_pbit2ubit(buf, iuup_pdu+offset, payload_len_bytes*8); + return osmo_crc16gen_compute_bits(&iuup_data_crc_code, buf, payload_len_bytes*8); +} + +int osmo_iuup_compute_header_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[2*8]; + + if (pdu_len < 2) + return -1; + + osmo_pbit2ubit(buf, iuup_pdu, 2*8); + return osmo_crc8gen_compute_bits(&iuup_hdr_crc_code, buf, 2*8); +} +/* IuUP CRC Implementation */ + +/* (C) 2017 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace IuUP__Types { + + +INTEGER f__IuUP__compute__crc__payload(OCTETSTRING const &in) +{ + int crc_calc; + const unsigned char *data = (const unsigned char *)in; + int len = in.lengthof(); + + crc_calc = osmo_iuup_compute_payload_crc(data, len); + + return INTEGER(crc_calc); +} + +INTEGER f__IuUP__compute__crc__header(OCTETSTRING const &in) +{ + int crc_calc; + const unsigned char *data = (const unsigned char *)in; + int len = in.lengthof(); + + crc_calc = osmo_iuup_compute_header_crc(data, len); + + return INTEGER(crc_calc); +} + +OCTETSTRING f__enc__IuUP__PDU(const IuUP__PDU& pdu) +{ + TTCN_Buffer buf; + int crc_hdr, crc_payload; + uint8_t in[2]; + pdu.encode(IuUP__PDU_descr_, buf, TTCN_EncDec::CT_RAW); + OCTETSTRING ret_val(buf.get_len(), buf.get_data()); + + crc_hdr = osmo_iuup_compute_header_crc(buf.get_data(), buf.get_len()); + crc_payload = osmo_iuup_compute_payload_crc(buf.get_data(), buf.get_len()); + in[0] = (crc_hdr & 0x3f) << 2; + in[0] |= (crc_payload & 0x3ff) >> 8; + in[1] = crc_payload & 0xff; + OCTETSTRING CHECKSUM(2, in); + + ret_val = substr(ret_val, 0, 2) + CHECKSUM + substr(ret_val, 4, ret_val.lengthof()-4); + + return ret_val; +} + +} diff --git a/library/IuUP_Types.ttcn b/library/IuUP_Types.ttcn new file mode 100644 index 0000000..933b64f --- /dev/null +++ b/library/IuUP_Types.ttcn @@ -0,0 +1,338 @@ +module IuUP_Types { + +import from Osmocom_Types all; +import from General_Types all; + +/* See TS 25.415 6.6.3.1 */ +type uint4_t IuUP_PDU_Type; + +/* See TS 25.415 6.6.3.2 */ +type enumerated IuUP_AckNack { + IuUP_ACKNACK_CTRL (0), + IuUP_ACKNACK_ACK (1), + IuUP_ACKNACK_NACK (2), + IuUP_ACKNACK_RESERVED (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.3 */ +type uint4_t IuUP_FrameNr; + +/* See TS 25.415 6.6.3.5 */ +type enumerated IuUP_FQC { + IuUP_FQC_GOOD (0), + IuUP_FQC_BAD (1), + IuUP_FQC_BAD_RADIO (2), + IuUP_FQC_SPARE (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.6 */ +type uint6_t IuUP_RFCI; + +/* See TS 25.415 6.6.3.7 */ +type enumerated IuUP_ProcedureIndicator { + IuUP_PRI_INITIALIZATION (0), + IuUP_PRI_RATE_CONTROL (1), + IuUP_PRI_TIME_ALIGNMENT (2), + IuUP_PRI_ERROR_EVENT (3) + /* reserved */ +} with { variant "FIELDLENGTH(4)" }; + +/* See TS 25.415 6.6.3.13 */ +type uint6_t IuUP_NumOfRfciInd; + +/* See TS 25.415 6.6.3.15 */ +type enumerated IuUP_ErrorDistance { + IuUP_ERR_DIST_LOCAL (0), + IuUP_ERR_DIST_FIRST_FW (1), + IuUP_ERR_DIST_SECOND_FW (2), + IuUP_ERR_DIST_RESERVED (3) +} with { variant "FIELDLENGTH(2)" }; + +/* See TS 25.415 6.6.3.16 */ +type enumerated IuUP_ErrorCause { + /* Syntactical protocol errors */ + IuUP_CAUSE_CRC_ERROR_HEADER (0), + IuUP_CAUSE_CRC_ERROR_PAYLOAD (1), + IuUP_CAUSE_UNEXP_FRAME_NR (2), + IuUP_CAUSE_FRAME_LOSS (3), + IuUP_CAUSE_PDU_TYPE_UNKNOWN (4), + IuUP_CAUSE_UNKNOWN_PROCEDURE (5), + IuUP_CAUSE_UNKNOWN_RES_VAL (6), + IuUP_CAUSE_UNKNOWN_FIELD (7), + IuUP_CAUSE_FRAME_TOO_SHORT (8), + IuUP_CAUSE_MISSING_FIELD (9), + /* Semantical protocol errors */ + IuUP_CAUSE_UNEXPECTED_PDU_TYPE (16), + IuUP_CAUSE_UNEXPECTED_PROCEDURE (18), + IuUP_CAUSE_UNEXPECTED_RFCI (19), + IuUP_CAUSE_UNEXPECTED_VALUE (20), + /* Other Errors */ + IuUP_CAUSE_INIT_FAIL (42), + IuUP_CAUSE_INIT_FAIL_NET_TMR_EXP (43), + IuUP_CAUSE_INIT_FAIL_FERR_REP_NACK (44), + IuUP_CAUSE_RATE_CONTROL_FAIL (45), + IuUP_CAUSE_ERROR_EVENT_FAIL (46), + IuUP_CAUSE_TIME_ALIGN_NOTSUPP (47), + IuUP_CAUSE_REQ_ALIGN_NOTPOSS (48), + IuUP_CAUSE_IU_UP_VERS_NOTSUPP (49) +} with { variant "FIELDLENGTH(6)" }; + +/* See TS 25.415 6.6.3.18 */ +type uint8_t IuUP_TimeAlignment; + + +/* See TS 25.415 6.6.2.1 */ +type record IuUP_PDU_Type_0 { + IuUP_PDU_Type pdu_type, /* 0 */ + IuUP_FrameNr frame_nr, + IuUP_FQC fqc, + IuUP_RFCI rfci, + uint6_t header_crc, + uint10_t payload_crc, + octetstring payload +}; + +/* See TS 25.415 6.6.2.2 */ +type record IuUP_PDU_Type_1 { + IuUP_PDU_Type pdu_type, /* 1 */ + IuUP_FrameNr frame_nr, + IuUP_FQC fqc, + IuUP_RFCI rfci, + uint6_t header_crc, + BIT2 spare, + octetstring payload +}; + +/* See TS 25.415 6.6.6.2.3 */ +type record IuUP_PDU_Type_14 { + IuUP_PDU_Type pdu_type, + IuUP_AckNack ack_nack, + uint2_t frame_nr, + uint4_t iuup_version, + IuUP_ProcedureIndicator procedure_ind, + uint6_t header_crc, + uint10_t payload_crc, + IuUP_PDU14_Union u +} with { variant (u) "CROSSTAG( proc_sending, ack_nack=IuUP_ACKNACK_CTRL; + ack, ack_nack=IuUP_ACKNACK_ACK; + nack, ack_nack=IuUP_ACKNACK_NACK)" +}; + +/* 6.6.2.3.1 Figure 21 */ +type record IuUP_PDU14_ProcSending { + octetstring payload +}; + +/* 6.6.2.3.2 Figure 22 */ +type record IuUP_PDU14_ACK { + octetstring spare_ext optional +}; + +/* 6.6.2.3.3 Figure 23 */ +type record IuUP_PDU14_NACK { + IuUP_ErrorCause err_cause, + BIT2 spare, + octetstring spare_ext optional +}; + +type union IuUP_PDU14_Union { + IuUP_PDU14_ProcSending proc_sending, + IuUP_PDU14_ACK ack, + IuUP_PDU14_NACK nack +}; + +type union IuUP_PDU14_ProcSendingUnion { + IuUP_PDU14_ProcSending_INIT init, + IuUP_PDU14_ProcSending_RATE_CTRL rate_ctrl, + IuUP_PDU14_ProcSending_RATE_CTRL rate_ctrl_ack, + IuUP_PDU14_ProcSending_TIME_ALIGNMENT time_alignment, + IuUP_PDU14_ProcSending_ERROR_EVENT error_event +}; + +/* 6.6.2.3.4.1 Initialisation */ +type record IuUP_PDU14_ProcSending_INIT { + BIT3 spare, + boolean ti, + uint3_t subflows_per_rfci, + boolean chain_ind, + + /* FIXME: Further decode */ + octetstring payload +}; +type record IuUP_InitRfci { + boolean lri, + boolean li, + IuUP_RFCI rfci, + RecOfU8 len8 optional, + RecOfU16 len16 optional +} with { variant (len8) "PRESENCE(li=false)"; + variant (len16) "PRESENCE(li=true)" +}; +type record of uint8_t RecOfU8; +type record of uint16_t RecOfU16; + +/* 6.6.2.3.4.2.1 Rate Control procedure */ +type record IuUP_PDU14_ProcSending_RATE_CTRL { + BIT2 spare, + uint6_t nr_of_rfci_ind, + bitstring rfci_ind +} with { variant (nr_of_rfci_ind) "LENGTHTO(rfci_ind)" + variant (nr_of_rfci_ind) "UNIT(bits)" +}; + +/* 6.6.2.3.4.3 Time Alignment */ +type record IuUP_PDU14_ProcSending_TIME_ALIGNMENT { + uint8_t time_alignment, + octetstring spare optional +}; + +/* 6.6.2.3.4.4 Error Event */ +type record IuUP_PDU14_ProcSending_ERROR_EVENT { + IuUP_ErrorDistance distance, + IuUP_ErrorCause cause +}; + + +type union IuUP_PDU { + IuUP_PDU_Type_0 type_0, + IuUP_PDU_Type_1 type_1, + IuUP_PDU_Type_14 type_14 +} with { variant "TAG( type_0, pdu_type = 0; + type_1, pdu_type = 1; + type_14, pdu_type = 14;)" }; + +/* hand-written C++ functions */ +external function f_enc_IuUP_PDU(in IuUP_PDU msg) return octetstring; +external function f_IuUP_compute_crc_header(in octetstring inp) return uint6_t; +external function f_IuUP_compute_crc_payload(in octetstring inp) return uint10_t; + +/* auto-generated */ +external function dec_IuUP_PDU(in octetstring stream) return IuUP_PDU + with { extension "prototype(convert) decode(RAW)" }; + +template IuUP_PDU ts_IuUP_INIT_ACK(uint2_t frame_nr, uint4_t version) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_ACK, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := 0, + payload_crc := 0, + u := { + ack := { + spare_ext := omit + } + } + } +}; + +template IuUP_PDU tr_IuUP_INIT_ACK(template uint2_t frame_nr := ?, template uint4_t version := ?) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_ACK, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := ?, + payload_crc := ?, + u := { + ack := { + spare_ext := omit + } + } + } +}; + +template IuUP_PDU ts_IuUP_INIT(octetstring payload, uint2_t frame_nr := 0, uint4_t version := 0) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_CTRL, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := 0, + payload_crc := 0, + u := { + proc_sending := { + payload := payload + } + } + } +}; + +template IuUP_PDU tr_IuUP_INIT(template octetstring payload := ?, template uint2_t frame_nr := ?, + template uint4_t version := ?) := { + type_14 := { + pdu_type := 14, + ack_nack := IuUP_ACKNACK_CTRL, + frame_nr := frame_nr, + iuup_version := version, + procedure_ind := IuUP_PRI_INITIALIZATION, + header_crc := ?, + payload_crc := ?, + u := { + proc_sending := { + payload := payload + } + } + } +}; + + +template IuUP_PDU ts_IuUP_Type0(IuUP_FrameNr frame_nr, IuUP_RFCI rfci, octetstring payload, + IuUP_FQC fqc := IuUP_FQC_GOOD) := { + type_0 := { + pdu_type := 0, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := 0, + payload_crc := 0, + payload := payload + } +}; + +template IuUP_PDU tr_IuUP_Type0(template IuUP_FrameNr frame_nr := ?, template IuUP_RFCI rfci := ?, + template IuUP_FQC fqc := ?) := { + type_0 := { + pdu_type := 0, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := ?, + payload_crc := ?, + payload := ? + } +}; + +template IuUP_PDU ts_IuUP_Type1(IuUP_FrameNr frame_nr, IuUP_RFCI rfci, octetstring payload, + IuUP_FQC fqc := IuUP_FQC_GOOD) := { + type_1 := { + pdu_type := 1, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := 0, + spare := '00'B, + payload := payload + } +}; + + +template IuUP_PDU tr_IuUP_Type1(template IuUP_FrameNr frame_nr := ?, template IuUP_RFCI rfci := ?, + template IuUP_FQC fqc := ?) := { + type_1 := { + pdu_type := 1, + frame_nr := frame_nr, + fqc := fqc, + rfci := rfci, + header_crc := ?, + spare := ?, + payload := ? + } +}; + + + +} with { encode "RAW" ; variant "FIELDORDER(msb)" } -- To view, visit https://gerrit.osmocom.org/5562 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie04438d8ec2b796e9e56b1937fa024a5299457dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:05:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 24 Dec 2017 23:05:02 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: BSC_Tests: Fix TC_assignment_fr_a5_4 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: BSC_Tests: Fix TC_assignment_fr_a5_4 ...................................................................... BSC_Tests: Fix TC_assignment_fr_a5_4 Don't expect the ASSIGNMENT to fail in case of unsupported A5/4, but expect a CIPHERING MODE REJECT. Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn 2 files changed, 15 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 4c88788..4cf418e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1338,7 +1338,7 @@ private function f_tc_assignment_fr_a5_4(charstring id) runs on MSC_ConnHdlr { var TestHdlrParams pars := valueof(t_def_TestHdlrPars); - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var template PDU_BSSAP exp_compl := tr_BSSMAP_AssignmentComplete(omit, ?); var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342)); var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla)); const OCT8 kc := '0001020304050607'O; @@ -1346,9 +1346,9 @@ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + f_establish_fully(pars, ass_cmd, exp_compl); + f_cipher_mode('10'O, kc, kc128, true); /* TODO: expect GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED cause value */ - f_establish_fully(pars, ass_cmd, exp_fail); - f_cipher_mode('10'O, kc, kc128); } testcase TC_assignment_fr_a5_4() runs on test_CT { diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 51ac650..f683ef4 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -104,7 +104,8 @@ RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3)))); } -function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit) runs on MSC_ConnHdlr { +function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit, boolean exp_fail := false) +runs on MSC_ConnHdlr { var PDU_BSSAP bssap; var RSL_Message rsl; @@ -125,10 +126,18 @@ } [] BSSAP.receive(tr_BSSMAP_CipherModeCompl) -> value bssap { // bssap.bssmap.cipherModeComplete.chosenEncryptionAlgorithm.algoritmhIdentifier - setverdict(pass); + if (exp_fail == true) { + setverdict(fail, "Unexpected Cipher Mode Complete"); + } else { + setverdict(pass); + } } [] BSSAP.receive(tr_BSSMAP_CipherModeRej) -> value bssap { - setverdict(fail, "Ciphering Mode Reject"); + if (exp_fail == false) { + setverdict(fail, "Ciphering Mode Reject"); + } else { + setverdict(pass); + } } } } -- To view, visit https://gerrit.osmocom.org/5561 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:20 +0000 Subject: [PATCH] libosmo-sccp[master]: osmo_sccp_addr_name / _dump: drop 'NO_GT' output Message-ID: Review at https://gerrit.osmocom.org/5567 osmo_sccp_addr_name / _dump: drop 'NO_GT' output Do not print the GTI if gti is set to OSMO_SCCP_GTI_NO_GT and no GT is present in the address. If addr->gt.gti is set to OSMO_SCCP_GTI_NO_GT, i.e. currently always, osmo_sccp_addr_name() and osmo_sccp_addr_dump() output ",GTI=NO_GT" in every address dump, which is useless clutter. Drop that. However, if a Global Title is flagged in addr->presence, still output the GTI to highlight situations where GTI might mismatch the presence of a GT. Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1 --- M src/sccp_helpers.c M tests/xua/xua_test.ok 2 files changed, 12 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/67/5567/1 diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index cafca94..b7446e0 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -300,7 +300,8 @@ append_to_buf(buf, sizeof(buf), &comma, "SSN=%u", addr->ssn); if (addr->presence & OSMO_SCCP_ADDR_T_IPv4) append_to_buf(buf, sizeof(buf), &comma, "IP=%s", inet_ntoa(addr->ip.v4)); - append_to_buf(buf, sizeof(buf), &comma, "GTI=%u", addr->gt.gti); + if (addr->gt.gti != OSMO_SCCP_GTI_NO_GT || addr->presence & OSMO_SCCP_ADDR_T_GT) + append_to_buf(buf, sizeof(buf), &comma, "GTI=%u", addr->gt.gti); if (addr->presence & OSMO_SCCP_ADDR_T_GT) append_to_buf(buf, sizeof(buf), &comma, "GT=(%s)", osmo_sccp_gt_dump(&addr->gt)); @@ -323,7 +324,8 @@ append_to_buf(buf, sizeof(buf), &comma, "SSN=%s", osmo_sccp_ssn_name(addr->ssn)); if (addr->presence & OSMO_SCCP_ADDR_T_IPv4) append_to_buf(buf, sizeof(buf), &comma, "IP=%s", inet_ntoa(addr->ip.v4)); - append_to_buf(buf, sizeof(buf), &comma, "GTI=%s", osmo_sccp_gti_name(addr->gt.gti)); + if (addr->gt.gti != OSMO_SCCP_GTI_NO_GT || addr->presence & OSMO_SCCP_ADDR_T_GT) + append_to_buf(buf, sizeof(buf), &comma, "GTI=%s", osmo_sccp_gti_name(addr->gt.gti)); if (addr->presence & OSMO_SCCP_ADDR_T_GT) append_to_buf(buf, sizeof(buf), &comma, "GT=(%s)", osmo_sccp_gt_dump(&addr->gt)); diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index 472c02b..83b8b8d 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -7,8 +7,8 @@ expected: RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992) parsed: RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992) sccp_addr_parse test case 2 -expected: RI=2,SSN=254,GTI=0 -parsed: RI=2,SSN=254,GTI=0 +expected: RI=2,SSN=254 +parsed: RI=2,SSN=254 Testing Decoded GT -> SUA encoding IN: TT=0,NPL=1,NAI=4,DIG=919969679389 0400000001000000040000003931393936393637393338390000000000000000000000000000000000000000 @@ -135,25 +135,25 @@ Testing SCCP Address Encode/Decode => NOGT-PC1024 -input addr: RI=2,PC=1024,GTI=0 +input addr: RI=2,PC=1024 rc=3, expected rc=3 encoded addr: 410004 expected addr: 410004 -decod addr: RI=2,PC=1024,GTI=0 +decod addr: RI=2,PC=1024 => NOGT-PC16383 -input addr: RI=2,PC=16383,GTI=0 +input addr: RI=2,PC=16383 rc=3, expected rc=3 encoded addr: 41ff3f expected addr: 41ff3f -decod addr: RI=2,PC=16383,GTI=0 +decod addr: RI=2,PC=16383 => NOGT-PC16383-SSN90 -input addr: RI=2,PC=16383,SSN=90,GTI=0 +input addr: RI=2,PC=16383,SSN=90 rc=4, expected rc=4 encoded addr: 43ff3f5a expected addr: 43ff3f5a -decod addr: RI=2,PC=16383,SSN=90,GTI=0 +decod addr: RI=2,PC=16383,SSN=90 => GT-PC16383-NAIONLY input addr: RI=2,PC=16383,GTI=1,GT=() -- To view, visit https://gerrit.osmocom.org/5567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:20 +0000 Subject: [PATCH] libosmo-sccp[master]: typo: osmo-stp main: 'Erro' Message-ID: Review at https://gerrit.osmocom.org/5568 typo: osmo-stp main: 'Erro' Change-Id: Ibb28f48b46a4b86c62770b4d22dcf735717aeadb --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/68/5568/1 diff --git a/stp/stp_main.c b/stp/stp_main.c index 3216101..1e0c099 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -187,7 +187,7 @@ rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { - perror("Erro binding VTY port\n"); + perror("Error binding VTY port\n"); exit(1); } -- To view, visit https://gerrit.osmocom.org/5568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb28f48b46a4b86c62770b4d22dcf735717aeadb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:20 +0000 Subject: [PATCH] libosmo-sccp[master]: add osmo_sccp_user_name() Message-ID: Review at https://gerrit.osmocom.org/5569 add osmo_sccp_user_name() There is a naming dilemma: though the osmo_ prefix is now reserved for libosmocore, all surrounding API already has the osmo_ prefix. This will be used by osmo-hnbgw's VTY 'show cnlink' command. Change-Id: Ib7abf69cfcf4c56273223054b280458451e6c2f6 --- M include/osmocom/sigtran/sccp_sap.h M src/sccp_user.c 2 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/69/5569/1 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 7a4f9bf..84d762c 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -275,3 +275,5 @@ uint32_t ssn); bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence); + +const char *osmo_sccp_user_name(struct osmo_sccp_user *scu); diff --git a/src/sccp_user.c b/src/sccp_user.c index cd89c88..a6161c0 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -293,6 +293,27 @@ return true; } +/*! Compose a human readable string to describe the SCCP user's connection. + * The output follows ['':], e.g. "'OsmoHNBW':RI=SSN_PC,PC=0.23.5,SSN=RANAP", + * or just "RI=SSN_PC,PC=0.23.5,SSN=RANAP" if no scu->name is set. + * This calls osmo_sccp_addr_name(), which returns a static buffer; hence calling this function and + * osmo_sccp_addr_name() in the same printf statement is likely to conflict. */ +const char *osmo_sccp_user_name(struct osmo_sccp_user *scu) +{ + static char buf[128]; + struct osmo_sccp_addr sca; + /* Interestingly enough, the osmo_sccp_user stores an SSN and PC, but not in an osmo_sccp_addr + * struct. To be able to use osmo_sccp_addr_name(), we need to first create an osmo_sccp_addr. */ + osmo_sccp_make_addr_pc_ssn(&sca, scu->pc, scu->ssn); + snprintf(buf, sizeof(buf), + "%s%s%s", + scu->name && *scu->name ? scu->name : "", + scu->name && *scu->name ? ":" : "", + osmo_sccp_addr_name(scu->inst->ss7, &sca)); + buf[sizeof(buf)-1] = '\0'; + return buf; +} + /*********************************************************************** * Convenience function for CLIENT ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/5569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7abf69cfcf4c56273223054b280458451e6c2f6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:20 +0000 Subject: [PATCH] libosmo-sccp[master]: add osmo_ss7_route_name() Message-ID: Review at https://gerrit.osmocom.org/5570 add osmo_ss7_route_name() There is a naming dilemma: though the osmo_ prefix is now reserved for libosmocore, all surrounding API already has the osmo_ prefix. This will be used by osmo-hnbgw's VTY 'show cnlink' command. Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7_hmrt.c 2 files changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/70/5570/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 94d5e8a..fd3f103 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -234,6 +234,7 @@ osmo_ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const char *linkset_name); void osmo_ss7_route_destroy(struct osmo_ss7_route *rt); +const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps); /*********************************************************************** diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 51875b1..a1f9e92 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -139,6 +139,65 @@ } } +/*! Return human readable representation of the route, in a static buffer. + * This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing + * osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to + * conflict. + * \param[in] rt The route information to print, or NULL. + * \param[in] list_asps If true, append info for all ASPs for the route's AS. + * \returns A string constant or static buffer. */ +const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps) +{ + static char buf[256]; + char *pos = buf; + struct osmo_ss7_instance *inst; + size_t l; + + if (!rt) + return "no route"; + + inst = rt->rtable->inst; + +#define APPEND(fmt, args ...) \ + do { \ + l = snprintf(pos, sizeof(buf) - (pos - buf), fmt, ## args); \ + pos += l; \ + if (pos - buf >= sizeof(buf) ) \ + goto out; \ + } while (0) + + APPEND("pc=%u=%s mask=0x%x=%s", + rt->cfg.pc, osmo_ss7_pointcode_print(inst, rt->cfg.pc), + rt->cfg.mask, osmo_ss7_pointcode_print2(inst, rt->cfg.mask)); + + if (rt->dest.as) { + struct osmo_ss7_as *as = rt->dest.as; + int i; + APPEND(" via AS %s proto=%s", as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); + + if (list_asps) { + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp) + continue; + APPEND(" ASP"); + if (asp->cfg.name) + APPEND(" %s", asp->cfg.name); + if (asp->sock_name) + APPEND(" %s", asp->sock_name); + } + } + } else if (rt->dest.linkset) + APPEND(" via linkset %s", rt->dest.linkset->cfg.name); + else + APPEND(" has no route set"); +#undef APPEND + +out: + buf[sizeof(buf)-1] = '\0'; + return buf; +} + /* HMDC->HMRT Msg For Routing; Figure 26/Q.704 */ /* local message was receive d from L4, SRM, SLM, STM or SLTC, or * remote message received from L2 and HMDC determined msg for routing */ -- To view, visit https://gerrit.osmocom.org/5570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:21 +0000 Subject: [PATCH] libosmo-sccp[master]: cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() Message-ID: Review at https://gerrit.osmocom.org/5571 cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd --- M src/osmo_ss7_hmrt.c 1 file changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/71/5571/1 diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index a1f9e92..882d85d 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -217,12 +217,15 @@ /* FIXME: Transmit over respective Link */ if (rt->dest.as) { struct osmo_ss7_as *as = rt->dest.as; - DEBUGP(DLSS7, - "Found route for dpc=%u=%s: pc=%u=%s mask=0x%x" - " via AS %s proto=%s\n", - dpc, osmo_ss7_pointcode_print(inst, dpc), - rt->cfg.pc, osmo_ss7_pointcode_print2(inst, rt->cfg.pc), rt->cfg.mask, - as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); + + if (log_check_level(DLSS7, LOGL_DEBUG)) { + /* osmo_ss7_route_name() calls osmo_ss7_pointcode_print() and + * osmo_ss7_pointcode_print2(), guard against its static buffer being + * overwritten. */ + const char *rt_name = osmo_ss7_route_name(rt, false); + DEBUGP(DLSS7, "Found route for dpc=%u=%s: %s\n", + dpc, osmo_ss7_pointcode_print(inst, dpc), rt_name); + } switch (as->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA: @@ -238,12 +241,16 @@ break; } } else if (rt->dest.linkset) { - LOGP(DLSS7, LOGL_ERROR, - "Found route for dpc=%u=%s: pc=%u=%s mask=0x%x" - " via linkset %s, but MTP-TRANSFER.req unsupported for linkset.\n", - dpc, osmo_ss7_pointcode_print(inst, dpc), - rt->cfg.pc, osmo_ss7_pointcode_print2(inst, rt->cfg.pc), rt->cfg.mask, - rt->dest.linkset->cfg.name); + if (log_check_level(DLSS7, LOGL_ERROR)) { + /* osmo_ss7_route_name() calls osmo_ss7_pointcode_print() and + * osmo_ss7_pointcode_print2(), guard against its static buffer being + * overwritten. */ + const char *rt_name = osmo_ss7_route_name(rt, false); + LOGP(DLSS7, LOGL_ERROR, + "Found route for dpc=%u=%s: %s," + " but MTP-TRANSFER.req unsupported for linkset.\n", + dpc, osmo_ss7_pointcode_print(inst, dpc), rt_name); + } } else OSMO_ASSERT(0); } else { -- To view, visit https://gerrit.osmocom.org/5571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:21 +0000 Subject: [PATCH] libosmo-sccp[master]: error log: sccp_scoc.c: fix two fixmes: add error log output Message-ID: Review at https://gerrit.osmocom.org/5572 error log: sccp_scoc.c: fix two fixmes: add error log output Change-Id: Ib235ff8e264aaf0c2e9794f464a3ba7b54816f3d --- M src/sccp_scoc.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/5572/1 diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c index e0742f9..e9415d4 100644 --- a/src/sccp_scoc.c +++ b/src/sccp_scoc.c @@ -1623,7 +1623,8 @@ /* Allocate new connection structure */ conn = conn_create_id(inst, prim->u.connect.conn_id); if (!conn) { - /* FIXME: inform user */ + LOGP(DLSCCP, LOGL_ERROR, "Cannot create conn-id for primitive %s\n", + osmo_scu_prim_name(&prim->oph)); goto out; } conn->user = scu; @@ -1635,7 +1636,8 @@ /* Resolve existing connection structure */ conn = conn_find_by_id(inst, scu_prim_conn_id(prim)); if (!conn) { - /* FIXME: inform user */ + LOGP(DLSCCP, LOGL_ERROR, "Received unknown conn-id %u for primitive %s\n", + scu_prim_conn_id(prim), osmo_scu_prim_name(&prim->oph)); goto out; } break; -- To view, visit https://gerrit.osmocom.org/5572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib235ff8e264aaf0c2e9794f464a3ba7b54816f3d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:30 +0000 Subject: [PATCH] osmo-iuh[master]: vty: tweak / improve HNB and cnlink introspection In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5532 to look at the new patch set (#2). vty: tweak / improve HNB and cnlink introspection Add 'show cnlink' (uses new osmo_sccp_user_name(), see 'Depends' below). Tweak 'show hnb all'. The result looks something like: OsmoHNBGW> show cnlink IuCS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-OsmoHNBGW proto=m3ua ASP asp-clnt-OsmoHNBGW (r=127.0.0.1:2905<->l=127.0.0.1:37699) IuPS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-OsmoHNBGW proto=m3ua ASP asp-clnt-OsmoHNBGW (r=127.0.0.1:2905<->l=127.0.0.1:37699) OsmoHNBGW> show hnb all No HNB connected OsmoHNBGW> show hnb all HNB (r=192.168.0.124:29169<->l=192.168.0.9:29169) "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS 24->1002 (RUA->SUA) state=1 IuPS 24->1003 (RUA->SUA) state=1 HNB (r=192.168.0.15:29169<->l=192.168.0.9:29169) "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 IuCS 23->1000 (RUA->SUA) state=1 IuPS 23->1001 (RUA->SUA) state=1 2 HNB connected Related: OS#2772 OS#2773 Depends: Ib7abf69cfcf4c56273223054b280458451e6c2f6 (libosmo-sccp) Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 (libosmo-sccp) Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 --- M src/hnbgw_vty.c 1 file changed, 65 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/32/5532/2 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 3d16970..d50c4a5 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -20,6 +20,7 @@ #include +#include #include #include @@ -27,6 +28,8 @@ #include #include #include +#include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -108,19 +111,68 @@ return vty->node; } +DEFUN(show_cnlink, show_cnlink_cmd, "show cnlink", + SHOW_STR "Display information on core network link\n") +{ + struct osmo_ss7_route *rt; + struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(g_hnb_gw->sccp.client); + int i; +#define GUARD(STR) \ + STR ? STR : "", \ + STR ? ":" : "" + + vty_out(vty, "IuCS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s", + GUARD(g_hnb_gw->config.iucs_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iucs_remote_addr), + VTY_NEWLINE); + + rt = osmo_ss7_route_lookup(ss7, g_hnb_gw->sccp.iucs_remote_addr.pc); + vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE); + + vty_out(vty, "IuPS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s", + GUARD(g_hnb_gw->config.iups_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iups_remote_addr), + VTY_NEWLINE); + + rt = osmo_ss7_route_lookup(ss7, g_hnb_gw->sccp.iups_remote_addr.pc); + vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE); + +#undef GUARD + return CMD_SUCCESS; +} + +static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) +{ + char *name; + if (!ofd || ofd->fd < 0 + || !(name = osmo_sock_get_name(vty, ofd->fd))) { + vty_out(vty, "(no addr)"); + return; + } + vty_out(vty, name); + talloc_free(name); +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; - vty_out(vty, "HNB \"%s\" MCC %u MNC %u LAC %u RAC %u SAC %u CID %u%s", hnb->identity_info, - hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, - VTY_NEWLINE); - vty_out(vty, " HNBAP ID %u RUA ID %u%s", hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); + vty_out(vty, "HNB "); + vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); + vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE); + vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCCP-stream:HNBAP=%u,RUA=%u%s", + hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, + hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); llist_for_each_entry(map, &hnb->map_list, hnb_list) { - vty_out(vty, " Map %u->%u (RUA->SUA) cnlink=%p state=%u%s", map->rua_ctx_id, map->scu_conn_id, - map->cn_link, map->state, VTY_NEWLINE); - + vty_out(vty, " %s %u->%u (RUA->SUA) state=%u%s", + map->is_ps ? "IuPS" : "IuCS", + map->rua_ctx_id, map->scu_conn_id, + map->state, VTY_NEWLINE); } } @@ -132,6 +184,11 @@ DEFUN(show_hnb, show_hnb_cmd, "show hnb all", SHOW_STR "Display information about a HNB") { struct hnb_context *hnb; + + if (llist_empty(&g_hnb_gw->hnb_list)) { + vty_out(vty, "No HNB connected%s", VTY_NEWLINE); + return CMD_SUCCESS; + } llist_for_each_entry(hnb, &g_hnb_gw->hnb_list, list) { vty_dump_hnb_info(vty, hnb); @@ -282,6 +339,7 @@ install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_addr_cmd); + install_element_ve(&show_cnlink_cmd); install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/5532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:30 +0000 Subject: [PATCH] osmo-iuh[master]: compiler warning: asn1tostruct.py: return 0 at end of *_free... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5533 to look at the new patch set (#2). compiler warning: asn1tostruct.py: return 0 at end of *_free_*() Part of the resulting diff in the generated code: --- /tmp/hnbap_decoder.c 2017-12-24 17:06:50.983979866 +0100 +++ /tmp/hnbap_decoder.c 2017-12-24 17:07:10.760223354 +0100 @@ -1179,6 +1179,7 @@ TNLUpdateResponseIEs_t *tnlUpdateResponseIEs) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateResponseIEs->context_ID); + return 0; } int hnbap_free_tnlupdaterequesties( @@ -1187,6 +1188,7 @@ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateRequestIEs->context_ID); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RABList, &tnlUpdateRequestIEs->rabList); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Update_cause, &tnlUpdateRequestIEs->update_cause); + return 0; } int hnbap_free_errorindicationies( @@ -1197,12 +1199,14 @@ if ((errorIndicationIEs->presenceMask & ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) == ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_CriticalityDiagnostics, &errorIndicationIEs->criticalityDiagnostics); + return 0; } int hnbap_free_hnbconfigtransferrequesties( HNBConfigTransferRequestIEs_t *hnbConfigTransferRequestIEs) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NeighbourInfoRequestList, &hnbConfigTransferRequestIEs->neighbourInfoRequestList); + return 0; } int hnbap_free_tnlupdatefailureies( [etc.] Related: OS#2670 Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 --- M asn1/utils/asn1tostruct.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/33/5533/2 diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 5586e40..0bba9dd 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -389,6 +389,8 @@ iename = re.sub('id-', '', ie[0]) ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename)) f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore)) + + f.write(" return 0;\n") f.write("}\n\n") for key in iesDefs: -- To view, visit https://gerrit.osmocom.org/5533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:30 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:30 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: vty: revamp output of context maps on 'show hnb' Message-ID: Review at https://gerrit.osmocom.org/5573 osmo-hnbgw: vty: revamp output of context maps on 'show hnb' Instead of listing each and every context map, rather output a summary of context counts. Rationale: in a list of a hundred HNBs, I don't want to also see a dozen (or potentially thousands of) context map lines for each. Furthermore, the conn IDs aren't necessarily useful on network traces either. For example, what was shown as SUA Id is incidentally the SCCP Reference, but this is not a hard requirement and may change. Also, the reference is shown in wireshark as a hex in mismatching byte order ... so rather don't bother. The result now looks like OsmoHNBGW> show hnb all HNB (r=192.168.0.124:29169<->l=192.168.0.9:29169) "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS: 1 contexts: inactive-reserved:1 IuPS: 1 contexts: active:1 1 HNB connected Related: OS#2772 OS#2773 Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9 --- M include/osmocom/iuh/context_map.h M src/context_map.c M src/hnbgw_vty.c 3 files changed, 40 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/73/5573/1 diff --git a/include/osmocom/iuh/context_map.h b/include/osmocom/iuh/context_map.h index 8d957d6..6279b91 100644 --- a/include/osmocom/iuh/context_map.h +++ b/include/osmocom/iuh/context_map.h @@ -8,8 +8,13 @@ MAP_S_ACTIVE, /* currently active map */ MAP_S_RESERVED1, /* just disconnected, still resrved */ MAP_S_RESERVED2, /* still reserved */ + MAP_S_NUM_STATES /* Number of states, keep this at the end */ }; +extern const struct value_string hnbgw_context_map_state_names[]; +static inline const char *hnbgw_context_map_state_name(enum hnbgw_context_map_state val) +{ return get_value_string(hnbgw_context_map_state_names, val); } + struct hnb_context; struct hnbgw_cnlink; diff --git a/src/context_map.c b/src/context_map.c index b90f555..0c891cf 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -27,6 +27,14 @@ #include #include +const struct value_string hnbgw_context_map_state_names[] = { + {MAP_S_NULL , "not-initialized"}, + {MAP_S_ACTIVE , "active"}, + {MAP_S_RESERVED1, "inactive-reserved"}, + {MAP_S_RESERVED2, "inactive-discard"}, + {0, NULL} +}; + /* is a given SCCP USER SAP Connection ID in use for a given CN link? */ static int cn_id_in_use(struct hnbgw_cnlink *cn, uint32_t id) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index d50c4a5..4e512e4 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -157,9 +157,26 @@ talloc_free(name); } +static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, + unsigned int state_count[]) +{ + unsigned int i; + if (!count) + return; + vty_out(vty, " %s: %u contexts:", name, count); + for (i = 0; i <= MAP_S_NUM_STATES; i++) { + if (!state_count[i]) + continue; + vty_out(vty, " %s:%u", hnbgw_context_map_state_name(i), state_count[i]); + } + vty_out(vty, VTY_NEWLINE); +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; + unsigned int map_count[2] = {}; + unsigned int state_count[2][MAP_S_NUM_STATES + 1] = {}; vty_out(vty, "HNB "); vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); @@ -169,11 +186,13 @@ hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); llist_for_each_entry(map, &hnb->map_list, hnb_list) { - vty_out(vty, " %s %u->%u (RUA->SUA) state=%u%s", - map->is_ps ? "IuPS" : "IuCS", - map->rua_ctx_id, map->scu_conn_id, - map->state, VTY_NEWLINE); + map_count[map->is_ps? 1 : 0]++; + state_count[map->is_ps? 1 : 0] + [(map->state >= 0 && map->state < MAP_S_NUM_STATES)? + map->state : MAP_S_NUM_STATES]++; } + vty_dump_hnb_info__map_states(vty, "IuCS", map_count[0], state_count[0]); + vty_dump_hnb_info__map_states(vty, "IuPS", map_count[1], state_count[1]); } static void vty_dump_ue_info(struct vty *vty, struct ue_context *ue) @@ -184,6 +203,7 @@ DEFUN(show_hnb, show_hnb_cmd, "show hnb all", SHOW_STR "Display information about a HNB") { struct hnb_context *hnb; + unsigned int count = 0; if (llist_empty(&g_hnb_gw->hnb_list)) { vty_out(vty, "No HNB connected%s", VTY_NEWLINE); @@ -192,8 +212,11 @@ llist_for_each_entry(hnb, &g_hnb_gw->hnb_list, list) { vty_dump_hnb_info(vty, hnb); + count++; } + vty_out(vty, "%u HNB connected%s", count, VTY_NEWLINE); + return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/5573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:43 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:43 +0000 Subject: [PATCH] osmo-iuh[master]: segfault: context_map gc: use llist_for_each_entry_safe() Message-ID: Review at https://gerrit.osmocom.org/5574 segfault: context_map gc: use llist_for_each_entry_safe() The context map garbage collector removes entries from the list, hence it must use llist_for_each_entry_safe(). We haven't hit this before since nothing is yet flagging context maps to be discarded. Related: OS#2776 Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce --- M src/context_map.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/74/5574/1 diff --git a/src/context_map.c b/src/context_map.c index 0c891cf..dca276a 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -146,10 +146,10 @@ { struct hnb_gw *gw = data; struct hnbgw_cnlink *cn = gw->sccp.cnlink; - struct hnbgw_context_map *map; + struct hnbgw_context_map *map, *next_map; DEBUGP(DMAIN, "Running context mapper garbage collection\n"); - llist_for_each_entry(map, &cn->map_list, cn_list) { + llist_for_each_entry_safe(map, next_map, &cn->map_list, cn_list) { switch (map->state) { case MAP_S_RESERVED1: /* first time we see this reserved -- To view, visit https://gerrit.osmocom.org/5574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:44 +0000 Subject: [PATCH] osmo-iuh[master]: rua: discard context maps on id-Disconnect Message-ID: Review at https://gerrit.osmocom.org/5575 rua: discard context maps on id-Disconnect When an id-Disconnect is received, the RUA to SCCP user context becomes unused. Mark the context map as inactive in that case. It will be cleaned up by the context map garbage collector. Related: OS#2776 Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77 --- M src/hnbgw_rua.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/75/5575/1 diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 305b8cc..1d0ffbd 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -185,6 +185,7 @@ struct hnbgw_cnlink *cn = hnb->gw->sccp.cnlink; struct osmo_sccp_addr *remote_addr; bool is_ps; + bool release_context_map = false; int rc; switch (cN_DomainIndicator) { @@ -239,6 +240,7 @@ case OSMO_SCU_PRIM_N_DISCONNECT: prim->u.disconnect.conn_id = map->scu_conn_id; prim->u.disconnect.cause = cause; + release_context_map = true; break; case OSMO_SCU_PRIM_N_UNITDATA: prim->u.unitdata.called_addr = *remote_addr; @@ -261,6 +263,9 @@ rc = osmo_sccp_user_sap_down(cn->sccp_user, &prim->oph); + if (release_context_map) + context_map_deactivate(map); + return rc; } -- To view, visit https://gerrit.osmocom.org/5575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:44 +0000 Subject: [PATCH] osmo-iuh[master]: rua_to_scu(): don't create a context map for UNITDATA Message-ID: Review at https://gerrit.osmocom.org/5576 rua_to_scu(): don't create a context map for UNITDATA UNITDATA is connection-less, and as can be observed further below, the 'map' doesn't get used in the N_UNIDATA case. Related: OS#2776 Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50 --- M src/hnbgw_rua.c 1 file changed, 16 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/76/5576/1 diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 1d0ffbd..58bb23b 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -213,13 +213,21 @@ prim = (struct osmo_scu_prim *) msgb_put(msg, sizeof(*prim)); osmo_prim_init(&prim->oph, SCCP_SAP_USER, type, PRIM_OP_REQUEST, msg); - map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); - OSMO_ASSERT(map); - - DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u\n", - cn_domain_indicator_to_str(cN_DomainIndicator), - osmo_sccp_addr_dump(remote_addr), - map->rua_ctx_id, map->scu_conn_id); + switch (type) { + case OSMO_SCU_PRIM_N_UNITDATA: + DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u (unitdata, no scu_conn_id)\n", + cn_domain_indicator_to_str(cN_DomainIndicator), + osmo_sccp_addr_dump(remote_addr), + map->rua_ctx_id); + break; + default: + map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); + OSMO_ASSERT(map); + DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u\n", + cn_domain_indicator_to_str(cN_DomainIndicator), + osmo_sccp_addr_dump(remote_addr), + map->rua_ctx_id, map->scu_conn_id); + } /* add primitive header */ switch (type) { @@ -263,7 +271,7 @@ rc = osmo_sccp_user_sap_down(cn->sccp_user, &prim->oph); - if (release_context_map) + if (map && release_context_map) context_map_deactivate(map); return rc; -- To view, visit https://gerrit.osmocom.org/5576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:44 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:44 +0000 Subject: [PATCH] osmo-iuh[master]: cosmetic: context_map_tmr_cb(): fix comment Message-ID: Review at https://gerrit.osmocom.org/5577 cosmetic: context_map_tmr_cb(): fix comment Change-Id: I4dd07a4d09d3cd4dc2a08e42ee48344967e5e3a6 --- M src/context_map.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/77/5577/1 diff --git a/src/context_map.c b/src/context_map.c index dca276a..dc555bf 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -157,7 +157,7 @@ map->state = MAP_S_RESERVED2; break; case MAP_S_RESERVED2: - /* first time we see this reserved + /* second time we see this reserved * entry: remove it */ map->state = MAP_S_NULL; llist_del(&map->cn_list); -- To view, visit https://gerrit.osmocom.org/5577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4dd07a4d09d3cd4dc2a08e42ee48344967e5e3a6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:57 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw config: add 'rnc-id' config item Message-ID: Review at https://gerrit.osmocom.org/5578 osmo-hnbgw config: add 'rnc-id' config item So far, the RNC-Id is hard-coded as 23. Still use 23 as default, but allow configuring by config file. Hence make it possible to run multiple osmo-hnbgw with differing RNC-Id each. Change-Id: I374f558cc4bb36055f39efe9c58ae1b9bd49da46 --- M src/hnbgw_vty.c 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/78/5578/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 4e512e4..d41e3c0 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -239,6 +239,17 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_rnc_id, cfg_hnbgw_rnc_id_cmd, + "rnc-id <0-65535>", + "Configure the HNBGW's RNC Id, the common RNC Id used for all connected hNodeB. It is sent to" + " each hNodeB upon HNBAP HNB-Register-Accept, and the hNodeB will subsequently send this as" + " RANAP InitialUE Messages' GlobalRNC-ID IE. Takes effect as soon as the hNodeB re-registers.\n" + "RNC Id value\n") +{ + g_hnb_gw->config.rnc_id = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_hnbgw_iuh_local_ip, cfg_hnbgw_iuh_local_ip_cmd, "local-ip A.B.C.D", "Accept Iuh connections on local interface\n" "Local interface IP address (default: " HNBGW_LOCAL_IP_DEFAULT ")") @@ -345,6 +356,8 @@ install_element(CONFIG_NODE, &cfg_hnbgw_cmd); install_node(&hnbgw_node, config_write_hnbgw); + install_element(HNBGW_NODE, &cfg_hnbgw_rnc_id_cmd); + install_element(HNBGW_NODE, &cfg_hnbgw_iuh_cmd); install_node(&iuh_node, config_write_hnbgw_iuh); -- To view, visit https://gerrit.osmocom.org/5578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I374f558cc4bb36055f39efe9c58ae1b9bd49da46 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:57 +0000 Subject: [PATCH] osmo-iuh[master]: osmo-hnbgw: startup: log the RNC-Id that is going to be used Message-ID: Review at https://gerrit.osmocom.org/5579 osmo-hnbgw: startup: log the RNC-Id that is going to be used Change-Id: I8aeb93fe8037e5fdc0784f5fc3bdb527de3b76bd --- M src/hnbgw.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/79/5579/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index ff3e2a9..752fc0f 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -485,6 +485,8 @@ exit(1); } + LOGP(DHNBAP, LOGL_NOTICE, "Using RNC-Id %u\n", g_hnb_gw->config.rnc_id); + OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", g_hnb_gw->config.iuh_local_ip, -- To view, visit https://gerrit.osmocom.org/5579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8aeb93fe8037e5fdc0784f5fc3bdb527de3b76bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:46:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:46:58 +0000 Subject: [PATCH] osmo-iuh[master]: comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free Message-ID: Review at https://gerrit.osmocom.org/5580 comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free The comments are all right above the line that does the proper asn1 free step. Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b --- M src/hnbgw_rua.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/80/5580/1 diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 58bb23b..b2b8792 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -361,7 +361,7 @@ rc = rua_to_scu(hnb, ies.cN_DomainIndicator, OSMO_SCU_PRIM_N_CONNECT, context_id, 0, ies.ranaP_Message.buf, ies.ranaP_Message.size); - /* FIXME: what to do with the asn1c-allocated memory */ + rua_free_connecties(&ies); return rc; @@ -396,7 +396,6 @@ OSMO_SCU_PRIM_N_DISCONNECT, context_id, scu_cause, ranap_data, ranap_len); - /* FIXME: what to do with the asn1c-allocated memory */ rua_free_disconnecties(&ies); return rc; @@ -423,7 +422,6 @@ context_id, 0, ies.ranaP_Message.buf, ies.ranaP_Message.size); - /* FIXME: what to do with the asn1c-allocated memory */ rua_free_directtransferies(&ies); return rc; -- To view, visit https://gerrit.osmocom.org/5580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Dec 24 23:55:17 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 24 Dec 2017 23:55:17 +0000 Subject: [MERGED] osmo-iuh[master]: hnbap, rua, ranap decode: fix segfault on decode error In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: hnbap,rua,ranap decode: fix segfault on decode error ...................................................................... hnbap,rua,ranap decode: fix segfault on decode error Looking at hnbap_decode_hnbregisterrequesties(), I noticed a segfault if decoding the HNB Register Request PDU fails, which is due to an unchecked return value in code generated by asn1tostruct.py. Add return value and NULL pointer checks and hence fix null dereference on erratic PDUs across HNBAP, RUA and RANAP protocols. Similar checks exist in other places, this one was simply missing. Since the result of asn1tostruct.py is not committed, here is an example diff of the resulting change, of which there are 128 instances in total: @@ -304,7 +329,12 @@ memset(hnbRegisterRequestIEs, 0, sizeof(HNBRegisterRequestIEs_t)); HNBAP_DEBUG("Decoding message HNBRegisterRequestIEs (%s:%d)\n", __FILE__, __LINE__); - ANY_to_type_aper(any_p, &asn_DEF_HNBRegisterRequest, (void**)&hNBRegisterRequest_p); + tempDecoded = ANY_to_type_aper(any_p, &asn_DEF_HNBRegisterRequest, (void**)&hNBRegisterRequest_p); + + if (tempDecoded < 0 || hNBRegisterRequest_p == NULL) { + HNBAP_DEBUG("Decoding of message HNBRegisterRequestIEs failed\n"); + return -1; + } for (i = 0; i < hNBRegisterRequest_p->hnbRegisterRequest_ies.list.count; i++) { IE_t *ie_p; Change-Id: I6cb9cc9a88d22f03befa43f0968a874476fa079d --- M asn1/utils/asn1tostruct.py 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 8364c27..5586e40 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -311,7 +311,12 @@ f.write(" memset(%s, 0, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), prefix + re.sub('-', '_', key))) f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), prefix + re.sub('-', '_', keyName))) - f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower)) + f.write(" tempDecoded = ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower)) + f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (asn1cStructfirstlower)) + f.write(" %s_DEBUG(\"Decoding of message %s failed\\n\");\n" % (fileprefix.upper(), prefix + re.sub('-', '_', keyName))) + f.write(" return -1;\n") + f.write(" }\n\n") + f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess)) f.write(" %sIE_t *ie_p;\n" % (prefix)) f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess)) -- To view, visit https://gerrit.osmocom.org/5531 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cb9cc9a88d22f03befa43f0968a874476fa079d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:17:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:17:29 +0000 Subject: osmo-iuh[master]: vty: tweak / improve HNB and cnlink introspection In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:18:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:18:04 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: vty: revamp output of context maps on 'show hnb' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:18:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:18:13 +0000 Subject: osmo-iuh[master]: compiler warning: asn1tostruct.py: return 0 at end of *_free... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:18:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:18:28 +0000 Subject: osmo-iuh[master]: segfault: context_map gc: use llist_for_each_entry_safe() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:18:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:18:44 +0000 Subject: osmo-iuh[master]: rua: discard context maps on id-Disconnect In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:19:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:19:08 +0000 Subject: osmo-iuh[master]: rua_to_scu(): don't create a context map for UNITDATA In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:19:21 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:19:21 +0000 Subject: osmo-iuh[master]: cosmetic: context_map_tmr_cb(): fix comment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dd07a4d09d3cd4dc2a08e42ee48344967e5e3a6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:19:39 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:19:39 +0000 Subject: osmo-iuh[master]: osmo-hnbgw config: add 'rnc-id' config item In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I374f558cc4bb36055f39efe9c58ae1b9bd49da46 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:19:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:19:51 +0000 Subject: osmo-iuh[master]: osmo-hnbgw: startup: log the RNC-Id that is going to be used In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8aeb93fe8037e5fdc0784f5fc3bdb527de3b76bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:20:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:20:03 +0000 Subject: osmo-iuh[master]: comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:21:13 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:21:13 +0000 Subject: libosmo-sccp[master]: osmo_sccp_addr_name / _dump: drop 'NO_GT' output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:21:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:21:20 +0000 Subject: libosmo-sccp[master]: typo: osmo-stp main: 'Erro' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb28f48b46a4b86c62770b4d22dcf735717aeadb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:21:43 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:21:43 +0000 Subject: libosmo-sccp[master]: add osmo_sccp_user_name() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7abf69cfcf4c56273223054b280458451e6c2f6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:22:05 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:22:05 +0000 Subject: libosmo-sccp[master]: add osmo_ss7_route_name() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:22:48 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:22:48 +0000 Subject: libosmo-sccp[master]: cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:24:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 00:24:03 +0000 Subject: libosmo-sccp[master]: error log: sccp_scoc.c: fix two fixmes: add error log output In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/5572/1/src/sccp_scoc.c File src/sccp_scoc.c: Line 1626: LOGP(DLSCCP, LOGL_ERROR, "Cannot create conn-id for primitive %s\n", "inform the user" in the context of the SCCP-User-SAP means "send him the respective primitive as described by the ITU-T Q.7xx specs". I would expect a N-DISCONNET.ind with apropriate cause. -- To view, visit https://gerrit.osmocom.org/5572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib235ff8e264aaf0c2e9794f464a3ba7b54816f3d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:42:54 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:42:54 +0000 Subject: libosmo-sccp[master]: error log: sccp_scoc.c: fix two fixmes: add error log output In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5572/1/src/sccp_scoc.c File src/sccp_scoc.c: Line 1626: LOGP(DLSCCP, LOGL_ERROR, "Cannot create conn-id for primitive %s\n", > "inform the user" in the context of the SCCP-User-SAP means "send him the r gotcha, the SCCP User. Maybe we can keep the log msg but also keep the fixmes... -- To view, visit https://gerrit.osmocom.org/5572 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib235ff8e264aaf0c2e9794f464a3ba7b54816f3d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:43:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:43:11 +0000 Subject: [MERGED] libosmo-sccp[master]: cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() ...................................................................... cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name() Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd --- M src/osmo_ss7_hmrt.c 1 file changed, 19 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index a1f9e92..882d85d 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -217,12 +217,15 @@ /* FIXME: Transmit over respective Link */ if (rt->dest.as) { struct osmo_ss7_as *as = rt->dest.as; - DEBUGP(DLSS7, - "Found route for dpc=%u=%s: pc=%u=%s mask=0x%x" - " via AS %s proto=%s\n", - dpc, osmo_ss7_pointcode_print(inst, dpc), - rt->cfg.pc, osmo_ss7_pointcode_print2(inst, rt->cfg.pc), rt->cfg.mask, - as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); + + if (log_check_level(DLSS7, LOGL_DEBUG)) { + /* osmo_ss7_route_name() calls osmo_ss7_pointcode_print() and + * osmo_ss7_pointcode_print2(), guard against its static buffer being + * overwritten. */ + const char *rt_name = osmo_ss7_route_name(rt, false); + DEBUGP(DLSS7, "Found route for dpc=%u=%s: %s\n", + dpc, osmo_ss7_pointcode_print(inst, dpc), rt_name); + } switch (as->cfg.proto) { case OSMO_SS7_ASP_PROT_M3UA: @@ -238,12 +241,16 @@ break; } } else if (rt->dest.linkset) { - LOGP(DLSS7, LOGL_ERROR, - "Found route for dpc=%u=%s: pc=%u=%s mask=0x%x" - " via linkset %s, but MTP-TRANSFER.req unsupported for linkset.\n", - dpc, osmo_ss7_pointcode_print(inst, dpc), - rt->cfg.pc, osmo_ss7_pointcode_print2(inst, rt->cfg.pc), rt->cfg.mask, - rt->dest.linkset->cfg.name); + if (log_check_level(DLSS7, LOGL_ERROR)) { + /* osmo_ss7_route_name() calls osmo_ss7_pointcode_print() and + * osmo_ss7_pointcode_print2(), guard against its static buffer being + * overwritten. */ + const char *rt_name = osmo_ss7_route_name(rt, false); + LOGP(DLSS7, LOGL_ERROR, + "Found route for dpc=%u=%s: %s," + " but MTP-TRANSFER.req unsupported for linkset.\n", + dpc, osmo_ss7_pointcode_print(inst, dpc), rt_name); + } } else OSMO_ASSERT(0); } else { -- To view, visit https://gerrit.osmocom.org/5571 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:43:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:43:11 +0000 Subject: [MERGED] libosmo-sccp[master]: add osmo_ss7_route_name() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: add osmo_ss7_route_name() ...................................................................... add osmo_ss7_route_name() There is a naming dilemma: though the osmo_ prefix is now reserved for libosmocore, all surrounding API already has the osmo_ prefix. This will be used by osmo-hnbgw's VTY 'show cnlink' command. Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7_hmrt.c 2 files changed, 60 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 94d5e8a..fd3f103 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -234,6 +234,7 @@ osmo_ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const char *linkset_name); void osmo_ss7_route_destroy(struct osmo_ss7_route *rt); +const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps); /*********************************************************************** diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 51875b1..a1f9e92 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -139,6 +139,65 @@ } } +/*! Return human readable representation of the route, in a static buffer. + * This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing + * osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to + * conflict. + * \param[in] rt The route information to print, or NULL. + * \param[in] list_asps If true, append info for all ASPs for the route's AS. + * \returns A string constant or static buffer. */ +const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps) +{ + static char buf[256]; + char *pos = buf; + struct osmo_ss7_instance *inst; + size_t l; + + if (!rt) + return "no route"; + + inst = rt->rtable->inst; + +#define APPEND(fmt, args ...) \ + do { \ + l = snprintf(pos, sizeof(buf) - (pos - buf), fmt, ## args); \ + pos += l; \ + if (pos - buf >= sizeof(buf) ) \ + goto out; \ + } while (0) + + APPEND("pc=%u=%s mask=0x%x=%s", + rt->cfg.pc, osmo_ss7_pointcode_print(inst, rt->cfg.pc), + rt->cfg.mask, osmo_ss7_pointcode_print2(inst, rt->cfg.mask)); + + if (rt->dest.as) { + struct osmo_ss7_as *as = rt->dest.as; + int i; + APPEND(" via AS %s proto=%s", as->cfg.name, osmo_ss7_asp_protocol_name(as->cfg.proto)); + + if (list_asps) { + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp) + continue; + APPEND(" ASP"); + if (asp->cfg.name) + APPEND(" %s", asp->cfg.name); + if (asp->sock_name) + APPEND(" %s", asp->sock_name); + } + } + } else if (rt->dest.linkset) + APPEND(" via linkset %s", rt->dest.linkset->cfg.name); + else + APPEND(" has no route set"); +#undef APPEND + +out: + buf[sizeof(buf)-1] = '\0'; + return buf; +} + /* HMDC->HMRT Msg For Routing; Figure 26/Q.704 */ /* local message was receive d from L4, SRM, SLM, STM or SLTC, or * remote message received from L2 and HMDC determined msg for routing */ -- To view, visit https://gerrit.osmocom.org/5570 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:43:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:43:11 +0000 Subject: [MERGED] libosmo-sccp[master]: add osmo_sccp_user_name() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: add osmo_sccp_user_name() ...................................................................... add osmo_sccp_user_name() There is a naming dilemma: though the osmo_ prefix is now reserved for libosmocore, all surrounding API already has the osmo_ prefix. This will be used by osmo-hnbgw's VTY 'show cnlink' command. Change-Id: Ib7abf69cfcf4c56273223054b280458451e6c2f6 --- M include/osmocom/sigtran/sccp_sap.h M src/sccp_user.c 2 files changed, 23 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 7a4f9bf..84d762c 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -275,3 +275,5 @@ uint32_t ssn); bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence); + +const char *osmo_sccp_user_name(struct osmo_sccp_user *scu); diff --git a/src/sccp_user.c b/src/sccp_user.c index cd89c88..a6161c0 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -293,6 +293,27 @@ return true; } +/*! Compose a human readable string to describe the SCCP user's connection. + * The output follows ['':], e.g. "'OsmoHNBW':RI=SSN_PC,PC=0.23.5,SSN=RANAP", + * or just "RI=SSN_PC,PC=0.23.5,SSN=RANAP" if no scu->name is set. + * This calls osmo_sccp_addr_name(), which returns a static buffer; hence calling this function and + * osmo_sccp_addr_name() in the same printf statement is likely to conflict. */ +const char *osmo_sccp_user_name(struct osmo_sccp_user *scu) +{ + static char buf[128]; + struct osmo_sccp_addr sca; + /* Interestingly enough, the osmo_sccp_user stores an SSN and PC, but not in an osmo_sccp_addr + * struct. To be able to use osmo_sccp_addr_name(), we need to first create an osmo_sccp_addr. */ + osmo_sccp_make_addr_pc_ssn(&sca, scu->pc, scu->ssn); + snprintf(buf, sizeof(buf), + "%s%s%s", + scu->name && *scu->name ? scu->name : "", + scu->name && *scu->name ? ":" : "", + osmo_sccp_addr_name(scu->inst->ss7, &sca)); + buf[sizeof(buf)-1] = '\0'; + return buf; +} + /*********************************************************************** * Convenience function for CLIENT ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/5569 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7abf69cfcf4c56273223054b280458451e6c2f6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:43:11 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:43:11 +0000 Subject: [MERGED] libosmo-sccp[master]: typo: osmo-stp main: 'Erro' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: typo: osmo-stp main: 'Erro' ...................................................................... typo: osmo-stp main: 'Erro' Change-Id: Ibb28f48b46a4b86c62770b4d22dcf735717aeadb --- M stp/stp_main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/stp/stp_main.c b/stp/stp_main.c index 3216101..1e0c099 100644 --- a/stp/stp_main.c +++ b/stp/stp_main.c @@ -187,7 +187,7 @@ rc = telnet_init_dynif(NULL, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_STP); if (rc < 0) { - perror("Erro binding VTY port\n"); + perror("Error binding VTY port\n"); exit(1); } -- To view, visit https://gerrit.osmocom.org/5568 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb28f48b46a4b86c62770b4d22dcf735717aeadb Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 00:43:12 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 00:43:12 +0000 Subject: [MERGED] libosmo-sccp[master]: osmo_sccp_addr_name / _dump: drop 'NO_GT' output In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo_sccp_addr_name / _dump: drop 'NO_GT' output ...................................................................... osmo_sccp_addr_name / _dump: drop 'NO_GT' output Do not print the GTI if gti is set to OSMO_SCCP_GTI_NO_GT and no GT is present in the address. If addr->gt.gti is set to OSMO_SCCP_GTI_NO_GT, i.e. currently always, osmo_sccp_addr_name() and osmo_sccp_addr_dump() output ",GTI=NO_GT" in every address dump, which is useless clutter. Drop that. However, if a Global Title is flagged in addr->presence, still output the GTI to highlight situations where GTI might mismatch the presence of a GT. Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1 --- M src/sccp_helpers.c M tests/xua/xua_test.ok 2 files changed, 12 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c index cafca94..b7446e0 100644 --- a/src/sccp_helpers.c +++ b/src/sccp_helpers.c @@ -300,7 +300,8 @@ append_to_buf(buf, sizeof(buf), &comma, "SSN=%u", addr->ssn); if (addr->presence & OSMO_SCCP_ADDR_T_IPv4) append_to_buf(buf, sizeof(buf), &comma, "IP=%s", inet_ntoa(addr->ip.v4)); - append_to_buf(buf, sizeof(buf), &comma, "GTI=%u", addr->gt.gti); + if (addr->gt.gti != OSMO_SCCP_GTI_NO_GT || addr->presence & OSMO_SCCP_ADDR_T_GT) + append_to_buf(buf, sizeof(buf), &comma, "GTI=%u", addr->gt.gti); if (addr->presence & OSMO_SCCP_ADDR_T_GT) append_to_buf(buf, sizeof(buf), &comma, "GT=(%s)", osmo_sccp_gt_dump(&addr->gt)); @@ -323,7 +324,8 @@ append_to_buf(buf, sizeof(buf), &comma, "SSN=%s", osmo_sccp_ssn_name(addr->ssn)); if (addr->presence & OSMO_SCCP_ADDR_T_IPv4) append_to_buf(buf, sizeof(buf), &comma, "IP=%s", inet_ntoa(addr->ip.v4)); - append_to_buf(buf, sizeof(buf), &comma, "GTI=%s", osmo_sccp_gti_name(addr->gt.gti)); + if (addr->gt.gti != OSMO_SCCP_GTI_NO_GT || addr->presence & OSMO_SCCP_ADDR_T_GT) + append_to_buf(buf, sizeof(buf), &comma, "GTI=%s", osmo_sccp_gti_name(addr->gt.gti)); if (addr->presence & OSMO_SCCP_ADDR_T_GT) append_to_buf(buf, sizeof(buf), &comma, "GT=(%s)", osmo_sccp_gt_dump(&addr->gt)); diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index 472c02b..83b8b8d 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -7,8 +7,8 @@ expected: RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992) parsed: RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992) sccp_addr_parse test case 2 -expected: RI=2,SSN=254,GTI=0 -parsed: RI=2,SSN=254,GTI=0 +expected: RI=2,SSN=254 +parsed: RI=2,SSN=254 Testing Decoded GT -> SUA encoding IN: TT=0,NPL=1,NAI=4,DIG=919969679389 0400000001000000040000003931393936393637393338390000000000000000000000000000000000000000 @@ -135,25 +135,25 @@ Testing SCCP Address Encode/Decode => NOGT-PC1024 -input addr: RI=2,PC=1024,GTI=0 +input addr: RI=2,PC=1024 rc=3, expected rc=3 encoded addr: 410004 expected addr: 410004 -decod addr: RI=2,PC=1024,GTI=0 +decod addr: RI=2,PC=1024 => NOGT-PC16383 -input addr: RI=2,PC=16383,GTI=0 +input addr: RI=2,PC=16383 rc=3, expected rc=3 encoded addr: 41ff3f expected addr: 41ff3f -decod addr: RI=2,PC=16383,GTI=0 +decod addr: RI=2,PC=16383 => NOGT-PC16383-SSN90 -input addr: RI=2,PC=16383,SSN=90,GTI=0 +input addr: RI=2,PC=16383,SSN=90 rc=4, expected rc=4 encoded addr: 43ff3f5a expected addr: 43ff3f5a -decod addr: RI=2,PC=16383,SSN=90,GTI=0 +decod addr: RI=2,PC=16383,SSN=90 => GT-PC16383-NAIONLY input addr: RI=2,PC=16383,GTI=1,GT=() -- To view, visit https://gerrit.osmocom.org/5567 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f87b2b703223ecb5d0442b6199c5b779fe544a1 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 06:59:24 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 06:59:24 +0000 Subject: osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams In-Reply-To: References: Message-ID: Patch Set 16: Code-Review+1 (14 comments) I am still finding things (you know me) ... but I think it is becoming not worth it to fix them before merging. We've really had more than enough passes on it, from your comments this patch seems to work well enough, and my comments can all be addressed later. Even if they get dropped on the floor, maybe this will help improving future patches. I would welcome for the future that you actually go on gerrit and read through your patch like a reviewer, and you should find the typos I keep marking, by yourself, that would be cool. Here follow the comments, but if another reviewer agrees that none of them are worthwhile another cycle, I'd be ok with merging as-is. I think the most important one is "Line 903". https://gerrit.osmocom.org/#/c/4980/16/include/osmocom/msc/msc_mgcp.h File include/osmocom/msc/msc_mgcp.h: Line 34: /* RTP endpoint number. This number number identifies the endpoint number number https://gerrit.osmocom.org/#/c/4980/16/src/libmsc/a_iface.c File src/libmsc/a_iface.c: Line 403: LOGP(DMSC, LOGL_ERROR, would be nice to use LOGPCONN as above in line 392 https://gerrit.osmocom.org/#/c/4980/16/src/libmsc/iucs.c File src/libmsc/iucs.c: Line 42: extern struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, wondering why this is necessary, typically we would #include a header with this definition. extern is not necessary (I'm not really sure why extern exists as a keyword for functions) https://gerrit.osmocom.org/#/c/4980/16/src/libmsc/msc_mgcp.c File src/libmsc/msc_mgcp.c: Line 183: osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); I still think these two lines would make a good common static function like mgcp_fsm_error() ... wait, you actually have a handle_error() function, isn't it applicable here? Line 742: LOGPFSML(fi, LOGL_DEBUG, "state machine halted\n"); (the FSM internal logging just logged a state transition to ST_HALT, this is duplicating that, right?) Line 757: osmo_fsm_inst_state_chg(fi, ST_HALT, MGCP_REL_TIMEOUT, MGCP_REL_TIMEOUT_TIMER_NR); fsm_halt_cb is only invoked from receving events in the ST_HALT state. Why re-enter ST_HALT from ST_HALT? >From another angle: above comment says "state machine halted", yet there is another state change triggered? Line 763: [ST_CRCX_RAN] = { Thanks for the improvements, they help to understand. I still find that in the naming of the states, there is a mixup between the action, state and event. When an action like "sending X" happened, a state is like "waiting for Y", and event then is "received Y". Here the FSM states' naming tend to be like the action that came before entering a state or the event that triggered leaving the previous state. So when we're actually waiting for Y, the state is named "send X". In this particular state, the FSM init code probably sent the CRCX for RAN, and now this state could be ST_WAIT_CRCX_RAN_RESP. The comment above suggests that entering the state implicitly sends the CRCX (theoretically possible with an on_enter cb, but there is none). Other example: in handle_error(), we enter the ST_CALL state. That reads like: on any error, we have a call established. So, what I mean is, when reading, I find that questions remain that can only be answered by reading more of the code, and it would be nice to clearly know who did the action (the state doesn't do actions, it's just a number) and what the state is waiting for by the name and comment alone. Line 770: sending the CRCX for CN side */ * Line 797: * completed we will check the IP/Port of the RAN connection. If we as completed Line 798: * this data is valid we may continue with the MDCX phase for the RAN If we this Line 799: * side. If not we wait until the assinment completes on the A or on assinment Line 816: /* The ran side MDCX phase is complete when the response is received 'ran' the verb or RAN the acronym Line 817: * from the MGW. The is then active and we change to ST_CALL and wait The is Line 903: mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, LOGL_DEBUG, name); I still think it should be a child fsm of conn->conn_fsm -- To view, visit https://gerrit.osmocom.org/4980 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538 Gerrit-PatchSet: 16 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:04:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:04:04 +0000 Subject: [PATCH] osmo-mgw[master]: strct mgcp_rtp_state: Group + document struct members relate... Message-ID: Review at https://gerrit.osmocom.org/5581 strct mgcp_rtp_state: Group + document struct members related to patching Change-Id: I403ddcafe0a11290103bb017568cfacaf5c04412 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c 2 files changed, 31 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/81/5581/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index c3f9ba1..8d82b14 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -50,14 +50,21 @@ }; struct mgcp_rtp_state { + /* has this state structure been initialized? */ int initialized; - int patch_ssrc; - uint32_t orig_ssrc; + struct { + /* are we patching the SSRC value? */ + int patch_ssrc; + /* original SSRC (to which we shall patch any different SSRC) */ + uint32_t orig_ssrc; + /* offset to apply on the sequence number */ + int seq_offset; + /* offset to apply on the timestamp number */ + int32_t timestamp_offset; + } patch; - int seq_offset; - - int32_t timestamp_offset; + /* duration of a packet (FIXME: in which unit?) */ uint32_t packet_duration; struct mgcp_rtp_stream_state in_stream; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index fc6a1c8..877ce98 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -230,7 +230,7 @@ "on 0x%x SSRC: %u timestamp: %u " "from %s:%d\n", text, seq, - state->timestamp_offset, state->seq_offset, + state->patch.timestamp_offset, state->patch.seq_offset, ENDPOINT_NUMBER(endp), sstate->ssrc, timestamp, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -324,15 +324,15 @@ out_timestamp = state->out_stream.last_timestamp + delta_seq * tsdelta; timestamp_offset = out_timestamp - in_timestamp; - if (state->timestamp_offset != timestamp_offset) { - state->timestamp_offset = timestamp_offset; + if (state->patch.timestamp_offset != timestamp_offset) { + state->patch.timestamp_offset = timestamp_offset; LOGP(DRTP, LOGL_NOTICE, "Timestamp offset change on 0x%x SSRC: %u " "SeqNo delta: %d, TS offset: %d, " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - delta_seq, state->timestamp_offset, + delta_seq, state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -353,11 +353,11 @@ /* Align according to: T + Toffs - Tlast = k * Tptime */ ts_error = ts_alignment_error(&state->out_stream, ptime, - timestamp + state->timestamp_offset); + timestamp + state->patch.timestamp_offset); /* If there is an alignment error, we have to compensate it */ if (ts_error) { - state->timestamp_offset += ptime - ts_error; + state->patch.timestamp_offset += ptime - ts_error; LOGP(DRTP, LOGL_NOTICE, "Corrected timestamp alignment error of %d on 0x%x SSRC: %u " @@ -365,7 +365,7 @@ "from %s:%d\n", ts_error, ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->timestamp_offset, inet_ntoa(addr->sin_addr), + state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -374,7 +374,7 @@ * here would point to a serous problem with the alingnment * error computation fuction */ ts_check = ts_alignment_error(&state->out_stream, ptime, - timestamp + state->timestamp_offset); + timestamp + state->patch.timestamp_offset); OSMO_ASSERT(ts_check == 0); /* Return alignment error before compensation */ @@ -507,7 +507,7 @@ if (!state->initialized) { state->initialized = 1; state->in_stream.last_seq = seq - 1; - state->in_stream.ssrc = state->orig_ssrc = ssrc; + state->in_stream.ssrc = state->patch.orig_ssrc = ssrc; state->in_stream.last_tsdelta = 0; state->packet_duration = mgcp_rtp_packet_duration(endp, rtp_end); @@ -518,7 +518,7 @@ "endpoint:0x%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->seq_offset, state->packet_duration, + state->patch.seq_offset, state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); if (state->packet_duration == 0) { state->packet_duration = @@ -542,7 +542,7 @@ int16_t delta_seq; /* Always increment seqno by 1 */ - state->seq_offset = + state->patch.seq_offset = (state->out_stream.last_seq + 1) - seq; /* Estimate number of packets that would have been sent */ @@ -554,8 +554,8 @@ adjust_rtp_timestamp_offset(endp, state, rtp_end, addr, delta_seq, timestamp); - state->patch_ssrc = 1; - ssrc = state->orig_ssrc; + state->patch.patch_ssrc = 1; + ssrc = state->patch.orig_ssrc; if (rtp_end->force_constant_ssrc != -1) rtp_end->force_constant_ssrc -= 1; @@ -564,7 +564,7 @@ "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->seq_offset, state->timestamp_offset, + state->patch.seq_offset, state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -575,8 +575,8 @@ addr, seq, timestamp, "input", &state->in_stream.last_tsdelta); - if (state->patch_ssrc) - ssrc = state->orig_ssrc; + if (state->patch.patch_ssrc) + ssrc = state->patch.orig_ssrc; } /* Save before patching */ @@ -591,15 +591,15 @@ timestamp); /* Store the updated SSRC back to the packet */ - if (state->patch_ssrc) + if (state->patch.patch_ssrc) rtp_hdr->ssrc = htonl(ssrc); /* Apply the offset and store it back to the packet. * This won't change anything if the offset is 0, so the conditional is * omitted. */ - seq += state->seq_offset; + seq += state->patch.seq_offset; rtp_hdr->sequence = htons(seq); - timestamp += state->timestamp_offset; + timestamp += state->patch.timestamp_offset; rtp_hdr->timestamp = htonl(timestamp); /* Check again, whether the timestamps are still valid */ -- To view, visit https://gerrit.osmocom.org/5581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I403ddcafe0a11290103bb017568cfacaf5c04412 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:04:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:04:07 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_rtp_state: grup 'stats' members into sub-structure Message-ID: Review at https://gerrit.osmocom.org/5582 mgcp_rtp_state: grup 'stats' members into sub-structure Change-Id: I92a1bead01c6b85bf237b6edf64a1b76b9e97c78 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_stat.c M tests/mgcp/mgcp_test.c 4 files changed, 48 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/82/5582/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 8d82b14..9e7246e 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -71,13 +71,16 @@ struct mgcp_rtp_stream_state out_stream; /* jitter and packet loss calculation */ - int stats_initialized; - uint16_t stats_base_seq; - uint16_t stats_max_seq; - uint32_t stats_ssrc; - uint32_t stats_jitter; - int32_t stats_transit; - int stats_cycles; + struct { + int initialized; + uint16_t base_seq; + uint16_t max_seq; + uint32_t ssrc; + uint32_t jitter; + int32_t transit; + int cycles; + } stats; + bool patched_first_rtp_payload; /* FIXME: drop this, see OS#2459 */ }; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 877ce98..4f88341 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -433,14 +433,14 @@ int32_t d; /* initialize or re-initialize */ - if (!state->stats_initialized || state->stats_ssrc != ssrc) { - state->stats_initialized = 1; - state->stats_base_seq = seq; - state->stats_max_seq = seq - 1; - state->stats_ssrc = ssrc; - state->stats_jitter = 0; - state->stats_transit = transit; - state->stats_cycles = 0; + if (!state->stats.initialized || state->stats.ssrc != ssrc) { + state->stats.initialized = 1; + state->stats.base_seq = seq; + state->stats.max_seq = seq - 1; + state->stats.ssrc = ssrc; + state->stats.jitter = 0; + state->stats.transit = transit; + state->stats.cycles = 0; } else { uint16_t udelta; @@ -451,10 +451,10 @@ * It can't wrap during the initialization so let's * skip it here. The Appendix A probably doesn't have * this issue because of the probation. */ - udelta = seq - state->stats_max_seq; + udelta = seq - state->stats.max_seq; if (udelta < RTP_MAX_DROPOUT) { - if (seq < state->stats_max_seq) - state->stats_cycles += RTP_SEQ_MOD; + if (seq < state->stats.max_seq) + state->stats.cycles += RTP_SEQ_MOD; } else if (udelta <= RTP_SEQ_MOD - RTP_MAX_MISORDER) { LOGP(DRTP, LOGL_NOTICE, "RTP seqno made a very large jump on 0x%x delta: %u\n", @@ -466,12 +466,12 @@ * taken closer to the read function. This was taken from the * Appendix A of RFC 3550. Timestamp and arrival_time have a 1/rate * resolution. */ - d = transit - state->stats_transit; - state->stats_transit = transit; + d = transit - state->stats.transit; + state->stats.transit = transit; if (d < 0) d = -d; - state->stats_jitter += d - ((state->stats_jitter + 8) >> 4); - state->stats_max_seq = seq; + state->stats.jitter += d - ((state->stats.jitter + 8) >> 4); + state->stats.max_seq = seq; } /* The RFC 3550 Appendix A assumes there are multiple sources but diff --git a/src/libosmo-mgcp/mgcp_stat.c b/src/libosmo-mgcp/mgcp_stat.c index b84f5f2..54c4b66 100644 --- a/src/libosmo-mgcp/mgcp_stat.c +++ b/src/libosmo-mgcp/mgcp_stat.c @@ -30,10 +30,10 @@ struct mgcp_rtp_end *end, uint32_t *expected, int *loss) { - *expected = state->stats_cycles + state->stats_max_seq; - *expected = *expected - state->stats_base_seq + 1; + *expected = state->stats.cycles + state->stats.max_seq; + *expected = *expected - state->stats.base_seq + 1; - if (!state->stats_initialized) { + if (!state->stats.initialized) { *expected = 0; *loss = 0; return; @@ -56,9 +56,9 @@ /* Helper function for mgcp_format_stats_rtp() to calculate jitter */ uint32_t calc_jitter(struct mgcp_rtp_state *state) { - if (!state->stats_initialized) + if (!state->stats.initialized) return 0; - return state->stats_jitter >> 4; + return state->stats.jitter >> 4; } /* Generate statistics for an RTP connection */ diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 330d24d..6f8e4ca 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -916,10 +916,10 @@ memset(&state, 0, sizeof(state)); memset(&rtp, 0, sizeof(rtp)); - state.stats_initialized = 1; - state.stats_base_seq = pl_test_dat[i].base_seq; - state.stats_max_seq = pl_test_dat[i].max_seq; - state.stats_cycles = pl_test_dat[i].cycles; + state.stats.initialized = 1; + state.stats.base_seq = pl_test_dat[i].base_seq; + state.stats.max_seq = pl_test_dat[i].max_seq; + state.stats.cycles = pl_test_dat[i].cycles; rtp.packets_rx = pl_test_dat[i].packets; calc_loss(&state, &rtp, &expected, &loss); @@ -1183,7 +1183,7 @@ state.out_stream.err_ts_counter - last_out_ts_err_cnt); printf("Stats: Jitter = %u, Transit = %d\n", - calc_jitter(&state), state.stats_transit); + calc_jitter(&state), state.stats.transit); last_in_ts_err_cnt = state.in_stream.err_ts_counter; last_out_ts_err_cnt = state.out_stream.err_ts_counter; @@ -1362,29 +1362,29 @@ conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); - OSMO_ASSERT(conn->state.stats_initialized == 0); + OSMO_ASSERT(conn->state.stats.initialized == 0); mgcp_rtp_annex_count(endp, &conn->state, 0, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == 0); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == 0); mgcp_rtp_annex_count(endp, &conn->state, 1, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == 1); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == 1); /* now jump.. */ mgcp_rtp_annex_count(endp, &conn->state, UINT16_MAX, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == UINT16_MAX); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == UINT16_MAX); /* and wrap */ mgcp_rtp_annex_count(endp, &conn->state, 0, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == UINT16_MAX + 1); - OSMO_ASSERT(conn->state.stats_max_seq == 0); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == UINT16_MAX + 1); + OSMO_ASSERT(conn->state.stats.max_seq == 0); mgcp_release_endp(endp); talloc_free(cfg); -- To view, visit https://gerrit.osmocom.org/5582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92a1bead01c6b85bf237b6edf64a1b76b9e97c78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:04:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:04:07 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_rtp_end: Group statistics members into 'stats' sub-struct Message-ID: Review at https://gerrit.osmocom.org/5583 mgcp_rtp_end: Group statistics members into 'stats' sub-struct Change-Id: I4e0ecdcd9a75fe08abc55b730780c01617f3d4af --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_stat.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c 7 files changed, 26 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/83/5583/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 9e7246e..11bafe7 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -97,11 +97,14 @@ struct mgcp_rtp_end { /* statistics */ - unsigned int packets_rx; - unsigned int octets_rx; - unsigned int packets_tx; - unsigned int octets_tx; - unsigned int dropped_packets; + struct { + unsigned int packets_rx; + unsigned int octets_rx; + unsigned int packets_tx; + unsigned int octets_tx; + unsigned int dropped_packets; + } stats; + struct in_addr addr; /* in network byte order */ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 4090a9f..9063bec 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -93,12 +93,7 @@ end->rtp.fd = -1; end->rtcp.fd = -1; - end->local_port = 0; - end->packets_rx = 0; - end->octets_rx = 0; - end->packets_tx = 0; - end->octets_tx = 0; - end->dropped_packets = 0; + memset(&end->stats, 0, sizeof(end->stats)); end->rtp_port = end->rtcp_port = 0; talloc_free(end->fmtp_extra); end->fmtp_extra = NULL; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 4f88341..9bf6f85 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -692,7 +692,7 @@ dest_name = conn_dst->conn->name; if (!rtp_end->output_enabled) { - rtp_end->dropped_packets += 1; + rtp_end->stats.dropped_packets += 1; LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", @@ -747,8 +747,8 @@ if (len <= 0) return len; - conn_dst->end.packets_tx += 1; - conn_dst->end.octets_tx += len; + conn_dst->end.stats.packets_tx += 1; + conn_dst->end.stats.octets_tx += len; nbytes += len; buflen = cont; @@ -767,8 +767,8 @@ &rtp_end->addr, rtp_end->rtcp_port, buf, len); - conn_dst->end.packets_tx += 1; - conn_dst->end.octets_tx += len; + conn_dst->end.stats.packets_tx += 1; + conn_dst->end.stats.octets_tx += len; return len; } @@ -928,8 +928,8 @@ } /* Increment RX statistics */ - conn->end.packets_rx += 1; - conn->end.octets_rx += rc; + conn->end.stats.packets_rx += 1; + conn->end.stats.octets_rx += rc; /* Forward a copy of the RTP data to a debug ip/port */ forward_data(fd->fd, &conn->tap_in, buf, rc); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 5030812..6e19611 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -255,8 +255,8 @@ .sin_port = conn_net->end.rtp_port, }; - conn_bts->end.octets_tx += msg->len; - conn_bts->end.packets_tx++; + conn_bts->end.stats.octets_tx += msg->len; + conn_bts->end.stats.packets_tx++; /* Send RTP data to NET */ /* FIXME: Get rid of conn_bts and conn_net! */ @@ -282,8 +282,8 @@ .sin_port = conn_bts->end.rtp_port, }; - conn_net->end.octets_tx += msg->len; - conn_net->end.packets_tx++; + conn_net->end.stats.octets_tx += msg->len; + conn_net->end.stats.packets_tx++; /* Send RTP data to BTS */ /* FIXME: Get rid of conn_bts and conn_net! */ diff --git a/src/libosmo-mgcp/mgcp_stat.c b/src/libosmo-mgcp/mgcp_stat.c index 54c4b66..88a2d69 100644 --- a/src/libosmo-mgcp/mgcp_stat.c +++ b/src/libosmo-mgcp/mgcp_stat.c @@ -43,8 +43,8 @@ * Make sure the sign is correct and use the biggest * positive/negative number that fits. */ - *loss = *expected - end->packets_rx; - if (*expected < end->packets_rx) { + *loss = *expected - end->stats.packets_rx; + if (*expected < end->stats.packets_rx) { if (*loss > 0) *loss = INT_MIN; } else { @@ -74,8 +74,8 @@ nchars = snprintf(str, str_len, "\r\nP: PS=%u, OS=%u, PR=%u, OR=%u, PL=%d, JI=%u", - conn->end.packets_tx, conn->end.octets_tx, - conn->end.packets_rx, conn->end.octets_rx, + conn->end.stats.packets_tx, conn->end.stats.octets_tx, + conn->end.stats.packets_rx, conn->end.stats.octets_rx, ploss, jitter); if (nchars < 0 || nchars >= str_len) goto truncate; diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index e938391..7fa3949 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -167,7 +167,7 @@ " Output-Enabled: %d Force-PTIME: %d%s", state->in_stream.err_ts_counter, state->out_stream.err_ts_counter, VTY_NEWLINE, - end->dropped_packets, VTY_NEWLINE, + end->stats.dropped_packets, VTY_NEWLINE, codec->payload_type, codec->rate, codec->channels, VTY_NEWLINE, codec->frame_duration_num, codec->frame_duration_den, VTY_NEWLINE, end->frames_per_packet, end->packet_duration_ms, diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 6f8e4ca..46fc1c1 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -921,7 +921,7 @@ state.stats.max_seq = pl_test_dat[i].max_seq; state.stats.cycles = pl_test_dat[i].cycles; - rtp.packets_rx = pl_test_dat[i].packets; + rtp.stats.packets_rx = pl_test_dat[i].packets; calc_loss(&state, &rtp, &expected, &loss); if (loss != pl_test_dat[i].loss -- To view, visit https://gerrit.osmocom.org/5583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e0ecdcd9a75fe08abc55b730780c01617f3d4af Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:04:07 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:04:07 +0000 Subject: [PATCH] osmo-mgw[master]: libosmo-mgcp: Cosmetic spelling fixes in comments Message-ID: Review at https://gerrit.osmocom.org/5584 libosmo-mgcp: Cosmetic spelling fixes in comments Change-Id: Ic0469c2a4d69b55a6a90653ad7ea1ad89a34e4bc --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 6 files changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/84/5584/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index c7634fb..d6397d3 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -105,12 +105,12 @@ }; /* There are up to three modes in which the keep-alive dummy packet can be - * sent. The beviour is controlled viw the keepalive_interval member of the + * sent. The behaviour is controlled via the keepalive_interval member of the * trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy- * packet is sent at all and the timer that sends regular dummy packets * is no longer scheduled. If the keepalive_interval is set to -1, only * one dummy packet is sent when an CRCX or an MDCX is performed. No timer - * is scheduled. For all vales greater 0, the a timer is scheduled and the + * is scheduled. For all vales greater 0, the timer is scheduled and the * value is used as interval. See also mgcp_keepalive_timer_cb(), * handle_modify_con(), and handle_create_con() */ #define MGCP_KEEPALIVE_ONCE (-1) diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 11bafe7..61d45bf 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -217,7 +217,7 @@ /*!< copy of the mode to restore the original setting (VTY) */ enum mgcp_connection_mode mode_orig; - /*!< connection id to identify the conntion */ + /*!< connection id to identify the connection */ char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 9063bec..a136fda 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -249,9 +249,9 @@ return; } -/*! dump basic connection information to human readble string. +/*! dump basic connection information to human readable string. * \param[in] conn to dump - * \returns human readble string */ + * \returns human readable string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { static char str[sizeof(conn->name)+sizeof(conn->id)+256]; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 9bf6f85..bd6bec9 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -371,8 +371,8 @@ /* Check we really managed to compensate the timestamp * offset. There should not be any remaining error, failing - * here would point to a serous problem with the alingnment - * error computation fuction */ + * here would point to a serous problem with the alignment + * error computation function */ ts_check = ts_alignment_error(&state->out_stream, ptime, timestamp + state->patch.timestamp_offset); OSMO_ASSERT(ts_check == 0); @@ -386,7 +386,7 @@ * \param[in] destination RTP end * \param[in,out] pointer to buffer with voice data * \param[in] voice data length - * \param[in] maxmimum size of caller provided voice data buffer + * \param[in] maximum size of caller provided voice data buffer * \returns ignores input parameters, return always 0 */ int mgcp_rtp_processing_default(struct mgcp_endpoint *endp, struct mgcp_rtp_end *dst_end, diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 6e19611..d0141f3 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -142,7 +142,7 @@ } /* Lookup existing handle for a specified address, if the handle can not be - * foud a the function will automatically allocate one */ + * found, the function will automatically allocate one */ static struct osmux_in_handle * osmux_handle_lookup(struct mgcp_config *cfg, struct in_addr *addr, int rem_port) { diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a1ecce2..f87f341 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -317,10 +317,10 @@ return create_ok_response(p->endp, 200, "AUEP", p->trans); } -/* Try to find a free port by attemting to bind on it. Also handle the +/* Try to find a free port by attempting to bind on it. Also handle the * counter that points on the next free port. Since we have a pointer - * to the next free port, binding should work on the first attemt, - * neverless, try at least the next 200 ports before giving up */ + * to the next free port, binding should work on the first attempt, + * nevertheless, try at least the next 200 ports before giving up */ static int allocate_port(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn) { int i; @@ -356,7 +356,7 @@ } /* Set the LCO from a string (see RFC 3435). - * The string is stored in the 'string' field. A NULL string is handled excatlyy + * The string is stored in the 'string' field. A NULL string is handled exactly * like an empty string, the 'string' field is never NULL after this function * has been called. */ static void set_local_cx_options(void *ctx, struct mgcp_lco *lco, @@ -548,7 +548,7 @@ } /* Set the callid, creation of another connection will only be possible - * when the callid matches up. (Connections are distinuished by their + * when the callid matches up. (Connections are distinguished by their * connection ids) */ endp->callid = talloc_strdup(tcfg->endpoints, callid); @@ -1013,7 +1013,7 @@ } /* Connection keepalive timer, will take care that dummy packets are send - * regulary, so that NAT connections stay open */ + * regularly, so that NAT connections stay open */ static void mgcp_keepalive_timer_cb(void *_tcfg) { struct mgcp_trunk_config *tcfg = _tcfg; @@ -1184,14 +1184,14 @@ return 0; } -/*! relase endpoint, all open connections are closed. +/*! release endpoint, all open connections are closed. * \param[in] endp endpoint to release */ void mgcp_release_endp(struct mgcp_endpoint *endp) { LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", ENDPOINT_NUMBER(endp)); - /* Normally this function should only be called wehen + /* Normally this function should only be called when * all connections have been removed already. In case * that there are still connections open (e.g. when * RSIP is executed), free them all at once. */ -- To view, visit https://gerrit.osmocom.org/5584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0469c2a4d69b55a6a90653ad7ea1ad89a34e4bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:06:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:06:44 +0000 Subject: osmo-mgw[master]: strct mgcp_rtp_state: Group + document struct members relate... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I403ddcafe0a11290103bb017568cfacaf5c04412 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:07:02 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:07:02 +0000 Subject: osmo-mgw[master]: mgcp_rtp_state: grup 'stats' members into sub-structure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I92a1bead01c6b85bf237b6edf64a1b76b9e97c78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:07:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:07:25 +0000 Subject: osmo-mgw[master]: mgcp_rtp_end: Group statistics members into 'stats' sub-struct In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e0ecdcd9a75fe08abc55b730780c01617f3d4af Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:07:51 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:07:51 +0000 Subject: osmo-mgw[master]: libosmo-mgcp: Cosmetic spelling fixes in comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0469c2a4d69b55a6a90653ad7ea1ad89a34e4bc Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:20:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:20:14 +0000 Subject: [MERGED] osmo-mgw[master]: libosmo-mgcp: Cosmetic spelling fixes in comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: libosmo-mgcp: Cosmetic spelling fixes in comments ...................................................................... libosmo-mgcp: Cosmetic spelling fixes in comments Change-Id: Ic0469c2a4d69b55a6a90653ad7ea1ad89a34e4bc --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 6 files changed, 17 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index c7634fb..d6397d3 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -105,12 +105,12 @@ }; /* There are up to three modes in which the keep-alive dummy packet can be - * sent. The beviour is controlled viw the keepalive_interval member of the + * sent. The behaviour is controlled via the keepalive_interval member of the * trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy- * packet is sent at all and the timer that sends regular dummy packets * is no longer scheduled. If the keepalive_interval is set to -1, only * one dummy packet is sent when an CRCX or an MDCX is performed. No timer - * is scheduled. For all vales greater 0, the a timer is scheduled and the + * is scheduled. For all vales greater 0, the timer is scheduled and the * value is used as interval. See also mgcp_keepalive_timer_cb(), * handle_modify_con(), and handle_create_con() */ #define MGCP_KEEPALIVE_ONCE (-1) diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 11bafe7..61d45bf 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -217,7 +217,7 @@ /*!< copy of the mode to restore the original setting (VTY) */ enum mgcp_connection_mode mode_orig; - /*!< connection id to identify the conntion */ + /*!< connection id to identify the connection */ char id[MGCP_CONN_ID_LENGTH]; /*!< human readable name (vty, logging) */ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 9063bec..a136fda 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -249,9 +249,9 @@ return; } -/*! dump basic connection information to human readble string. +/*! dump basic connection information to human readable string. * \param[in] conn to dump - * \returns human readble string */ + * \returns human readable string */ char *mgcp_conn_dump(struct mgcp_conn *conn) { static char str[sizeof(conn->name)+sizeof(conn->id)+256]; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index dc5628a..ac7dc67 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -372,8 +372,8 @@ /* Check we really managed to compensate the timestamp * offset. There should not be any remaining error, failing - * here would point to a serous problem with the alingnment - * error computation fuction */ + * here would point to a serous problem with the alignment + * error computation function */ ts_check = ts_alignment_error(&state->out_stream, ptime, timestamp + state->patch.timestamp_offset); OSMO_ASSERT(ts_check == 0); @@ -387,7 +387,7 @@ * \param[in] destination RTP end * \param[in,out] pointer to buffer with voice data * \param[in] voice data length - * \param[in] maxmimum size of caller provided voice data buffer + * \param[in] maximum size of caller provided voice data buffer * \returns ignores input parameters, return always 0 */ int mgcp_rtp_processing_default(struct mgcp_endpoint *endp, struct mgcp_rtp_end *dst_end, diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 6e19611..d0141f3 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -142,7 +142,7 @@ } /* Lookup existing handle for a specified address, if the handle can not be - * foud a the function will automatically allocate one */ + * found, the function will automatically allocate one */ static struct osmux_in_handle * osmux_handle_lookup(struct mgcp_config *cfg, struct in_addr *addr, int rem_port) { diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index a1ecce2..f87f341 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -317,10 +317,10 @@ return create_ok_response(p->endp, 200, "AUEP", p->trans); } -/* Try to find a free port by attemting to bind on it. Also handle the +/* Try to find a free port by attempting to bind on it. Also handle the * counter that points on the next free port. Since we have a pointer - * to the next free port, binding should work on the first attemt, - * neverless, try at least the next 200 ports before giving up */ + * to the next free port, binding should work on the first attempt, + * nevertheless, try at least the next 200 ports before giving up */ static int allocate_port(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn) { int i; @@ -356,7 +356,7 @@ } /* Set the LCO from a string (see RFC 3435). - * The string is stored in the 'string' field. A NULL string is handled excatlyy + * The string is stored in the 'string' field. A NULL string is handled exactly * like an empty string, the 'string' field is never NULL after this function * has been called. */ static void set_local_cx_options(void *ctx, struct mgcp_lco *lco, @@ -548,7 +548,7 @@ } /* Set the callid, creation of another connection will only be possible - * when the callid matches up. (Connections are distinuished by their + * when the callid matches up. (Connections are distinguished by their * connection ids) */ endp->callid = talloc_strdup(tcfg->endpoints, callid); @@ -1013,7 +1013,7 @@ } /* Connection keepalive timer, will take care that dummy packets are send - * regulary, so that NAT connections stay open */ + * regularly, so that NAT connections stay open */ static void mgcp_keepalive_timer_cb(void *_tcfg) { struct mgcp_trunk_config *tcfg = _tcfg; @@ -1184,14 +1184,14 @@ return 0; } -/*! relase endpoint, all open connections are closed. +/*! release endpoint, all open connections are closed. * \param[in] endp endpoint to release */ void mgcp_release_endp(struct mgcp_endpoint *endp) { LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", ENDPOINT_NUMBER(endp)); - /* Normally this function should only be called wehen + /* Normally this function should only be called when * all connections have been removed already. In case * that there are still connections open (e.g. when * RSIP is executed), free them all at once. */ -- To view, visit https://gerrit.osmocom.org/5584 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0469c2a4d69b55a6a90653ad7ea1ad89a34e4bc Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:20:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:20:14 +0000 Subject: [MERGED] osmo-mgw[master]: strct mgcp_rtp_state: Group + document struct members relate... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: strct mgcp_rtp_state: Group + document struct members related to patching ...................................................................... strct mgcp_rtp_state: Group + document struct members related to patching Change-Id: I403ddcafe0a11290103bb017568cfacaf5c04412 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c 2 files changed, 31 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index c3f9ba1..8d82b14 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -50,14 +50,21 @@ }; struct mgcp_rtp_state { + /* has this state structure been initialized? */ int initialized; - int patch_ssrc; - uint32_t orig_ssrc; + struct { + /* are we patching the SSRC value? */ + int patch_ssrc; + /* original SSRC (to which we shall patch any different SSRC) */ + uint32_t orig_ssrc; + /* offset to apply on the sequence number */ + int seq_offset; + /* offset to apply on the timestamp number */ + int32_t timestamp_offset; + } patch; - int seq_offset; - - int32_t timestamp_offset; + /* duration of a packet (FIXME: in which unit?) */ uint32_t packet_duration; struct mgcp_rtp_stream_state in_stream; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index aac3e51..8c0a7e3 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -231,7 +231,7 @@ "on 0x%x SSRC: %u timestamp: %u " "from %s:%d\n", text, seq, - state->timestamp_offset, state->seq_offset, + state->patch.timestamp_offset, state->patch.seq_offset, ENDPOINT_NUMBER(endp), sstate->ssrc, timestamp, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -325,15 +325,15 @@ out_timestamp = state->out_stream.last_timestamp + delta_seq * tsdelta; timestamp_offset = out_timestamp - in_timestamp; - if (state->timestamp_offset != timestamp_offset) { - state->timestamp_offset = timestamp_offset; + if (state->patch.timestamp_offset != timestamp_offset) { + state->patch.timestamp_offset = timestamp_offset; LOGP(DRTP, LOGL_NOTICE, "Timestamp offset change on 0x%x SSRC: %u " "SeqNo delta: %d, TS offset: %d, " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - delta_seq, state->timestamp_offset, + delta_seq, state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -354,11 +354,11 @@ /* Align according to: T + Toffs - Tlast = k * Tptime */ ts_error = ts_alignment_error(&state->out_stream, ptime, - timestamp + state->timestamp_offset); + timestamp + state->patch.timestamp_offset); /* If there is an alignment error, we have to compensate it */ if (ts_error) { - state->timestamp_offset += ptime - ts_error; + state->patch.timestamp_offset += ptime - ts_error; LOGP(DRTP, LOGL_NOTICE, "Corrected timestamp alignment error of %d on 0x%x SSRC: %u " @@ -366,7 +366,7 @@ "from %s:%d\n", ts_error, ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->timestamp_offset, inet_ntoa(addr->sin_addr), + state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -375,7 +375,7 @@ * here would point to a serous problem with the alingnment * error computation fuction */ ts_check = ts_alignment_error(&state->out_stream, ptime, - timestamp + state->timestamp_offset); + timestamp + state->patch.timestamp_offset); OSMO_ASSERT(ts_check == 0); /* Return alignment error before compensation */ @@ -508,7 +508,7 @@ if (!state->initialized) { state->initialized = 1; state->in_stream.last_seq = seq - 1; - state->in_stream.ssrc = state->orig_ssrc = ssrc; + state->in_stream.ssrc = state->patch.orig_ssrc = ssrc; state->in_stream.last_tsdelta = 0; state->packet_duration = mgcp_rtp_packet_duration(endp, rtp_end); @@ -519,7 +519,7 @@ "endpoint:0x%x initializing stream, SSRC: %u timestamp: %u " "pkt-duration: %d, from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->seq_offset, state->packet_duration, + state->patch.seq_offset, state->packet_duration, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); if (state->packet_duration == 0) { state->packet_duration = @@ -543,7 +543,7 @@ int16_t delta_seq; /* Always increment seqno by 1 */ - state->seq_offset = + state->patch.seq_offset = (state->out_stream.last_seq + 1) - seq; /* Estimate number of packets that would have been sent */ @@ -555,8 +555,8 @@ adjust_rtp_timestamp_offset(endp, state, rtp_end, addr, delta_seq, timestamp); - state->patch_ssrc = 1; - ssrc = state->orig_ssrc; + state->patch.patch_ssrc = 1; + ssrc = state->patch.orig_ssrc; if (rtp_end->force_constant_ssrc != -1) rtp_end->force_constant_ssrc -= 1; @@ -565,7 +565,7 @@ "SeqNo offset: %d, TS offset: %d " "from %s:%d\n", ENDPOINT_NUMBER(endp), state->in_stream.ssrc, - state->seq_offset, state->timestamp_offset, + state->patch.seq_offset, state->patch.timestamp_offset, inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); } @@ -576,8 +576,8 @@ addr, seq, timestamp, "input", &state->in_stream.last_tsdelta); - if (state->patch_ssrc) - ssrc = state->orig_ssrc; + if (state->patch.patch_ssrc) + ssrc = state->patch.orig_ssrc; } /* Save before patching */ @@ -592,15 +592,15 @@ timestamp); /* Store the updated SSRC back to the packet */ - if (state->patch_ssrc) + if (state->patch.patch_ssrc) rtp_hdr->ssrc = htonl(ssrc); /* Apply the offset and store it back to the packet. * This won't change anything if the offset is 0, so the conditional is * omitted. */ - seq += state->seq_offset; + seq += state->patch.seq_offset; rtp_hdr->sequence = htons(seq); - timestamp += state->timestamp_offset; + timestamp += state->patch.timestamp_offset; rtp_hdr->timestamp = htonl(timestamp); /* Check again, whether the timestamps are still valid */ -- To view, visit https://gerrit.osmocom.org/5581 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I403ddcafe0a11290103bb017568cfacaf5c04412 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:20:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:20:14 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_rtp_end: Group statistics members into 'stats' sub-struct In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp_rtp_end: Group statistics members into 'stats' sub-struct ...................................................................... mgcp_rtp_end: Group statistics members into 'stats' sub-struct Change-Id: I4e0ecdcd9a75fe08abc55b730780c01617f3d4af --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_stat.c M src/libosmo-mgcp/mgcp_vty.c M tests/mgcp/mgcp_test.c 7 files changed, 26 insertions(+), 28 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 9e7246e..11bafe7 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -97,11 +97,14 @@ struct mgcp_rtp_end { /* statistics */ - unsigned int packets_rx; - unsigned int octets_rx; - unsigned int packets_tx; - unsigned int octets_tx; - unsigned int dropped_packets; + struct { + unsigned int packets_rx; + unsigned int octets_rx; + unsigned int packets_tx; + unsigned int octets_tx; + unsigned int dropped_packets; + } stats; + struct in_addr addr; /* in network byte order */ diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 4090a9f..9063bec 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -93,12 +93,7 @@ end->rtp.fd = -1; end->rtcp.fd = -1; - end->local_port = 0; - end->packets_rx = 0; - end->octets_rx = 0; - end->packets_tx = 0; - end->octets_tx = 0; - end->dropped_packets = 0; + memset(&end->stats, 0, sizeof(end->stats)); end->rtp_port = end->rtcp_port = 0; talloc_free(end->fmtp_extra); end->fmtp_extra = NULL; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 2056a8e..dc5628a 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -693,7 +693,7 @@ dest_name = conn_dst->conn->name; if (!rtp_end->output_enabled) { - rtp_end->dropped_packets += 1; + rtp_end->stats.dropped_packets += 1; LOGP(DRTP, LOGL_DEBUG, "endpoint:0x%x output disabled, drop to %s %s " "rtp_port:%u rtcp_port:%u\n", @@ -748,8 +748,8 @@ if (len <= 0) return len; - conn_dst->end.packets_tx += 1; - conn_dst->end.octets_tx += len; + conn_dst->end.stats.packets_tx += 1; + conn_dst->end.stats.octets_tx += len; nbytes += len; buflen = cont; @@ -768,8 +768,8 @@ &rtp_end->addr, rtp_end->rtcp_port, buf, len); - conn_dst->end.packets_tx += 1; - conn_dst->end.octets_tx += len; + conn_dst->end.stats.packets_tx += 1; + conn_dst->end.stats.octets_tx += len; return len; } @@ -929,8 +929,8 @@ } /* Increment RX statistics */ - conn->end.packets_rx += 1; - conn->end.octets_rx += rc; + conn->end.stats.packets_rx += 1; + conn->end.stats.octets_rx += rc; /* Forward a copy of the RTP data to a debug ip/port */ forward_data(fd->fd, &conn->tap_in, buf, rc); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 5030812..6e19611 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -255,8 +255,8 @@ .sin_port = conn_net->end.rtp_port, }; - conn_bts->end.octets_tx += msg->len; - conn_bts->end.packets_tx++; + conn_bts->end.stats.octets_tx += msg->len; + conn_bts->end.stats.packets_tx++; /* Send RTP data to NET */ /* FIXME: Get rid of conn_bts and conn_net! */ @@ -282,8 +282,8 @@ .sin_port = conn_bts->end.rtp_port, }; - conn_net->end.octets_tx += msg->len; - conn_net->end.packets_tx++; + conn_net->end.stats.octets_tx += msg->len; + conn_net->end.stats.packets_tx++; /* Send RTP data to BTS */ /* FIXME: Get rid of conn_bts and conn_net! */ diff --git a/src/libosmo-mgcp/mgcp_stat.c b/src/libosmo-mgcp/mgcp_stat.c index 54c4b66..88a2d69 100644 --- a/src/libosmo-mgcp/mgcp_stat.c +++ b/src/libosmo-mgcp/mgcp_stat.c @@ -43,8 +43,8 @@ * Make sure the sign is correct and use the biggest * positive/negative number that fits. */ - *loss = *expected - end->packets_rx; - if (*expected < end->packets_rx) { + *loss = *expected - end->stats.packets_rx; + if (*expected < end->stats.packets_rx) { if (*loss > 0) *loss = INT_MIN; } else { @@ -74,8 +74,8 @@ nchars = snprintf(str, str_len, "\r\nP: PS=%u, OS=%u, PR=%u, OR=%u, PL=%d, JI=%u", - conn->end.packets_tx, conn->end.octets_tx, - conn->end.packets_rx, conn->end.octets_rx, + conn->end.stats.packets_tx, conn->end.stats.octets_tx, + conn->end.stats.packets_rx, conn->end.stats.octets_rx, ploss, jitter); if (nchars < 0 || nchars >= str_len) goto truncate; diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index e938391..7fa3949 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -167,7 +167,7 @@ " Output-Enabled: %d Force-PTIME: %d%s", state->in_stream.err_ts_counter, state->out_stream.err_ts_counter, VTY_NEWLINE, - end->dropped_packets, VTY_NEWLINE, + end->stats.dropped_packets, VTY_NEWLINE, codec->payload_type, codec->rate, codec->channels, VTY_NEWLINE, codec->frame_duration_num, codec->frame_duration_den, VTY_NEWLINE, end->frames_per_packet, end->packet_duration_ms, diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 6f8e4ca..46fc1c1 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -921,7 +921,7 @@ state.stats.max_seq = pl_test_dat[i].max_seq; state.stats.cycles = pl_test_dat[i].cycles; - rtp.packets_rx = pl_test_dat[i].packets; + rtp.stats.packets_rx = pl_test_dat[i].packets; calc_loss(&state, &rtp, &expected, &loss); if (loss != pl_test_dat[i].loss -- To view, visit https://gerrit.osmocom.org/5583 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e0ecdcd9a75fe08abc55b730780c01617f3d4af Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 25 09:20:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 25 Dec 2017 09:20:15 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_rtp_state: grup 'stats' members into sub-structure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp_rtp_state: grup 'stats' members into sub-structure ...................................................................... mgcp_rtp_state: grup 'stats' members into sub-structure Change-Id: I92a1bead01c6b85bf237b6edf64a1b76b9e97c78 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_stat.c M tests/mgcp/mgcp_test.c 4 files changed, 48 insertions(+), 45 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 8d82b14..9e7246e 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -71,13 +71,16 @@ struct mgcp_rtp_stream_state out_stream; /* jitter and packet loss calculation */ - int stats_initialized; - uint16_t stats_base_seq; - uint16_t stats_max_seq; - uint32_t stats_ssrc; - uint32_t stats_jitter; - int32_t stats_transit; - int stats_cycles; + struct { + int initialized; + uint16_t base_seq; + uint16_t max_seq; + uint32_t ssrc; + uint32_t jitter; + int32_t transit; + int cycles; + } stats; + bool patched_first_rtp_payload; /* FIXME: drop this, see OS#2459 */ }; diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 8c0a7e3..2056a8e 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -434,14 +434,14 @@ int32_t d; /* initialize or re-initialize */ - if (!state->stats_initialized || state->stats_ssrc != ssrc) { - state->stats_initialized = 1; - state->stats_base_seq = seq; - state->stats_max_seq = seq - 1; - state->stats_ssrc = ssrc; - state->stats_jitter = 0; - state->stats_transit = transit; - state->stats_cycles = 0; + if (!state->stats.initialized || state->stats.ssrc != ssrc) { + state->stats.initialized = 1; + state->stats.base_seq = seq; + state->stats.max_seq = seq - 1; + state->stats.ssrc = ssrc; + state->stats.jitter = 0; + state->stats.transit = transit; + state->stats.cycles = 0; } else { uint16_t udelta; @@ -452,10 +452,10 @@ * It can't wrap during the initialization so let's * skip it here. The Appendix A probably doesn't have * this issue because of the probation. */ - udelta = seq - state->stats_max_seq; + udelta = seq - state->stats.max_seq; if (udelta < RTP_MAX_DROPOUT) { - if (seq < state->stats_max_seq) - state->stats_cycles += RTP_SEQ_MOD; + if (seq < state->stats.max_seq) + state->stats.cycles += RTP_SEQ_MOD; } else if (udelta <= RTP_SEQ_MOD - RTP_MAX_MISORDER) { LOGP(DRTP, LOGL_NOTICE, "RTP seqno made a very large jump on 0x%x delta: %u\n", @@ -467,12 +467,12 @@ * taken closer to the read function. This was taken from the * Appendix A of RFC 3550. Timestamp and arrival_time have a 1/rate * resolution. */ - d = transit - state->stats_transit; - state->stats_transit = transit; + d = transit - state->stats.transit; + state->stats.transit = transit; if (d < 0) d = -d; - state->stats_jitter += d - ((state->stats_jitter + 8) >> 4); - state->stats_max_seq = seq; + state->stats.jitter += d - ((state->stats.jitter + 8) >> 4); + state->stats.max_seq = seq; } /* The RFC 3550 Appendix A assumes there are multiple sources but diff --git a/src/libosmo-mgcp/mgcp_stat.c b/src/libosmo-mgcp/mgcp_stat.c index b84f5f2..54c4b66 100644 --- a/src/libosmo-mgcp/mgcp_stat.c +++ b/src/libosmo-mgcp/mgcp_stat.c @@ -30,10 +30,10 @@ struct mgcp_rtp_end *end, uint32_t *expected, int *loss) { - *expected = state->stats_cycles + state->stats_max_seq; - *expected = *expected - state->stats_base_seq + 1; + *expected = state->stats.cycles + state->stats.max_seq; + *expected = *expected - state->stats.base_seq + 1; - if (!state->stats_initialized) { + if (!state->stats.initialized) { *expected = 0; *loss = 0; return; @@ -56,9 +56,9 @@ /* Helper function for mgcp_format_stats_rtp() to calculate jitter */ uint32_t calc_jitter(struct mgcp_rtp_state *state) { - if (!state->stats_initialized) + if (!state->stats.initialized) return 0; - return state->stats_jitter >> 4; + return state->stats.jitter >> 4; } /* Generate statistics for an RTP connection */ diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 330d24d..6f8e4ca 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -916,10 +916,10 @@ memset(&state, 0, sizeof(state)); memset(&rtp, 0, sizeof(rtp)); - state.stats_initialized = 1; - state.stats_base_seq = pl_test_dat[i].base_seq; - state.stats_max_seq = pl_test_dat[i].max_seq; - state.stats_cycles = pl_test_dat[i].cycles; + state.stats.initialized = 1; + state.stats.base_seq = pl_test_dat[i].base_seq; + state.stats.max_seq = pl_test_dat[i].max_seq; + state.stats.cycles = pl_test_dat[i].cycles; rtp.packets_rx = pl_test_dat[i].packets; calc_loss(&state, &rtp, &expected, &loss); @@ -1183,7 +1183,7 @@ state.out_stream.err_ts_counter - last_out_ts_err_cnt); printf("Stats: Jitter = %u, Transit = %d\n", - calc_jitter(&state), state.stats_transit); + calc_jitter(&state), state.stats.transit); last_in_ts_err_cnt = state.in_stream.err_ts_counter; last_out_ts_err_cnt = state.out_stream.err_ts_counter; @@ -1362,29 +1362,29 @@ conn = mgcp_conn_get_rtp(endp, _conn->id); OSMO_ASSERT(conn); - OSMO_ASSERT(conn->state.stats_initialized == 0); + OSMO_ASSERT(conn->state.stats.initialized == 0); mgcp_rtp_annex_count(endp, &conn->state, 0, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == 0); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == 0); mgcp_rtp_annex_count(endp, &conn->state, 1, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == 1); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == 1); /* now jump.. */ mgcp_rtp_annex_count(endp, &conn->state, UINT16_MAX, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == 0); - OSMO_ASSERT(conn->state.stats_max_seq == UINT16_MAX); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == 0); + OSMO_ASSERT(conn->state.stats.max_seq == UINT16_MAX); /* and wrap */ mgcp_rtp_annex_count(endp, &conn->state, 0, 0, 2342); - OSMO_ASSERT(conn->state.stats_initialized == 1); - OSMO_ASSERT(conn->state.stats_cycles == UINT16_MAX + 1); - OSMO_ASSERT(conn->state.stats_max_seq == 0); + OSMO_ASSERT(conn->state.stats.initialized == 1); + OSMO_ASSERT(conn->state.stats.cycles == UINT16_MAX + 1); + OSMO_ASSERT(conn->state.stats.max_seq == 0); mgcp_release_endp(endp); talloc_free(cfg); -- To view, visit https://gerrit.osmocom.org/5582 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I92a1bead01c6b85bf237b6edf64a1b76b9e97c78 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:44:58 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:44:58 +0000 Subject: [MERGED] osmo-iuh[master]: compiler warning: asn1tostruct.py: return 0 at end of *_free... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: compiler warning: asn1tostruct.py: return 0 at end of *_free_*() ...................................................................... compiler warning: asn1tostruct.py: return 0 at end of *_free_*() Part of the resulting diff in the generated code: --- /tmp/hnbap_decoder.c 2017-12-24 17:06:50.983979866 +0100 +++ /tmp/hnbap_decoder.c 2017-12-24 17:07:10.760223354 +0100 @@ -1179,6 +1179,7 @@ TNLUpdateResponseIEs_t *tnlUpdateResponseIEs) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateResponseIEs->context_ID); + return 0; } int hnbap_free_tnlupdaterequesties( @@ -1187,6 +1188,7 @@ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Context_ID, &tnlUpdateRequestIEs->context_ID); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RABList, &tnlUpdateRequestIEs->rabList); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Update_cause, &tnlUpdateRequestIEs->update_cause); + return 0; } int hnbap_free_errorindicationies( @@ -1197,12 +1199,14 @@ if ((errorIndicationIEs->presenceMask & ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) == ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_CriticalityDiagnostics, &errorIndicationIEs->criticalityDiagnostics); + return 0; } int hnbap_free_hnbconfigtransferrequesties( HNBConfigTransferRequestIEs_t *hnbConfigTransferRequestIEs) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NeighbourInfoRequestList, &hnbConfigTransferRequestIEs->neighbourInfoRequestList); + return 0; } int hnbap_free_tnlupdatefailureies( [etc.] Related: OS#2670 Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 --- M asn1/utils/asn1tostruct.py 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 5586e40..0bba9dd 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -389,6 +389,8 @@ iename = re.sub('id-', '', ie[0]) ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename)) f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s->%s);\n" % (ietypeunderscore, lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore)) + + f.write(" return 0;\n") f.write("}\n\n") for key in iesDefs: -- To view, visit https://gerrit.osmocom.org/5533 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieba12c09c33a81da964bf88a858714d922ced8c0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:00 +0000 Subject: [MERGED] osmo-iuh[master]: vty: tweak / improve HNB and cnlink introspection In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: tweak / improve HNB and cnlink introspection ...................................................................... vty: tweak / improve HNB and cnlink introspection Add 'show cnlink' (uses new osmo_sccp_user_name(), see 'Depends' below). Tweak 'show hnb all'. The result looks something like: OsmoHNBGW> show cnlink IuCS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-OsmoHNBGW proto=m3ua ASP asp-clnt-OsmoHNBGW (r=127.0.0.1:2905<->l=127.0.0.1:37699) IuPS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-OsmoHNBGW proto=m3ua ASP asp-clnt-OsmoHNBGW (r=127.0.0.1:2905<->l=127.0.0.1:37699) OsmoHNBGW> show hnb all No HNB connected OsmoHNBGW> show hnb all HNB (r=192.168.0.124:29169<->l=192.168.0.9:29169) "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS 24->1002 (RUA->SUA) state=1 IuPS 24->1003 (RUA->SUA) state=1 HNB (r=192.168.0.15:29169<->l=192.168.0.9:29169) "000295-0000154153 at ap.ipaccess.com" MCC 901 MNC 70 LAC 24358 RAC 22 SAC 65535 CID 1048575 SCCP-stream:HNBAP=0,RUA=0 IuCS 23->1000 (RUA->SUA) state=1 IuPS 23->1001 (RUA->SUA) state=1 2 HNB connected Related: OS#2772 OS#2773 Depends: Ib7abf69cfcf4c56273223054b280458451e6c2f6 (libosmo-sccp) Ia0d15a2814b08bc3f052a1ed12dbb68bade55309 (libosmo-sccp) Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 --- M src/hnbgw_vty.c 1 file changed, 65 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 3d16970..d50c4a5 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -20,6 +20,7 @@ #include +#include #include #include @@ -27,6 +28,8 @@ #include #include #include +#include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -108,19 +111,68 @@ return vty->node; } +DEFUN(show_cnlink, show_cnlink_cmd, "show cnlink", + SHOW_STR "Display information on core network link\n") +{ + struct osmo_ss7_route *rt; + struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(g_hnb_gw->sccp.client); + int i; +#define GUARD(STR) \ + STR ? STR : "", \ + STR ? ":" : "" + + vty_out(vty, "IuCS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s", + GUARD(g_hnb_gw->config.iucs_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iucs_remote_addr), + VTY_NEWLINE); + + rt = osmo_ss7_route_lookup(ss7, g_hnb_gw->sccp.iucs_remote_addr.pc); + vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE); + + vty_out(vty, "IuPS: %s <->", + osmo_sccp_user_name(g_hnb_gw->sccp.cnlink->sccp_user)); + vty_out(vty, " %s%s%s%s", + GUARD(g_hnb_gw->config.iups_remote_addr_name), + osmo_sccp_inst_addr_name(g_hnb_gw->sccp.client, &g_hnb_gw->sccp.iups_remote_addr), + VTY_NEWLINE); + + rt = osmo_ss7_route_lookup(ss7, g_hnb_gw->sccp.iups_remote_addr.pc); + vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE); + +#undef GUARD + return CMD_SUCCESS; +} + +static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) +{ + char *name; + if (!ofd || ofd->fd < 0 + || !(name = osmo_sock_get_name(vty, ofd->fd))) { + vty_out(vty, "(no addr)"); + return; + } + vty_out(vty, name); + talloc_free(name); +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; - vty_out(vty, "HNB \"%s\" MCC %u MNC %u LAC %u RAC %u SAC %u CID %u%s", hnb->identity_info, - hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, - VTY_NEWLINE); - vty_out(vty, " HNBAP ID %u RUA ID %u%s", hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); + vty_out(vty, "HNB "); + vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); + vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE); + vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCCP-stream:HNBAP=%u,RUA=%u%s", + hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, + hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); llist_for_each_entry(map, &hnb->map_list, hnb_list) { - vty_out(vty, " Map %u->%u (RUA->SUA) cnlink=%p state=%u%s", map->rua_ctx_id, map->scu_conn_id, - map->cn_link, map->state, VTY_NEWLINE); - + vty_out(vty, " %s %u->%u (RUA->SUA) state=%u%s", + map->is_ps ? "IuPS" : "IuCS", + map->rua_ctx_id, map->scu_conn_id, + map->state, VTY_NEWLINE); } } @@ -132,6 +184,11 @@ DEFUN(show_hnb, show_hnb_cmd, "show hnb all", SHOW_STR "Display information about a HNB") { struct hnb_context *hnb; + + if (llist_empty(&g_hnb_gw->hnb_list)) { + vty_out(vty, "No HNB connected%s", VTY_NEWLINE); + return CMD_SUCCESS; + } llist_for_each_entry(hnb, &g_hnb_gw->hnb_list, list) { vty_dump_hnb_info(vty, hnb); @@ -282,6 +339,7 @@ install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_addr_cmd); + install_element_ve(&show_cnlink_cmd); install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/5532 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:00 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: vty: revamp output of context maps on 'show hnb' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-hnbgw: vty: revamp output of context maps on 'show hnb' ...................................................................... osmo-hnbgw: vty: revamp output of context maps on 'show hnb' Instead of listing each and every context map, rather output a summary of context counts. Rationale: in a list of a hundred HNBs, I don't want to also see a dozen (or potentially thousands of) context map lines for each. Furthermore, the conn IDs aren't necessarily useful on network traces either. For example, what was shown as SUA Id is incidentally the SCCP Reference, but this is not a hard requirement and may change. Also, the reference is shown in wireshark as a hex in mismatching byte order ... so rather don't bother. The result now looks like OsmoHNBGW> show hnb all HNB (r=192.168.0.124:29169<->l=192.168.0.9:29169) "000295-0000152614 at ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS: 1 contexts: inactive-reserved:1 IuPS: 1 contexts: active:1 1 HNB connected Related: OS#2772 OS#2773 Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9 --- M include/osmocom/iuh/context_map.h M src/context_map.c M src/hnbgw_vty.c 3 files changed, 40 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/context_map.h b/include/osmocom/iuh/context_map.h index 8d957d6..6279b91 100644 --- a/include/osmocom/iuh/context_map.h +++ b/include/osmocom/iuh/context_map.h @@ -8,8 +8,13 @@ MAP_S_ACTIVE, /* currently active map */ MAP_S_RESERVED1, /* just disconnected, still resrved */ MAP_S_RESERVED2, /* still reserved */ + MAP_S_NUM_STATES /* Number of states, keep this at the end */ }; +extern const struct value_string hnbgw_context_map_state_names[]; +static inline const char *hnbgw_context_map_state_name(enum hnbgw_context_map_state val) +{ return get_value_string(hnbgw_context_map_state_names, val); } + struct hnb_context; struct hnbgw_cnlink; diff --git a/src/context_map.c b/src/context_map.c index b90f555..0c891cf 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -27,6 +27,14 @@ #include #include +const struct value_string hnbgw_context_map_state_names[] = { + {MAP_S_NULL , "not-initialized"}, + {MAP_S_ACTIVE , "active"}, + {MAP_S_RESERVED1, "inactive-reserved"}, + {MAP_S_RESERVED2, "inactive-discard"}, + {0, NULL} +}; + /* is a given SCCP USER SAP Connection ID in use for a given CN link? */ static int cn_id_in_use(struct hnbgw_cnlink *cn, uint32_t id) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index d50c4a5..4e512e4 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -157,9 +157,26 @@ talloc_free(name); } +static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, + unsigned int state_count[]) +{ + unsigned int i; + if (!count) + return; + vty_out(vty, " %s: %u contexts:", name, count); + for (i = 0; i <= MAP_S_NUM_STATES; i++) { + if (!state_count[i]) + continue; + vty_out(vty, " %s:%u", hnbgw_context_map_state_name(i), state_count[i]); + } + vty_out(vty, VTY_NEWLINE); +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; + unsigned int map_count[2] = {}; + unsigned int state_count[2][MAP_S_NUM_STATES + 1] = {}; vty_out(vty, "HNB "); vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); @@ -169,11 +186,13 @@ hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); llist_for_each_entry(map, &hnb->map_list, hnb_list) { - vty_out(vty, " %s %u->%u (RUA->SUA) state=%u%s", - map->is_ps ? "IuPS" : "IuCS", - map->rua_ctx_id, map->scu_conn_id, - map->state, VTY_NEWLINE); + map_count[map->is_ps? 1 : 0]++; + state_count[map->is_ps? 1 : 0] + [(map->state >= 0 && map->state < MAP_S_NUM_STATES)? + map->state : MAP_S_NUM_STATES]++; } + vty_dump_hnb_info__map_states(vty, "IuCS", map_count[0], state_count[0]); + vty_dump_hnb_info__map_states(vty, "IuPS", map_count[1], state_count[1]); } static void vty_dump_ue_info(struct vty *vty, struct ue_context *ue) @@ -184,6 +203,7 @@ DEFUN(show_hnb, show_hnb_cmd, "show hnb all", SHOW_STR "Display information about a HNB") { struct hnb_context *hnb; + unsigned int count = 0; if (llist_empty(&g_hnb_gw->hnb_list)) { vty_out(vty, "No HNB connected%s", VTY_NEWLINE); @@ -192,8 +212,11 @@ llist_for_each_entry(hnb, &g_hnb_gw->hnb_list, list) { vty_dump_hnb_info(vty, hnb); + count++; } + vty_out(vty, "%u HNB connected%s", count, VTY_NEWLINE); + return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/5573 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:00 +0000 Subject: [MERGED] osmo-iuh[master]: rua: discard context maps on id-Disconnect In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: rua: discard context maps on id-Disconnect ...................................................................... rua: discard context maps on id-Disconnect When an id-Disconnect is received, the RUA to SCCP user context becomes unused. Mark the context map as inactive in that case. It will be cleaned up by the context map garbage collector. Related: OS#2776 Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77 --- M src/hnbgw_rua.c 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 305b8cc..1d0ffbd 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -185,6 +185,7 @@ struct hnbgw_cnlink *cn = hnb->gw->sccp.cnlink; struct osmo_sccp_addr *remote_addr; bool is_ps; + bool release_context_map = false; int rc; switch (cN_DomainIndicator) { @@ -239,6 +240,7 @@ case OSMO_SCU_PRIM_N_DISCONNECT: prim->u.disconnect.conn_id = map->scu_conn_id; prim->u.disconnect.cause = cause; + release_context_map = true; break; case OSMO_SCU_PRIM_N_UNITDATA: prim->u.unitdata.called_addr = *remote_addr; @@ -261,6 +263,9 @@ rc = osmo_sccp_user_sap_down(cn->sccp_user, &prim->oph); + if (release_context_map) + context_map_deactivate(map); + return rc; } -- To view, visit https://gerrit.osmocom.org/5575 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:01 +0000 Subject: [MERGED] osmo-iuh[master]: rua_to_scu(): don't create a context map for UNITDATA In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: rua_to_scu(): don't create a context map for UNITDATA ...................................................................... rua_to_scu(): don't create a context map for UNITDATA UNITDATA is connection-less, and as can be observed further below, the 'map' doesn't get used in the N_UNIDATA case. Related: OS#2776 Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50 --- M src/hnbgw_rua.c 1 file changed, 16 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 1d0ffbd..58bb23b 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -213,13 +213,21 @@ prim = (struct osmo_scu_prim *) msgb_put(msg, sizeof(*prim)); osmo_prim_init(&prim->oph, SCCP_SAP_USER, type, PRIM_OP_REQUEST, msg); - map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); - OSMO_ASSERT(map); - - DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u\n", - cn_domain_indicator_to_str(cN_DomainIndicator), - osmo_sccp_addr_dump(remote_addr), - map->rua_ctx_id, map->scu_conn_id); + switch (type) { + case OSMO_SCU_PRIM_N_UNITDATA: + DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u (unitdata, no scu_conn_id)\n", + cn_domain_indicator_to_str(cN_DomainIndicator), + osmo_sccp_addr_dump(remote_addr), + map->rua_ctx_id); + break; + default: + map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); + OSMO_ASSERT(map); + DEBUGP(DRUA, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u\n", + cn_domain_indicator_to_str(cN_DomainIndicator), + osmo_sccp_addr_dump(remote_addr), + map->rua_ctx_id, map->scu_conn_id); + } /* add primitive header */ switch (type) { @@ -263,7 +271,7 @@ rc = osmo_sccp_user_sap_down(cn->sccp_user, &prim->oph); - if (release_context_map) + if (map && release_context_map) context_map_deactivate(map); return rc; -- To view, visit https://gerrit.osmocom.org/5576 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:01 +0000 Subject: [MERGED] osmo-iuh[master]: segfault: context_map gc: use llist_for_each_entry_safe() In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: segfault: context_map gc: use llist_for_each_entry_safe() ...................................................................... segfault: context_map gc: use llist_for_each_entry_safe() The context map garbage collector removes entries from the list, hence it must use llist_for_each_entry_safe(). We haven't hit this before since nothing is yet flagging context maps to be discarded. Related: OS#2776 Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce --- M src/context_map.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/context_map.c b/src/context_map.c index 0c891cf..dca276a 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -146,10 +146,10 @@ { struct hnb_gw *gw = data; struct hnbgw_cnlink *cn = gw->sccp.cnlink; - struct hnbgw_context_map *map; + struct hnbgw_context_map *map, *next_map; DEBUGP(DMAIN, "Running context mapper garbage collection\n"); - llist_for_each_entry(map, &cn->map_list, cn_list) { + llist_for_each_entry_safe(map, next_map, &cn->map_list, cn_list) { switch (map->state) { case MAP_S_RESERVED1: /* first time we see this reserved -- To view, visit https://gerrit.osmocom.org/5574 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d5899923054d1bf862d542fec862fb1e6f07dce Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:01 +0000 Subject: [MERGED] osmo-iuh[master]: cosmetic: context_map_tmr_cb(): fix comment In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: context_map_tmr_cb(): fix comment ...................................................................... cosmetic: context_map_tmr_cb(): fix comment Change-Id: I4dd07a4d09d3cd4dc2a08e42ee48344967e5e3a6 --- M src/context_map.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/context_map.c b/src/context_map.c index dca276a..dc555bf 100644 --- a/src/context_map.c +++ b/src/context_map.c @@ -157,7 +157,7 @@ map->state = MAP_S_RESERVED2; break; case MAP_S_RESERVED2: - /* first time we see this reserved + /* second time we see this reserved * entry: remove it */ map->state = MAP_S_NULL; llist_del(&map->cn_list); -- To view, visit https://gerrit.osmocom.org/5577 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4dd07a4d09d3cd4dc2a08e42ee48344967e5e3a6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:01 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:01 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw config: add 'rnc-id' config item In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-hnbgw config: add 'rnc-id' config item ...................................................................... osmo-hnbgw config: add 'rnc-id' config item So far, the RNC-Id is hard-coded as 23. Still use 23 as default, but allow configuring by config file. Hence make it possible to run multiple osmo-hnbgw with differing RNC-Id each. Change-Id: I374f558cc4bb36055f39efe9c58ae1b9bd49da46 --- M src/hnbgw_vty.c 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 4e512e4..d41e3c0 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -239,6 +239,17 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_rnc_id, cfg_hnbgw_rnc_id_cmd, + "rnc-id <0-65535>", + "Configure the HNBGW's RNC Id, the common RNC Id used for all connected hNodeB. It is sent to" + " each hNodeB upon HNBAP HNB-Register-Accept, and the hNodeB will subsequently send this as" + " RANAP InitialUE Messages' GlobalRNC-ID IE. Takes effect as soon as the hNodeB re-registers.\n" + "RNC Id value\n") +{ + g_hnb_gw->config.rnc_id = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_hnbgw_iuh_local_ip, cfg_hnbgw_iuh_local_ip_cmd, "local-ip A.B.C.D", "Accept Iuh connections on local interface\n" "Local interface IP address (default: " HNBGW_LOCAL_IP_DEFAULT ")") @@ -345,6 +356,8 @@ install_element(CONFIG_NODE, &cfg_hnbgw_cmd); install_node(&hnbgw_node, config_write_hnbgw); + install_element(HNBGW_NODE, &cfg_hnbgw_rnc_id_cmd); + install_element(HNBGW_NODE, &cfg_hnbgw_iuh_cmd); install_node(&iuh_node, config_write_hnbgw_iuh); -- To view, visit https://gerrit.osmocom.org/5578 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I374f558cc4bb36055f39efe9c58ae1b9bd49da46 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:02 +0000 Subject: [MERGED] osmo-iuh[master]: osmo-hnbgw: startup: log the RNC-Id that is going to be used In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-hnbgw: startup: log the RNC-Id that is going to be used ...................................................................... osmo-hnbgw: startup: log the RNC-Id that is going to be used Change-Id: I8aeb93fe8037e5fdc0784f5fc3bdb527de3b76bd --- M src/hnbgw.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index ff3e2a9..752fc0f 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -485,6 +485,8 @@ exit(1); } + LOGP(DHNBAP, LOGL_NOTICE, "Using RNC-Id %u\n", g_hnb_gw->config.rnc_id); + OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", g_hnb_gw->config.iuh_local_ip, -- To view, visit https://gerrit.osmocom.org/5579 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8aeb93fe8037e5fdc0784f5fc3bdb527de3b76bd Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 13:45:02 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 13:45:02 +0000 Subject: [MERGED] osmo-iuh[master]: comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free ...................................................................... comments: hnbgw_rua.c: remove obsolete fixmes for asn1 free The comments are all right above the line that does the proper asn1 free step. Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b --- M src/hnbgw_rua.c 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c index 58bb23b..b2b8792 100644 --- a/src/hnbgw_rua.c +++ b/src/hnbgw_rua.c @@ -361,7 +361,7 @@ rc = rua_to_scu(hnb, ies.cN_DomainIndicator, OSMO_SCU_PRIM_N_CONNECT, context_id, 0, ies.ranaP_Message.buf, ies.ranaP_Message.size); - /* FIXME: what to do with the asn1c-allocated memory */ + rua_free_connecties(&ies); return rc; @@ -396,7 +396,6 @@ OSMO_SCU_PRIM_N_DISCONNECT, context_id, scu_cause, ranap_data, ranap_len); - /* FIXME: what to do with the asn1c-allocated memory */ rua_free_disconnecties(&ies); return rc; @@ -423,7 +422,6 @@ context_id, 0, ies.ranaP_Message.buf, ies.ranaP_Message.size); - /* FIXME: what to do with the asn1c-allocated memory */ rua_free_directtransferies(&ies); return rc; -- To view, visit https://gerrit.osmocom.org/5580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 14:02:20 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 14:02:20 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 6: > > why you want to make the py2 scripts py3 compatible > > Because it's 1) easy, 2) testable 3) makes them future proof when > python 2 is retired. py2->3 migration is more than print(), there's at least the handling of character encoding which is quite different as well. So you won't know that the migration worked out until you've actually run it with py3 (with some odd characters involved). try:..except: statements are different. and so forth... so I'm still a bit sceptical on the whole idea, but if you say it works... -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 14:03:36 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 14:03:36 +0000 Subject: python/osmo-python-tests[master]: Improve python3 compatibility In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121 Gerrit-PatchSet: 6 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 14:25:00 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 14:25:00 +0000 Subject: [PATCH] osmo-iuh[master]: vty typo: 'show hnb': SCTP stream, not SCCP stream Message-ID: Review at https://gerrit.osmocom.org/5585 vty typo: 'show hnb': SCTP stream, not SCCP stream Change-Id: Iceb29af9f4ef6b4b4ed9778bdd683d30c201371d --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/85/5585/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index d41e3c0..060319b 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -181,7 +181,7 @@ vty_out(vty, "HNB "); vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE); - vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCCP-stream:HNBAP=%u,RUA=%u%s", + vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCTP-stream:HNBAP=%u,RUA=%u%s", hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iceb29af9f4ef6b4b4ed9778bdd683d30c201371d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 18:25:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 18:25:21 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add getopt option parsing in preparation for a ... Message-ID: Review at https://gerrit.osmocom.org/5586 abisip-find: add getopt option parsing in preparation for a new option Subsequent patch I4201876431029b303dbd10e46492228379c9782a will add the -l cmdline option. Add getopt in a separate step here to keep the patch lean. Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 --- M src/ipaccess/abisip-find.c 1 file changed, 55 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/5586/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index c459161..46205dd 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -24,13 +24,63 @@ #include #include #include - +#include #include #include #include #include #include + +static struct { + const char *ifname; +} cmdline_opts = { + .ifname = NULL, +}; + +static void print_help() +{ + printf("\n"); + printf("Usage: abisip-find [-l] []\n"); + printf(" Specify the outgoing network interface,\n" + " e.g. 'eth0'\n"); +} + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "h", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(EXIT_SUCCESS); + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); + exit(EXIT_FAILURE); + break; + } + } + + if (argc - optind > 0) + cmdline_opts.ifname = argv[optind++]; + + if (argc - optind > 0) { + fprintf(stderr, "Error: too many arguments\n"); + print_help(); + exit(EXIT_FAILURE); + } +} static int udp_sock(const char *ifname) { @@ -173,22 +223,20 @@ int main(int argc, char **argv) { struct osmo_fd bfd; - char *ifname = NULL; int rc; printf("abisip-find (C) 2009 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); - if (argc < 2) { + handle_options(argc, argv); + + if (!cmdline_opts.ifname) fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); - } else { - ifname = argv[1]; - } bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; - bfd.fd = udp_sock(ifname); + bfd.fd = udp_sock(cmdline_opts.ifname); if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); -- To view, visit https://gerrit.osmocom.org/5586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 18:25:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 18:25:21 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add -l to list base stations instead of streami... Message-ID: Review at https://gerrit.osmocom.org/5587 abisip-find: add -l to list base stations instead of streaming replies To get an overview of what base stations are present in a network, particularly with many base stations being present, it is particularly useful to get a list of connected base stations instead of just output of received replies. Keep a sorted list of known base stations, which time out after 10 seconds. Print additions and removals, and total amount of replies received. On each change, print the entire list. Output a running total of replies received, to provide comfort to the reader that something is still happening, and to confirm that the shown listing is still up-to-date (updated on the same line by means of '\r'). It looks like: ----- Mon Dec 25 18:59:43 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' Total: 2 RX: 11 ----- Mon Dec 25 19:00:12 2017 LOST: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:12 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' Total: 1 RX: 15 ----- Mon Dec 25 19:00:28 2017 New: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:28 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' RX: 18 Change-Id: I4201876431029b303dbd10e46492228379c9782a --- M src/ipaccess/abisip-find.c 1 file changed, 140 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/87/5587/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 46205dd..2f8d80f 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -25,17 +25,22 @@ #include #include #include +#include +#include #include #include +#include #include #include #include static struct { const char *ifname; + bool list_view; } cmdline_opts = { .ifname = NULL, + .list_view = false, }; static void print_help() @@ -44,6 +49,9 @@ printf("Usage: abisip-find [-l] []\n"); printf(" Specify the outgoing network interface,\n" " e.g. 'eth0'\n"); + printf(" -l --list-view Instead of printing received responses,\n" + " output a sorted list of currently present\n" + " base stations and change events.\n"); } static void handle_options(int argc, char **argv) @@ -52,10 +60,11 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"list-view", 0, 0, 'l'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "h", + c = getopt_long(argc, argv, "hl", long_options, &option_index); if (c == -1) break; @@ -64,6 +73,9 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 'l': + cmdline_opts.list_view = true; + break; default: /* catch unknown options *as well as* missing arguments. */ fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); @@ -159,22 +171,137 @@ return sendto(fd, find_pkt, sizeof(find_pkt), 0, (struct sockaddr *) &sa, sizeof(sa)); } -static int parse_response(unsigned char *buf, int len) +static char *parse_response(void *ctx, unsigned char *buf, int len) { uint8_t t_len; uint8_t t_tag; uint8_t *cur = buf; + char *out = talloc_zero_size(ctx, 512); while (cur < buf + len) { t_len = *cur++; t_tag = *cur++; - printf("%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); + out = talloc_asprintf_append(out, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); cur += t_len; } - printf("\n"); - return 0; + + return out; +} + +struct base_station { + struct llist_head entry; + char *line; + time_t timestamp; +}; + +LLIST_HEAD(base_stations); + +void *ctx = NULL; + +void print_timestamp() +{ + time_t now = time(NULL); + printf("\n\n----- %s\n", ctime(&now)); +} + +struct base_station *base_station_parse(unsigned char *buf, int len) +{ + struct base_station *new_bs = talloc_zero(ctx, struct base_station); + new_bs->line = parse_response(new_bs, buf, len); + new_bs->timestamp = time(NULL); + return new_bs; +} + +bool base_stations_add(struct base_station *new_bs) +{ + struct base_station *bs; + + llist_for_each_entry(bs, &base_stations, entry) { + int c = strcmp(new_bs->line, bs->line); + if (!c) { + /* entry already exists. */ + bs->timestamp = new_bs->timestamp; + return false; + } + + if (c < 0) { + /* found the place to add the entry */ + break; + } + } + + print_timestamp(); + printf("New:\n%s\n", new_bs->line); + + llist_add_tail(&new_bs->entry, &bs->entry); + return true; +} + +bool base_stations_timeout() +{ + struct base_station *bs, *next_bs; + time_t now = time(NULL); + bool changed = false; + + llist_for_each_entry_safe(bs, next_bs, &base_stations, entry) { + if (now - bs->timestamp < 10) + continue; + print_timestamp(); + printf("LOST:\n%s\n", bs->line); + + llist_del(&bs->entry); + talloc_free(bs); + changed = true; + } + return changed; +} + +void base_stations_print() +{ + struct base_station *bs; + int count = 0; + + print_timestamp(); + llist_for_each_entry(bs, &base_stations, entry) { + printf("%3d: %s\n", count, bs->line); + count++; + } + printf("\nTotal: %d\n", count); +} + +static void base_stations_bump(bool known_changed) +{ + bool changed = known_changed; + if (base_stations_timeout()) + changed = true; + + if (changed) + base_stations_print(); +} + +static void handle_response(unsigned char *buf, int len) +{ + static unsigned int responses = 0; + responses++; + + if (cmdline_opts.list_view) { + bool changed = false; + struct base_station *bs = base_station_parse(buf, len); + if (base_stations_add(bs)) + changed = true; + else + talloc_free(bs); + base_stations_bump(changed); + printf("RX: %u \r", responses); + fflush(stdout); + } else { + char *line = parse_response(ctx, buf, len); + printf(line); + printf("\n"); + talloc_free(line); + } } static int read_response(int fd) @@ -195,7 +322,8 @@ if (buf[4] != IPAC_MSGT_ID_RESP) return 0; - return parse_response(buf+6, len-6); + handle_response(buf+6, len-6); + return 0; } static int bfd_cb(struct osmo_fd *bfd, unsigned int flags) @@ -217,6 +345,8 @@ bfd->when |= BSC_FD_WRITE; + base_stations_bump(false); + osmo_timer_schedule(&timer, 5, 0); } @@ -231,8 +361,10 @@ handle_options(argc, argv); if (!cmdline_opts.ifname) - fprintf(stdout, "you might need to specify the outgoing\n" - " network interface, e.g. ``%s eth0''\n", argv[0]); + fprintf(stdout, "- You might need to specify the outgoing\n" + " network interface, e.g. ``%s eth0''\n", argv[0]); + if (!cmdline_opts.list_view) + fprintf(stdout, "- You may find the --list-view option convenient.\n"); bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; -- To view, visit https://gerrit.osmocom.org/5587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4201876431029b303dbd10e46492228379c9782a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 18:25:21 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 18:25:21 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: update copyright Message-ID: Review at https://gerrit.osmocom.org/5588 abisip-find: update copyright Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 --- M src/ipaccess/abisip-find.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/88/5588/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 2f8d80f..cba8a7a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -1,6 +1,7 @@ /* ip.access nanoBTS configuration tool */ /* (C) 2009-2010 by Harald Welte + * (C) 2017 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -355,7 +356,8 @@ struct osmo_fd bfd; int rc; - printf("abisip-find (C) 2009 by Harald Welte\n"); + printf("abisip-find (C) 2009-2010 by Harald Welte\n"); + printf(" (C) 2017 by sysmocom - s.f.m.c. GmbH\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/5588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 18:25:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 18:25:22 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add timeout option Message-ID: Review at https://gerrit.osmocom.org/5589 abisip-find: add timeout option Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 --- M src/ipaccess/abisip-find.c 1 file changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/89/5589/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index cba8a7a..d94e18a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -39,9 +40,11 @@ static struct { const char *ifname; bool list_view; + time_t list_view_timeout; } cmdline_opts = { .ifname = NULL, .list_view = false, + .list_view_timeout = 10, }; static void print_help() @@ -53,6 +56,9 @@ printf(" -l --list-view Instead of printing received responses,\n" " output a sorted list of currently present\n" " base stations and change events.\n"); + printf(" -t --timeout Drop base stations after seconds of\n" + " receiving no more replies from it.\n" + " Implies --list-view.\n"); } static void handle_options(int argc, char **argv) @@ -62,10 +68,11 @@ static struct option long_options[] = { {"help", 0, 0, 'h'}, {"list-view", 0, 0, 'l'}, + {"timeout", 1, 0, 't'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hl", + c = getopt_long(argc, argv, "hlt:", long_options, &option_index); if (c == -1) break; @@ -74,6 +81,14 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 't': + errno = 0; + cmdline_opts.list_view_timeout = strtoul(optarg, NULL, 10); + if (errno) { + fprintf(stderr, "Invalid timeout value: %s\n", optarg); + exit(EXIT_FAILURE); + } + /* fall through to imply list-view: */ case 'l': cmdline_opts.list_view = true; break; @@ -247,7 +262,7 @@ bool changed = false; llist_for_each_entry_safe(bs, next_bs, &base_stations, entry) { - if (now - bs->timestamp < 10) + if (now - bs->timestamp < cmdline_opts.list_view_timeout) continue; print_timestamp(); printf("LOST:\n%s\n", bs->line); -- To view, visit https://gerrit.osmocom.org/5589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Dec 25 18:25:22 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 18:25:22 +0000 Subject: [PATCH] osmo-bsc[master]: abisip-find: add --interval option Message-ID: Review at https://gerrit.osmocom.org/5590 abisip-find: add --interval option Change-Id: I9540054bdda185b2585209289cee565f61f33dcf --- M src/ipaccess/abisip-find.c 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/5590/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index d94e18a..4d3e390 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -39,10 +39,12 @@ static struct { const char *ifname; + int send_interval; bool list_view; time_t list_view_timeout; } cmdline_opts = { .ifname = NULL, + .send_interval = 5, .list_view = false, .list_view_timeout = 10, }; @@ -53,6 +55,7 @@ printf("Usage: abisip-find [-l] []\n"); printf(" Specify the outgoing network interface,\n" " e.g. 'eth0'\n"); + printf(" -i --interval Send broadcast frames every seconds.\n"); printf(" -l --list-view Instead of printing received responses,\n" " output a sorted list of currently present\n" " base stations and change events.\n"); @@ -67,12 +70,13 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"send-interval", 1, 0, 'i'}, {"list-view", 0, 0, 'l'}, {"timeout", 1, 0, 't'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hlt:", + c = getopt_long(argc, argv, "hi:lt:", long_options, &option_index); if (c == -1) break; @@ -81,6 +85,14 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 'i': + errno = 0; + cmdline_opts.send_interval = strtoul(optarg, NULL, 10); + if (errno) { + fprintf(stderr, "Invalid interval value: %s\n", optarg); + exit(EXIT_FAILURE); + } + break; case 't': errno = 0; cmdline_opts.list_view_timeout = strtoul(optarg, NULL, 10); @@ -363,7 +375,7 @@ base_stations_bump(false); - osmo_timer_schedule(&timer, 5, 0); + osmo_timer_schedule(&timer, cmdline_opts.send_interval, 0); } int main(int argc, char **argv) @@ -382,6 +394,8 @@ " network interface, e.g. ``%s eth0''\n", argv[0]); if (!cmdline_opts.list_view) fprintf(stdout, "- You may find the --list-view option convenient.\n"); + else if (cmdline_opts.send_interval >= cmdline_opts.list_view_timeout) + fprintf(stdout, "\nWARNING: the --timeout should be larger than --interval.\n\n"); bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; @@ -398,7 +412,7 @@ } osmo_timer_setup(&timer, timer_cb, &bfd); - osmo_timer_schedule(&timer, 5, 0); + osmo_timer_schedule(&timer, cmdline_opts.send_interval, 0); printf("Trying to find ip.access BTS by broadcast UDP...\n"); -- To view, visit https://gerrit.osmocom.org/5590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9540054bdda185b2585209289cee565f61f33dcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From admin at opensuse.org Mon Dec 25 20:02:27 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:02:27 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a415966812c3_8cd9d2f601239163@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 264s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 264s] make[5]: *** [hnbgw_vty.o] Error 1 [ 264s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 264s] Makefile:628: recipe for target 'all-recursive' failed [ 264s] make[4]: *** [all-recursive] Error 1 [ 264s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 264s] Makefile:439: recipe for target 'all' failed [ 264s] make[3]: *** [all] Error 2 [ 264s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 264s] Makefile:440: recipe for target 'all-recursive' failed [ 264s] make[2]: *** [all-recursive] Error 1 [ 264s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 264s] Makefile:363: recipe for target 'all' failed [ 264s] make[1]: *** [all] Error 2 [ 264s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 264s] dh_auto_build: make -j1 returned exit code 2 [ 264s] debian/rules:9: recipe for target 'build' failed [ 264s] make: *** [build] Error 2 [ 264s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 264s] [ 264s] lamb19 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:02:11 UTC 2017. [ 264s] [ 264s] ### VM INTERACTION START ### [ 265s] Powering off. [ 265s] [ 257.632683] reboot: Power down [ 265s] ### VM INTERACTION END ### [ 265s] [ 265s] lamb19 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:02:13 UTC 2017. [ 265s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:04:45 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:04:45 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a4159e082583_8cd9d2f6012392b7@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 276s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 276s] make[5]: *** [hnbgw_vty.o] Error 1 [ 276s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 276s] Makefile:628: recipe for target 'all-recursive' failed [ 276s] make[4]: *** [all-recursive] Error 1 [ 276s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 276s] Makefile:439: recipe for target 'all' failed [ 276s] make[3]: *** [all] Error 2 [ 276s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 276s] Makefile:440: recipe for target 'all-recursive' failed [ 276s] make[2]: *** [all-recursive] Error 1 [ 276s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 276s] Makefile:363: recipe for target 'all' failed [ 276s] make[1]: *** [all] Error 2 [ 276s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 276s] dh_auto_build: make -j1 returned exit code 2 [ 276s] debian/rules:9: recipe for target 'build' failed [ 276s] make: *** [build] Error 2 [ 276s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 276s] [ 276s] lamb55 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:04:32 UTC 2017. [ 276s] [ 276s] ### VM INTERACTION START ### [ 277s] Powering off. [ 277s] [ 268.508556] reboot: Power down [ 277s] ### VM INTERACTION END ### [ 277s] [ 277s] lamb55 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:04:34 UTC 2017. [ 277s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:06:27 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:06:27 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a415a55711a7_8cd9d2f60123931b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 387s] cc1: some warnings being treated as errors [ 387s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 387s] make[5]: *** [hnbgw_vty.o] Error 1 [ 387s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 387s] Makefile:639: recipe for target 'all-recursive' failed [ 387s] make[4]: *** [all-recursive] Error 1 [ 387s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 387s] Makefile:451: recipe for target 'all' failed [ 387s] make[3]: *** [all] Error 2 [ 387s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 387s] Makefile:452: recipe for target 'all-recursive' failed [ 387s] make[2]: *** [all-recursive] Error 1 [ 387s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 387s] Makefile:376: recipe for target 'all' failed [ 387s] make[1]: *** [all] Error 2 [ 387s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 387s] dh_auto_build: make -j1 returned exit code 2 [ 387s] debian/rules:9: recipe for target 'build' failed [ 387s] make: *** [build] Error 2 [ 387s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 387s] [ 387s] wildcard2 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:06:19 UTC 2017. [ 387s] [ 387s] ### VM INTERACTION START ### [ 390s] [ 374.214571] reboot: Power down [ 391s] ### VM INTERACTION END ### [ 391s] [ 391s] wildcard2 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:06:23 UTC 2017. [ 391s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:07:36 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:07:36 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a415a93a58c4_8cd9d2f60123942c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 377s] cc1: some warnings being treated as errors [ 377s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 377s] make[5]: *** [hnbgw_vty.o] Error 1 [ 377s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 377s] Makefile:639: recipe for target 'all-recursive' failed [ 377s] make[4]: *** [all-recursive] Error 1 [ 377s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 377s] Makefile:451: recipe for target 'all' failed [ 377s] make[3]: *** [all] Error 2 [ 377s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 377s] Makefile:452: recipe for target 'all-recursive' failed [ 377s] make[2]: *** [all-recursive] Error 1 [ 377s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 377s] Makefile:376: recipe for target 'all' failed [ 377s] make[1]: *** [all] Error 2 [ 377s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 377s] dh_auto_build: make -j1 returned exit code 2 [ 377s] debian/rules:9: recipe for target 'build' failed [ 377s] make: *** [build] Error 2 [ 377s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 377s] [ 377s] wildcard3 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:07:22 UTC 2017. [ 377s] [ 377s] ### VM INTERACTION START ### [ 380s] [ 370.373181] reboot: Power down [ 381s] ### VM INTERACTION END ### [ 381s] [ 381s] wildcard3 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:07:27 UTC 2017. [ 381s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:08:10 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:08:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a415ab37db06_8cd9d2f60123955d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 526s] cc1: some warnings being treated as errors [ 526s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 526s] make[5]: *** [hnbgw_vty.o] Error 1 [ 526s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 526s] Makefile:639: recipe for target 'all-recursive' failed [ 526s] make[4]: *** [all-recursive] Error 1 [ 526s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 526s] Makefile:451: recipe for target 'all' failed [ 526s] make[3]: *** [all] Error 2 [ 526s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 526s] Makefile:452: recipe for target 'all-recursive' failed [ 526s] make[2]: *** [all-recursive] Error 1 [ 526s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 526s] Makefile:376: recipe for target 'all' failed [ 526s] make[1]: *** [all] Error 2 [ 526s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 526s] dh_auto_build: make -j1 returned exit code 2 [ 526s] debian/rules:9: recipe for target 'build' failed [ 526s] make: *** [build] Error 2 [ 526s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 526s] [ 526s] cloud101 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:07:54 UTC 2017. [ 526s] [ 526s] ### VM INTERACTION START ### [ 529s] [ 513.052515] reboot: Power down [ 530s] ### VM INTERACTION END ### [ 530s] [ 530s] cloud101 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:07:58 UTC 2017. [ 530s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:09:18 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:09:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a415b09b1ddb_8cd9d2f60123966c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 600s] cc1: some warnings being treated as errors [ 600s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 600s] make[5]: *** [hnbgw_vty.o] Error 1 [ 600s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 600s] Makefile:639: recipe for target 'all-recursive' failed [ 600s] make[4]: *** [all-recursive] Error 1 [ 600s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 600s] Makefile:451: recipe for target 'all' failed [ 600s] make[3]: *** [all] Error 2 [ 600s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 600s] Makefile:452: recipe for target 'all-recursive' failed [ 600s] make[2]: *** [all-recursive] Error 1 [ 600s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 600s] Makefile:376: recipe for target 'all' failed [ 600s] make[1]: *** [all] Error 2 [ 600s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 600s] dh_auto_build: make -j1 returned exit code 2 [ 600s] debian/rules:9: recipe for target 'build' failed [ 600s] make: *** [build] Error 2 [ 600s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 600s] [ 600s] lamb24 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:09:03 UTC 2017. [ 600s] [ 600s] ### VM INTERACTION START ### [ 603s] [ 594.381672] reboot: Power down [ 603s] ### VM INTERACTION END ### [ 603s] [ 603s] lamb24 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:09:06 UTC 2017. [ 603s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:09:52 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:09:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a415b2a4ac37_8cd9d2f601239717@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 583s] cc1: some warnings being treated as errors [ 583s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 583s] make[5]: *** [hnbgw_vty.o] Error 1 [ 583s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 583s] Makefile:639: recipe for target 'all-recursive' failed [ 583s] make[4]: *** [all-recursive] Error 1 [ 583s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 583s] Makefile:451: recipe for target 'all' failed [ 583s] make[3]: *** [all] Error 2 [ 583s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 583s] Makefile:452: recipe for target 'all-recursive' failed [ 583s] make[2]: *** [all-recursive] Error 1 [ 583s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 583s] Makefile:376: recipe for target 'all' failed [ 583s] make[1]: *** [all] Error 2 [ 583s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 583s] dh_auto_build: make -j1 returned exit code 2 [ 583s] debian/rules:9: recipe for target 'build' failed [ 583s] make: *** [build] Error 2 [ 583s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 583s] [ 583s] lamb56 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:09:43 UTC 2017. [ 583s] [ 583s] ### VM INTERACTION START ### [ 586s] [ 578.362871] reboot: Power down [ 586s] ### VM INTERACTION END ### [ 586s] [ 586s] lamb56 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:09:46 UTC 2017. [ 586s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:10:26 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:10:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a415b44cdc88_8cd9d2f6012398f9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 585s] cc1: some warnings being treated as errors [ 585s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 585s] make[5]: *** [hnbgw_vty.o] Error 1 [ 585s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 585s] Makefile:639: recipe for target 'all-recursive' failed [ 585s] make[4]: *** [all-recursive] Error 1 [ 585s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 585s] Makefile:451: recipe for target 'all' failed [ 585s] make[3]: *** [all] Error 2 [ 585s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 585s] Makefile:452: recipe for target 'all-recursive' failed [ 585s] make[2]: *** [all-recursive] Error 1 [ 585s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 585s] Makefile:376: recipe for target 'all' failed [ 585s] make[1]: *** [all] Error 2 [ 585s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 585s] dh_auto_build: make -j1 returned exit code 2 [ 585s] debian/rules:9: recipe for target 'build' failed [ 585s] make: *** [build] Error 2 [ 585s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 585s] [ 585s] lamb02 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:05 UTC 2017. [ 585s] [ 585s] ### VM INTERACTION START ### [ 588s] [ 580.175297] reboot: Power down [ 588s] ### VM INTERACTION END ### [ 588s] [ 588s] lamb02 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:09 UTC 2017. [ 588s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:10:26 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:10:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a415b451eab7_8cd9d2f601239992@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 612s] cc1: some warnings being treated as errors [ 612s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 612s] make[5]: *** [hnbgw_vty.o] Error 1 [ 612s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 612s] Makefile:639: recipe for target 'all-recursive' failed [ 612s] make[4]: *** [all-recursive] Error 1 [ 612s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 612s] Makefile:451: recipe for target 'all' failed [ 612s] make[3]: *** [all] Error 2 [ 612s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 612s] Makefile:452: recipe for target 'all-recursive' failed [ 612s] make[2]: *** [all-recursive] Error 1 [ 612s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 612s] Makefile:376: recipe for target 'all' failed [ 612s] make[1]: *** [all] Error 2 [ 612s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 612s] dh_auto_build: make -j1 returned exit code 2 [ 612s] debian/rules:9: recipe for target 'build' failed [ 612s] make: *** [build] Error 2 [ 612s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 612s] [ 612s] lamb61 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:05 UTC 2017. [ 612s] [ 612s] ### VM INTERACTION START ### [ 615s] [ 605.854013] reboot: Power down [ 615s] ### VM INTERACTION END ### [ 615s] [ 615s] lamb61 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:09 UTC 2017. [ 615s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:10:26 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:10:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a415b4593076_8cd9d2f601240019@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 534s] cc1: some warnings being treated as errors [ 534s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 534s] make[5]: *** [hnbgw_vty.o] Error 1 [ 534s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:639: recipe for target 'all-recursive' failed [ 534s] make[4]: *** [all-recursive] Error 1 [ 534s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:451: recipe for target 'all' failed [ 534s] make[3]: *** [all] Error 2 [ 534s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:452: recipe for target 'all-recursive' failed [ 534s] make[2]: *** [all-recursive] Error 1 [ 534s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 534s] Makefile:376: recipe for target 'all' failed [ 534s] make[1]: *** [all] Error 2 [ 534s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 534s] dh_auto_build: make -j1 returned exit code 2 [ 534s] debian/rules:9: recipe for target 'build' failed [ 534s] make: *** [build] Error 2 [ 534s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 534s] [ 534s] cloud118 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:11 UTC 2017. [ 534s] [ 534s] ### VM INTERACTION START ### [ 537s] [ 516.509639] reboot: Power down [ 539s] ### VM INTERACTION END ### [ 539s] [ 539s] cloud118 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:17 UTC 2017. [ 539s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:11:02 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:11:02 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a415b656e2dd_8cd9d2f60124017e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 618s] cc1: some warnings being treated as errors [ 618s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 618s] make[5]: *** [hnbgw_vty.o] Error 1 [ 618s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 618s] Makefile:639: recipe for target 'all-recursive' failed [ 618s] make[4]: *** [all-recursive] Error 1 [ 618s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 618s] Makefile:451: recipe for target 'all' failed [ 618s] make[3]: *** [all] Error 2 [ 618s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 618s] Makefile:452: recipe for target 'all-recursive' failed [ 618s] make[2]: *** [all-recursive] Error 1 [ 618s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 618s] Makefile:376: recipe for target 'all' failed [ 618s] make[1]: *** [all] Error 2 [ 618s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 618s] dh_auto_build: make -j1 returned exit code 2 [ 618s] debian/rules:9: recipe for target 'build' failed [ 618s] make: *** [build] Error 2 [ 618s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 618s] [ 618s] lamb60 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:54 UTC 2017. [ 618s] [ 618s] ### VM INTERACTION START ### [ 621s] [ 612.803808] reboot: Power down [ 621s] ### VM INTERACTION END ### [ 621s] [ 621s] lamb60 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:10:57 UTC 2017. [ 621s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:24:10 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:24:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a415e70398ef_8cd9d2f6012402c9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 1058s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 1058s] make[5]: *** [hnbgw_vty.o] Error 1 [ 1058s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 1058s] Makefile:639: recipe for target 'all-recursive' failed [ 1058s] make[4]: *** [all-recursive] Error 1 [ 1058s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 1058s] Makefile:451: recipe for target 'all' failed [ 1058s] make[3]: *** [all] Error 2 [ 1058s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 1058s] Makefile:452: recipe for target 'all-recursive' failed [ 1058s] make[2]: *** [all-recursive] Error 1 [ 1058s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 1058s] Makefile:376: recipe for target 'all' failed [ 1058s] make[1]: *** [all] Error 2 [ 1058s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1058s] dh_auto_build: make -j1 returned exit code 2 [ 1058s] debian/rules:9: recipe for target 'build' failed [ 1058s] make: *** [build] Error 2 [ 1058s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1058s] [ 1058s] obs-arm-1 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:24:01 UTC 2017. [ 1058s] [ 1058s] ### VM INTERACTION START ### [ 1061s] [ 1039.726650] sysrq: SysRq : Power Off [ 1061s] [ 1039.729617] reboot: Power down [ 1061s] ### VM INTERACTION END ### [ 1061s] [ 1061s] obs-arm-1 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:24:04 UTC 2017. [ 1061s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Dec 25 20:30:10 2017 From: admin at opensuse.org (OBS Notification) Date: Mon, 25 Dec 2017 20:30:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a415fd780fca_8cd9d2f6012406c4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 791s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 791s] make[5]: *** [hnbgw_vty.o] Error 1 [ 791s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 791s] Makefile:639: recipe for target 'all-recursive' failed [ 791s] make[4]: *** [all-recursive] Error 1 [ 791s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 791s] Makefile:451: recipe for target 'all' failed [ 791s] make[3]: *** [all] Error 2 [ 791s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 791s] Makefile:452: recipe for target 'all-recursive' failed [ 791s] make[2]: *** [all-recursive] Error 1 [ 791s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 791s] Makefile:376: recipe for target 'all' failed [ 791s] make[1]: *** [all] Error 2 [ 791s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 791s] dh_auto_build: make -j1 returned exit code 2 [ 791s] debian/rules:9: recipe for target 'build' failed [ 791s] make: *** [build] Error 2 [ 791s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 791s] [ 791s] armbuild26 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:30:00 UTC 2017. [ 791s] [ 791s] ### VM INTERACTION START ### [ 794s] [ 779.794601] SysRq : Power Off [ 794s] [ 779.802517] reboot: Power down [ 794s] ### VM INTERACTION END ### [ 794s] [ 794s] armbuild26 failed "build osmo-iuh_0.2.0.20171225.dsc" at Mon Dec 25 20:30:03 UTC 2017. [ 794s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Dec 25 22:27:57 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 22:27:57 +0000 Subject: osmo-iuh[master]: vty typo: 'show hnb': SCTP stream, not SCCP stream In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iceb29af9f4ef6b4b4ed9778bdd683d30c201371d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Dec 25 22:28:06 2017 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 25 Dec 2017 22:28:06 +0000 Subject: [MERGED] osmo-iuh[master]: vty typo: 'show hnb': SCTP stream, not SCCP stream In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: vty typo: 'show hnb': SCTP stream, not SCCP stream ...................................................................... vty typo: 'show hnb': SCTP stream, not SCCP stream Change-Id: Iceb29af9f4ef6b4b4ed9778bdd683d30c201371d --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index d41e3c0..060319b 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -181,7 +181,7 @@ vty_out(vty, "HNB "); vty_out_ofd_addr(vty, hnb->conn? osmo_stream_srv_get_ofd(hnb->conn) : NULL); vty_out(vty, " \"%s\"%s", hnb->identity_info, VTY_NEWLINE); - vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCCP-stream:HNBAP=%u,RUA=%u%s", + vty_out(vty, " MCC %u MNC %u LAC %u RAC %u SAC %u CID %u SCTP-stream:HNBAP=%u,RUA=%u%s", hnb->id.mcc, hnb->id.mnc, hnb->id.lac, hnb->id.rac, hnb->id.sac, hnb->id.cid, hnb->hnbap_stream, hnb->rua_stream, VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/5585 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iceb29af9f4ef6b4b4ed9778bdd683d30c201371d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 26 18:42:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 26 Dec 2017 18:42:00 +0000 Subject: [PATCH] osmo-iuh[master]: Add control interface Message-ID: Review at https://gerrit.osmocom.org/5591 Add control interface * add libosmoctrl dependency * bind control interface Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba --- M configure.ac M include/osmocom/iuh/hnbgw.h M src/Makefile.am M src/hnbgw.c 4 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/91/5591/1 diff --git a/configure.ac b/configure.ac index 4c5f47f..2b8974f 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0) +PKG_CHECK_MODULES(OSMOCTRL, libosmoctrl) PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(OSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(ASN1C, libasn1c >= 0.9.28) diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 58bdab4..f3970b0 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -120,6 +120,7 @@ const char *iups_remote_addr_name; uint16_t rnc_id; bool hnbap_allow_tmsi; + struct ctrl_handle *ctrl; } config; /*! SCTP listen socket for incoming connections */ struct osmo_stream_srv_link *iuh; diff --git a/src/Makefile.am b/src/Makefile.am index 85bfad6..2e57a8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ - $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOCTRL_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) # build the shared RANAP library @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..7e501fa 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -41,7 +41,10 @@ #include #include #include - +#include +#include +#include +#include #include #include #include @@ -477,6 +480,13 @@ exit(1); } + g_hnb_gw->config.ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + if (!g_hnb_gw->config.ctrl) { + LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", + ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); + exit(1); + } + ranap_set_log_area(DRANAP); rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max From admin at opensuse.org Tue Dec 26 20:08:24 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:08:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a42ac42812d4_8cd9d2f6013823df@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 260s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 260s] make[5]: *** [hnbgw_vty.o] Error 1 [ 260s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:628: recipe for target 'all-recursive' failed [ 260s] make[4]: *** [all-recursive] Error 1 [ 260s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:439: recipe for target 'all' failed [ 260s] make[3]: *** [all] Error 2 [ 260s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 260s] Makefile:440: recipe for target 'all-recursive' failed [ 260s] make[2]: *** [all-recursive] Error 1 [ 260s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 260s] Makefile:363: recipe for target 'all' failed [ 260s] make[1]: *** [all] Error 2 [ 260s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 260s] dh_auto_build: make -j1 returned exit code 2 [ 260s] debian/rules:9: recipe for target 'build' failed [ 260s] make: *** [build] Error 2 [ 260s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 260s] [ 260s] lamb64 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:08:11 UTC 2017. [ 260s] [ 260s] ### VM INTERACTION START ### [ 261s] Powering off. [ 261s] [ 253.231873] reboot: Power down [ 261s] ### VM INTERACTION END ### [ 261s] [ 261s] lamb64 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:08:13 UTC 2017. [ 261s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:09:15 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:09:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a42ac7c24fb9_8cd9d2f6013828fa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_8.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 271s] Makefile:599: recipe for target 'hnbgw_vty.o' failed [ 271s] make[5]: *** [hnbgw_vty.o] Error 1 [ 271s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:628: recipe for target 'all-recursive' failed [ 271s] make[4]: *** [all-recursive] Error 1 [ 271s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:439: recipe for target 'all' failed [ 271s] make[3]: *** [all] Error 2 [ 271s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 271s] Makefile:440: recipe for target 'all-recursive' failed [ 271s] make[2]: *** [all-recursive] Error 1 [ 271s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 271s] Makefile:363: recipe for target 'all' failed [ 271s] make[1]: *** [all] Error 2 [ 271s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 271s] dh_auto_build: make -j1 returned exit code 2 [ 271s] debian/rules:9: recipe for target 'build' failed [ 271s] make: *** [build] Error 2 [ 271s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 271s] [ 271s] lamb14 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:09:01 UTC 2017. [ 271s] [ 271s] ### VM INTERACTION START ### [ 272s] Powering off. [ 272s] [ 264.338378] reboot: Power down [ 272s] ### VM INTERACTION END ### [ 272s] [ 272s] lamb14 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:09:03 UTC 2017. [ 272s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:11:33 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:11:33 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a42ad1255457_8cd9d2f601383654@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 581s] cc1: some warnings being treated as errors [ 581s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 581s] make[5]: *** [hnbgw_vty.o] Error 1 [ 581s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:639: recipe for target 'all-recursive' failed [ 581s] make[4]: *** [all-recursive] Error 1 [ 581s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:451: recipe for target 'all' failed [ 581s] make[3]: *** [all] Error 2 [ 581s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 581s] Makefile:452: recipe for target 'all-recursive' failed [ 581s] make[2]: *** [all-recursive] Error 1 [ 581s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 581s] Makefile:376: recipe for target 'all' failed [ 581s] make[1]: *** [all] Error 2 [ 581s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 581s] dh_auto_build: make -j1 returned exit code 2 [ 581s] debian/rules:9: recipe for target 'build' failed [ 581s] make: *** [build] Error 2 [ 581s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 581s] [ 581s] lamb19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:12 UTC 2017. [ 581s] [ 581s] ### VM INTERACTION START ### [ 584s] [ 576.011197] reboot: Power down [ 584s] ### VM INTERACTION END ### [ 584s] [ 584s] lamb19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:15 UTC 2017. [ 584s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:11:50 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:11:50 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a42ad13c66b0_8cd9d2f601383961@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 555s] cc1: some warnings being treated as errors [ 555s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 555s] make[5]: *** [hnbgw_vty.o] Error 1 [ 555s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:639: recipe for target 'all-recursive' failed [ 555s] make[4]: *** [all-recursive] Error 1 [ 555s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:451: recipe for target 'all' failed [ 555s] make[3]: *** [all] Error 2 [ 555s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 555s] Makefile:452: recipe for target 'all-recursive' failed [ 555s] make[2]: *** [all-recursive] Error 1 [ 555s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 555s] Makefile:376: recipe for target 'all' failed [ 555s] make[1]: *** [all] Error 2 [ 555s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 555s] dh_auto_build: make -j1 returned exit code 2 [ 555s] debian/rules:9: recipe for target 'build' failed [ 555s] make: *** [build] Error 2 [ 555s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 555s] [ 555s] build32 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:42 UTC 2017. [ 555s] [ 555s] ### VM INTERACTION START ### [ 558s] [ 549.650254] reboot: Power down [ 559s] ### VM INTERACTION END ### [ 559s] [ 559s] build32 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:11:46 UTC 2017. [ 559s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:12:41 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:12:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a42ad4c5c86e_8cd9d2f6013843b1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 564s] cc1: some warnings being treated as errors [ 564s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 564s] make[5]: *** [hnbgw_vty.o] Error 1 [ 564s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:639: recipe for target 'all-recursive' failed [ 564s] make[4]: *** [all-recursive] Error 1 [ 564s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:451: recipe for target 'all' failed [ 564s] make[3]: *** [all] Error 2 [ 564s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 564s] Makefile:452: recipe for target 'all-recursive' failed [ 564s] make[2]: *** [all-recursive] Error 1 [ 564s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 564s] Makefile:376: recipe for target 'all' failed [ 564s] make[1]: *** [all] Error 2 [ 564s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 564s] dh_auto_build: make -j1 returned exit code 2 [ 564s] debian/rules:9: recipe for target 'build' failed [ 564s] make: *** [build] Error 2 [ 564s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 564s] [ 564s] lamb07 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:31 UTC 2017. [ 564s] [ 564s] ### VM INTERACTION START ### [ 567s] [ 559.595984] sysrq: SysRq : [ 559.602167] reboot: Power down [ 567s] ### VM INTERACTION END ### [ 567s] [ 567s] lamb07 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:34 UTC 2017. [ 567s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:12:58 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:12:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a42ad4d1830_8cd9d2f6013845f7@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 534s] cc1: some warnings being treated as errors [ 534s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 534s] make[5]: *** [hnbgw_vty.o] Error 1 [ 534s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:639: recipe for target 'all-recursive' failed [ 534s] make[4]: *** [all-recursive] Error 1 [ 534s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:451: recipe for target 'all' failed [ 534s] make[3]: *** [all] Error 2 [ 534s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 534s] Makefile:452: recipe for target 'all-recursive' failed [ 534s] make[2]: *** [all-recursive] Error 1 [ 534s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 534s] Makefile:376: recipe for target 'all' failed [ 534s] make[1]: *** [all] Error 2 [ 534s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 534s] dh_auto_build: make -j1 returned exit code 2 [ 534s] debian/rules:9: recipe for target 'build' failed [ 534s] make: *** [build] Error 2 [ 534s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 534s] [ 534s] cloud107 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:38 UTC 2017. [ 534s] [ 534s] ### VM INTERACTION START ### [ 537s] [ 515.542511] reboot: Power down [ 539s] ### VM INTERACTION END ### [ 539s] [ 539s] cloud107 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:43 UTC 2017. [ 539s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:12:58 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:12:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a42ad4d44e41_8cd9d2f6013846cd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 520s] cc1: some warnings being treated as errors [ 520s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 520s] make[5]: *** [hnbgw_vty.o] Error 1 [ 520s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:639: recipe for target 'all-recursive' failed [ 520s] make[4]: *** [all-recursive] Error 1 [ 520s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:451: recipe for target 'all' failed [ 520s] make[3]: *** [all] Error 2 [ 520s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 520s] Makefile:452: recipe for target 'all-recursive' failed [ 520s] make[2]: *** [all-recursive] Error 1 [ 520s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 520s] Makefile:376: recipe for target 'all' failed [ 520s] make[1]: *** [all] Error 2 [ 520s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 520s] dh_auto_build: make -j1 returned exit code 2 [ 520s] debian/rules:9: recipe for target 'build' failed [ 520s] make: *** [build] Error 2 [ 520s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 520s] [ 520s] lamb75 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:44 UTC 2017. [ 520s] [ 520s] ### VM INTERACTION START ### [ 523s] [ 516.070402] reboot: Power down [ 523s] ### VM INTERACTION END ### [ 523s] [ 523s] lamb75 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:12:48 UTC 2017. [ 523s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:13:32 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:13:32 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a42ad8a54c96_8cd9d2f601384743@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 602s] cc1: some warnings being treated as errors [ 602s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 602s] make[5]: *** [hnbgw_vty.o] Error 1 [ 602s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:639: recipe for target 'all-recursive' failed [ 602s] make[4]: *** [all-recursive] Error 1 [ 602s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:451: recipe for target 'all' failed [ 602s] make[3]: *** [all] Error 2 [ 602s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 602s] Makefile:452: recipe for target 'all-recursive' failed [ 602s] make[2]: *** [all-recursive] Error 1 [ 602s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 602s] Makefile:376: recipe for target 'all' failed [ 602s] make[1]: *** [all] Error 2 [ 602s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 602s] dh_auto_build: make -j1 returned exit code 2 [ 602s] debian/rules:9: recipe for target 'build' failed [ 602s] make: *** [build] Error 2 [ 602s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 602s] [ 602s] lamb13 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:17 UTC 2017. [ 602s] [ 602s] ### VM INTERACTION START ### [ 605s] [ 596.299132] reboot: Power down [ 605s] ### VM INTERACTION END ### [ 605s] [ 605s] lamb13 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:20 UTC 2017. [ 605s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:13:49 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:13:49 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a42ad8b1c0d_8cd9d2f60138493e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 566s] cc1: some warnings being treated as errors [ 566s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 566s] make[5]: *** [hnbgw_vty.o] Error 1 [ 566s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:639: recipe for target 'all-recursive' failed [ 566s] make[4]: *** [all-recursive] Error 1 [ 566s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:451: recipe for target 'all' failed [ 566s] make[3]: *** [all] Error 2 [ 566s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 566s] Makefile:452: recipe for target 'all-recursive' failed [ 566s] make[2]: *** [all-recursive] Error 1 [ 566s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 566s] Makefile:376: recipe for target 'all' failed [ 566s] make[1]: *** [all] Error 2 [ 566s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 566s] dh_auto_build: make -j1 returned exit code 2 [ 566s] debian/rules:9: recipe for target 'build' failed [ 566s] make: *** [build] Error 2 [ 566s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 566s] [ 566s] cloud105 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:27 UTC 2017. [ 566s] [ 566s] ### VM INTERACTION START ### [ 569s] [ 552.397373] reboot: Power down [ 571s] ### VM INTERACTION END ### [ 571s] [ 571s] cloud105 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:33 UTC 2017. [ 571s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:14:06 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:14:06 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a42ada496adb_8cd9d2f6013850ba@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 530s] cc1: some warnings being treated as errors [ 530s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 530s] make[5]: *** [hnbgw_vty.o] Error 1 [ 530s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:639: recipe for target 'all-recursive' failed [ 530s] make[4]: *** [all-recursive] Error 1 [ 530s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:451: recipe for target 'all' failed [ 530s] make[3]: *** [all] Error 2 [ 530s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 530s] Makefile:452: recipe for target 'all-recursive' failed [ 530s] make[2]: *** [all-recursive] Error 1 [ 530s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 530s] Makefile:376: recipe for target 'all' failed [ 530s] make[1]: *** [all] Error 2 [ 530s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 530s] dh_auto_build: make -j1 returned exit code 2 [ 530s] debian/rules:9: recipe for target 'build' failed [ 530s] make: *** [build] Error 2 [ 530s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 530s] [ 530s] cloud115 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:13:57 UTC 2017. [ 530s] [ 530s] ### VM INTERACTION START ### [ 534s] [ 516.785588] reboot: Power down [ 535s] ### VM INTERACTION END ### [ 535s] [ 535s] cloud115 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:03 UTC 2017. [ 535s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:14:40 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:14:40 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a42adc4856f_8cd9d2f601385350@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-iuh failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 538s] cc1: some warnings being treated as errors [ 538s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 538s] make[5]: *** [hnbgw_vty.o] Error 1 [ 538s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:639: recipe for target 'all-recursive' failed [ 538s] make[4]: *** [all-recursive] Error 1 [ 538s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:451: recipe for target 'all' failed [ 538s] make[3]: *** [all] Error 2 [ 538s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 538s] Makefile:452: recipe for target 'all-recursive' failed [ 538s] make[2]: *** [all-recursive] Error 1 [ 538s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 538s] Makefile:376: recipe for target 'all' failed [ 538s] make[1]: *** [all] Error 2 [ 538s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 538s] dh_auto_build: make -j1 returned exit code 2 [ 538s] debian/rules:9: recipe for target 'build' failed [ 538s] make: *** [build] Error 2 [ 538s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 538s] [ 538s] cloud137 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:34 UTC 2017. [ 538s] [ 538s] ### VM INTERACTION START ### [ 541s] [ 529.174556] reboot: Power down [ 542s] ### VM INTERACTION END ### [ 542s] [ 542s] cloud137 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:14:39 UTC 2017. [ 542s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Dec 26 20:31:50 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 20:31:50 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a42b1c24b900_8cd9d2f6013873ea@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 1010s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 1010s] make[5]: *** [hnbgw_vty.o] Error 1 [ 1010s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:639: recipe for target 'all-recursive' failed [ 1010s] make[4]: *** [all-recursive] Error 1 [ 1010s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:451: recipe for target 'all' failed [ 1010s] make[3]: *** [all] Error 2 [ 1010s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 1010s] Makefile:452: recipe for target 'all-recursive' failed [ 1010s] make[2]: *** [all-recursive] Error 1 [ 1010s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 1010s] Makefile:376: recipe for target 'all' failed [ 1010s] make[1]: *** [all] Error 2 [ 1010s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1010s] dh_auto_build: make -j1 returned exit code 2 [ 1010s] debian/rules:9: recipe for target 'build' failed [ 1010s] make: *** [build] Error 2 [ 1010s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1010s] [ 1010s] obs-arm-4 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:31:36 UTC 2017. [ 1010s] [ 1010s] ### VM INTERACTION START ### [ 1013s] [ 999.679824] sysrq: SysRq : Power Off [ 1013s] [ 999.682895] reboot: Power down [ 1013s] ### VM INTERACTION END ### [ 1013s] [ 1013s] obs-arm-4 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 20:31:39 UTC 2017. [ 1013s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 26 20:44:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 20:44:23 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code Message-ID: Review at https://gerrit.osmocom.org/5592 hnbgw_vty.c: cosmetic: Fix non-tab-indented code This was introduced a week ago in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 and is now cleaned up. Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 --- M src/hnbgw_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/92/5592/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 060319b..2c47bba 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -147,14 +147,14 @@ static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) { - char *name; - if (!ofd || ofd->fd < 0 + char *name; + if (!ofd || ofd->fd < 0 || !(name = osmo_sock_get_name(vty, ofd->fd))) { vty_out(vty, "(no addr)"); return; - } - vty_out(vty, name); - talloc_free(name); + } + vty_out(vty, name); + talloc_free(name); } static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 26 20:44:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 20:44:25 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() Message-ID: Review at https://gerrit.osmocom.org/5593 hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() We have to use a format string, we cannot directly print "name". Fixes a build error on our OBS builds: hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security] which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 about one week ago. Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/93/5593/1 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 2c47bba..859cd31 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -153,7 +153,7 @@ vty_out(vty, "(no addr)"); return; } - vty_out(vty, name); + vty_out(vty, "%s", name); talloc_free(name); } -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:15:14 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:15:14 +0000 Subject: osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:15:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:15:31 +0000 Subject: osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:15:36 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:15:36 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() ...................................................................... hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out() We have to use a format string, we cannot directly print "name". Fixes a build error on our OBS builds: hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security] which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 about one week ago. Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e --- M src/hnbgw_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 2c47bba..859cd31 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -153,7 +153,7 @@ vty_out(vty, "(no addr)"); return; } - vty_out(vty, name); + vty_out(vty, "%s", name); talloc_free(name); } -- To view, visit https://gerrit.osmocom.org/5593 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:15:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:15:37 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw_vty.c: cosmetic: Fix non-tab-indented code In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw_vty.c: cosmetic: Fix non-tab-indented code ...................................................................... hnbgw_vty.c: cosmetic: Fix non-tab-indented code This was introduced a week ago in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 and is now cleaned up. Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 --- M src/hnbgw_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 060319b..2c47bba 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -147,14 +147,14 @@ static void vty_out_ofd_addr(struct vty *vty, struct osmo_fd *ofd) { - char *name; - if (!ofd || ofd->fd < 0 + char *name; + if (!ofd || ofd->fd < 0 || !(name = osmo_sock_get_name(vty, ofd->fd))) { vty_out(vty, "(no addr)"); return; - } - vty_out(vty, name); - talloc_free(name); + } + vty_out(vty, name); + talloc_free(name); } static void vty_dump_hnb_info__map_states(struct vty *vty, const char *name, unsigned int count, -- To view, visit https://gerrit.osmocom.org/5592 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:16:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:16:56 +0000 Subject: osmo-bsc[master]: abisip-find: add getopt option parsing in preparation for a ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:18:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:18:34 +0000 Subject: osmo-bsc[master]: abisip-find: add -l to list base stations instead of streami... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4201876431029b303dbd10e46492228379c9782a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:19:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:19:03 +0000 Subject: osmo-bsc[master]: abisip-find: add timeout option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:20:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:20:46 +0000 Subject: osmo-bsc[master]: abisip-find: update copyright In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:20:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:20:59 +0000 Subject: [MERGED] osmo-bsc[master]: abisip-find: update copyright In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abisip-find: update copyright ...................................................................... abisip-find: update copyright Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 --- M src/ipaccess/abisip-find.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 2f8d80f..cba8a7a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -1,6 +1,7 @@ /* ip.access nanoBTS configuration tool */ /* (C) 2009-2010 by Harald Welte + * (C) 2017 by sysmocom - s.f.m.c. GmbH * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -355,7 +356,8 @@ struct osmo_fd bfd; int rc; - printf("abisip-find (C) 2009 by Harald Welte\n"); + printf("abisip-find (C) 2009-2010 by Harald Welte\n"); + printf(" (C) 2017 by sysmocom - s.f.m.c. GmbH\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); handle_options(argc, argv); -- To view, visit https://gerrit.osmocom.org/5588 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:20:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:20:59 +0000 Subject: [MERGED] osmo-bsc[master]: abisip-find: add timeout option In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add timeout option ...................................................................... abisip-find: add timeout option Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 --- M src/ipaccess/abisip-find.c 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index cba8a7a..d94e18a 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -39,9 +40,11 @@ static struct { const char *ifname; bool list_view; + time_t list_view_timeout; } cmdline_opts = { .ifname = NULL, .list_view = false, + .list_view_timeout = 10, }; static void print_help() @@ -53,6 +56,9 @@ printf(" -l --list-view Instead of printing received responses,\n" " output a sorted list of currently present\n" " base stations and change events.\n"); + printf(" -t --timeout Drop base stations after seconds of\n" + " receiving no more replies from it.\n" + " Implies --list-view.\n"); } static void handle_options(int argc, char **argv) @@ -62,10 +68,11 @@ static struct option long_options[] = { {"help", 0, 0, 'h'}, {"list-view", 0, 0, 'l'}, + {"timeout", 1, 0, 't'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hl", + c = getopt_long(argc, argv, "hlt:", long_options, &option_index); if (c == -1) break; @@ -74,6 +81,14 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 't': + errno = 0; + cmdline_opts.list_view_timeout = strtoul(optarg, NULL, 10); + if (errno) { + fprintf(stderr, "Invalid timeout value: %s\n", optarg); + exit(EXIT_FAILURE); + } + /* fall through to imply list-view: */ case 'l': cmdline_opts.list_view = true; break; @@ -247,7 +262,7 @@ bool changed = false; llist_for_each_entry_safe(bs, next_bs, &base_stations, entry) { - if (now - bs->timestamp < 10) + if (now - bs->timestamp < cmdline_opts.list_view_timeout) continue; print_timestamp(); printf("LOST:\n%s\n", bs->line); -- To view, visit https://gerrit.osmocom.org/5589 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:20:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:20:59 +0000 Subject: [MERGED] osmo-bsc[master]: abisip-find: add -l to list base stations instead of streami... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add -l to list base stations instead of streaming replies ...................................................................... abisip-find: add -l to list base stations instead of streaming replies To get an overview of what base stations are present in a network, particularly with many base stations being present, it is particularly useful to get a list of connected base stations instead of just output of received replies. Keep a sorted list of known base stations, which time out after 10 seconds. Print additions and removals, and total amount of replies received. On each change, print the entire list. Output a running total of replies received, to provide comfort to the reader that something is still happening, and to confirm that the shown listing is still up-to-date (updated on the same line by means of '\r'). It looks like: ----- Mon Dec 25 18:59:43 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' Total: 2 RX: 11 ----- Mon Dec 25 19:00:12 2017 LOST: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:12 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' Total: 1 RX: 15 ----- Mon Dec 25 19:00:28 2017 New: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:28 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' RX: 18 Change-Id: I4201876431029b303dbd10e46492228379c9782a --- M src/ipaccess/abisip-find.c 1 file changed, 140 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 46205dd..2f8d80f 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -25,17 +25,22 @@ #include #include #include +#include +#include #include #include +#include #include #include #include static struct { const char *ifname; + bool list_view; } cmdline_opts = { .ifname = NULL, + .list_view = false, }; static void print_help() @@ -44,6 +49,9 @@ printf("Usage: abisip-find [-l] []\n"); printf(" Specify the outgoing network interface,\n" " e.g. 'eth0'\n"); + printf(" -l --list-view Instead of printing received responses,\n" + " output a sorted list of currently present\n" + " base stations and change events.\n"); } static void handle_options(int argc, char **argv) @@ -52,10 +60,11 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"list-view", 0, 0, 'l'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "h", + c = getopt_long(argc, argv, "hl", long_options, &option_index); if (c == -1) break; @@ -64,6 +73,9 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 'l': + cmdline_opts.list_view = true; + break; default: /* catch unknown options *as well as* missing arguments. */ fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); @@ -159,22 +171,137 @@ return sendto(fd, find_pkt, sizeof(find_pkt), 0, (struct sockaddr *) &sa, sizeof(sa)); } -static int parse_response(unsigned char *buf, int len) +static char *parse_response(void *ctx, unsigned char *buf, int len) { uint8_t t_len; uint8_t t_tag; uint8_t *cur = buf; + char *out = talloc_zero_size(ctx, 512); while (cur < buf + len) { t_len = *cur++; t_tag = *cur++; - printf("%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); + out = talloc_asprintf_append(out, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); cur += t_len; } - printf("\n"); - return 0; + + return out; +} + +struct base_station { + struct llist_head entry; + char *line; + time_t timestamp; +}; + +LLIST_HEAD(base_stations); + +void *ctx = NULL; + +void print_timestamp() +{ + time_t now = time(NULL); + printf("\n\n----- %s\n", ctime(&now)); +} + +struct base_station *base_station_parse(unsigned char *buf, int len) +{ + struct base_station *new_bs = talloc_zero(ctx, struct base_station); + new_bs->line = parse_response(new_bs, buf, len); + new_bs->timestamp = time(NULL); + return new_bs; +} + +bool base_stations_add(struct base_station *new_bs) +{ + struct base_station *bs; + + llist_for_each_entry(bs, &base_stations, entry) { + int c = strcmp(new_bs->line, bs->line); + if (!c) { + /* entry already exists. */ + bs->timestamp = new_bs->timestamp; + return false; + } + + if (c < 0) { + /* found the place to add the entry */ + break; + } + } + + print_timestamp(); + printf("New:\n%s\n", new_bs->line); + + llist_add_tail(&new_bs->entry, &bs->entry); + return true; +} + +bool base_stations_timeout() +{ + struct base_station *bs, *next_bs; + time_t now = time(NULL); + bool changed = false; + + llist_for_each_entry_safe(bs, next_bs, &base_stations, entry) { + if (now - bs->timestamp < 10) + continue; + print_timestamp(); + printf("LOST:\n%s\n", bs->line); + + llist_del(&bs->entry); + talloc_free(bs); + changed = true; + } + return changed; +} + +void base_stations_print() +{ + struct base_station *bs; + int count = 0; + + print_timestamp(); + llist_for_each_entry(bs, &base_stations, entry) { + printf("%3d: %s\n", count, bs->line); + count++; + } + printf("\nTotal: %d\n", count); +} + +static void base_stations_bump(bool known_changed) +{ + bool changed = known_changed; + if (base_stations_timeout()) + changed = true; + + if (changed) + base_stations_print(); +} + +static void handle_response(unsigned char *buf, int len) +{ + static unsigned int responses = 0; + responses++; + + if (cmdline_opts.list_view) { + bool changed = false; + struct base_station *bs = base_station_parse(buf, len); + if (base_stations_add(bs)) + changed = true; + else + talloc_free(bs); + base_stations_bump(changed); + printf("RX: %u \r", responses); + fflush(stdout); + } else { + char *line = parse_response(ctx, buf, len); + printf(line); + printf("\n"); + talloc_free(line); + } } static int read_response(int fd) @@ -195,7 +322,8 @@ if (buf[4] != IPAC_MSGT_ID_RESP) return 0; - return parse_response(buf+6, len-6); + handle_response(buf+6, len-6); + return 0; } static int bfd_cb(struct osmo_fd *bfd, unsigned int flags) @@ -217,6 +345,8 @@ bfd->when |= BSC_FD_WRITE; + base_stations_bump(false); + osmo_timer_schedule(&timer, 5, 0); } @@ -231,8 +361,10 @@ handle_options(argc, argv); if (!cmdline_opts.ifname) - fprintf(stdout, "you might need to specify the outgoing\n" - " network interface, e.g. ``%s eth0''\n", argv[0]); + fprintf(stdout, "- You might need to specify the outgoing\n" + " network interface, e.g. ``%s eth0''\n", argv[0]); + if (!cmdline_opts.list_view) + fprintf(stdout, "- You may find the --list-view option convenient.\n"); bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; -- To view, visit https://gerrit.osmocom.org/5587 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4201876431029b303dbd10e46492228379c9782a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:21:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:21:00 +0000 Subject: [MERGED] osmo-bsc[master]: abisip-find: add getopt option parsing in preparation for a ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abisip-find: add getopt option parsing in preparation for a new option ...................................................................... abisip-find: add getopt option parsing in preparation for a new option Subsequent patch I4201876431029b303dbd10e46492228379c9782a will add the -l cmdline option. Add getopt in a separate step here to keep the patch lean. Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 --- M src/ipaccess/abisip-find.c 1 file changed, 55 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index c459161..46205dd 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -24,13 +24,63 @@ #include #include #include - +#include #include #include #include #include #include + +static struct { + const char *ifname; +} cmdline_opts = { + .ifname = NULL, +}; + +static void print_help() +{ + printf("\n"); + printf("Usage: abisip-find [-l] []\n"); + printf(" Specify the outgoing network interface,\n" + " e.g. 'eth0'\n"); +} + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static struct option long_options[] = { + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "h", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(EXIT_SUCCESS); + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting. Try --help.\n"); + exit(EXIT_FAILURE); + break; + } + } + + if (argc - optind > 0) + cmdline_opts.ifname = argv[optind++]; + + if (argc - optind > 0) { + fprintf(stderr, "Error: too many arguments\n"); + print_help(); + exit(EXIT_FAILURE); + } +} static int udp_sock(const char *ifname) { @@ -173,22 +223,20 @@ int main(int argc, char **argv) { struct osmo_fd bfd; - char *ifname = NULL; int rc; printf("abisip-find (C) 2009 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); - if (argc < 2) { + handle_options(argc, argv); + + if (!cmdline_opts.ifname) fprintf(stdout, "you might need to specify the outgoing\n" " network interface, e.g. ``%s eth0''\n", argv[0]); - } else { - ifname = argv[1]; - } bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; - bfd.fd = udp_sock(ifname); + bfd.fd = udp_sock(cmdline_opts.ifname); if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); -- To view, visit https://gerrit.osmocom.org/5586 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Tue Dec 26 21:22:24 2017 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Dec 2017 21:22:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a42bd962630c_8cd9d2f60138976f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-iuh failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 1153s] Makefile:610: recipe for target 'hnbgw_vty.o' failed [ 1153s] make[5]: *** [hnbgw_vty.o] Error 1 [ 1153s] make[5]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:639: recipe for target 'all-recursive' failed [ 1153s] make[4]: *** [all-recursive] Error 1 [ 1153s] make[4]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:451: recipe for target 'all' failed [ 1153s] make[3]: *** [all] Error 2 [ 1153s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 1153s] Makefile:452: recipe for target 'all-recursive' failed [ 1153s] make[2]: *** [all-recursive] Error 1 [ 1153s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 1153s] Makefile:376: recipe for target 'all' failed [ 1153s] make[1]: *** [all] Error 2 [ 1153s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1153s] dh_auto_build: make -j1 returned exit code 2 [ 1153s] debian/rules:9: recipe for target 'build' failed [ 1153s] make: *** [build] Error 2 [ 1153s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1153s] [ 1153s] armbuild19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 21:22:02 UTC 2017. [ 1153s] [ 1153s] ### VM INTERACTION START ### [ 1156s] [ 1105.864696] SysRq : Power Off [ 1156s] [ 1105.866114] reboot: Power down [ 1156s] ### VM INTERACTION END ### [ 1156s] [ 1156s] armbuild19 failed "build osmo-iuh_0.2.0.20171226.dsc" at Tue Dec 26 21:22:06 UTC 2017. [ 1156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:23:27 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:23:27 +0000 Subject: osmo-bsc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:23:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:23:42 +0000 Subject: osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 7 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:23:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:23:50 +0000 Subject: osmo-sgsn[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 Gerrit-PatchSet: 9 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:26:15 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:26:15 +0000 Subject: osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 21:26:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 21:26:59 +0000 Subject: osmo-sgsn[master]: gtphub: make rate_ctr unique In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5524 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e07f95c36de369bcd0691b8d0fd47c844abe5da Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Dec 26 22:21:54 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 22:21:54 +0000 Subject: [MERGED] osmo-sgsn[master]: cosmetic: use macro for gtphub plane iteration In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: use macro for gtphub plane iteration ...................................................................... cosmetic: use macro for gtphub plane iteration Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 --- M src/gprs/gtphub.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c index 5e962f2..76eebb1 100644 --- a/src/gprs/gtphub.c +++ b/src/gprs/gtphub.c @@ -1517,7 +1517,7 @@ int ie_mandatory = (p->type == GTP_CREATE_PDP_REQ); unsigned int side_idx = p->side_idx; - for (plane_idx = 0; plane_idx < 2; plane_idx++) { + for_each_plane(plane_idx) { int rc; struct gsn_addr use_addr; uint16_t use_port; -- To view, visit https://gerrit.osmocom.org/5528 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If82fcd9f6509da60e6f0d916fe107de1b38bfd18 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Dec 26 22:22:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 22:22:10 +0000 Subject: [MERGED] osmo-sgsn[master]: Use connection id when allocating rate counters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Use connection id when allocating rate counters ...................................................................... Use connection id when allocating rate counters Due to recent libosmocore's change we can't allocate rate counters with the same name and index which are already allocated. This causes sgsn_mm_ctx_alloc_iu() failure for multiple subscribers. Fix this by using conn_id parameter from ranap_ue_conn_ctx. Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Related: OS#2757 --- M src/gprs/gprs_sgsn.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 768d953..c4321f9 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -255,21 +255,23 @@ { #if BUILD_IU struct sgsn_mm_ctx *ctx; + struct ranap_ue_conn_ctx *ue_ctx = uectx; ctx = talloc_zero(tall_bsc_ctx, struct sgsn_mm_ctx); if (!ctx) return NULL; ctx->ran_type = MM_CTX_T_UTRAN_Iu; - ctx->iu.ue_ctx = uectx; + ctx->iu.ue_ctx = ue_ctx; ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; ctx->gmm_state = GMM_DEREGISTERED; ctx->pmm_state = PMM_DETACHED; ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL; - ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0); + ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, ue_ctx->conn_id); if (!ctx->ctrg) { - LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group\n"); + LOGMMCTXP(LOGL_ERROR, ctx, "Cannot allocate counter group for %s.%u\n", + mmctx_ctrg_desc.group_name_prefix, ue_ctx->conn_id); talloc_free(ctx); return NULL; } -- To view, visit https://gerrit.osmocom.org/5523 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1062ffdcac96c82269cab6f4e7ae50e28dc3aa44 Gerrit-PatchSet: 4 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Dec 26 22:23:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 22:23:08 +0000 Subject: osmo-iuh[master]: Add control interface In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5591/1/include/osmocom/iuh/hnbgw.h File include/osmocom/iuh/hnbgw.h: Line 123: struct ctrl_handle *ctrl; this is not really 'configuration' and hence doesn't belong into the 'config' structure. -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Dec 26 22:24:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 26 Dec 2017 22:24:17 +0000 Subject: osmo-bsc[master]: abisip-find: add --interval option In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5590/1/src/ipaccess/abisip-find.c File src/ipaccess/abisip-find.c: PS1, Line 90: send_interval might be worth to check for interval==0 and reject it -- To view, visit https://gerrit.osmocom.org/5590 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9540054bdda185b2585209289cee565f61f33dcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Dec 27 02:07:35 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 27 Dec 2017 02:07:35 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Send SMS through the primitive interface Message-ID: Review at https://gerrit.osmocom.org/5594 mobile: Send SMS through the primitive interface Make this symmetric and send the SMS through the primitive interface. Construct and copy the sms into the prim, store the SCA in the prim as well. In 04.11 we see we can store 2*10 digits in the destination address and a NUL. Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c M src/host/layer23/src/mobile/script_lua.c 5 files changed, 39 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/94/5594/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d3074fb..3ed6710 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -35,5 +35,7 @@ int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, const char *text, uint8_t msg_ref); +int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, + struct gsm_sms *sms); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 39b4945..034b202 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -62,6 +62,8 @@ struct mobile_sms_param { struct gsm_sms sms; + char sca[20+1]; /*sms; + + /* Force a NUL at the end of the string */ + param->sca[sizeof(param->sca) - 1] = '\0'; + + return gsm411_tx_sms_submit(intf->ms, param->sca, sms); +} + int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *prim) { int rc = 0; @@ -184,6 +197,9 @@ case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): rc = cancel_timer(intf, &prim->u.timer); break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_REQUEST): + rc = send_sms(intf, &prim->u.sms); + break; default: LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); break; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 1b80c48..14ab58f 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -372,7 +372,9 @@ static int lua_ms_sms_send_simple(lua_State *L) { const char *sms_sca, *number, *text; - int msg_ref, rc; + struct mobile_prim *prim; + struct gsm_sms *sms; + int msg_ref; luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); @@ -384,8 +386,21 @@ number = lua_tostring(L, -3); sms_sca = lua_tostring(L, -4); - rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); - lua_pushinteger(L, rc); + prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_REQUEST); + + sms = sms_from_text(number, 0, text); + if (!sms) { + lua_pushinteger(L, -ENOMEM); + msgb_free(prim->hdr.msg); + return 1; + } + + prim->u.sms.sms = *sms; + prim->u.sms.sms.msg_ref = msg_ref; + osmo_strlcpy(prim->u.sms.sca, sms_sca, sizeof(prim->u.sms.sca)); + mobile_prim_intf_req(get_primitive(L), prim); + + lua_pushinteger(L, 0); return 1; } -- To view, visit https://gerrit.osmocom.org/5594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Dec 27 02:52:55 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 27 Dec 2017 02:52:55 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Properly close the primitive interface on reload Message-ID: Review at https://gerrit.osmocom.org/5595 mobile: Properly close the primitive interface on reload When reloading a script go through script_lua_close. Get the primitive first. Then destruct the lua environment which will lead to GC (e.g. cancellation of timers) and then delete the primitive code. Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/5595/1 diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 14ab58f..9b256d3 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -510,10 +510,14 @@ int script_lua_close(struct osmocom_ms *ms) { + struct mobile_prim_intf *intf; + if (!ms->lua_state) return 0; + intf = get_primitive(ms->lua_state); lua_close(ms->lua_state); + mobile_prim_intf_free(intf); ms->lua_state = NULL; return 0; } @@ -523,8 +527,7 @@ struct mobile_prim_intf *intf; int err; - if (ms->lua_state) - lua_close(ms->lua_state); + script_lua_close(ms); ms->lua_state = lua_newstate(talloc_lua_alloc, ms); if (!ms->lua_state) return -1; @@ -550,7 +553,7 @@ vty_out(vty, "%% LUA execute error: %s%s", lua_tostring(ms->lua_state, -1), VTY_NEWLINE); lua_pop(ms->lua_state, 1); - return 3; + return -3; } return 0; -- To view, visit https://gerrit.osmocom.org/5595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Dec 27 02:52:55 2017 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 27 Dec 2017 02:52:55 +0000 Subject: [PATCH] osmocom-bb[master]: mobile: Add lua examples for basic functions that are available Message-ID: Review at https://gerrit.osmocom.org/5596 mobile: Add lua examples for basic functions that are available Link to Lua docs, link to our manual. Demo logging, timer, MS on/off, sms sending and sms receiving. For the MM state I will need to export constants/names to make this usable. Currently it is a bit of a hack (first time to MM_IDLE) to send a SMS. We would know when we attached though. Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff --- A doc/examples/mobile/lua_helloworld.lua A doc/examples/mobile/lua_ms_on_off.lua A doc/examples/mobile/lua_sms_on_attach.lua A doc/examples/mobile/lua_sms_receive.lua A doc/examples/mobile/lua_timer.lua 5 files changed, 91 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/96/5596/1 diff --git a/doc/examples/mobile/lua_helloworld.lua b/doc/examples/mobile/lua_helloworld.lua new file mode 100644 index 0000000..fd5abcc --- /dev/null +++ b/doc/examples/mobile/lua_helloworld.lua @@ -0,0 +1,9 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Standard print and log_* are forwarded to the Osmocom logging framework +print("Hellp from Lua"); +log_notice("Notice from lua"); +log_debug("Debug from Lua"); +log_error("Error from Lua"); +log_fatal("Fatal from Lua"); diff --git a/doc/examples/mobile/lua_ms_on_off.lua b/doc/examples/mobile/lua_ms_on_off.lua new file mode 100644 index 0000000..57e492d --- /dev/null +++ b/doc/examples/mobile/lua_ms_on_off.lua @@ -0,0 +1,23 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- Switch the MS on/off but this can only be done if the MS +-- is in the right state. This assumes that the MS is fully +-- connected and doesn't stall. + +local start = false +osmo.ms().start() +function toggle_ms_state() + timer = osmo.timeout(20, function() + if start then + print("STARTING", osmo.ms().start()) + start = false + else + print("STOPPING", osmo.ms().stop(true)) + start = true + end + toggle_ms_state() + end) +end +toggle_ms_state() diff --git a/doc/examples/mobile/lua_sms_on_attach.lua b/doc/examples/mobile/lua_sms_on_attach.lua new file mode 100644 index 0000000..8d73f2f --- /dev/null +++ b/doc/examples/mobile/lua_sms_on_attach.lua @@ -0,0 +1,32 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- State change +local sent_sms = false +function mm_cb(new_state, new_substate, old_substate) + -- The system has attached and returned to idle. Send a SMS the first time + -- it happens. + if new_state == 19 and new_substate == 1 then + if not sent_sms then + sent_sms = true + osmo.ms():sms_send_simple("1234", "21321324", "fooooooo", 23) + end + end +end + +-- Called when a new SMS arrives or status for delivery +-- is updated. Check the msg_ref field. +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +-- We need to register a callback +local cbs = { + Sms=sms_cb, + Mm=mm_cb +} +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_sms_receive.lua b/doc/examples/mobile/lua_sms_receive.lua new file mode 100644 index 0000000..4be4e0a --- /dev/null +++ b/doc/examples/mobile/lua_sms_receive.lua @@ -0,0 +1,15 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +local cbs = { + Sms=sms_cb, +} + +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_timer.lua b/doc/examples/mobile/lua_timer.lua new file mode 100644 index 0000000..1119af8 --- /dev/null +++ b/doc/examples/mobile/lua_timer.lua @@ -0,0 +1,12 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Start and stop timer with callback. Schedule a timeout and +-- resume execution then. + +-- Timeout in 10 seconds +local timer = osmo.timeout(10, function() + print("Timeout occurred"); +end) +-- We can cancel it. The callback will not be called +timer:cancel() -- To view, visit https://gerrit.osmocom.org/5596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed Dec 27 11:10:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 11:10:45 +0000 Subject: [MERGED] osmo-sgsn[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Migrate from OpenSSL to osmo_get_rand_id() ...................................................................... Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Related: OS#1694 Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 --- M configure.ac M debian/control M src/gprs/Makefile.am M src/gprs/gb_proxy.c M src/gprs/gprs_gmm.c M src/gprs/gprs_llc.c M src/gprs/gprs_sgsn.c M tests/gbproxy/Makefile.am M tests/gbproxy/gbproxy_test.c M tests/sgsn/Makefile.am M tests/sgsn/sgsn_test.c M tests/sndcp_xid/Makefile.am M tests/xid/Makefile.am 13 files changed, 57 insertions(+), 66 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 2de31cc..e886fa5 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0) PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) # Enable/disable 3G aka IuPS + IuCS support? AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])], diff --git a/debian/control b/debian/control index ce2167a..330945f 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,6 @@ automake, libtool, pkg-config, - libssl-dev, libtalloc-dev, libc-ares-dev, libgtp-dev, diff --git a/src/gprs/Makefile.am b/src/gprs/Makefile.am index 764acba..b0fca6f 100644 --- a/src/gprs/Makefile.am +++ b/src/gprs/Makefile.am @@ -15,7 +15,6 @@ $(LIBOSMOGB_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBCARES_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBGTP_CFLAGS) \ $(NULL) if BUILD_IU @@ -61,7 +60,6 @@ $(NULL) osmo_gbproxy_LDADD = \ $(OSMO_LIBS) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) @@ -97,7 +95,6 @@ $(OSMO_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 6a9bc22..63c3a61 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -50,8 +50,6 @@ #include #include -#include - extern void *tall_bsc_ctx; static const struct rate_ctr_desc global_ctr_description[] = { @@ -232,12 +230,13 @@ uint32_t sgsn_ptmsi) { uint32_t bss_ptmsi; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { bss_ptmsi = sgsn_ptmsi; } else { do { - if (RAND_bytes((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &bss_ptmsi, sizeof(bss_ptmsi)); + if (rc < 0) { bss_ptmsi = GSM_RESERVED_TMSI; break; } @@ -250,7 +249,7 @@ } if (bss_ptmsi == GSM_RESERVED_TMSI) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a BSS P-TMSI: %d (%s)\n", rc, strerror(-rc)); return bss_ptmsi; } @@ -260,7 +259,7 @@ uint32_t bss_tlli) { uint32_t sgsn_tlli; - int max_retries = 23; + int max_retries = 23, rc = 0; if (!peer->cfg->patch_ptmsi) { sgsn_tlli = bss_tlli; } else if (link_info->sgsn_tlli.ptmsi != GSM_RESERVED_TMSI && @@ -274,7 +273,8 @@ } else { do { /* create random TLLI, 0b01111xxx... */ - if (RAND_bytes((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)) != 1) { + rc = osmo_get_rand_id((uint8_t *) &sgsn_tlli, sizeof(sgsn_tlli)); + if (rc < 0) { sgsn_tlli = 0; break; } @@ -287,7 +287,7 @@ } if (!sgsn_tlli) - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate an SGSN TLLI: %d (%s)\n", rc, strerror(-rc)); return sgsn_tlli; } diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index f07b806..ead958e 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -31,8 +31,6 @@ #include #include -#include - #include "bscconfig.h" #include @@ -587,6 +585,7 @@ struct gsm48_hdr *gh; struct gsm48_auth_ciph_req *acreq; uint8_t *m_rand, *m_cksn, rbyte; + int rc; LOGMMCTXP(LOGL_INFO, mm, "<- GPRS AUTH AND CIPHERING REQ (rand = %s", osmo_hexdump(vec->rand, sizeof(vec->rand))); @@ -610,12 +609,13 @@ /* ? 10.5.5.7: */ acreq->force_stby = force_standby; /* 3GPP TS 24.008 ? 10.5.5.19: */ - if (RAND_bytes(&rbyte, 1) != 1) { - LOGP(DMM, LOGL_NOTICE, "RAND_bytes failed for A&C ref, falling " - "back to rand()\n"); - acreq->ac_ref_nr = rand(); - } else - acreq->ac_ref_nr = rbyte; + rc = osmo_get_rand_id(&rbyte, 1); + if (rc < 0) { + LOGP(DMM, LOGL_ERROR, "osmo_get_rand_id() failed for A&C ref: %s\n", strerror(-rc)); + return rc; + } + + acreq->ac_ref_nr = rbyte; mm->ac_ref_nr_used = acreq->ac_ref_nr; /* Only if authentication is requested we need to set RAND + CKSN */ @@ -2086,6 +2086,7 @@ { struct sgsn_mm_ctx *mm = _mm; struct gsm_auth_tuple *at; + int rc; mm->num_T_exp++; @@ -2130,8 +2131,11 @@ } at = &mm->auth_triplet; - gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); - osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); + rc = gsm48_tx_gmm_auth_ciph_req(mm, &at->vec, at->key_seq, false); + if (rc < 0) + LOGMMCTXP(LOGL_ERROR, mm, "failed sending Auth. & Ciph. Reuqest: %s \n", strerror(-rc)); + else + osmo_timer_schedule(&mm->timer, sgsn->cfg.timers.T3360, 0); break; case 3370: /* waiting for IDENTITY RESPONSE */ if (mm->num_T_exp >= 5) { diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c index 22743fe..1a7cf3d 100644 --- a/src/gprs/gprs_llc.c +++ b/src/gprs/gprs_llc.c @@ -23,8 +23,6 @@ #include #include -#include - #include #include #include @@ -1065,14 +1063,15 @@ struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); struct gprs_llc_lle *lle = &llme->lle[1]; uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ @@ -1098,14 +1097,15 @@ { struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); uint8_t xid_bytes[1024]; - int xid_bytes_len; + int xid_bytes_len, rc; uint8_t *xid; LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); - if (RAND_bytes((uint8_t *) &llme->iov_ui, 4) != 1) { - LOGP(DLLC, LOGL_NOTICE, "RAND_bytes failed for LLC XID reset, " - "falling back to rand()\n"); - llme->iov_ui = rand(); + + rc = osmo_get_rand_id((uint8_t *) &llme->iov_ui, 4); + if (rc < 0) { + LOGP(DLLC, LOGL_ERROR, "osmo_get_rand_id() failed for LLC XID reset: %s\n", strerror(-rc)); + return rc; } /* Generate XID message */ diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index c4321f9..688eaed 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -46,8 +46,6 @@ #include -#include - #include "../../bscconfig.h" #if BUILD_IU @@ -643,10 +641,11 @@ { struct sgsn_mm_ctx *mm; uint32_t ptmsi = 0xdeadbeef; - int max_retries = 100; + int max_retries = 100, rc = 0; restart: - if (RAND_bytes((uint8_t *) &ptmsi, sizeof(ptmsi)) != 1) + rc = osmo_get_rand_id((uint8_t *) &ptmsi, sizeof(ptmsi)); + if (rc < 0) goto failed; /* Enforce that the 2 MSB are set without loosing the distance between @@ -684,7 +683,7 @@ return ptmsi; failed: - LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI\n"); + LOGP(DGPRS, LOGL_ERROR, "Failed to allocate a P-TMSI: %d (%s)\n", rc, strerror(-rc)); return GSM_RESERVED_TMSI; } diff --git a/tests/gbproxy/Makefile.am b/tests/gbproxy/Makefile.am index 3291839..ef38fb6 100644 --- a/tests/gbproxy/Makefile.am +++ b/tests/gbproxy/Makefile.am @@ -28,7 +28,7 @@ $(NULL) gbproxy_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ $(NULL) gbproxy_test_LDADD = \ @@ -46,6 +46,5 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBRARY_DL) \ - $(LIBCRYPTO_LIBS) \ -lrt \ $(NULL) diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c index e8a4ef9..3ebdccb 100644 --- a/tests/gbproxy/gbproxy_test.c +++ b/tests/gbproxy/gbproxy_test.c @@ -37,8 +37,6 @@ #include #include -#include - #define REMOTE_BSS_ADDR 0x01020304 #define REMOTE_SGSN_ADDR 0x05060708 @@ -55,24 +53,23 @@ struct llist_head *received_messages = NULL; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } static int rand_seq_num = 0; -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { uint32_t val; OSMO_ASSERT(num == sizeof(val)); - OSMO_ASSERT(__real_RAND_bytes(buf, num) == 1); val = 0x00dead00 + rand_seq_num; diff --git a/tests/sgsn/Makefile.am b/tests/sgsn/Makefile.am index 36026dd..802811d 100644 --- a/tests/sgsn/Makefile.am +++ b/tests/sgsn/Makefile.am @@ -32,7 +32,7 @@ $(NULL) sgsn_test_LDFLAGS = \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ -Wl,--wrap=sgsn_update_subscriber_data \ -Wl,--wrap=gprs_subscr_request_update_location \ -Wl,--wrap=gprs_subscr_request_auth_info \ @@ -67,7 +67,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index a486794..219587a 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -100,21 +100,21 @@ return 0; } -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int mock_RAND_bytes(unsigned char *buf, int num); -int (*RAND_bytes_cb)(unsigned char *, int) = - &mock_RAND_bytes; +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *data, size_t len); +int mock_osmo_get_rand_id(uint8_t *data, size_t len); +int (*osmo_get_rand_id_cb)(uint8_t *, size_t) = + &mock_osmo_get_rand_id; -int __wrap_RAND_bytes(unsigned char *buf, int num) +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - return (*RAND_bytes_cb)(buf, num); + return (*osmo_get_rand_id_cb)(buf, num); } /* make results of A&C ref predictable */ -int mock_RAND_bytes(unsigned char *buf, int num) +int mock_osmo_get_rand_id(uint8_t *buf, size_t num) { if (num > 1) - return __real_RAND_bytes(buf, num); + return __real_osmo_get_rand_id(buf, num); buf[0] = 0; return 1; } diff --git a/tests/sndcp_xid/Makefile.am b/tests/sndcp_xid/Makefile.am index d09c41b..fbcb36c 100644 --- a/tests/sndcp_xid/Makefile.am +++ b/tests/sndcp_xid/Makefile.am @@ -14,7 +14,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt -lm diff --git a/tests/xid/Makefile.am b/tests/xid/Makefile.am index 6c3689f..92876ec 100644 --- a/tests/xid/Makefile.am +++ b/tests/xid/Makefile.am @@ -30,7 +30,6 @@ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOGB_LIBS) \ $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBGTP_LIBS) \ -lrt \ -lm \ -- To view, visit https://gerrit.osmocom.org/3821 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92 Gerrit-PatchSet: 10 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 27 11:11:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 11:11:00 +0000 Subject: [MERGED] osmo-bsc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Migrate from OpenSSL to osmo_get_rand_id() ...................................................................... Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Related: OS#1694 --- M configure.ac M contrib/jenkins.sh M debian/control M src/osmo-bsc_nat/Makefile.am M src/osmo-bsc_nat/bsc_nat.c M tests/channel/Makefile.am 6 files changed, 8 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 98f96bb..97b2e2f 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,6 @@ PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.3.2) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.2.0) PKG_CHECK_MODULES(LIBOSMOLEGACYMGCP, libosmo-legacy-mgcp >= 1.0.0) diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d7a41a8..873d1a5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -18,7 +18,7 @@ mkdir "$deps" || true -osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false +osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") diff --git a/debian/control b/debian/control index 5e9ad60..fae280a 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ libtool, pkg-config, python-minimal, - libssl-dev (>= 0.9.5), libtalloc-dev, libosmocore-dev (>= 0.10.0), libosmo-sccp-dev (>= 0.0.2), diff --git a/src/osmo-bsc_nat/Makefile.am b/src/osmo-bsc_nat/Makefile.am index 1bee68e..a941b58 100644 --- a/src/osmo-bsc_nat/Makefile.am +++ b/src/osmo-bsc_nat/Makefile.am @@ -12,7 +12,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOSCCP_CFLAGS) \ $(LIBOSMOLEGACYMGCP_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -49,7 +48,6 @@ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBRARY_GSM) \ -lrt \ $(NULL) diff --git a/src/osmo-bsc_nat/bsc_nat.c b/src/osmo-bsc_nat/bsc_nat.c index 1548ea3..5569d2f 100644 --- a/src/osmo-bsc_nat/bsc_nat.c +++ b/src/osmo-bsc_nat/bsc_nat.c @@ -74,8 +74,6 @@ #include -#include - #include "../../bscconfig.h" #define SCCP_CLOSE_TIME 20 @@ -208,7 +206,7 @@ 0x01, IPAC_IDTAG_UNITNAME, 0x01, IPAC_IDTAG_SERNR, }; - + int rc; uint8_t *mrand; uint8_t id_req[sizeof(s_id_req) + (2+16)]; uint8_t *buf = &id_req[sizeof(s_id_req)]; @@ -221,19 +219,17 @@ buf = v_put(buf, 0x23); mrand = bsc->last_rand; - if (RAND_bytes(mrand, 16) != 1) - goto failed_random; + rc = osmo_get_rand_id(mrand, 16); + if (rc < 0) { + /* the timeout will trigger and close this connection */ + LOGP(DNAT, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return; + } memcpy(buf, mrand, 16); buf += 16; bsc_send_data(bsc, id_req, sizeof(id_req), IPAC_PROTO_IPACCESS); - return; - -failed_random: - /* the timeout will trigger and close this connection */ - LOGP(DNAT, LOGL_ERROR, "Failed to read from urandom.\n"); - return; } static struct msgb *nat_create_rlsd(struct nat_sccp_connection *conn) diff --git a/tests/channel/Makefile.am b/tests/channel/Makefile.am index 395daf7..12f18f8 100644 --- a/tests/channel/Makefile.am +++ b/tests/channel/Makefile.am @@ -29,5 +29,4 @@ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(NULL) -- To view, visit https://gerrit.osmocom.org/3819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 27 11:11:15 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 11:11:15 +0000 Subject: [MERGED] osmo-msc[master]: Migrate from OpenSSL to osmo_get_rand_id() In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Migrate from OpenSSL to osmo_get_rand_id() ...................................................................... Migrate from OpenSSL to osmo_get_rand_id() This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. Related: OS#1694 Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 --- M configure.ac M debian/control M src/libmsc/Makefile.am M src/libmsc/auth.c M src/libmsc/db.c M src/libmsc/gsm_04_08.c M src/libvlr/Makefile.am M src/libvlr/vlr.c M src/osmo-msc/Makefile.am M tests/db/Makefile.am M tests/msc_vlr/Makefile.am M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/Makefile.am 13 files changed, 10 insertions(+), 27 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 49d06f5..feb3de9 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp) -PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5) PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.1.0) PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.12.0) diff --git a/debian/control b/debian/control index 60d468e..6219ea4 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,6 @@ pkg-config, libdbi-dev, libtalloc-dev, - libssl-dev (>= 0.9.5), libsmpp34-dev (>= 1.12), libasn1c-dev (>= 0.9.28), libosmocore-dev (>= 0.10.0), diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index 998df26..7dfb047 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -10,7 +10,6 @@ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c index 7b5367b..7c78c6e 100644 --- a/src/libmsc/auth.c +++ b/src/libmsc/auth.c @@ -28,8 +28,6 @@ #include #include -#include - #include const struct value_string auth_action_names[] = { diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 0cb8ff3..28004f7 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -42,8 +42,6 @@ #include #include -#include - static char *db_basename = NULL; static char *db_dirname = NULL; static dbi_conn conn; diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 26ac923..88472e0 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "bscconfig.h" diff --git a/src/libvlr/Makefile.am b/src/libvlr/Makefile.am index 511dfc0..e3d5ced 100644 --- a/src/libvlr/Makefile.am +++ b/src/libvlr/Makefile.am @@ -7,7 +7,6 @@ $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(COVERAGE_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(NULL) noinst_HEADERS = \ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 670ff83..8c6911a 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -31,8 +31,6 @@ #include #include -#include - #include #include #include @@ -275,12 +273,13 @@ { struct vlr_instance *vlr = vsub->vlr; uint32_t tmsi; - int tried; + int tried, rc; for (tried = 0; tried < 100; tried++) { - if (RAND_bytes((uint8_t *) &tmsi, sizeof(tmsi)) != 1) { - LOGP(DVLR, LOGL_ERROR, "RAND_bytes failed\n"); - return -1; + rc = osmo_get_rand_id((uint8_t *) &tmsi, sizeof(tmsi)); + if (rc < 0) { + LOGP(DDB, LOGL_ERROR, "osmo_get_rand_id() failed: %s\n", strerror(-rc)); + return rc; } /* throw the dice again, if the TSMI doesn't fit */ if (tmsi == GSM_RESERVED_TMSI) diff --git a/src/osmo-msc/Makefile.am b/src/osmo-msc/Makefile.am index e296f97..1d8bfbd 100644 --- a/src/osmo-msc/Makefile.am +++ b/src/osmo-msc/Makefile.am @@ -13,7 +13,6 @@ $(LIBOSMOCTRL_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -43,7 +42,6 @@ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBSMPP34_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ -ldbi \ diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index bcb66ec..720e005 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -42,6 +42,5 @@ $(LIBOSMOGSM_LIBS) \ $(LIBSMPP34_LIBS) \ $(LIBOSMOVTY_LIBS) \ - $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am index 8bbe6cb..3a2c859 100644 --- a/tests/msc_vlr/Makefile.am +++ b/tests/msc_vlr/Makefile.am @@ -9,7 +9,6 @@ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBSMPP34_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -30,7 +29,7 @@ -Wl,--wrap=ranap_iu_page_cs \ -Wl,--wrap=msc_stop_paging \ -Wl,--wrap=gsm340_gen_scts \ - -Wl,--wrap=RAND_bytes \ + -Wl,--wrap=osmo_get_rand_id \ -Wl,--wrap=msc_call_assignment \ -Wl,--wrap=msc_call_release \ $(NULL) @@ -43,7 +42,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 9cc61b1..ac850b3 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -257,11 +257,11 @@ } unsigned char next_rand_byte = 0; -/* override, requires '-Wl,--wrap=RAND_bytes' */ -int __real_RAND_bytes(unsigned char *buf, int num); -int __wrap_RAND_bytes(unsigned char *buf, int num) +/* override, requires '-Wl,--wrap=osmo_get_rand_id' */ +int __real_osmo_get_rand_id(uint8_t *buf, size_t num); +int __wrap_osmo_get_rand_id(uint8_t *buf, size_t num) { - int i; + size_t i; for (i = 0; i < num; i++) buf[i] = next_rand_byte++; return 1; diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index a912be1..8c538b0 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -8,7 +8,6 @@ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBCRYPTO_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ @@ -38,7 +37,6 @@ $(LIBSMPP34_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ - $(LIBCRYPTO_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ -- To view, visit https://gerrit.osmocom.org/3820 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71cd631704a4dc155c6c752fee2a42cd6e2fa336 Gerrit-PatchSet: 8 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Dec 27 11:32:54 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 11:32:54 +0000 Subject: [PATCH] osmo-iuh[master]: Add control interface In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5591 to look at the new patch set (#2). Add control interface * add libosmoctrl dependency * bind control interface Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba --- M configure.ac M include/osmocom/iuh/hnbgw.h M src/Makefile.am M src/hnbgw.c 4 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/91/5591/2 diff --git a/configure.ac b/configure.ac index 4c5f47f..2b8974f 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0) +PKG_CHECK_MODULES(OSMOCTRL, libosmoctrl) PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(OSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(ASN1C, libasn1c >= 0.9.28) diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 58bdab4..971ede4 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -129,7 +129,7 @@ struct llist_head ue_list; /* next availble UE Context ID */ uint32_t next_ue_ctx_id; - + struct ctrl_handle *ctrl; /* currently active CN links for CS and PS */ struct { struct osmo_sccp_instance *client; diff --git a/src/Makefile.am b/src/Makefile.am index 85bfad6..2e57a8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ - $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOCTRL_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) # build the shared RANAP library @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..d57c7e3 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -41,7 +41,10 @@ #include #include #include - +#include +#include +#include +#include #include #include #include @@ -477,6 +480,13 @@ exit(1); } + g_hnb_gw->ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + if (!g_hnb_gw->ctrl) { + LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", + ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); + exit(1); + } + ranap_set_log_area(DRANAP); rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Dec 27 12:25:02 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 12:25:02 +0000 Subject: [PATCH] osmo-msc[master]: VLR: log unhandled subscriber update Message-ID: Review at https://gerrit.osmocom.org/5597 VLR: log unhandled subscriber update Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 --- M src/libmsc/gsm_04_08.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/97/5597/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 88472e0..5102776 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3476,7 +3476,8 @@ /* VLR informs us that the subscriber data has somehow been modified */ static void msc_vlr_subscr_update(struct vlr_subscr *subscr) { - /* FIXME */ + LOGP(DMM, LOGL_ERROR, "FIXME: unhandled VLR update for IMSI=%s (%s, MSISDN=%s, used=%d)\n", + subscr->imsi, subscr->msisdn, subscr->name, subscr->use_count); } /* VLR informs us that the subscriber has been associated with a conn */ -- To view, visit https://gerrit.osmocom.org/5597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 27 15:03:17 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 15:03:17 +0000 Subject: [PATCH] osmo-msc[master]: VLR: log subscriber update In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5597 to look at the new patch set (#2). VLR: log subscriber update * move log helpers to generic header * log subscriber update It's handy for troubleshooting issues with subscriber update via GSUP from HLR. Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr.c M src/libvlr/vlr_core.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 15 files changed, 62 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/97/5597/2 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 1b365a9..d094122 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -12,6 +12,12 @@ // for GSM_NAME_LENGTH #include +#define LOGGSUPP(level, gsup, fmt, args...) \ + LOGP(DVLR, level, "GSUP(%s) " fmt, (gsup)->imsi, ## args) + +#define LOGVSUBP(level, vsub, fmt, args...) \ + LOGP(DVLR, level, "SUBSCR(%s) " fmt, vlr_subscr_name(vsub), ## args) + struct log_target; /* from 3s to 10s */ diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 88472e0..3045f71 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3476,7 +3476,8 @@ /* VLR informs us that the subscriber data has somehow been modified */ static void msc_vlr_subscr_update(struct vlr_subscr *subscr) { - /* FIXME */ + LOGVSUBP(LOGL_NOTICE, subscr, "VLR: update for IMSI=%s (MSISDN=%s, used=%d)\n", + subscr->imsi, subscr->msisdn, subscr->use_count); } /* VLR informs us that the subscriber has been associated with a conn */ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 8c6911a..73c3f13 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -651,7 +651,7 @@ unsigned idx; int rc; - if (gsup_msg->msisdn_enc) { + if (gsup_msg->msisdn_enc) {//FIXME: vlr_subscr_set_msisdn()? decode_bcd_number_safe(vsub->msisdn, sizeof(vsub->msisdn), gsup_msg->msisdn_enc, gsup_msg->msisdn_enc_len, 0); diff --git a/src/libvlr/vlr_core.h b/src/libvlr/vlr_core.h index 310cd97..bf6314d 100644 --- a/src/libvlr/vlr_core.h +++ b/src/libvlr/vlr_core.h @@ -4,16 +4,6 @@ struct osmo_gsup_message; -#define LOGGSUPP(level, gsup, fmt, args...) \ - LOGP(DVLR, level, "GSUP(%s) " fmt, \ - (gsup)->imsi, \ - ## args) - -#define LOGVSUBP(level, vsub, fmt, args...) \ - LOGP(DVLR, level, "SUBSCR(%s) " fmt, \ - vlr_subscr_name(vsub), ## args) - - const char *vlr_subscr_name(struct vlr_subscr *vsub); int vlr_subscr_req_lu(struct vlr_subscr *vsub, bool is_ps); int vlr_subscr_req_sai(struct vlr_subscr *vsub, const uint8_t *auts, diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 662074d..fac9623 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -80,6 +80,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -517,6 +518,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -960,6 +962,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1490,6 +1493,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -2034,6 +2038,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -2364,6 +2369,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index c7c7d8d..d17d44b 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -91,6 +91,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -439,6 +440,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index e6d64a2..bee4646 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -97,6 +97,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -544,6 +545,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -972,6 +974,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -1194,6 +1197,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1413,6 +1417,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1644,6 +1649,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 711ca48..d17f5ea 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -98,6 +98,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -583,6 +584,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1103,6 +1105,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1344,6 +1347,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1532,6 +1536,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index 50c1c73..812eb3b 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -232,6 +232,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -381,6 +382,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -533,6 +535,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -760,6 +763,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 4a30c91..439dc72 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -123,6 +123,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index f0c4116..4abcc18 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -183,6 +183,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -378,6 +379,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index e902065..0132461 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -38,6 +38,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -361,6 +362,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -695,6 +697,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -870,6 +873,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1042,6 +1046,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1256,6 +1261,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1413,6 +1419,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1602,6 +1609,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1764,6 +1772,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -1956,6 +1965,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index ea256bc..229cabe 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -82,6 +82,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -206,6 +207,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -336,6 +338,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -461,6 +464,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -575,6 +579,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -767,6 +772,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -961,6 +967,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1161,6 +1168,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1387,6 +1395,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1630,6 +1639,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index ce27bf1..f4e5f0e 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -125,6 +125,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -241,6 +242,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -405,6 +407,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 41bdf49..2c1741d 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -80,6 +80,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -551,6 +552,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1058,6 +1060,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1280,6 +1283,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 -- To view, visit https://gerrit.osmocom.org/5597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Dec 27 18:36:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 18:36:28 +0000 Subject: [PATCH] osmo-msc[master]: Add control command to expire subscriber Message-ID: Review at https://gerrit.osmocom.org/5598 Add control command to expire subscriber It's equivalent of existing vty command: common part is extracted into shared helper function. Change-Id: I267886b7c79ed6d9c2f34a2e60d2972b7f4f4036 --- M include/osmocom/msc/vlr.h M src/libmsc/ctrl_commands.c M src/libmsc/vty_interface_layer3.c M src/libvlr/vlr.c 4 files changed, 56 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/98/5598/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 1b365a9..0bc9f66 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -274,7 +274,7 @@ /* tell the VLR that the subscriber connection is gone */ int vlr_subscr_disconnected(struct vlr_subscr *vsub); - +bool vlr_subscr_expire(struct vlr_subscr *vsub); int vlr_subscr_rx_id_resp(struct vlr_subscr *vsub, const uint8_t *mi, size_t mi_len); int vlr_subscr_rx_auth_resp(struct vlr_subscr *vsub, bool is_r99, bool is_utran, const uint8_t *res, uint8_t res_len); diff --git a/src/libmsc/ctrl_commands.c b/src/libmsc/ctrl_commands.c index c6236ed..b0625bb 100644 --- a/src/libmsc/ctrl_commands.c +++ b/src/libmsc/ctrl_commands.c @@ -59,11 +59,49 @@ } CTRL_CMD_DEFINE_RO(subscriber_list, "subscriber-list-active-v1"); +CTRL_CMD_DEFINE_WO_NOVRF(sub_expire, "subscriber-expire"); +static int set_sub_expire(struct ctrl_cmd *cmd, void *data) +{ + struct vlr_subscr *vsub; + + if (!msc_ctrl_net) { + cmd->reply = "MSC CTRL commands not initialized"; + return CTRL_CMD_ERROR; + } + + if (!msc_ctrl_net->vlr) { + cmd->reply = "VLR not initialized"; + return CTRL_CMD_ERROR; + } + + vsub = vlr_subscr_find_by_imsi(msc_ctrl_net->vlr, cmd->value); + if (!vsub) { + LOGP(DCTRL, LOGL_ERROR, "Attempt to expire unknown subscriber IMSI=%s\n", cmd->value); + cmd->reply = "IMSI unknown"; + return CTRL_CMD_ERROR; + } + + LOGP(DCTRL, LOGL_NOTICE, "Expiring subscriber IMSI=%s\n", cmd->value); + + if (vlr_subscr_expire(vsub)) + LOGP(DCTRL, LOGL_NOTICE, "VLR released subscriber %s\n", vlr_subscr_name(vsub)); + + if (vsub->use_count > 1) + LOGP(DCTRL, LOGL_NOTICE, "Subscriber %s is still in use, should be released soon\n", + vlr_subscr_name(vsub)); + + vlr_subscr_put(vsub); + + return CTRL_CMD_REPLY; +} + int msc_ctrl_cmds_install(struct gsm_network *net) { int rc = 0; msc_ctrl_net = net; rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_subscriber_list); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_sub_expire); + return rc; } diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index 02a3600..068eeb5 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -579,12 +579,9 @@ return CMD_WARNING; } - if (vsub->lu_complete) { - vsub->lu_complete = false; - vlr_subscr_put(vsub); + if (vlr_subscr_expire(vsub)) vty_out(vty, "%% VLR released subscriber %s%s", vlr_subscr_name(vsub), VTY_NEWLINE); - } if (vsub->use_count > 1) vty_out(vty, "%% Subscriber %s is still in use," diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 8c6911a..25a3617 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -948,17 +948,28 @@ } } +bool vlr_subscr_expire(struct vlr_subscr *vsub) +{ + if (vsub->lu_complete) { + vsub->lu_complete = false; + vlr_subscr_put(vsub); + + return true; + } + + return false; +} + int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub) { /* paranoia: should any LU or PARQ FSMs still be running, stop them. */ vlr_subscr_cancel(vsub, GMM_CAUSE_IMPL_DETACHED); vsub->imsi_detached_flag = true; - if (vsub->lu_complete) { - vsub->lu_complete = false; - /* balancing the get from vlr_lu_compl_fsm_success() */ - vlr_subscr_put(vsub); - } + + /* balancing the get from vlr_lu_compl_fsm_success() */ + vlr_subscr_expire(vsub); + return 0; } -- To view, visit https://gerrit.osmocom.org/5598 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I267886b7c79ed6d9c2f34a2e60d2972b7f4f4036 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Dec 27 18:54:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 18:54:56 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#8). Update ctrl command parsing for python3 * make parse() return command id in addition to variable name and value * introduce parse_kv() wrapper which ignores that id and use it instead of old parse() * make parse() compatible with python3 where we got bytes, not string from the socket so we have to decode it properly before using split() * expand test_py3.py with simply asyn server which verifies that osmo_ctrl.py works properly Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M contrib/jenkins.sh M osmopy/osmo_ipa.py M scripts/osmo_ctrl.py M scripts/twisted_ipa.py M tests/test_py3.py 5 files changed, 85 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/8 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d18b19d..9734549 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -24,7 +24,7 @@ $PY3 $COM_FLAGS $f done -cd scripts -./osmo_ctrl.py --help +# Run async server which tests scripts/osmo_ctrl.py interaction +$PY3 tests/test_py3.py # TODO: add more tests diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..afabf67 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,23 +231,33 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data): + """ + Parse Ctrl string returning (id, var, value) tuple + var could be None in case of ERROR message + value could be None in case of GET message + both could be None in case of TRAP with non-zero id + """ + data = self.rem_header(raw_data).decode('utf-8') + (s, i, v) = data.split(' ', 2) + if s == self.CTRL_ERR: + return i, None, v + if s == self.CTRL_GET: + return i, v, None + if s == self.CTRL_GET + '_' + self.CTRL_REP: + return i, v, None + (s, i, var, val) = data.split(' ', 3) + if s == self.CTRL_TRAP and i != '0': + return i, None, None + return i, var, val + + def parse_kv(self, raw_data): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) + (i, var, val) = self.parse(raw_data) return var, val def trap(self, var, val): @@ -265,11 +275,19 @@ return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) + def reply(self, op_id, var, val=None): + """ + Make SET/GET command reply: returns assembled message + """ + if val is not None: + return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, self.CTRL_REP, op_id, var, val)) + return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, op_id, var)) + def verify(self, reply, r, var, val=None): """ Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value """ - (k, v) = self.parse(reply) + (k, v) = self.parse_kv(reply) if k != var or (val is not None and v != val): return False, v return True, v diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 8c0608f..ac20050 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -40,8 +40,8 @@ def do_set_get(sck, var, value = None): (r, c) = Ctrl().cmd(var, value) sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + ret = sck.recv(4096) + return (Ctrl().rem_header(ret),) + Ctrl().verify(ret, r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..533bfae 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse_kv(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) diff --git a/tests/test_py3.py b/tests/test_py3.py index cac2f93..3a96d9f 100644 --- a/tests/test_py3.py +++ b/tests/test_py3.py @@ -1,7 +1,51 @@ #!/usr/bin/env python3 -# just import a smoke test for osmopy +# just a smoke test for osmopy -import osmopy +import asyncio, random +from osmopy.osmo_ipa import Ctrl +from osmopy import __version__ -print('[Python3] Smoke test PASSED.') +class CtrlProtocol(asyncio.Protocol): + def connection_made(self, transport): + peername = transport.get_extra_info('peername') + print('Connection from {}'.format(peername)) + self.transport = transport + + def data_received(self, data): + (i, v, k) = Ctrl().parse(data) + if not k: + print('Ctrl GET received: %s' % v) + else: + print('Ctrl SET received: %s :: %s' % (v, k)) + + message = Ctrl().reply(i, v, k) + self.transport.write(message) + + self.transport.close() + # quit the loop gracefully + print('Closing the loop...') + loop.stop() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + test_host = '127.0.0.5' + test_port = str(random.randint(1025, 60000)) + + # Each client connection will create a new protocol instance + server = loop.run_until_complete(loop.create_server(CtrlProtocol, test_host, test_port)) + + print('Serving on {}...'.format(server.sockets[0].getsockname())) + + # Async client running in the subprocess plugged to the same event loop + loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d', test_host, '-p', test_port), loop = loop)) + + loop.run_forever() + + # Cleanup after loop is finished + server.close() + loop.run_until_complete(server.wait_closed()) + loop.close() + + print('[Python3] Smoke test PASSED for v%s' % __version__) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 8 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From admin at opensuse.org Wed Dec 27 19:59:53 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 19:59:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a43fbbe38798_8cd9d2f6014719e0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 51s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 51s] printf(line); [ 51s] ^~~~~~ [ 51s] cc1: some warnings being treated as errors [ 51s] Makefile:517: recipe for target 'abisip-find.o' failed [ 51s] make[4]: *** [abisip-find.o] Error 1 [ 51s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 51s] Makefile:408: recipe for target 'all-recursive' failed [ 51s] make[3]: *** [all-recursive] Error 1 [ 51s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 51s] Makefile:443: recipe for target 'all-recursive' failed [ 51s] make[2]: *** [all-recursive] Error 1 [ 51s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 51s] Makefile:375: recipe for target 'all' failed [ 51s] make[1]: *** [all] Error 2 [ 51s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 51s] dh_auto_build: make -j1 returned exit code 2 [ 51s] debian/rules:45: recipe for target 'build' failed [ 51s] make: *** [build] Error 2 [ 51s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 51s] [ 51s] build83 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 19:59:33 UTC 2017. [ 51s] [ 51s] ### VM INTERACTION START ### [ 54s] [ 50.025417] reboot: Power down [ 55s] ### VM INTERACTION END ### [ 55s] [ 55s] build83 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 19:59:37 UTC 2017. [ 55s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:00:10 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:00:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a43fbd7f1caa_8cd9d2f6014720c5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 111s] printf(line); [ 111s] ^ [ 111s] cc1: some warnings being treated as errors [ 111s] Makefile:506: recipe for target 'abisip-find.o' failed [ 111s] make[4]: *** [abisip-find.o] Error 1 [ 111s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 112s] Makefile:396: recipe for target 'all-recursive' failed [ 112s] make[3]: *** [all-recursive] Error 1 [ 112s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 112s] Makefile:431: recipe for target 'all-recursive' failed [ 112s] make[2]: *** [all-recursive] Error 1 [ 112s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 112s] Makefile:362: recipe for target 'all' failed [ 112s] make[1]: *** [all] Error 2 [ 112s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 112s] dh_auto_build: make -j1 returned exit code 2 [ 112s] debian/rules:45: recipe for target 'build' failed [ 112s] make: *** [build] Error 2 [ 112s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 112s] [ 112s] build31 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 19:59:59 UTC 2017. [ 112s] [ 112s] ### VM INTERACTION START ### [ 113s] Powering off. [ 113s] [ 105.962232] reboot: Power down [ 113s] ### VM INTERACTION END ### [ 113s] [ 113s] build31 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:00:01 UTC 2017. [ 113s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:01:35 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:01:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a43fc333596f_8cd9d2f6014721a8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 120s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 120s] printf(line); [ 120s] ^~~~~~ [ 120s] cc1: some warnings being treated as errors [ 120s] Makefile:517: recipe for target 'abisip-find.o' failed [ 120s] make[4]: *** [abisip-find.o] Error 1 [ 120s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 120s] Makefile:408: recipe for target 'all-recursive' failed [ 120s] make[3]: *** [all-recursive] Error 1 [ 120s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 120s] Makefile:443: recipe for target 'all-recursive' failed [ 120s] make[2]: *** [all-recursive] Error 1 [ 120s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 120s] Makefile:375: recipe for target 'all' failed [ 120s] make[1]: *** [all] Error 2 [ 120s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 120s] dh_auto_build: make -j1 returned exit code 2 [ 120s] debian/rules:45: recipe for target 'build' failed [ 120s] make: *** [build] Error 2 [ 120s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 120s] [ 120s] cloud130 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:01:29 UTC 2017. [ 120s] [ 120s] ### VM INTERACTION START ### [ 123s] [ 105.971757] reboot: Power down [ 125s] ### VM INTERACTION END ### [ 125s] [ 125s] cloud130 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:01:34 UTC 2017. [ 125s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:02:27 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:02:27 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a43fc6fb4518_8cd9d2f601472235@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 116s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 116s] printf(line); [ 116s] ^~~~~~ [ 116s] cc1: some warnings being treated as errors [ 116s] Makefile:517: recipe for target 'abisip-find.o' failed [ 116s] make[4]: *** [abisip-find.o] Error 1 [ 116s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 116s] Makefile:408: recipe for target 'all-recursive' failed [ 116s] make[3]: *** [all-recursive] Error 1 [ 116s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 116s] Makefile:443: recipe for target 'all-recursive' failed [ 116s] make[2]: *** [all-recursive] Error 1 [ 116s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 116s] Makefile:375: recipe for target 'all' failed [ 116s] make[1]: *** [all] Error 2 [ 116s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 116s] dh_auto_build: make -j1 returned exit code 2 [ 116s] debian/rules:45: recipe for target 'build' failed [ 116s] make: *** [build] Error 2 [ 116s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 116s] [ 116s] cloud129 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:06 UTC 2017. [ 116s] [ 116s] ### VM INTERACTION START ### [ 119s] [ 104.306828] reboot: Power down [ 119s] ### VM INTERACTION END ### [ 119s] [ 119s] cloud129 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:10 UTC 2017. [ 119s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:02:44 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:02:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a43fc701b746_8cd9d2f601472369@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 101s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 101s] printf(line); [ 101s] ^~~~~~ [ 101s] cc1: some warnings being treated as errors [ 101s] Makefile:517: recipe for target 'abisip-find.o' failed [ 101s] make[4]: *** [abisip-find.o] Error 1 [ 101s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 101s] Makefile:408: recipe for target 'all-recursive' failed [ 101s] make[3]: *** [all-recursive] Error 1 [ 101s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 101s] Makefile:443: recipe for target 'all-recursive' failed [ 101s] make[2]: *** [all-recursive] Error 1 [ 101s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 101s] Makefile:375: recipe for target 'all' failed [ 101s] make[1]: *** [all] Error 2 [ 101s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 101s] dh_auto_build: make -j1 returned exit code 2 [ 101s] debian/rules:45: recipe for target 'build' failed [ 101s] make: *** [build] Error 2 [ 101s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 101s] [ 101s] lamb55 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:23 UTC 2017. [ 101s] [ 101s] ### VM INTERACTION START ### [ 105s] [ 95.701562] reboot: Power down [ 105s] ### VM INTERACTION END ### [ 105s] [ 105s] lamb55 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:27 UTC 2017. [ 105s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:03:01 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:03:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a43fc8e80f76_8cd9d2f601472416@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 120s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 120s] printf(line); [ 120s] ^~~~~~ [ 120s] cc1: some warnings being treated as errors [ 120s] Makefile:517: recipe for target 'abisip-find.o' failed [ 120s] make[4]: *** [abisip-find.o] Error 1 [ 120s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 120s] Makefile:408: recipe for target 'all-recursive' failed [ 120s] make[3]: *** [all-recursive] Error 1 [ 120s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 120s] Makefile:443: recipe for target 'all-recursive' failed [ 120s] make[2]: *** [all-recursive] Error 1 [ 120s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 120s] Makefile:375: recipe for target 'all' failed [ 120s] make[1]: *** [all] Error 2 [ 120s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 120s] dh_auto_build: make -j1 returned exit code 2 [ 120s] debian/rules:45: recipe for target 'build' failed [ 120s] make: *** [build] Error 2 [ 120s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 120s] [ 120s] cloud118 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:43 UTC 2017. [ 120s] [ 120s] ### VM INTERACTION START ### [ 123s] [ 102.410125] reboot: Power down [ 125s] ### VM INTERACTION END ### [ 125s] [ 125s] cloud118 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:49 UTC 2017. [ 125s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:03:01 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:03:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a43fc8ec842f_8cd9d2f601472589@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 105s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 105s] printf(line); [ 105s] ^~~~~~ [ 105s] cc1: some warnings being treated as errors [ 105s] Makefile:517: recipe for target 'abisip-find.o' failed [ 105s] make[4]: *** [abisip-find.o] Error 1 [ 105s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 105s] Makefile:408: recipe for target 'all-recursive' failed [ 105s] make[3]: *** [all-recursive] Error 1 [ 105s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 105s] Makefile:443: recipe for target 'all-recursive' failed [ 105s] make[2]: *** [all-recursive] Error 1 [ 105s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 105s] Makefile:375: recipe for target 'all' failed [ 105s] make[1]: *** [all] Error 2 [ 105s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 105s] dh_auto_build: make -j1 returned exit code 2 [ 105s] debian/rules:45: recipe for target 'build' failed [ 105s] make: *** [build] Error 2 [ 105s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 105s] [ 105s] lamb64 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:45 UTC 2017. [ 105s] [ 105s] ### VM INTERACTION START ### [ 108s] [ 99.096847] reboot: Power down [ 108s] ### VM INTERACTION END ### [ 108s] [ 108s] lamb64 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:49 UTC 2017. [ 108s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:03:01 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:03:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a43fc8f28610_8cd9d2f601472633@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 111s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 111s] printf(line); [ 111s] ^ [ 111s] cc1: some warnings being treated as errors [ 111s] Makefile:517: recipe for target 'abisip-find.o' failed [ 111s] make[4]: *** [abisip-find.o] Error 1 [ 111s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 111s] Makefile:408: recipe for target 'all-recursive' failed [ 111s] make[3]: *** [all-recursive] Error 1 [ 111s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 111s] Makefile:443: recipe for target 'all-recursive' failed [ 111s] make[2]: *** [all-recursive] Error 1 [ 111s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 111s] Makefile:375: recipe for target 'all' failed [ 111s] make[1]: *** [all] Error 2 [ 111s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 111s] dh_auto_build: make -j1 returned exit code 2 [ 111s] debian/rules:45: recipe for target 'build' failed [ 111s] make: *** [build] Error 2 [ 111s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 111s] [ 111s] lamb61 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:55 UTC 2017. [ 111s] [ 111s] ### VM INTERACTION START ### [ 114s] [ 106.639981] reboot: Power down [ 114s] ### VM INTERACTION END ### [ 114s] [ 114s] lamb61 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:02:58 UTC 2017. [ 114s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:03:53 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:03:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a43fcadd35ec_8cd9d2f601472794@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 93s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 93s] printf(line); [ 93s] ^~~~~~ [ 93s] cc1: some warnings being treated as errors [ 93s] Makefile:517: recipe for target 'abisip-find.o' failed [ 93s] make[4]: *** [abisip-find.o] Error 1 [ 93s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 93s] Makefile:408: recipe for target 'all-recursive' failed [ 93s] make[3]: *** [all-recursive] Error 1 [ 93s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 93s] Makefile:443: recipe for target 'all-recursive' failed [ 93s] make[2]: *** [all-recursive] Error 1 [ 93s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 93s] Makefile:375: recipe for target 'all' failed [ 93s] make[1]: *** [all] Error 2 [ 93s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 93s] dh_auto_build: make -j1 returned exit code 2 [ 93s] debian/rules:45: recipe for target 'build' failed [ 93s] make: *** [build] Error 2 [ 93s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 93s] [ 94s] lamb08 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:03:41 UTC 2017. [ 94s] [ 94s] ### VM INTERACTION START ### [ 97s] [ 88.505508] reboot: Power down [ 97s] ### VM INTERACTION END ### [ 97s] [ 97s] lamb08 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:03:44 UTC 2017. [ 97s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:04:10 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:04:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a43fcc730725_8cd9d2f601472885@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 132s] printf(line); [ 132s] ^ [ 132s] cc1: some warnings being treated as errors [ 132s] Makefile:506: recipe for target 'abisip-find.o' failed [ 132s] make[4]: *** [abisip-find.o] Error 1 [ 132s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 132s] Makefile:396: recipe for target 'all-recursive' failed [ 132s] make[3]: *** [all-recursive] Error 1 [ 132s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 132s] Makefile:431: recipe for target 'all-recursive' failed [ 132s] make[2]: *** [all-recursive] Error 1 [ 132s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 132s] Makefile:362: recipe for target 'all' failed [ 132s] make[1]: *** [all] Error 2 [ 132s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 132s] dh_auto_build: make -j1 returned exit code 2 [ 132s] debian/rules:45: recipe for target 'build' failed [ 132s] make: *** [build] Error 2 [ 132s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 132s] [ 132s] cloud138 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:03:50 UTC 2017. [ 132s] [ 132s] ### VM INTERACTION START ### [ 133s] Powering off. [ 133s] [ 120.867533] reboot: Power down [ 134s] ### VM INTERACTION END ### [ 134s] [ 134s] cloud138 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:03:53 UTC 2017. [ 134s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:05:35 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:05:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a43fd221a1a0_8cd9d2f601472943@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 111s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 111s] printf(line); [ 111s] ^ [ 111s] cc1: some warnings being treated as errors [ 111s] Makefile:517: recipe for target 'abisip-find.o' failed [ 111s] make[4]: *** [abisip-find.o] Error 1 [ 111s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 111s] Makefile:408: recipe for target 'all-recursive' failed [ 111s] make[3]: *** [all-recursive] Error 1 [ 111s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 111s] Makefile:443: recipe for target 'all-recursive' failed [ 111s] make[2]: *** [all-recursive] Error 1 [ 111s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 111s] Makefile:375: recipe for target 'all' failed [ 111s] make[1]: *** [all] Error 2 [ 111s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 111s] dh_auto_build: make -j1 returned exit code 2 [ 111s] debian/rules:45: recipe for target 'build' failed [ 111s] make: *** [build] Error 2 [ 111s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 111s] [ 111s] lamb61 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:05:16 UTC 2017. [ 111s] [ 111s] ### VM INTERACTION START ### [ 114s] [ 105.831624] reboot: Power down [ 114s] ### VM INTERACTION END ### [ 114s] [ 114s] lamb61 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:05:19 UTC 2017. [ 114s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 20:16:27 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 20:16:27 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a43ffb915b7e_8cd9d2f601473682@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 237s] printf(line); [ 237s] ^~~~~~ [ 237s] cc1: some warnings being treated as errors [ 237s] Makefile:517: recipe for target 'abisip-find.o' failed [ 237s] make[4]: *** [abisip-find.o] Error 1 [ 237s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 237s] Makefile:408: recipe for target 'all-recursive' failed [ 237s] make[3]: *** [all-recursive] Error 1 [ 237s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 237s] Makefile:443: recipe for target 'all-recursive' failed [ 237s] make[2]: *** [all-recursive] Error 1 [ 237s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 237s] Makefile:375: recipe for target 'all' failed [ 237s] make[1]: *** [all] Error 2 [ 237s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 237s] dh_auto_build: make -j1 returned exit code 2 [ 237s] debian/rules:45: recipe for target 'build' failed [ 237s] make: *** [build] Error 2 [ 237s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 237s] [ 237s] armbuild17 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:16:22 UTC 2017. [ 237s] [ 237s] ### VM INTERACTION START ### [ 240s] [ 190.832257] SysRq : Power Off [ 240s] [ 190.833611] reboot: Power down [ 240s] ### VM INTERACTION END ### [ 240s] [ 240s] armbuild17 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 20:16:26 UTC 2017. [ 240s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Dec 27 21:17:40 2017 From: admin at opensuse.org (OBS Notification) Date: Wed, 27 Dec 2017 21:17:40 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a440e0266d5a_8cd9d2f60147778b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 190s] printf(line); [ 190s] ^~~~~~ [ 191s] cc1: some warnings being treated as errors [ 191s] Makefile:517: recipe for target 'abisip-find.o' failed [ 191s] make[4]: *** [abisip-find.o] Error 1 [ 191s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 191s] Makefile:408: recipe for target 'all-recursive' failed [ 191s] make[3]: *** [all-recursive] Error 1 [ 191s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 191s] Makefile:443: recipe for target 'all-recursive' failed [ 191s] make[2]: *** [all-recursive] Error 1 [ 191s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 191s] Makefile:375: recipe for target 'all' failed [ 191s] make[1]: *** [all] Error 2 [ 191s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 191s] dh_auto_build: make -j1 returned exit code 2 [ 191s] debian/rules:45: recipe for target 'build' failed [ 191s] make: *** [build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 191s] [ 191s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 21:17:25 UTC 2017. [ 191s] [ 191s] ### VM INTERACTION START ### [ 194s] [ 181.268121] sysrq: SysRq : Power Off [ 194s] [ 181.271039] reboot: Power down [ 194s] ### VM INTERACTION END ### [ 194s] [ 194s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171227.dsc" at Wed Dec 27 21:17:29 UTC 2017. [ 194s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Dec 27 21:55:56 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 27 Dec 2017 21:55:56 +0000 Subject: [PATCH] osmo-iuh[master]: Expand ctrl interface Message-ID: Review at https://gerrit.osmocom.org/5599 Expand ctrl interface Add commands to get number of connected HNBs and identity string of connected HNB based on Cell ID. Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9 --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c 2 files changed, 97 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/99/5599/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 971ede4..094f31f 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -6,7 +6,7 @@ #include #include #include - +#include #define DEBUG #include @@ -18,6 +18,10 @@ DRANAP, }; +enum hnb_ctrl_node { + CTRL_NODE_HNB = _LAST_CTRL_NODE, + _LAST_CTRL_NODE_HNB +}; #define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" /* TODO: CS and PS now both connect to OsmoSTP, i.e. that's always going to be the same address. Drop the @@ -142,6 +146,9 @@ extern void *talloc_asn1_ctx; +struct hnb_context *hnb_context_by_id(struct hnb_gw *gw, uint32_t cid); +unsigned hnb_contexts(const struct hnb_gw *gw); + struct ue_context *ue_context_by_id(struct hnb_gw *gw, uint32_t id); struct ue_context *ue_context_by_imsi(struct hnb_gw *gw, const char *imsi); struct ue_context *ue_context_by_tmsi(struct hnb_gw *gw, uint32_t tmsi); diff --git a/src/hnbgw.c b/src/hnbgw.c index d57c7e3..afbb5a7 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -93,6 +93,30 @@ return gw; } +struct hnb_context *hnb_context_by_id(struct hnb_gw *gw, uint32_t cid) +{ + struct hnb_context *hnb; + + llist_for_each_entry(hnb, &gw->hnb_list, list) { + if (hnb->id.cid == cid) + return hnb; + } + + return NULL; +} + +unsigned hnb_contexts(const struct hnb_gw *gw) +{ + unsigned num_ctx = 0; + struct hnb_context *hnb; + + llist_for_each_entry(hnb, &gw->hnb_list, list) { + num_ctx++; + } + + return num_ctx; +} + struct ue_context *ue_context_by_id(struct hnb_gw *gw, uint32_t id) { struct ue_context *ue; @@ -423,6 +447,63 @@ } } +CTRL_CMD_DEFINE_RO(hnb_info, "info"); +static int get_hnb_info(struct ctrl_cmd *cmd, void *data) +{ + struct hnb_context *hnb = data; + + cmd->reply = talloc_strdup(cmd, hnb->identity_info); + + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_RO(hnbs, "num-hnb"); +static int get_hnbs(struct ctrl_cmd *cmd, void *data) +{ + cmd->reply = talloc_asprintf(cmd, "%u", hnb_contexts(data)); + + return CTRL_CMD_REPLY; +} + +int hnb_ctrl_cmds_install() +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_hnbs); + rc |= ctrl_cmd_install(CTRL_NODE_HNB, &cmd_hnb_info); + + return rc; +} + +static int hnb_ctrl_node_lookup(void *data, vector vline, int *node_type, void **node_data, int *i) +{ + const char *token = vector_slot(vline, *i); + struct hnb_context *hnb; + long num; + + switch (*node_type) { + case CTRL_NODE_ROOT: + if (strcmp(token, "hnb") != 0) + return 0; + + (*i)++; + + if (!ctrl_parse_get_num(vline, *i, &num)) + return -ERANGE; + + hnb = hnb_context_by_id(data, num); + if (!hnb) + return -ENODEV; + + *node_data = hnb; + *node_type = CTRL_NODE_HNB; + break; + default: + return 0; + } + + return 1; +} int main(int argc, char **argv) { @@ -480,11 +561,18 @@ exit(1); } - g_hnb_gw->ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + g_hnb_gw->ctrl = ctrl_interface_setup_dynip2(g_hnb_gw, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, + hnb_ctrl_node_lookup, _LAST_CTRL_NODE_HNB); if (!g_hnb_gw->ctrl) { LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); exit(1); + } else { + rc = hnb_ctrl_cmds_install(); + if (rc) { + LOGP(DMAIN, LOGL_ERROR, "Failed to install CTRL interface commands\n"); + return 2; + } } ranap_set_log_area(DRANAP); -- To view, visit https://gerrit.osmocom.org/5599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:17:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:17:25 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_msg: We must parse endpoint numbers as hex, not decimal! Message-ID: Review at https://gerrit.osmocom.org/5600 mgcp_msg: We must parse endpoint numbers as hex, not decimal! The MGCP client uses hex numbers, while the server side parses it as decimal. This results in the first 10 calls succeeding, but from 0x0a onwards it of course fails :/ Change-Id: I006f5f5325f0a5069d02fec8912a38d943cfc552 Closes: OS#2784 --- M src/libosmo-mgcp/mgcp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/5600/1 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 17b1026..d6174df 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -192,7 +192,7 @@ if (strncmp(mgcp, "ds/e1", 5) == 0) return find_e1_endpoint(cfg, mgcp); - gw = strtoul(mgcp, &endptr, 10); + gw = strtoul(mgcp, &endptr, 16); if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@') return &cfg->trunk.endpoints[gw]; -- To view, visit https://gerrit.osmocom.org/5600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I006f5f5325f0a5069d02fec8912a38d943cfc552 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:29:46 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:29:46 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MGCP_Test: Test use of 30 endpoint numbers Message-ID: Review at https://gerrit.osmocom.org/5601 MGCP_Test: Test use of 30 endpoint numbers We used to have a big (OS#2784) where only endpoint numbers below 10 (0x0A) were working due to failed interpretation in hex/dec. Let's use up to 30 endpoints to ensure hex as well as two-digit digit numbers. Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579 --- M mgw/MGCP_Test.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/5601/1 diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 80f4c83..3a548c4 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -452,6 +452,32 @@ setverdict(pass); } + function f_crcx_and_dlcx_ep_callid_connid(MgcpEndpoint ep, MgcpCallId call_id) runs on dummy_CT { + var template MgcpCommand cmd; + var MgcpResponse resp; + + cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK); + + f_dlcx_ok(ep, call_id, extract_conn_id(resp)); + + setverdict(pass); + } + + testcase TC_crcx_dlcx_30ep() runs on dummy_CT { + var MgcpEndpoint ep; + var MgcpCallId call_id; + var integer ep_nr; + + f_init(); + + for (ep_nr := 1; ep_nr < 30; ep_nr := ep_nr+1) { + ep := hex2str(int2hex(ep_nr, 2)) & "@mgw"; + call_id := int2hex(ep_nr, 2) & '1234'H; + f_crcx_and_dlcx_ep_callid_connid(ep, call_id); + } + } + /* Test (valid) CRCX followed by (valid) DLCX containing EP+CallId */ testcase TC_crcx_and_dlcx_ep_callid() runs on dummy_CT { var template MgcpCommand cmd; -- To view, visit https://gerrit.osmocom.org/5601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:31:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:31:10 +0000 Subject: osmo-mgw[master]: mgcp_msg: We must parse endpoint numbers as hex, not decimal! In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I006f5f5325f0a5069d02fec8912a38d943cfc552 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:31:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:31:17 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_msg: We must parse endpoint numbers as hex, not decimal! In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp_msg: We must parse endpoint numbers as hex, not decimal! ...................................................................... mgcp_msg: We must parse endpoint numbers as hex, not decimal! The MGCP client uses hex numbers, while the server side parses it as decimal. This results in the first 10 calls succeeding, but from 0x0a onwards it of course fails :/ Change-Id: I006f5f5325f0a5069d02fec8912a38d943cfc552 Closes: OS#2784 --- M src/libosmo-mgcp/mgcp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 17b1026..d6174df 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -192,7 +192,7 @@ if (strncmp(mgcp, "ds/e1", 5) == 0) return find_e1_endpoint(cfg, mgcp); - gw = strtoul(mgcp, &endptr, 10); + gw = strtoul(mgcp, &endptr, 16); if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@') return &cfg->trunk.endpoints[gw]; -- To view, visit https://gerrit.osmocom.org/5600 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I006f5f5325f0a5069d02fec8912a38d943cfc552 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:41:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:41:28 +0000 Subject: osmo-ttcn3-hacks[master]: MGCP_Test: Test use of 30 endpoint numbers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 02:41:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 02:41:32 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MGCP_Test: Test use of 30 endpoint numbers In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MGCP_Test: Test use of 30 endpoint numbers ...................................................................... MGCP_Test: Test use of 30 endpoint numbers We used to have a big (OS#2784) where only endpoint numbers below 10 (0x0A) were working due to failed interpretation in hex/dec. Let's use up to 30 endpoints to ensure hex as well as two-digit digit numbers. Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579 --- M mgw/MGCP_Test.ttcn 1 file changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 80f4c83..3a548c4 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -452,6 +452,32 @@ setverdict(pass); } + function f_crcx_and_dlcx_ep_callid_connid(MgcpEndpoint ep, MgcpCallId call_id) runs on dummy_CT { + var template MgcpCommand cmd; + var MgcpResponse resp; + + cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id); + resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK); + + f_dlcx_ok(ep, call_id, extract_conn_id(resp)); + + setverdict(pass); + } + + testcase TC_crcx_dlcx_30ep() runs on dummy_CT { + var MgcpEndpoint ep; + var MgcpCallId call_id; + var integer ep_nr; + + f_init(); + + for (ep_nr := 1; ep_nr < 30; ep_nr := ep_nr+1) { + ep := hex2str(int2hex(ep_nr, 2)) & "@mgw"; + call_id := int2hex(ep_nr, 2) & '1234'H; + f_crcx_and_dlcx_ep_callid_connid(ep, call_id); + } + } + /* Test (valid) CRCX followed by (valid) DLCX containing EP+CallId */ testcase TC_crcx_and_dlcx_ep_callid() runs on dummy_CT { var template MgcpCommand cmd; -- To view, visit https://gerrit.osmocom.org/5601 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb3e01b5d31decefbf0c87ea39ec5021c8795579 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 11:28:41 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 11:28:41 +0000 Subject: [PATCH] osmo-iuh[master]: Use proper package version Message-ID: Review at https://gerrit.osmocom.org/5602 Use proper package version Use actual application version instead of hardcoded "0". Change-Id: I8711b9d819454d810291d57b97119d9fe4a47f8e --- M src/hnbgw.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/02/5602/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..5f5c311 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -326,7 +326,7 @@ static struct vty_app_info vty_info = { .name = "OsmoHNBGW", - .version = "0", + .version = PACKAGE_VERSION, .go_parent_cb = hnbgw_vty_go_parent, }; -- To view, visit https://gerrit.osmocom.org/5602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8711b9d819454d810291d57b97119d9fe4a47f8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 11:33:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 11:33:00 +0000 Subject: [PATCH] osmo-iuh[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5603 Enable sanitize for CI tests Change-Id: I90ca756691e4f644d93af519ed5d54d794d1d401 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/03/5603/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 01e3da2..c739f7f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -34,7 +34,7 @@ set -x autoreconf --install --force -./configure +./configure --enable-sanitize # Verify that checked-in asn1 code is identical to regenerated asn1 code PATH="$inst/bin:$PATH" $MAKE $PARALLEL_MAKE -C src regen -- To view, visit https://gerrit.osmocom.org/5603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90ca756691e4f644d93af519ed5d54d794d1d401 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 11:36:45 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 11:36:45 +0000 Subject: [PATCH] osmo-hlr[master]: Enable sanitize for CI tests Message-ID: Review at https://gerrit.osmocom.org/5604 Enable sanitize for CI tests Change-Id: I112307b5eaf494062b2e8498ff2e9217fb8db925 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/5604/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b273517..eaf4f2b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ cd "$base" autoreconf --install --force -./configure --enable-external-tests CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-external-tests CFLAGS="-Werror" CPPFLAGS="-Werror" $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh $MAKE distcheck || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I112307b5eaf494062b2e8498ff2e9217fb8db925 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 11:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 11:58:25 +0000 Subject: [PATCH] osmo-bsc[master]: Remove obsolete ./configure option Message-ID: Review at https://gerrit.osmocom.org/5605 Remove obsolete ./configure option The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I9492d8e988b464aa41f572611cbf2461bb8be3eb --- M README.vty-tests M configure.ac M contrib/jenkins.sh 3 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/5605/1 diff --git a/README.vty-tests b/README.vty-tests index ba1b87c..0669ea8 100644 --- a/README.vty-tests +++ b/README.vty-tests @@ -4,7 +4,7 @@ and pass the following configure options here: - ./configure --enable-vty-tests --enable-external-tests + ./configure --enable-external-tests The VTY tests are then included in the standard check target: diff --git a/configure.ac b/configure.ac index 97b2e2f..0e67490 100644 --- a/configure.ac +++ b/configure.ac @@ -113,11 +113,6 @@ AC_SUBST([COVERAGE_LDFLAGS]) fi -AC_ARG_ENABLE([vty_tests], - AC_HELP_STRING([--enable-vty-tests], - [Include the VTY/CTRL tests in make check (deprecated) - [default=no]]), - [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 873d1a5..b07e555 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -40,12 +40,12 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize --enable-vty-tests --enable-external-tests +./configure --enable-sanitize --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-external-tests" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9492d8e988b464aa41f572611cbf2461bb8be3eb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 12:04:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 12:04:29 +0000 Subject: [PATCH] osmo-sgsn[master]: Remove obsolete ./configure option Message-ID: Review at https://gerrit.osmocom.org/5606 Remove obsolete ./configure option The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I6230cfcf10247b601e16e7b872305499815520a9 --- M README.vty-tests M configure.ac M contrib/jenkins.sh 3 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/06/5606/1 diff --git a/README.vty-tests b/README.vty-tests index ba1b87c..0669ea8 100644 --- a/README.vty-tests +++ b/README.vty-tests @@ -4,7 +4,7 @@ and pass the following configure options here: - ./configure --enable-vty-tests --enable-external-tests + ./configure --enable-external-tests The VTY tests are then included in the standard check target: diff --git a/configure.ac b/configure.ac index e886fa5..b89c046 100644 --- a/configure.ac +++ b/configure.ac @@ -150,11 +150,6 @@ CHECK_TM_INCLUDES_TM_GMTOFF -AC_ARG_ENABLE([vty_tests], - AC_HELP_STRING([--enable-vty-tests], - [Include the VTY/CTRL tests in make check (deprecated) - [default=no]]), - [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d2db0c9..a32be1e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -46,12 +46,12 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests +./configure --enable-sanitize $SMPP $MGCP $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-external-tests" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6230cfcf10247b601e16e7b872305499815520a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 12:05:29 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 12:05:29 +0000 Subject: osmo-hlr[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Seems like recent changes to libosmoctrl broke the tests. -- To view, visit https://gerrit.osmocom.org/5604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I112307b5eaf494062b2e8498ff2e9217fb8db925 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 12:50:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 12:50:18 +0000 Subject: [PATCH] osmo-mgw[master]: mgcp_internal.h: document more struct members with comments Message-ID: Review at https://gerrit.osmocom.org/5607 mgcp_internal.h: document more struct members with comments Change-Id: Idfba05de37d354f9485030f37dfc9c780eff7b35 --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/07/5607/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 61d45bf..5c96928 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -95,6 +95,7 @@ char *subtype_name; }; +/* 'mgcp_rtp_end': basically a wrapper around the RTP+RTCP ports */ struct mgcp_rtp_end { /* statistics */ struct { @@ -105,6 +106,7 @@ unsigned int dropped_packets; } stats; + /* local IP address of the RTP socket */ struct in_addr addr; /* in network byte order */ @@ -118,23 +120,30 @@ int frames_per_packet; uint32_t packet_duration_ms; char *fmtp_extra; + /* are we transmitting packets (1) or dropping (0) outbound packets */ int output_enabled; + /* FIXME: This parameter can be set + printed, but is nowhere used! */ int force_output_ptime; /* RTP patching */ int force_constant_ssrc; /* -1: always, 0: don't, 1: once */ + /* should we perform align_rtp_timestamp_offset() (1) or not (0) */ int force_aligned_timing; + /* FIXME: not used anymore, used to be [external] transcoding related */ void *rtp_process_data; /* Each end has a separate socket for RTP and RTCP */ struct osmo_fd rtp; struct osmo_fd rtcp; + /* local UDP port number of the RTP socket; RTCP is +1 */ int local_port; }; struct mgcp_rtp_tap { + /* is this tap active (1) or not (0) */ int enabled; + /* IP/port to which we're forwarding the tapped data */ struct sockaddr_in forward; }; @@ -170,7 +179,7 @@ /* Sequence bits */ struct mgcp_rtp_state state; - /* taps for the rtp connection */ + /* taps for the rtp connection; one per direction */ struct mgcp_rtp_tap tap_in; struct mgcp_rtp_tap tap_out; -- To view, visit https://gerrit.osmocom.org/5607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfba05de37d354f9485030f37dfc9c780eff7b35 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 12:50:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 12:50:19 +0000 Subject: [PATCH] osmo-mgw[master]: centralize handling of common errors like "endpoint not found" Message-ID: Review at https://gerrit.osmocom.org/5608 centralize handling of common errors like "endpoint not found" Previously we * did not distinguish between the cause of errors in mgcp_header_parse * common errors were not handled in mgcp_handle_message() but in individual per-verb functions Let's centralize the handling of generating error responses and remove that burden from the individual per-verb handler functions. Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 --- M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 11 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/08/5608/1 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index d6174df..7f05a44 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -230,21 +230,21 @@ if (!pdata->endp) { LOGP(DLMGCP, LOGL_ERROR, "Unable to find Endpoint `%s'\n", elem); - return -1; + return -500; } break; case 2: if (strcmp("MGCP", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP header parsing error\n"); - return -1; + return -510; } break; case 3: if (strcmp("1.0", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP version `%s' " "not supported\n", elem); - return -1; + return -528; } break; } @@ -255,7 +255,7 @@ LOGP(DLMGCP, LOGL_ERROR, "MGCP status line too short.\n"); pdata->trans = "000000"; pdata->endp = NULL; - return -1; + return -510; } return 0; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index f87f341..71c0fde 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -287,6 +287,12 @@ return do_retransmission(pdata.endp); } + /* check for general parser failure */ + if (pdata.found < 0) { + LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to find the endpoint\n", msg->l2h); + return create_err_response(NULL, -pdata.found, (const char *) msg->l2h, pdata.trans); + } + for (i = 0; i < ARRAY_SIZE(mgcp_requests); ++i) { if (strncmp (mgcp_requests[i].name, (const char *)&msg->l2h[0], @@ -308,13 +314,7 @@ static struct msgb *handle_audit_endpoint(struct mgcp_parse_data *p) { LOGP(DLMGCP, LOGL_NOTICE, "AUEP: auditing endpoint ...\n"); - - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "AUEP: failed to find the endpoint.\n"); - return create_err_response(NULL, 500, "AUEP", p->trans); - } else - return create_ok_response(p->endp, 200, "AUEP", p->trans); + return create_ok_response(p->endp, 200, "AUEP", p->trans); } /* Try to find a free port by attempting to bind on it. Also handle the @@ -451,9 +451,6 @@ char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 510, "CRCX", p->trans); /* parse CallID C: and LocalParameters L: */ for_each_line(line, p->save) { @@ -675,9 +672,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); - if (p->found != 0) - return create_err_response(NULL, 510, "MDCX", p->trans); - if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", @@ -824,9 +818,6 @@ const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - if (p->found != 0) - return create_err_response(NULL, error_code, "DLCX", p->trans); - LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); @@ -958,12 +949,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "RSIP: resetting all endpoints ...\n"); - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "RSIP: failed to find the endpoint.\n"); - return NULL; - } - if (p->cfg->reset_cb) p->cfg->reset_cb(p->endp->tcfg); return NULL; @@ -988,9 +973,6 @@ char tone = CHAR_MAX; LOGP(DLMGCP, LOGL_NOTICE, "RQNT: processing request for notification ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 400, "RQNT", p->trans); for_each_line(line, p->save) { switch (line[0]) { -- To view, visit https://gerrit.osmocom.org/5608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 12:50:19 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 12:50:19 +0000 Subject: [PATCH] osmo-mgw[master]: Return proper MGCP Error codes, as per spec Message-ID: Review at https://gerrit.osmocom.org/5609 Return proper MGCP Error codes, as per spec Change-Id: I55db8351422ff951516fefa6a29e87086b7ab74b Closes: OS#2657, OS#2656 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 21 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/09/5609/1 diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 5c96928..33a754c 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -273,7 +273,6 @@ struct mgcp_endpoint *endp; char *trans; char *save; - int found; }; int mgcp_send(struct mgcp_endpoint *endp, int is_rtp, struct sockaddr_in *addr, diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 71c0fde..9d79343 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -252,7 +252,7 @@ struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg) { struct mgcp_parse_data pdata; - int i, code, handled = 0; + int rc, i, code, handled = 0; struct msgb *resp = NULL; char *data; @@ -280,7 +280,7 @@ memset(&pdata, 0, sizeof(pdata)); pdata.cfg = cfg; data = mgcp_strline((char *)msg->l3h, &pdata.save); - pdata.found = mgcp_parse_header(&pdata, data); + rc = mgcp_parse_header(&pdata, data); if (pdata.endp && pdata.trans && pdata.endp->last_trans && strcmp(pdata.endp->last_trans, pdata.trans) == 0) { @@ -288,9 +288,9 @@ } /* check for general parser failure */ - if (pdata.found < 0) { + if (rc < 0) { LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to find the endpoint\n", msg->l2h); - return create_err_response(NULL, -pdata.found, (const char *) msg->l2h, pdata.trans); + return create_err_response(NULL, -rc, (const char *) msg->l2h, pdata.trans); } for (i = 0; i < ARRAY_SIZE(mgcp_requests); ++i) { @@ -500,14 +500,14 @@ LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing callid\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 516, "CRCX", p->trans); } if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 517, "CRCX", p->trans); } /* Check if we are able to accept the creation of another connection */ @@ -523,7 +523,7 @@ } else { /* There is no more room for a connection, leave * everything as it is and return with an error */ - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 540, "CRCX", p->trans); } } @@ -685,13 +685,17 @@ switch (line[0]) { case 'C': - if (mgcp_verify_call_id(endp, line + 3) != 0) + if (mgcp_verify_call_id(endp, line + 3) != 0) { + error_code = 516; goto error3; + } break; case 'I': conn_id = (const char *)line + 3; - if (mgcp_verify_ci(endp, conn_id) != 0) + if (mgcp_verify_ci(endp, conn_id) != 0) { + error_code = 515; goto error3; + } break; case 'L': local_options = (const char *)line + 3; @@ -719,7 +723,7 @@ LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "MDCX", p->trans); + return create_err_response(endp, 515, "MDCX", p->trans); } conn = mgcp_conn_get_rtp(endp, conn_id); @@ -826,7 +830,7 @@ LOGP(DLMGCP, LOGL_ERROR, "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); + return create_err_response(endp, 515, "DLCX", p->trans); } for_each_line(line, p->save) { @@ -835,13 +839,17 @@ switch (line[0]) { case 'C': - if (mgcp_verify_call_id(endp, line + 3) != 0) + if (mgcp_verify_call_id(endp, line + 3) != 0) { + error_code = 516; goto error3; + } break; case 'I': conn_id = (const char *)line + 3; - if (mgcp_verify_ci(endp, conn_id) != 0) + if (mgcp_verify_ci(endp, conn_id) != 0) { + error_code = 515; goto error3; + } break; case 'Z': silent = strcmp("noanswer", line + 3) == 0; -- To view, visit https://gerrit.osmocom.org/5609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55db8351422ff951516fefa6a29e87086b7ab74b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:00:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:00:50 +0000 Subject: [PATCH] osmo-mgw[master]: centralize handling of common errors like "endpoint not found" In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5608 to look at the new patch set (#2). centralize handling of common errors like "endpoint not found" Previously we * did not distinguish between the cause of errors in mgcp_header_parse * common errors were not handled in mgcp_handle_message() but in individual per-verb functions Let's centralize the handling of generating error responses and remove that burden from the individual per-verb handler functions. Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 --- M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c 3 files changed, 12 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/08/5608/2 diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index d6174df..7f05a44 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -230,21 +230,21 @@ if (!pdata->endp) { LOGP(DLMGCP, LOGL_ERROR, "Unable to find Endpoint `%s'\n", elem); - return -1; + return -500; } break; case 2: if (strcmp("MGCP", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP header parsing error\n"); - return -1; + return -510; } break; case 3: if (strcmp("1.0", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP version `%s' " "not supported\n", elem); - return -1; + return -528; } break; } @@ -255,7 +255,7 @@ LOGP(DLMGCP, LOGL_ERROR, "MGCP status line too short.\n"); pdata->trans = "000000"; pdata->endp = NULL; - return -1; + return -510; } return 0; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index f87f341..71c0fde 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -287,6 +287,12 @@ return do_retransmission(pdata.endp); } + /* check for general parser failure */ + if (pdata.found < 0) { + LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to find the endpoint\n", msg->l2h); + return create_err_response(NULL, -pdata.found, (const char *) msg->l2h, pdata.trans); + } + for (i = 0; i < ARRAY_SIZE(mgcp_requests); ++i) { if (strncmp (mgcp_requests[i].name, (const char *)&msg->l2h[0], @@ -308,13 +314,7 @@ static struct msgb *handle_audit_endpoint(struct mgcp_parse_data *p) { LOGP(DLMGCP, LOGL_NOTICE, "AUEP: auditing endpoint ...\n"); - - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "AUEP: failed to find the endpoint.\n"); - return create_err_response(NULL, 500, "AUEP", p->trans); - } else - return create_ok_response(p->endp, 200, "AUEP", p->trans); + return create_ok_response(p->endp, 200, "AUEP", p->trans); } /* Try to find a free port by attempting to bind on it. Also handle the @@ -451,9 +451,6 @@ char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 510, "CRCX", p->trans); /* parse CallID C: and LocalParameters L: */ for_each_line(line, p->save) { @@ -675,9 +672,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); - if (p->found != 0) - return create_err_response(NULL, 510, "MDCX", p->trans); - if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", @@ -824,9 +818,6 @@ const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - if (p->found != 0) - return create_err_response(NULL, error_code, "DLCX", p->trans); - LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); @@ -958,12 +949,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "RSIP: resetting all endpoints ...\n"); - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "RSIP: failed to find the endpoint.\n"); - return NULL; - } - if (p->cfg->reset_cb) p->cfg->reset_cb(p->endp->tcfg); return NULL; @@ -988,9 +973,6 @@ char tone = CHAR_MAX; LOGP(DLMGCP, LOGL_NOTICE, "RQNT: processing request for notification ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 400, "RQNT", p->trans); for_each_line(line, p->save) { switch (line[0]) { diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 46fc1c1..46fd69b 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -76,7 +76,7 @@ #define SHORT_RET "510 000000 FAIL\r\n" #define MDCX_WRONG_EP "MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0\r\n" -#define MDCX_ERR_RET "510 18983213 FAIL\r\n" +#define MDCX_ERR_RET "500 18983213 FAIL\r\n" #define MDCX_UNALLOCATED "MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0\r\n" #define MDCX_RET "400 18983214 FAIL\r\n" -- To view, visit https://gerrit.osmocom.org/5608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:03:50 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:03:50 +0000 Subject: osmo-mgw[master]: centralize handling of common errors like "endpoint not found" In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:03:52 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:03:52 +0000 Subject: osmo-mgw[master]: mgcp_internal.h: document more struct members with comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfba05de37d354f9485030f37dfc9c780eff7b35 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:03:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:03:56 +0000 Subject: osmo-mgw[master]: Return proper MGCP Error codes, as per spec In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55db8351422ff951516fefa6a29e87086b7ab74b Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:03:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:03:59 +0000 Subject: [MERGED] osmo-mgw[master]: Return proper MGCP Error codes, as per spec In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Return proper MGCP Error codes, as per spec ...................................................................... Return proper MGCP Error codes, as per spec Change-Id: I55db8351422ff951516fefa6a29e87086b7ab74b Closes: OS#2657, OS#2656 --- M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_protocol.c 2 files changed, 21 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 5c96928..33a754c 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -273,7 +273,6 @@ struct mgcp_endpoint *endp; char *trans; char *save; - int found; }; int mgcp_send(struct mgcp_endpoint *endp, int is_rtp, struct sockaddr_in *addr, diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 71c0fde..9d79343 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -252,7 +252,7 @@ struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg) { struct mgcp_parse_data pdata; - int i, code, handled = 0; + int rc, i, code, handled = 0; struct msgb *resp = NULL; char *data; @@ -280,7 +280,7 @@ memset(&pdata, 0, sizeof(pdata)); pdata.cfg = cfg; data = mgcp_strline((char *)msg->l3h, &pdata.save); - pdata.found = mgcp_parse_header(&pdata, data); + rc = mgcp_parse_header(&pdata, data); if (pdata.endp && pdata.trans && pdata.endp->last_trans && strcmp(pdata.endp->last_trans, pdata.trans) == 0) { @@ -288,9 +288,9 @@ } /* check for general parser failure */ - if (pdata.found < 0) { + if (rc < 0) { LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to find the endpoint\n", msg->l2h); - return create_err_response(NULL, -pdata.found, (const char *) msg->l2h, pdata.trans); + return create_err_response(NULL, -rc, (const char *) msg->l2h, pdata.trans); } for (i = 0; i < ARRAY_SIZE(mgcp_requests); ++i) { @@ -500,14 +500,14 @@ LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing callid\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 516, "CRCX", p->trans); } if (!mode) { LOGP(DLMGCP, LOGL_ERROR, "CRCX: endpoint:%x insufficient parameters, missing mode\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 517, "CRCX", p->trans); } /* Check if we are able to accept the creation of another connection */ @@ -523,7 +523,7 @@ } else { /* There is no more room for a connection, leave * everything as it is and return with an error */ - return create_err_response(endp, 400, "CRCX", p->trans); + return create_err_response(endp, 540, "CRCX", p->trans); } } @@ -685,13 +685,17 @@ switch (line[0]) { case 'C': - if (mgcp_verify_call_id(endp, line + 3) != 0) + if (mgcp_verify_call_id(endp, line + 3) != 0) { + error_code = 516; goto error3; + } break; case 'I': conn_id = (const char *)line + 3; - if (mgcp_verify_ci(endp, conn_id) != 0) + if (mgcp_verify_ci(endp, conn_id) != 0) { + error_code = 515; goto error3; + } break; case 'L': local_options = (const char *)line + 3; @@ -719,7 +723,7 @@ LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x insufficient parameters, missing ci (connectionIdentifier)\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "MDCX", p->trans); + return create_err_response(endp, 515, "MDCX", p->trans); } conn = mgcp_conn_get_rtp(endp, conn_id); @@ -826,7 +830,7 @@ LOGP(DLMGCP, LOGL_ERROR, "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", ENDPOINT_NUMBER(endp)); - return create_err_response(endp, 400, "DLCX", p->trans); + return create_err_response(endp, 515, "DLCX", p->trans); } for_each_line(line, p->save) { @@ -835,13 +839,17 @@ switch (line[0]) { case 'C': - if (mgcp_verify_call_id(endp, line + 3) != 0) + if (mgcp_verify_call_id(endp, line + 3) != 0) { + error_code = 516; goto error3; + } break; case 'I': conn_id = (const char *)line + 3; - if (mgcp_verify_ci(endp, conn_id) != 0) + if (mgcp_verify_ci(endp, conn_id) != 0) { + error_code = 515; goto error3; + } break; case 'Z': silent = strcmp("noanswer", line + 3) == 0; -- To view, visit https://gerrit.osmocom.org/5609 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55db8351422ff951516fefa6a29e87086b7ab74b Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:03:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:03:59 +0000 Subject: [MERGED] osmo-mgw[master]: mgcp_internal.h: document more struct members with comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mgcp_internal.h: document more struct members with comments ...................................................................... mgcp_internal.h: document more struct members with comments Change-Id: Idfba05de37d354f9485030f37dfc9c780eff7b35 --- M include/osmocom/mgcp/mgcp_internal.h 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 61d45bf..5c96928 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -95,6 +95,7 @@ char *subtype_name; }; +/* 'mgcp_rtp_end': basically a wrapper around the RTP+RTCP ports */ struct mgcp_rtp_end { /* statistics */ struct { @@ -105,6 +106,7 @@ unsigned int dropped_packets; } stats; + /* local IP address of the RTP socket */ struct in_addr addr; /* in network byte order */ @@ -118,23 +120,30 @@ int frames_per_packet; uint32_t packet_duration_ms; char *fmtp_extra; + /* are we transmitting packets (1) or dropping (0) outbound packets */ int output_enabled; + /* FIXME: This parameter can be set + printed, but is nowhere used! */ int force_output_ptime; /* RTP patching */ int force_constant_ssrc; /* -1: always, 0: don't, 1: once */ + /* should we perform align_rtp_timestamp_offset() (1) or not (0) */ int force_aligned_timing; + /* FIXME: not used anymore, used to be [external] transcoding related */ void *rtp_process_data; /* Each end has a separate socket for RTP and RTCP */ struct osmo_fd rtp; struct osmo_fd rtcp; + /* local UDP port number of the RTP socket; RTCP is +1 */ int local_port; }; struct mgcp_rtp_tap { + /* is this tap active (1) or not (0) */ int enabled; + /* IP/port to which we're forwarding the tapped data */ struct sockaddr_in forward; }; @@ -170,7 +179,7 @@ /* Sequence bits */ struct mgcp_rtp_state state; - /* taps for the rtp connection */ + /* taps for the rtp connection; one per direction */ struct mgcp_rtp_tap tap_in; struct mgcp_rtp_tap tap_out; -- To view, visit https://gerrit.osmocom.org/5607 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfba05de37d354f9485030f37dfc9c780eff7b35 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:04:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:04:00 +0000 Subject: [MERGED] osmo-mgw[master]: centralize handling of common errors like "endpoint not found" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: centralize handling of common errors like "endpoint not found" ...................................................................... centralize handling of common errors like "endpoint not found" Previously we * did not distinguish between the cause of errors in mgcp_header_parse * common errors were not handled in mgcp_handle_message() but in individual per-verb functions Let's centralize the handling of generating error responses and remove that burden from the individual per-verb handler functions. Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 --- M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c M tests/mgcp/mgcp_test.c 3 files changed, 12 insertions(+), 30 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index d6174df..7f05a44 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -230,21 +230,21 @@ if (!pdata->endp) { LOGP(DLMGCP, LOGL_ERROR, "Unable to find Endpoint `%s'\n", elem); - return -1; + return -500; } break; case 2: if (strcmp("MGCP", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP header parsing error\n"); - return -1; + return -510; } break; case 3: if (strcmp("1.0", elem)) { LOGP(DLMGCP, LOGL_ERROR, "MGCP version `%s' " "not supported\n", elem); - return -1; + return -528; } break; } @@ -255,7 +255,7 @@ LOGP(DLMGCP, LOGL_ERROR, "MGCP status line too short.\n"); pdata->trans = "000000"; pdata->endp = NULL; - return -1; + return -510; } return 0; diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index f87f341..71c0fde 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -287,6 +287,12 @@ return do_retransmission(pdata.endp); } + /* check for general parser failure */ + if (pdata.found < 0) { + LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to find the endpoint\n", msg->l2h); + return create_err_response(NULL, -pdata.found, (const char *) msg->l2h, pdata.trans); + } + for (i = 0; i < ARRAY_SIZE(mgcp_requests); ++i) { if (strncmp (mgcp_requests[i].name, (const char *)&msg->l2h[0], @@ -308,13 +314,7 @@ static struct msgb *handle_audit_endpoint(struct mgcp_parse_data *p) { LOGP(DLMGCP, LOGL_NOTICE, "AUEP: auditing endpoint ...\n"); - - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "AUEP: failed to find the endpoint.\n"); - return create_err_response(NULL, 500, "AUEP", p->trans); - } else - return create_ok_response(p->endp, 200, "AUEP", p->trans); + return create_ok_response(p->endp, 200, "AUEP", p->trans); } /* Try to find a free port by attempting to bind on it. Also handle the @@ -451,9 +451,6 @@ char conn_name[512]; LOGP(DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 510, "CRCX", p->trans); /* parse CallID C: and LocalParameters L: */ for_each_line(line, p->save) { @@ -675,9 +672,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); - if (p->found != 0) - return create_err_response(NULL, 510, "MDCX", p->trans); - if (llist_count(&endp->conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", @@ -824,9 +818,6 @@ const char *conn_id = NULL; struct mgcp_conn_rtp *conn = NULL; - if (p->found != 0) - return create_err_response(NULL, error_code, "DLCX", p->trans); - LOGP(DLMGCP, LOGL_NOTICE, "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); @@ -958,12 +949,6 @@ LOGP(DLMGCP, LOGL_NOTICE, "RSIP: resetting all endpoints ...\n"); - if (p->found != 0) { - LOGP(DLMGCP, LOGL_ERROR, - "RSIP: failed to find the endpoint.\n"); - return NULL; - } - if (p->cfg->reset_cb) p->cfg->reset_cb(p->endp->tcfg); return NULL; @@ -988,9 +973,6 @@ char tone = CHAR_MAX; LOGP(DLMGCP, LOGL_NOTICE, "RQNT: processing request for notification ...\n"); - - if (p->found != 0) - return create_err_response(NULL, 400, "RQNT", p->trans); for_each_line(line, p->save) { switch (line[0]) { diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 46fc1c1..46fd69b 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -76,7 +76,7 @@ #define SHORT_RET "510 000000 FAIL\r\n" #define MDCX_WRONG_EP "MDCX 18983213 ds/e1-3/1 at 172.16.6.66 MGCP 1.0\r\n" -#define MDCX_ERR_RET "510 18983213 FAIL\r\n" +#define MDCX_ERR_RET "500 18983213 FAIL\r\n" #define MDCX_UNALLOCATED "MDCX 18983214 ds/e1-1/2 at 172.16.6.66 MGCP 1.0\r\n" #define MDCX_RET "400 18983214 FAIL\r\n" -- To view, visit https://gerrit.osmocom.org/5608 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I463b27306e10ae3b021583ed102977e7299e5e66 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:19:16 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 13:19:16 +0000 Subject: [PATCH] osmo-pcu[master]: Add optional profiling support Message-ID: Review at https://gerrit.osmocom.org/5610 Add optional profiling support This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/10/5610/1 diff --git a/configure.ac b/configure.ac index 5867cbe..8a8b93c 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,15 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) -- To view, visit https://gerrit.osmocom.org/5610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:21:18 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MGCP: Add 30 endpoint number test to control section Message-ID: Review at https://gerrit.osmocom.org/5611 MGCP: Add 30 endpoint number test to control section Change-Id: Ifa03697531680c72e4179a4195aeac371660b722 --- M mgw/MGCP_Test.ttcn 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/5611/1 diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 3a548c4..7c3889a 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -608,5 +608,7 @@ execute(TC_crcx_and_dlcx_ep_callid_inval()); execute(TC_crcx_and_dlcx_ep_callid_connid_inval()); execute(TC_crcx_and_dlcx_retrans()); + + execute(TC_crcx_dlcx_30ep()); } } -- To view, visit https://gerrit.osmocom.org/5611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa03697531680c72e4179a4195aeac371660b722 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:21:18 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:21:18 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: MGCP_Test: be more liberal in some of the error codes we expect Message-ID: Review at https://gerrit.osmocom.org/5612 MGCP_Test: be more liberal in some of the error codes we expect Sometimes it's not entirely clear which error code should be returned, so let's accept multiple options, depending on the situation Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521 --- M mgw/MGCP_Test.ttcn 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/5612/1 diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 7c3889a..516944a 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -212,7 +212,7 @@ /* Send DLCX and expect OK response */ function f_dlcx_ok(MgcpEndpoint ep, template MgcpCallId call_id := omit, template MgcpConnectionId conn_id := omit) runs on dummy_CT { - f_dlcx(ep, "200", "OK", call_id, conn_id); + f_dlcx(ep, ("200","250"), "OK", call_id, conn_id); } /* Send DLCX and accept any response */ @@ -296,7 +296,7 @@ var template MgcpCommand cmd; var MgcpResponse resp; var MgcpEndpoint ep := "2 at mgw"; - var template MgcpResponse rtmpl := tr_MgcpResp_Err("400"); + var template MgcpResponse rtmpl := tr_MgcpResp_Err(("400","516")); f_init(ep); @@ -316,7 +316,7 @@ var MgcpResponse resp; var MgcpEndpoint ep := "2 at mgw"; var MgcpCallId call_id := '1229'H; - var template MgcpResponse rtmpl := tr_MgcpResp_Err("400"); + var template MgcpResponse rtmpl := tr_MgcpResp_Err(("400","517")); f_init(ep); @@ -420,8 +420,7 @@ var MgcpEndpoint ep := "4 at mgw"; var template MgcpResponse rtmpl := { line := { - /* TODO: accept/enforce better error? */ - code := "400", + code := ("400", "515"), string := ? }, params:= { }, -- To view, visit https://gerrit.osmocom.org/5612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:23:03 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:23:03 +0000 Subject: osmo-ttcn3-hacks[master]: MGCP_Test: be more liberal in some of the error codes we expect In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:23:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:23:06 +0000 Subject: osmo-ttcn3-hacks[master]: MGCP: Add 30 endpoint number test to control section In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifa03697531680c72e4179a4195aeac371660b722 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:23:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:23:09 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MGCP: Add 30 endpoint number test to control section In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MGCP: Add 30 endpoint number test to control section ...................................................................... MGCP: Add 30 endpoint number test to control section Change-Id: Ifa03697531680c72e4179a4195aeac371660b722 --- M mgw/MGCP_Test.ttcn 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 3a548c4..7c3889a 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -608,5 +608,7 @@ execute(TC_crcx_and_dlcx_ep_callid_inval()); execute(TC_crcx_and_dlcx_ep_callid_connid_inval()); execute(TC_crcx_and_dlcx_retrans()); + + execute(TC_crcx_dlcx_30ep()); } } -- To view, visit https://gerrit.osmocom.org/5611 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa03697531680c72e4179a4195aeac371660b722 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:23:10 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 13:23:10 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: MGCP_Test: be more liberal in some of the error codes we expect In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: MGCP_Test: be more liberal in some of the error codes we expect ...................................................................... MGCP_Test: be more liberal in some of the error codes we expect Sometimes it's not entirely clear which error code should be returned, so let's accept multiple options, depending on the situation Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521 --- M mgw/MGCP_Test.ttcn 1 file changed, 4 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 7c3889a..516944a 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -212,7 +212,7 @@ /* Send DLCX and expect OK response */ function f_dlcx_ok(MgcpEndpoint ep, template MgcpCallId call_id := omit, template MgcpConnectionId conn_id := omit) runs on dummy_CT { - f_dlcx(ep, "200", "OK", call_id, conn_id); + f_dlcx(ep, ("200","250"), "OK", call_id, conn_id); } /* Send DLCX and accept any response */ @@ -296,7 +296,7 @@ var template MgcpCommand cmd; var MgcpResponse resp; var MgcpEndpoint ep := "2 at mgw"; - var template MgcpResponse rtmpl := tr_MgcpResp_Err("400"); + var template MgcpResponse rtmpl := tr_MgcpResp_Err(("400","516")); f_init(ep); @@ -316,7 +316,7 @@ var MgcpResponse resp; var MgcpEndpoint ep := "2 at mgw"; var MgcpCallId call_id := '1229'H; - var template MgcpResponse rtmpl := tr_MgcpResp_Err("400"); + var template MgcpResponse rtmpl := tr_MgcpResp_Err(("400","517")); f_init(ep); @@ -420,8 +420,7 @@ var MgcpEndpoint ep := "4 at mgw"; var template MgcpResponse rtmpl := { line := { - /* TODO: accept/enforce better error? */ - code := "400", + code := ("400", "515"), string := ? }, params:= { }, -- To view, visit https://gerrit.osmocom.org/5612 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d6eaec4d025b9da170f59c759884afe2e768521 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 13:34:18 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 13:34:18 +0000 Subject: [PATCH] osmo-bsc[master]: Add optional profiling support Message-ID: Review at https://gerrit.osmocom.org/5613 Add optional profiling support This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/13/5613/1 diff --git a/configure.ac b/configure.ac index 97b2e2f..433e3bf 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,15 @@ AC_SUBST([COVERAGE_LDFLAGS]) fi +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + AC_ARG_ENABLE([vty_tests], AC_HELP_STRING([--enable-vty-tests], [Include the VTY/CTRL tests in make check (deprecated) -- To view, visit https://gerrit.osmocom.org/5613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 16:24:52 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 16:24:52 +0000 Subject: [PATCH] libosmocore[master]: coding: move eB adjustement to appropriate place Message-ID: Review at https://gerrit.osmocom.org/5614 coding: move eB adjustement to appropriate place As a leftover from code move from OsmoBTS we have eB adjustement outside of eB check in gsm0503_tch_burst_map() which is rightfully noted by Coverity. Let's fix this by moving the adjustement under the corresponding if. Change-Id: I385cd6ffea4d13ef911910fc87c92b73809888a2 Fixes: CID57691 --- M src/coding/gsm0503_mapping.c 1 file changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/5614/1 diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c index 1e37fce..f7532eb 100644 --- a/src/coding/gsm0503_mapping.c +++ b/src/coding/gsm0503_mapping.c @@ -92,13 +92,8 @@ eB[i] = iB[i]; for (i = 58 - odd; i < 114; i += 2) eB[i + 2] = iB[i]; - } - - if (h) { - if (!odd) - eB[58] = *h; - else - eB[57] = *h; + if (h) + eB[odd ? 57 : 58] = *h; } } -- To view, visit https://gerrit.osmocom.org/5614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I385cd6ffea4d13ef911910fc87c92b73809888a2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 17:01:58 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 17:01:58 +0000 Subject: [PATCH] osmo-bsc[master]: Check and handle SMS encoding failure Message-ID: Review at https://gerrit.osmocom.org/5615 Check and handle SMS encoding failure The SMS address encoding can fail due to gsm48_encode_bcd_number() which was not checked for because wrong type was used. Fix this by using correct type, checking for error and propagating it to the caller. Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Fixes: CID57882 --- M src/osmo-bsc_nat/bsc_nat_rewrite.c 1 file changed, 22 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/15/5615/1 diff --git a/src/osmo-bsc_nat/bsc_nat_rewrite.c b/src/osmo-bsc_nat/bsc_nat_rewrite.c index 75ed4ec..7db9234 100644 --- a/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -340,10 +340,10 @@ /** * This is a helper for GSM 04.11 8.2.5.2 Destination address element */ -void sms_encode_addr_element(struct msgb *out, const char *new_number, +static bool sms_encode_addr_element(struct msgb *out, const char *new_number, int format, int tp_data) { - uint8_t new_addr_len; + int new_addr_len; uint8_t new_addr[26]; /* @@ -355,6 +355,9 @@ */ new_addr_len = gsm48_encode_bcd_number(new_addr, ARRAY_SIZE(new_addr), 1, new_number); + if (new_addr_len < 0) + return false; + new_addr[1] = format; if (tp_data) { uint8_t *data = msgb_put(out, new_addr_len); @@ -363,6 +366,8 @@ } else { msgb_lv_put(out, new_addr_len - 1, new_addr + 1); } + + return true; } static struct msgb *sms_create_new(uint8_t type, uint8_t ref, @@ -391,7 +396,10 @@ msgb_v_put(out, ref); msgb_lv_put(out, orig_addr_len, orig_addr_ptr); - sms_encode_addr_element(out, new_number, 0x91, 0); + if (!sms_encode_addr_element(out, new_number, 0x91, 0)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } /* Patch the TPDU from here on */ @@ -411,11 +419,17 @@ msgb_v_put(out, data_ptr[1]); /* encode the new number and put it */ - if (strncmp(new_dest_nr, "00", 2) == 0) - sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1); - else - sms_encode_addr_element(out, new_dest_nr, 0x81, 1); - + if (strncmp(new_dest_nr, "00", 2) == 0) { + if (!sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } + } else { + if (!sms_encode_addr_element(out, new_dest_nr, 0x81, 1)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } + } /* Copy the rest after the TP-DS */ data = msgb_put(out, data_len - 2 - 1 - old_dest_len); memcpy(data, &data_ptr[2 + 1 + old_dest_len], data_len - 2 - 1 - old_dest_len); -- To view, visit https://gerrit.osmocom.org/5615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 18:35:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 18:35:06 +0000 Subject: [PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3 In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5028 to look at the new patch set (#9). Update ctrl command parsing for python3 * make parse() return command id in addition to variable name and value * introduce parse_kv() wrapper which ignores that id and use it instead of old parse() * make parse() compatible with python3 where we got bytes, not string from the socket so we have to decode it properly before using split() * expand test_py3.py with simply asyn server which verifies that osmo_ctrl.py works properly Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 --- M contrib/jenkins.sh M osmopy/osmo_ipa.py M scripts/osmo_ctrl.py M scripts/twisted_ipa.py M tests/test_py3.py 5 files changed, 88 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/5028/9 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d18b19d..9734549 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -24,7 +24,7 @@ $PY3 $COM_FLAGS $f done -cd scripts -./osmo_ctrl.py --help +# Run async server which tests scripts/osmo_ctrl.py interaction +$PY3 tests/test_py3.py # TODO: add more tests diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py index 71cbf45..a1fcaf6 100755 --- a/osmopy/osmo_ipa.py +++ b/osmopy/osmo_ipa.py @@ -28,7 +28,7 @@ """ Stateless IPA protocol multiplexer: add/remove/parse (extended) header """ - version = "0.0.5" + version = "0.0.6" TCP_PORT_OML = 3002 TCP_PORT_RSL = 3003 # OpenBSC extensions: OSMO, MGCP_OLD @@ -231,23 +231,36 @@ return None return d - def parse(self, data, op=None): + def parse(self, raw_data): + """ + Parse Ctrl string returning (id, var, value) tuple + var could be None in case of ERROR message + value could be None in case of GET message + both could be None in case of TRAP with non-zero id + """ + data = self.rem_header(raw_data) + if data == None: + return None, None, None + data = data.decode('utf-8') + (s, i, v) = data.split(' ', 2) + if s == self.CTRL_ERR: + return i, None, v + if s == self.CTRL_GET: + return i, v, None + if s == self.CTRL_GET + '_' + self.CTRL_REP: + return i, v, None + (s, i, var, val) = data.split(' ', 3) + if s == self.CTRL_TRAP and i != '0': + return i, None, None + return i, var, val + + def parse_kv(self, raw_data): """ Parse Ctrl string returning (var, value) pair var could be None in case of ERROR message value could be None in case of GET message """ - (s, i, v) = data.split(' ', 2) - if s == self.CTRL_ERR: - return None, v - if s == self.CTRL_GET: - return v, None - (s, i, var, val) = data.split(' ', 3) - if s == self.CTRL_TRAP and i != '0': - return None, '%s with non-zero id %s' % (s, i) - if op is not None and i != op: - if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP: - return None, '%s with unexpected id %s' % (s, i) + (i, var, val) = self.parse(raw_data) return var, val def trap(self, var, val): @@ -265,11 +278,19 @@ return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val)) return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var)) + def reply(self, op_id, var, val=None): + """ + Make SET/GET command reply: returns assembled message + """ + if val is not None: + return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, self.CTRL_REP, op_id, var, val)) + return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, op_id, var)) + def verify(self, reply, r, var, val=None): """ Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value """ - (k, v) = self.parse(reply) + (k, v) = self.parse_kv(reply) if k != var or (val is not None and v != val): return False, v return True, v diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py index 8c0608f..ac20050 100755 --- a/scripts/osmo_ctrl.py +++ b/scripts/osmo_ctrl.py @@ -40,8 +40,8 @@ def do_set_get(sck, var, value = None): (r, c) = Ctrl().cmd(var, value) sck.send(c) - answer = Ctrl().rem_header(sck.recv(4096)) - return (answer,) + Ctrl().verify(answer, r, var, value) + ret = sck.recv(4096) + return (Ctrl().rem_header(ret),) + Ctrl().verify(ret, r, var, value) def set_var(sck, var, val): (a, _, _) = do_set_get(sck, var, val) diff --git a/scripts/twisted_ipa.py b/scripts/twisted_ipa.py index bb8323d..533bfae 100755 --- a/scripts/twisted_ipa.py +++ b/scripts/twisted_ipa.py @@ -22,7 +22,7 @@ */ """ -__version__ = "0.7.0" # bump this on every non-trivial change +__version__ = "0.7.1" # bump this on every non-trivial change from osmopy.osmo_ipa import Ctrl, IPA from twisted.internet.protocol import ReconnectingClientFactory @@ -243,7 +243,7 @@ OSMO CTRL message dispatcher, lambda default should never happen For basic tests only, appropriate handling routines should be replaced: see CtrlServer for example """ - self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse(data.decode('utf-8'))) + self.dbg('OSMO CTRL received %s::%s' % Ctrl().parse_kv(data)) (cmd, op_id, v) = data.decode('utf-8').split(' ', 2) method = getattr(self, 'ctrl_' + cmd, lambda: "CTRL unknown command") method(data, op_id, v) diff --git a/tests/test_py3.py b/tests/test_py3.py index cac2f93..3a96d9f 100644 --- a/tests/test_py3.py +++ b/tests/test_py3.py @@ -1,7 +1,51 @@ #!/usr/bin/env python3 -# just import a smoke test for osmopy +# just a smoke test for osmopy -import osmopy +import asyncio, random +from osmopy.osmo_ipa import Ctrl +from osmopy import __version__ -print('[Python3] Smoke test PASSED.') +class CtrlProtocol(asyncio.Protocol): + def connection_made(self, transport): + peername = transport.get_extra_info('peername') + print('Connection from {}'.format(peername)) + self.transport = transport + + def data_received(self, data): + (i, v, k) = Ctrl().parse(data) + if not k: + print('Ctrl GET received: %s' % v) + else: + print('Ctrl SET received: %s :: %s' % (v, k)) + + message = Ctrl().reply(i, v, k) + self.transport.write(message) + + self.transport.close() + # quit the loop gracefully + print('Closing the loop...') + loop.stop() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + test_host = '127.0.0.5' + test_port = str(random.randint(1025, 60000)) + + # Each client connection will create a new protocol instance + server = loop.run_until_complete(loop.create_server(CtrlProtocol, test_host, test_port)) + + print('Serving on {}...'.format(server.sockets[0].getsockname())) + + # Async client running in the subprocess plugged to the same event loop + loop.run_until_complete(asyncio.gather(asyncio.create_subprocess_exec('./scripts/osmo_ctrl.py', '-g', 'mnc', '-d', test_host, '-p', test_port), loop = loop)) + + loop.run_forever() + + # Cleanup after loop is finished + server.close() + loop.run_until_complete(server.wait_closed()) + loop.close() + + print('[Python3] Smoke test PASSED for v%s' % __version__) -- To view, visit https://gerrit.osmocom.org/5028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1 Gerrit-PatchSet: 9 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Dec 28 18:41:18 2017 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Thu, 28 Dec 2017 18:41:18 +0000 Subject: osmo-bsc[master]: Check and handle SMS encoding failure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) Looks good to me, thanks. https://gerrit.osmocom.org/#/c/5615/1/src/osmo-bsc_nat/bsc_nat_rewrite.c File src/osmo-bsc_nat/bsc_nat_rewrite.c: Line 343: static bool sms_encode_addr_element(struct msgb *out, const char *new_number, Hmm, I thought we don't really use bool in our code, but a quick grep reveals that it is actually used nowadays. -- To view, visit https://gerrit.osmocom.org/5615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:17:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:17:45 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: bsc-test: Fix compilation after IuUP support was introduced Message-ID: Review at https://gerrit.osmocom.org/5616 bsc-test: Fix compilation after IuUP support was introduced Ever since I46de7fb9c324654275a27aa5f8c1be70340e3229 we had problems linking the object files together due to a missing object Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a --- M bsc/regen_makefile.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/5616/1 diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index d937482..1d5b92b 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc *.c" ../regen-makefile.sh $MAIN $FILES -- To view, visit https://gerrit.osmocom.org/5616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:17:45 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:17:45 +0000 Subject: [PATCH] osmo-ttcn3-hacks[master]: GSUP Support and first test against OsmoHLR Message-ID: Review at https://gerrit.osmocom.org/5617 GSUP Support and first test against OsmoHLR Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff --- M bsc-nat/gen_links.sh M bsc/gen_links.sh A hlr/GSUP_Test.ttcn A hlr/Makefile A hlr/gen_links.sh A hlr/regen_makefile.sh A library/GSUP_Types.ttcn M library/IPA_Emulation.ttcn M selftest/gen_links.sh 9 files changed, 518 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/5617/1 diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 9a45c89..65b1602 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -55,5 +55,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 4316966..14771a7 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES diff --git a/hlr/GSUP_Test.ttcn b/hlr/GSUP_Test.ttcn new file mode 100644 index 0000000..1118369 --- /dev/null +++ b/hlr/GSUP_Test.ttcn @@ -0,0 +1,54 @@ +module GSUP_Test { + +import from GSUP_Types all; +import from IPA_Emulation all; + +type component test_CT { + var IPA_Emulation_CT vc_IPA; + var IPA_CCM_Parameters ccm_pars; + port IPA_GSUP_PT GSUP; +}; + +modulepar { + charstring mp_hlr_ip := "127.0.0.1"; + integer mp_hlr_gsup_port := 4222; + integer mp_hlr_ctrl_port := 4259; +}; + +function f_init() runs on test_CT { + ccm_pars := c_IPA_default_ccm_pars; + ccm_pars.name := "Osmocom TTCN-3 GSUP Simulator"; + + vc_IPA := IPA_Emulation_CT.create("IPA"); + map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); + connect(vc_IPA:IPA_GSUP_PORT, self:GSUP); + vc_IPA.start(IPA_Emulation.main_client(mp_hlr_ip, mp_hlr_gsup_port, "", -1, ccm_pars)); +} + +testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT { + var hexstring imsi; + timer T := 10.0; + + f_init(); + + imsi := '01234'H; + GSUP.send(valueof(ts_GSUP_SAI_REQ(imsi))); + T.start; + alt { + [] GSUP.receive(tr_GSUP_SAI_ERR(imsi, 17)) { + setverdict(pass); + } + [] GSUP.receive(tr_GSUP_SAI_RES(imsi)) { + setverdict(fail); + } + [] T.timeout { + setverdict(inconc); + } + } +} + +control { + execute( TC_gsup_sai_err_invalid_imsi() ); +}; + +}; diff --git a/hlr/Makefile b/hlr/Makefile new file mode 100644 index 0000000..3f0952a --- /dev/null +++ b/hlr/Makefile @@ -0,0 +1,193 @@ +# This Makefile was generated by the Makefile Generator +# of the TTCN-3 Test Executor version CRL 113 200/6 R3A +# for Harald Welte (laforge at nataraja) on Thu Dec 28 17:35:00 2017 + +# Copyright (c) 2000-2017 Ericsson Telecom AB + +# The following make commands are available: +# - make, make all Builds the executable test suite. +# - make archive Archives all source files. +# - make check Checks the semantics of TTCN-3 and ASN.1modules. +# - make port Generates port skeletons. +# - make clean Removes all generated files. +# - make compile Translates TTCN-3 and ASN.1 modules to C++. +# - make dep Creates/updates dependency list. +# - make executable Builds the executable test suite. +# - make library Builds the library archive. +# - make objects Builds the object files without linking the executable. +# - make shared_objects Builds the shared object files without linking the executable. +# +# Set these variables... +# + +# The path of your TTCN-3 Test Executor installation: +# Uncomment this line to override the environment variable. +ifndef TTCN3_DIR +TTCN3_DIR = /usr +endif + +# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32) +PLATFORM = LINUX + +# Your C++ compiler: +# (if you change the platform, you may need to change the compiler) +CXX = g++ + +# Flags for the C++ preprocessor (and makedepend as well): +CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)/include -I/usr/include/titan + +# Flags for the C++ compiler: +CXXFLAGS = -Wall -fPIC + +# Flags for the linker: +LDFLAGS = -L /usr/lib/titan -fPIC + +ifeq ($(PLATFORM), WIN32) +# Silence linker warnings. +LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc +endif + +# Utility to create library files +AR = ar +ARFLAGS = + +# Flags for the TTCN-3 and ASN.1 compiler: +COMPILER_FLAGS = -L + +# Execution mode: (either ttcn3 or ttcn3-parallel) +TTCN3_LIB = ttcn3-parallel-dynamic + +# The path of your libxml2 installation: +# If you do not have your own one, leave it unchanged. +XMLDIR = $(TTCN3_DIR) + +# Directory to store the archived source files: +# Note: you can set any directory except ./archive +ARCHIVE_DIR = backup + +# +# You may change these variables. Add your files if necessary... +# + +# TTCN-3 modules of this project: +TTCN3_MODULES = GSUP_Test.ttcn GSM_Types.ttcn GSUP_Types.ttcn General_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_Emulation.ttcn IPA_Types.ttcn IPL4asp_Functions.ttcn IPL4asp_PortType.ttcn IPL4asp_Types.ttcn MGCP_CodecPort.ttcn MGCP_Types.ttcn MTP3asp_PortType.ttcn MTP3asp_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_Types.ttcn RSL_Types.ttcn SDP_Types.ttcn Socket_API_Definitions.ttcn TCCConversion_Functions.ttcn TCCInterface_Functions.ttcn + +# ASN.1 modules of this project: +ASN1_MODULES = + +# C++ source & header files generated from the TTCN-3 & ASN.1 modules of +# this project: +GENERATED_SOURCES = GSUP_Test.cc GSM_Types.cc GSUP_Types.cc General_Types.cc IPA_CodecPort.cc IPA_CodecPort_CtrlFunct.cc IPA_Emulation.cc IPA_Types.cc IPL4asp_Functions.cc IPL4asp_PortType.cc IPL4asp_Types.cc MGCP_CodecPort.cc MGCP_Types.cc MTP3asp_PortType.cc MTP3asp_Types.cc Osmocom_CTRL_Types.cc Osmocom_Types.cc RSL_Types.cc SDP_Types.cc Socket_API_Definitions.cc TCCConversion_Functions.cc TCCInterface_Functions.cc +GENERATED_HEADERS = GSUP_Test.hh GSM_Types.hh GSUP_Types.hh General_Types.hh IPA_CodecPort.hh IPA_CodecPort_CtrlFunct.hh IPA_Emulation.hh IPA_Types.hh IPL4asp_Functions.hh IPL4asp_PortType.hh IPL4asp_Types.hh MGCP_CodecPort.hh MGCP_Types.hh MTP3asp_PortType.hh MTP3asp_Types.hh Osmocom_CTRL_Types.hh Osmocom_Types.hh RSL_Types.hh SDP_Types.hh Socket_API_Definitions.hh TCCConversion_Functions.hh TCCInterface_Functions.hh + +# C/C++ Source & header files of Test Ports, external functions and +# other modules: +USER_SOURCES = IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc MGCP_CodecPort_CtrlFunctDef.cc SDP_parse_.tab.c lex.SDP_parse_.c +USER_HEADERS = IPL4asp_PT.hh SDP_parse_.tab.h + +# Shared object files of this project: +SHARED_OBJECTS = GSUP_Test.so GSM_Types.so GSUP_Types.so General_Types.so IPA_CodecPort.so IPA_CodecPort_CtrlFunct.so IPA_Emulation.so IPA_Types.so IPL4asp_Functions.so IPL4asp_PortType.so IPL4asp_Types.so MGCP_CodecPort.so MGCP_Types.so MTP3asp_PortType.so MTP3asp_Types.so Osmocom_CTRL_Types.so Osmocom_Types.so RSL_Types.so SDP_Types.so Socket_API_Definitions.so TCCConversion_Functions.so TCCInterface_Functions.so IPA_CodecPort_CtrlFunctDef.so IPL4asp_PT.so IPL4asp_discovery.so TCCConversion.so TCCInterface.so SDP_EncDec.so MGCP_CodecPort_CtrlFunctDef.so SDP_parse_.tab.so lex.SDP_parse_.so + +# Object files of this project that are needed for the executable test suite: +OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS) + +GENERATED_OBJECTS = GSUP_Test.o GSM_Types.o GSUP_Types.o General_Types.o IPA_CodecPort.o IPA_CodecPort_CtrlFunct.o IPA_Emulation.o IPA_Types.o IPL4asp_Functions.o IPL4asp_PortType.o IPL4asp_Types.o MGCP_CodecPort.o MGCP_Types.o MTP3asp_PortType.o MTP3asp_Types.o Osmocom_CTRL_Types.o Osmocom_Types.o RSL_Types.o SDP_Types.o Socket_API_Definitions.o TCCConversion_Functions.o TCCInterface_Functions.o + +USER_OBJECTS = IPA_CodecPort_CtrlFunctDef.o IPL4asp_PT.o IPL4asp_discovery.o TCCConversion.o TCCInterface.o SDP_EncDec.o MGCP_CodecPort_CtrlFunctDef.o SDP_parse_.tab.o lex.SDP_parse_.o + +# Other files of the project (Makefile, configuration files, etc.) +# that will be added to the archived source files: +OTHER_FILES = Makefile + +# The name of the executable test suite: +EXECUTABLE = GSUP_Test + + + +LIBRARY = lib$(EXECUTABLE).so + +TARGET = $(EXECUTABLE) + +# +# Do not modify these unless you know what you are doing... +# Platform specific additional libraries: +# +SOLARIS_LIBS = -lsocket -lnsl -lxml2 +SOLARIS8_LIBS = -lsocket -lnsl -lxml2 +LINUX_LIBS = -lxml2 +FREEBSD_LIBS = -lxml2 +WIN32_LIBS = -lxml2 + +# +# Rules for building the executable... +# + +all: $(TARGET) ; + +shared_objects: $(SHARED_OBJECTS) ; + +executable: $(EXECUTABLE) ; + +library: $(LIBRARY) ; + +objects: $(OBJECTS) compile; + +$(EXECUTABLE): $(SHARED_OBJECTS) + if $(CXX) $(LDFLAGS) -o $@ -Wl,--no-as-needed $(SHARED_OBJECTS) \ + -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ + -L$(OPENSSL_DIR)/lib -lcrypto \ + -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \ + then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi + +$(LIBRARY): $(OBJECTS) + $(CXX) -shared -o $@ $(OBJECTS) + +.cc.o .c.o: + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< + +%.so: %.o + $(CXX) -shared -o $@ $< + +$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile + @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi + +check: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler -s $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) + +port: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler -t $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) + +compile: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(ASN1_MODULES) - $? + touch $@ + +clean: + -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \ + $(GENERATED_SOURCES) $(SHARED_OBJECTS) compile \ + tags *.log + +dep: $(GENERATED_SOURCES) $(USER_SOURCES) ; + makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES) + +archive: + mkdir -p $(ARCHIVE_DIR) + tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \ + $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \ + | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz + +diag: + $(TTCN3_DIR)/bin/ttcn3_compiler -v 2>&1 + $(TTCN3_DIR)/bin/mctr_cli -v 2>&1 + $(CXX) -v 2>&1 + @echo TTCN3_DIR=$(TTCN3_DIR) + @echo OPENSSL_DIR=$(OPENSSL_DIR) + @echo XMLDIR=$(XMLDIR) + @echo PLATFORM=$(PLATFORM) + +# +# Add your rules here if necessary... +# + diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh new file mode 100755 index 0000000..6d83882 --- /dev/null +++ b/hlr/gen_links.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +BASEDIR=../deps + +gen_links() { + DIR=$1 + FILES=$* + for f in $FILES; do + echo "Linking $f" + ln -sf $DIR/$f $f + done +} + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCConversion.hh +TCCInterface.cc TCCInterface_ip.h" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.SDP/src +FILES="SDP_EncDec.cc SDP_Types.ttcn SDP_parse_.tab.c SDP_parse_.tab.h SDP_parse_parser.h SDP_parser.l +SDP_parser.y lex.SDP_parse_.c" +gen_links $DIR $FILES + +DIR=../MTP3asp_CNL113337/src +FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn" +gen_links $DIR $FILES + +DIR=../library +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn GSUP_Types.ttcn" +gen_links $DIR $FILES diff --git a/hlr/regen_makefile.sh b/hlr/regen_makefile.sh new file mode 100755 index 0000000..37991a6 --- /dev/null +++ b/hlr/regen_makefile.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +MAIN="GSUP_Test.ttcn" + +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" + +../regen-makefile.sh $MAIN $FILES diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn new file mode 100644 index 0000000..b994d1f --- /dev/null +++ b/library/GSUP_Types.ttcn @@ -0,0 +1,197 @@ +module GSUP_Types { + +import from General_Types all; +import from Osmocom_Types all; + +type enumerated GSUP_IEI { + OSMO_GSUP_IMSI_IE ('01'O), + OSMO_GSUP_CAUSE_IE ('02'O), + OSMO_GSUP_AUTH_TUPLE_IE ('03'O), + OSMO_GSUP_PDP_INFO_COMPL_IE ('04'O), + OSMO_GSUP_PDP_INFO_IE ('05'O), + OSMO_GSUP_CANCEL_TYPE_IE ('06'O), + OSMO_GSUP_FREEZE_PTMSI_IE ('07'O), + OSMO_GSUP_MSISDN_IE ('08'O), + OSMO_GSUP_HLR_NUMBER_IE ('09'O), + OSMO_GSUP_PDP_CONTEXT_ID_IE ('10'O), + OSMO_GSUP_PDP_TYPE_IE ('11'O), + OSMO_GSUP_ACCESS_POINT_NAME_IE ('12'O), + OSMO_GSUP_PDP_QOS_IE ('13'O), + OSMO_GSUP_CHARG_CHAR_IE ('14'O), + + OSMO_GSUP_RAND_IE ('20'O), + OSMO_GSUP_SRES_IE ('21'O), + OSMO_GSUP_KC_IE ('22'O), + OSMO_GSUP_IK_IE ('23'O), + OSMO_GSUP_CK_IE ('24'O), + OSMO_GSUP_AUTN_IE ('25'O), + OSMO_GSUP_AUTS_IE ('26'O), + OSMO_GSUP_RES_IE ('27'O), + OSMO_GSUP_CN_DOMAIN_IE ('28'O) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_MessageType { + OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST ('00000100'B), + OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR ('00000101'B), + OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT ('00000110'B), + + OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST ('00001000'B), + OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR ('00001001'B), + OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT ('00001010'B), + + OSMO_GSUP_MSGT_AUTH_FAIL_REPORT ('00001011'B), + + OSMO_GSUP_MSGT_PURGE_MS_REQUEST ('00001100'B), + OSMO_GSUP_MSGT_PURGE_MS_ERROR ('00001101'B), + OSMO_GSUP_MSGT_PURGE_MS_RESULT ('00001110'B), + + OSMO_GSUP_MSGT_INSERT_DATA_REQUEST ('00010000'B), + OSMO_GSUP_MSGT_INSERT_DATA_ERROR ('00010001'B), + OSMO_GSUP_MSGT_INSERT_DATA_RESULT ('00010010'B), + + OSMO_GSUP_MSGT_DELETE_DATA_REQUEST ('00010100'B), + OSMO_GSUP_MSGT_DELETE_DATA_ERROR ('00010101'B), + OSMO_GSUP_MSGT_DELETE_DATA_RESULT ('00010110'B), + + OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST ('00011100'B), + OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR ('00011101'B), + OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_CancelType { + OSMO_GSUP_CANCEL_TYPE_UPDATE (1), + OSMO_GSUP_CANCEL_TYPE_WITHDRAW (2) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_CnDomain { + OSMO_GSUP_CN_DOMAIN_PS (1), + OSMO_GSUP_CN_DOMAIN_CS (2) +} with { variant "FIELDLENGTH(8)" }; + +type record GSUP_IE { + GSUP_IEI tag, + uint8_t len, + GSUP_IeValue val +} with { variant (len) "LENGTHTO(val)" + variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE; + cause, tag = OSMO_GSUP_CAUSE_IE; + cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE; + auts, tag = OSMO_GSUP_AUTS_IE; + rand, tag = OSMO_GSUP_RAND_IE; + msisdn, tag = OSMO_GSUP_MSISDN_IE; + hlr_number, tag = OSMO_GSUP_HLR_NUMBER_IE; + cn_domain, tag = OSMO_GSUP_CN_DOMAIN_IE; + charg_char, tag = OSMO_GSUP_CHARG_CHAR_IE)" +}; + +type record of GSUP_IE GSUP_IEs; + +type union GSUP_IeValue { + hexstring imsi, + integer cause, + GSUP_CancelType cancel_type, + //boolean pdp_info_compl, + //boolean freeze_ptmsi, + GSUP_IEs pdp_info, + GSUP_IEs auth_tuple, + octetstring auts, + octetstring rand, + hexstring msisdn, + octetstring hlr_number, + GSUP_CnDomain cn_domain, + octetstring charg_char +}; + +type record GSUP_PDU { + GSUP_MessageType msg_type, + GSUP_IEs ies +}; + +external function enc_GSUP_PDU(in GSUP_PDU msg) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + +external function dec_GSUP_PDU(in octetstring msg) return GSUP_PDU + with { extension "prototype(convert) decode(RAW)" }; + + +template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template GSUP_IEs ies := *) := { + msg_type := msgt, + ies := ies +} + +template GSUP_PDU ts_GSUP(GSUP_MessageType msgt, GSUP_IEs ies := {}) := { + msg_type := msgt, + ies := ies +} + +template GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) := + ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) }); + +template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer cause) := + tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { + tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); + +template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) := + tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { + tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * }); + + + +template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val := ?) := { + tag := iei, + len := ?, + val := val +} + +template (value) GSUP_IE ts_GSUP_IE_IMSI(hexstring imsi) := { + tag := OSMO_GSUP_IMSI_IE, + len := 0, /* overwritten */ + val := { + imsi := imsi + } +} + +template GSUP_IE tr_GSUP_IE_IMSI(template hexstring imsi) := { + tag := OSMO_GSUP_IMSI_IE, + len := ?, + val := { + imsi := imsi + } +} + +template (value) GSUP_IE ts_GSUP_IE_Cause(integer cause) := { + tag := OSMO_GSUP_CAUSE_IE, + len := 0, /* overwritten */ + val := { + cause := cause + } +} + +template GSUP_IE tr_GSUP_IE_Cause(template integer cause) := { + tag := OSMO_GSUP_CAUSE_IE, + len := ?, + val := { + cause := cause + } +} + +template (value) GSUP_IE ts_GSUP_IE_AUTS(octetstring auts) := { + tag := OSMO_GSUP_AUTS_IE, + len := 0, /* overwritten */ + val := { + auts := auts + } +} + +template (value) GSUP_IE ts_GSUP_IE_RAND(octetstring rand) := { + tag := OSMO_GSUP_RAND_IE, + len := 0, /* overwritten */ + val := { + rand := rand + } +} + + + + +} with { encode "RAW"; variant "FIELDORDER(msb)" } diff --git a/library/IPA_Emulation.ttcn b/library/IPA_Emulation.ttcn index ddedb39..9bad69f 100644 --- a/library/IPA_Emulation.ttcn +++ b/library/IPA_Emulation.ttcn @@ -17,6 +17,7 @@ import from RSL_Types all; import from MGCP_Types all; +import from GSUP_Types all; import from Osmocom_CTRL_Types all; @@ -99,6 +100,12 @@ inout CtrlMessage, ASP_IPA_Event; } with { extension "internal" } +/* Client port for CTRL inside IPA */ +type port IPA_GSUP_PT message { + inout GSUP_PDU, ASP_IPA_Event; +} with { extension "internal" } + + type component IPA_Emulation_CT { /* down-facing port to IPA codec port */ port IPA_CODEC_PT IPA_PORT; @@ -110,6 +117,9 @@ port IPA_RSL_PT IPA_RSL_PORT; /* up-facing port for CTRL */ port IPA_CTRL_PT IPA_CTRL_PORT; + /* up-facing port for GSUP */ + port IPA_GSUP_PT IPA_GSUP_PORT; + /* up-facing port for other streams */ port IPA_SP_PT IPA_SP_PORT; @@ -192,6 +202,9 @@ } if (IPA_CTRL_PORT.checkstate("Connected")) { IPA_CTRL_PORT.send(evt); + } + if (IPA_GSUP_PORT.checkstate("Connected")) { + IPA_GSUP_PORT.send(evt); } /* FIXME: to other ports */ } @@ -348,6 +361,10 @@ IPA_CTRL_PORT.send(dec_CtrlMessage(msg_ch)); } +private function f_gsup_to_user(octetstring msg) runs on IPA_Emulation_CT { + IPA_GSUP_PORT.send(dec_GSUP_PDU(msg)); +} + private function f_mgcp_to_ud(octetstring payload) runs on IPA_Emulation_CT return ASP_IPA_Unitdata { if (mp_ipa_mgcp_uses_osmo_ext) { return valueof(t_ASP_IPA_UD(IPAC_PROTO_MGCP_OLD, payload)); @@ -365,6 +382,7 @@ var MgcpCommand mgcp_cmd; var MgcpResponse mgcp_rsp; var CtrlMessage ctrl_msg; + var GSUP_PDU gsup_msg; var octetstring payload; var ASP_RSL_Unitdata rsl; @@ -399,6 +417,8 @@ f_mgcp_to_user(ipa_rx.msg); } case (IPAC_PROTO_EXT_CTRL) { f_ctrl_to_user(ipa_rx.msg); + } case (IPAC_PROTO_EXT_GSUP) { + f_gsup_to_user(ipa_rx.msg); } case else { IPA_SP_PORT.send(f_to_asp(ipa_rx)); } @@ -451,6 +471,12 @@ IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud)); } + [] IPA_GSUP_PORT.receive(GSUP_PDU:?) -> value gsup_msg { + payload := enc_GSUP_PDU(gsup_msg); + ipa_ud := valueof(t_ASP_IPA_UD(IPAC_PROTO_OSMO, payload, IPAC_PROTO_EXT_GSUP)); + IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud)); + } + /* Received RSL -> down into IPA */ [] IPA_RSL_PORT.receive(ASP_RSL_Unitdata:?) -> value rsl { IPA_PORT.send(f_from_rsl(g_ipa_conn_id, rsl)); diff --git a/selftest/gen_links.sh b/selftest/gen_links.sh index 0dd6ea0..5f53e44 100755 --- a/selftest/gen_links.sh +++ b/selftest/gen_links.sh @@ -52,5 +52,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:19:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:19:00 +0000 Subject: osmo-ttcn3-hacks[master]: bsc-test: Fix compilation after IuUP support was introduced In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:19:04 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:19:04 +0000 Subject: osmo-ttcn3-hacks[master]: GSUP Support and first test against OsmoHLR In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:19:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:19:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: GSUP Support and first test against OsmoHLR In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: GSUP Support and first test against OsmoHLR ...................................................................... GSUP Support and first test against OsmoHLR Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff --- M bsc-nat/gen_links.sh M bsc/gen_links.sh A hlr/GSUP_Test.ttcn A hlr/Makefile A hlr/gen_links.sh A hlr/regen_makefile.sh A library/GSUP_Types.ttcn M library/IPA_Emulation.ttcn M selftest/gen_links.sh 9 files changed, 518 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 9a45c89..65b1602 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -55,5 +55,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 4316966..14771a7 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -76,5 +76,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES diff --git a/hlr/GSUP_Test.ttcn b/hlr/GSUP_Test.ttcn new file mode 100644 index 0000000..1118369 --- /dev/null +++ b/hlr/GSUP_Test.ttcn @@ -0,0 +1,54 @@ +module GSUP_Test { + +import from GSUP_Types all; +import from IPA_Emulation all; + +type component test_CT { + var IPA_Emulation_CT vc_IPA; + var IPA_CCM_Parameters ccm_pars; + port IPA_GSUP_PT GSUP; +}; + +modulepar { + charstring mp_hlr_ip := "127.0.0.1"; + integer mp_hlr_gsup_port := 4222; + integer mp_hlr_ctrl_port := 4259; +}; + +function f_init() runs on test_CT { + ccm_pars := c_IPA_default_ccm_pars; + ccm_pars.name := "Osmocom TTCN-3 GSUP Simulator"; + + vc_IPA := IPA_Emulation_CT.create("IPA"); + map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); + connect(vc_IPA:IPA_GSUP_PORT, self:GSUP); + vc_IPA.start(IPA_Emulation.main_client(mp_hlr_ip, mp_hlr_gsup_port, "", -1, ccm_pars)); +} + +testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT { + var hexstring imsi; + timer T := 10.0; + + f_init(); + + imsi := '01234'H; + GSUP.send(valueof(ts_GSUP_SAI_REQ(imsi))); + T.start; + alt { + [] GSUP.receive(tr_GSUP_SAI_ERR(imsi, 17)) { + setverdict(pass); + } + [] GSUP.receive(tr_GSUP_SAI_RES(imsi)) { + setverdict(fail); + } + [] T.timeout { + setverdict(inconc); + } + } +} + +control { + execute( TC_gsup_sai_err_invalid_imsi() ); +}; + +}; diff --git a/hlr/Makefile b/hlr/Makefile new file mode 100644 index 0000000..3f0952a --- /dev/null +++ b/hlr/Makefile @@ -0,0 +1,193 @@ +# This Makefile was generated by the Makefile Generator +# of the TTCN-3 Test Executor version CRL 113 200/6 R3A +# for Harald Welte (laforge at nataraja) on Thu Dec 28 17:35:00 2017 + +# Copyright (c) 2000-2017 Ericsson Telecom AB + +# The following make commands are available: +# - make, make all Builds the executable test suite. +# - make archive Archives all source files. +# - make check Checks the semantics of TTCN-3 and ASN.1modules. +# - make port Generates port skeletons. +# - make clean Removes all generated files. +# - make compile Translates TTCN-3 and ASN.1 modules to C++. +# - make dep Creates/updates dependency list. +# - make executable Builds the executable test suite. +# - make library Builds the library archive. +# - make objects Builds the object files without linking the executable. +# - make shared_objects Builds the shared object files without linking the executable. +# +# Set these variables... +# + +# The path of your TTCN-3 Test Executor installation: +# Uncomment this line to override the environment variable. +ifndef TTCN3_DIR +TTCN3_DIR = /usr +endif + +# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32) +PLATFORM = LINUX + +# Your C++ compiler: +# (if you change the platform, you may need to change the compiler) +CXX = g++ + +# Flags for the C++ preprocessor (and makedepend as well): +CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)/include -I/usr/include/titan + +# Flags for the C++ compiler: +CXXFLAGS = -Wall -fPIC + +# Flags for the linker: +LDFLAGS = -L /usr/lib/titan -fPIC + +ifeq ($(PLATFORM), WIN32) +# Silence linker warnings. +LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc +endif + +# Utility to create library files +AR = ar +ARFLAGS = + +# Flags for the TTCN-3 and ASN.1 compiler: +COMPILER_FLAGS = -L + +# Execution mode: (either ttcn3 or ttcn3-parallel) +TTCN3_LIB = ttcn3-parallel-dynamic + +# The path of your libxml2 installation: +# If you do not have your own one, leave it unchanged. +XMLDIR = $(TTCN3_DIR) + +# Directory to store the archived source files: +# Note: you can set any directory except ./archive +ARCHIVE_DIR = backup + +# +# You may change these variables. Add your files if necessary... +# + +# TTCN-3 modules of this project: +TTCN3_MODULES = GSUP_Test.ttcn GSM_Types.ttcn GSUP_Types.ttcn General_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_Emulation.ttcn IPA_Types.ttcn IPL4asp_Functions.ttcn IPL4asp_PortType.ttcn IPL4asp_Types.ttcn MGCP_CodecPort.ttcn MGCP_Types.ttcn MTP3asp_PortType.ttcn MTP3asp_Types.ttcn Osmocom_CTRL_Types.ttcn Osmocom_Types.ttcn RSL_Types.ttcn SDP_Types.ttcn Socket_API_Definitions.ttcn TCCConversion_Functions.ttcn TCCInterface_Functions.ttcn + +# ASN.1 modules of this project: +ASN1_MODULES = + +# C++ source & header files generated from the TTCN-3 & ASN.1 modules of +# this project: +GENERATED_SOURCES = GSUP_Test.cc GSM_Types.cc GSUP_Types.cc General_Types.cc IPA_CodecPort.cc IPA_CodecPort_CtrlFunct.cc IPA_Emulation.cc IPA_Types.cc IPL4asp_Functions.cc IPL4asp_PortType.cc IPL4asp_Types.cc MGCP_CodecPort.cc MGCP_Types.cc MTP3asp_PortType.cc MTP3asp_Types.cc Osmocom_CTRL_Types.cc Osmocom_Types.cc RSL_Types.cc SDP_Types.cc Socket_API_Definitions.cc TCCConversion_Functions.cc TCCInterface_Functions.cc +GENERATED_HEADERS = GSUP_Test.hh GSM_Types.hh GSUP_Types.hh General_Types.hh IPA_CodecPort.hh IPA_CodecPort_CtrlFunct.hh IPA_Emulation.hh IPA_Types.hh IPL4asp_Functions.hh IPL4asp_PortType.hh IPL4asp_Types.hh MGCP_CodecPort.hh MGCP_Types.hh MTP3asp_PortType.hh MTP3asp_Types.hh Osmocom_CTRL_Types.hh Osmocom_Types.hh RSL_Types.hh SDP_Types.hh Socket_API_Definitions.hh TCCConversion_Functions.hh TCCInterface_Functions.hh + +# C/C++ Source & header files of Test Ports, external functions and +# other modules: +USER_SOURCES = IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc MGCP_CodecPort_CtrlFunctDef.cc SDP_parse_.tab.c lex.SDP_parse_.c +USER_HEADERS = IPL4asp_PT.hh SDP_parse_.tab.h + +# Shared object files of this project: +SHARED_OBJECTS = GSUP_Test.so GSM_Types.so GSUP_Types.so General_Types.so IPA_CodecPort.so IPA_CodecPort_CtrlFunct.so IPA_Emulation.so IPA_Types.so IPL4asp_Functions.so IPL4asp_PortType.so IPL4asp_Types.so MGCP_CodecPort.so MGCP_Types.so MTP3asp_PortType.so MTP3asp_Types.so Osmocom_CTRL_Types.so Osmocom_Types.so RSL_Types.so SDP_Types.so Socket_API_Definitions.so TCCConversion_Functions.so TCCInterface_Functions.so IPA_CodecPort_CtrlFunctDef.so IPL4asp_PT.so IPL4asp_discovery.so TCCConversion.so TCCInterface.so SDP_EncDec.so MGCP_CodecPort_CtrlFunctDef.so SDP_parse_.tab.so lex.SDP_parse_.so + +# Object files of this project that are needed for the executable test suite: +OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS) + +GENERATED_OBJECTS = GSUP_Test.o GSM_Types.o GSUP_Types.o General_Types.o IPA_CodecPort.o IPA_CodecPort_CtrlFunct.o IPA_Emulation.o IPA_Types.o IPL4asp_Functions.o IPL4asp_PortType.o IPL4asp_Types.o MGCP_CodecPort.o MGCP_Types.o MTP3asp_PortType.o MTP3asp_Types.o Osmocom_CTRL_Types.o Osmocom_Types.o RSL_Types.o SDP_Types.o Socket_API_Definitions.o TCCConversion_Functions.o TCCInterface_Functions.o + +USER_OBJECTS = IPA_CodecPort_CtrlFunctDef.o IPL4asp_PT.o IPL4asp_discovery.o TCCConversion.o TCCInterface.o SDP_EncDec.o MGCP_CodecPort_CtrlFunctDef.o SDP_parse_.tab.o lex.SDP_parse_.o + +# Other files of the project (Makefile, configuration files, etc.) +# that will be added to the archived source files: +OTHER_FILES = Makefile + +# The name of the executable test suite: +EXECUTABLE = GSUP_Test + + + +LIBRARY = lib$(EXECUTABLE).so + +TARGET = $(EXECUTABLE) + +# +# Do not modify these unless you know what you are doing... +# Platform specific additional libraries: +# +SOLARIS_LIBS = -lsocket -lnsl -lxml2 +SOLARIS8_LIBS = -lsocket -lnsl -lxml2 +LINUX_LIBS = -lxml2 +FREEBSD_LIBS = -lxml2 +WIN32_LIBS = -lxml2 + +# +# Rules for building the executable... +# + +all: $(TARGET) ; + +shared_objects: $(SHARED_OBJECTS) ; + +executable: $(EXECUTABLE) ; + +library: $(LIBRARY) ; + +objects: $(OBJECTS) compile; + +$(EXECUTABLE): $(SHARED_OBJECTS) + if $(CXX) $(LDFLAGS) -o $@ -Wl,--no-as-needed $(SHARED_OBJECTS) \ + -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ + -L$(OPENSSL_DIR)/lib -lcrypto \ + -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \ + then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi + +$(LIBRARY): $(OBJECTS) + $(CXX) -shared -o $@ $(OBJECTS) + +.cc.o .c.o: + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< + +%.so: %.o + $(CXX) -shared -o $@ $< + +$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile + @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi + +check: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler -s $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) + +port: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler -t $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) + +compile: $(TTCN3_MODULES) $(ASN1_MODULES) + $(TTCN3_DIR)/bin/ttcn3_compiler $(COMPILER_FLAGS) \ + $(TTCN3_MODULES) $(ASN1_MODULES) - $? + touch $@ + +clean: + -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \ + $(GENERATED_SOURCES) $(SHARED_OBJECTS) compile \ + tags *.log + +dep: $(GENERATED_SOURCES) $(USER_SOURCES) ; + makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES) + +archive: + mkdir -p $(ARCHIVE_DIR) + tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \ + $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \ + | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz + +diag: + $(TTCN3_DIR)/bin/ttcn3_compiler -v 2>&1 + $(TTCN3_DIR)/bin/mctr_cli -v 2>&1 + $(CXX) -v 2>&1 + @echo TTCN3_DIR=$(TTCN3_DIR) + @echo OPENSSL_DIR=$(OPENSSL_DIR) + @echo XMLDIR=$(XMLDIR) + @echo PLATFORM=$(PLATFORM) + +# +# Add your rules here if necessary... +# + diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh new file mode 100755 index 0000000..6d83882 --- /dev/null +++ b/hlr/gen_links.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +BASEDIR=../deps + +gen_links() { + DIR=$1 + FILES=$* + for f in $FILES; do + echo "Linking $f" + ln -sf $DIR/$f $f + done +} + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCConversion.hh +TCCInterface.cc TCCInterface_ip.h" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.SDP/src +FILES="SDP_EncDec.cc SDP_Types.ttcn SDP_parse_.tab.c SDP_parse_.tab.h SDP_parse_parser.h SDP_parser.l +SDP_parser.y lex.SDP_parse_.c" +gen_links $DIR $FILES + +DIR=../MTP3asp_CNL113337/src +FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn" +gen_links $DIR $FILES + +DIR=../library +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn GSUP_Types.ttcn" +gen_links $DIR $FILES diff --git a/hlr/regen_makefile.sh b/hlr/regen_makefile.sh new file mode 100755 index 0000000..37991a6 --- /dev/null +++ b/hlr/regen_makefile.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +MAIN="GSUP_Test.ttcn" + +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" + +../regen-makefile.sh $MAIN $FILES diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn new file mode 100644 index 0000000..b994d1f --- /dev/null +++ b/library/GSUP_Types.ttcn @@ -0,0 +1,197 @@ +module GSUP_Types { + +import from General_Types all; +import from Osmocom_Types all; + +type enumerated GSUP_IEI { + OSMO_GSUP_IMSI_IE ('01'O), + OSMO_GSUP_CAUSE_IE ('02'O), + OSMO_GSUP_AUTH_TUPLE_IE ('03'O), + OSMO_GSUP_PDP_INFO_COMPL_IE ('04'O), + OSMO_GSUP_PDP_INFO_IE ('05'O), + OSMO_GSUP_CANCEL_TYPE_IE ('06'O), + OSMO_GSUP_FREEZE_PTMSI_IE ('07'O), + OSMO_GSUP_MSISDN_IE ('08'O), + OSMO_GSUP_HLR_NUMBER_IE ('09'O), + OSMO_GSUP_PDP_CONTEXT_ID_IE ('10'O), + OSMO_GSUP_PDP_TYPE_IE ('11'O), + OSMO_GSUP_ACCESS_POINT_NAME_IE ('12'O), + OSMO_GSUP_PDP_QOS_IE ('13'O), + OSMO_GSUP_CHARG_CHAR_IE ('14'O), + + OSMO_GSUP_RAND_IE ('20'O), + OSMO_GSUP_SRES_IE ('21'O), + OSMO_GSUP_KC_IE ('22'O), + OSMO_GSUP_IK_IE ('23'O), + OSMO_GSUP_CK_IE ('24'O), + OSMO_GSUP_AUTN_IE ('25'O), + OSMO_GSUP_AUTS_IE ('26'O), + OSMO_GSUP_RES_IE ('27'O), + OSMO_GSUP_CN_DOMAIN_IE ('28'O) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_MessageType { + OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST ('00000100'B), + OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR ('00000101'B), + OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT ('00000110'B), + + OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST ('00001000'B), + OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR ('00001001'B), + OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT ('00001010'B), + + OSMO_GSUP_MSGT_AUTH_FAIL_REPORT ('00001011'B), + + OSMO_GSUP_MSGT_PURGE_MS_REQUEST ('00001100'B), + OSMO_GSUP_MSGT_PURGE_MS_ERROR ('00001101'B), + OSMO_GSUP_MSGT_PURGE_MS_RESULT ('00001110'B), + + OSMO_GSUP_MSGT_INSERT_DATA_REQUEST ('00010000'B), + OSMO_GSUP_MSGT_INSERT_DATA_ERROR ('00010001'B), + OSMO_GSUP_MSGT_INSERT_DATA_RESULT ('00010010'B), + + OSMO_GSUP_MSGT_DELETE_DATA_REQUEST ('00010100'B), + OSMO_GSUP_MSGT_DELETE_DATA_ERROR ('00010101'B), + OSMO_GSUP_MSGT_DELETE_DATA_RESULT ('00010110'B), + + OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST ('00011100'B), + OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR ('00011101'B), + OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_CancelType { + OSMO_GSUP_CANCEL_TYPE_UPDATE (1), + OSMO_GSUP_CANCEL_TYPE_WITHDRAW (2) +} with { variant "FIELDLENGTH(8)" }; + +type enumerated GSUP_CnDomain { + OSMO_GSUP_CN_DOMAIN_PS (1), + OSMO_GSUP_CN_DOMAIN_CS (2) +} with { variant "FIELDLENGTH(8)" }; + +type record GSUP_IE { + GSUP_IEI tag, + uint8_t len, + GSUP_IeValue val +} with { variant (len) "LENGTHTO(val)" + variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE; + cause, tag = OSMO_GSUP_CAUSE_IE; + cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE; + auts, tag = OSMO_GSUP_AUTS_IE; + rand, tag = OSMO_GSUP_RAND_IE; + msisdn, tag = OSMO_GSUP_MSISDN_IE; + hlr_number, tag = OSMO_GSUP_HLR_NUMBER_IE; + cn_domain, tag = OSMO_GSUP_CN_DOMAIN_IE; + charg_char, tag = OSMO_GSUP_CHARG_CHAR_IE)" +}; + +type record of GSUP_IE GSUP_IEs; + +type union GSUP_IeValue { + hexstring imsi, + integer cause, + GSUP_CancelType cancel_type, + //boolean pdp_info_compl, + //boolean freeze_ptmsi, + GSUP_IEs pdp_info, + GSUP_IEs auth_tuple, + octetstring auts, + octetstring rand, + hexstring msisdn, + octetstring hlr_number, + GSUP_CnDomain cn_domain, + octetstring charg_char +}; + +type record GSUP_PDU { + GSUP_MessageType msg_type, + GSUP_IEs ies +}; + +external function enc_GSUP_PDU(in GSUP_PDU msg) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + +external function dec_GSUP_PDU(in octetstring msg) return GSUP_PDU + with { extension "prototype(convert) decode(RAW)" }; + + +template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template GSUP_IEs ies := *) := { + msg_type := msgt, + ies := ies +} + +template GSUP_PDU ts_GSUP(GSUP_MessageType msgt, GSUP_IEs ies := {}) := { + msg_type := msgt, + ies := ies +} + +template GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) := + ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) }); + +template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer cause) := + tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { + tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); + +template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) := + tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { + tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * }); + + + +template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val := ?) := { + tag := iei, + len := ?, + val := val +} + +template (value) GSUP_IE ts_GSUP_IE_IMSI(hexstring imsi) := { + tag := OSMO_GSUP_IMSI_IE, + len := 0, /* overwritten */ + val := { + imsi := imsi + } +} + +template GSUP_IE tr_GSUP_IE_IMSI(template hexstring imsi) := { + tag := OSMO_GSUP_IMSI_IE, + len := ?, + val := { + imsi := imsi + } +} + +template (value) GSUP_IE ts_GSUP_IE_Cause(integer cause) := { + tag := OSMO_GSUP_CAUSE_IE, + len := 0, /* overwritten */ + val := { + cause := cause + } +} + +template GSUP_IE tr_GSUP_IE_Cause(template integer cause) := { + tag := OSMO_GSUP_CAUSE_IE, + len := ?, + val := { + cause := cause + } +} + +template (value) GSUP_IE ts_GSUP_IE_AUTS(octetstring auts) := { + tag := OSMO_GSUP_AUTS_IE, + len := 0, /* overwritten */ + val := { + auts := auts + } +} + +template (value) GSUP_IE ts_GSUP_IE_RAND(octetstring rand) := { + tag := OSMO_GSUP_RAND_IE, + len := 0, /* overwritten */ + val := { + rand := rand + } +} + + + + +} with { encode "RAW"; variant "FIELDORDER(msb)" } diff --git a/library/IPA_Emulation.ttcn b/library/IPA_Emulation.ttcn index ddedb39..9bad69f 100644 --- a/library/IPA_Emulation.ttcn +++ b/library/IPA_Emulation.ttcn @@ -17,6 +17,7 @@ import from RSL_Types all; import from MGCP_Types all; +import from GSUP_Types all; import from Osmocom_CTRL_Types all; @@ -99,6 +100,12 @@ inout CtrlMessage, ASP_IPA_Event; } with { extension "internal" } +/* Client port for CTRL inside IPA */ +type port IPA_GSUP_PT message { + inout GSUP_PDU, ASP_IPA_Event; +} with { extension "internal" } + + type component IPA_Emulation_CT { /* down-facing port to IPA codec port */ port IPA_CODEC_PT IPA_PORT; @@ -110,6 +117,9 @@ port IPA_RSL_PT IPA_RSL_PORT; /* up-facing port for CTRL */ port IPA_CTRL_PT IPA_CTRL_PORT; + /* up-facing port for GSUP */ + port IPA_GSUP_PT IPA_GSUP_PORT; + /* up-facing port for other streams */ port IPA_SP_PT IPA_SP_PORT; @@ -192,6 +202,9 @@ } if (IPA_CTRL_PORT.checkstate("Connected")) { IPA_CTRL_PORT.send(evt); + } + if (IPA_GSUP_PORT.checkstate("Connected")) { + IPA_GSUP_PORT.send(evt); } /* FIXME: to other ports */ } @@ -348,6 +361,10 @@ IPA_CTRL_PORT.send(dec_CtrlMessage(msg_ch)); } +private function f_gsup_to_user(octetstring msg) runs on IPA_Emulation_CT { + IPA_GSUP_PORT.send(dec_GSUP_PDU(msg)); +} + private function f_mgcp_to_ud(octetstring payload) runs on IPA_Emulation_CT return ASP_IPA_Unitdata { if (mp_ipa_mgcp_uses_osmo_ext) { return valueof(t_ASP_IPA_UD(IPAC_PROTO_MGCP_OLD, payload)); @@ -365,6 +382,7 @@ var MgcpCommand mgcp_cmd; var MgcpResponse mgcp_rsp; var CtrlMessage ctrl_msg; + var GSUP_PDU gsup_msg; var octetstring payload; var ASP_RSL_Unitdata rsl; @@ -399,6 +417,8 @@ f_mgcp_to_user(ipa_rx.msg); } case (IPAC_PROTO_EXT_CTRL) { f_ctrl_to_user(ipa_rx.msg); + } case (IPAC_PROTO_EXT_GSUP) { + f_gsup_to_user(ipa_rx.msg); } case else { IPA_SP_PORT.send(f_to_asp(ipa_rx)); } @@ -451,6 +471,12 @@ IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud)); } + [] IPA_GSUP_PORT.receive(GSUP_PDU:?) -> value gsup_msg { + payload := enc_GSUP_PDU(gsup_msg); + ipa_ud := valueof(t_ASP_IPA_UD(IPAC_PROTO_OSMO, payload, IPAC_PROTO_EXT_GSUP)); + IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud)); + } + /* Received RSL -> down into IPA */ [] IPA_RSL_PORT.receive(ASP_RSL_Unitdata:?) -> value rsl { IPA_PORT.send(f_from_rsl(g_ipa_conn_id, rsl)); diff --git a/selftest/gen_links.sh b/selftest/gen_links.sh index 0dd6ea0..5f53e44 100755 --- a/selftest/gen_links.sh +++ b/selftest/gen_links.sh @@ -52,5 +52,5 @@ gen_links $DIR $FILES DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/5617 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd7a6aca1ab193da39294f49a3adc4c1cd7cecff Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:19:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:19:20 +0000 Subject: [MERGED] osmo-ttcn3-hacks[master]: bsc-test: Fix compilation after IuUP support was introduced In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc-test: Fix compilation after IuUP support was introduced ...................................................................... bsc-test: Fix compilation after IuUP support was introduced Ever since I46de7fb9c324654275a27aa5f8c1be70340e3229 we had problems linking the object files together due to a missing object Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a --- M bsc/regen_makefile.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index d937482..1d5b92b 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc *.c" ../regen-makefile.sh $MAIN $FILES -- To view, visit https://gerrit.osmocom.org/5616 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d8c37f924b3a2c8b28cace4da2add1fadd0151a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:20:06 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:20:06 +0000 Subject: osmo-bsc[master]: Add optional profiling support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:20:09 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:20:09 +0000 Subject: osmo-pcu[master]: Add optional profiling support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:21:37 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:21:37 +0000 Subject: libosmocore[master]: coding: move eB adjustement to appropriate place In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5614 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I385cd6ffea4d13ef911910fc87c92b73809888a2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:22:29 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:22:29 +0000 Subject: osmo-iuh[master]: Use proper package version In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8711b9d819454d810291d57b97119d9fe4a47f8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:22:34 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:22:34 +0000 Subject: [MERGED] osmo-iuh[master]: Use proper package version In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Use proper package version ...................................................................... Use proper package version Use actual application version instead of hardcoded "0". Change-Id: I8711b9d819454d810291d57b97119d9fe4a47f8e --- M src/hnbgw.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index 752fc0f..5f5c311 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -326,7 +326,7 @@ static struct vty_app_info vty_info = { .name = "OsmoHNBGW", - .version = "0", + .version = PACKAGE_VERSION, .go_parent_cb = hnbgw_vty_go_parent, }; -- To view, visit https://gerrit.osmocom.org/5602 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8711b9d819454d810291d57b97119d9fe4a47f8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:22:57 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:22:57 +0000 Subject: osmo-iuh[master]: Enable sanitize for CI tests In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5603 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I90ca756691e4f644d93af519ed5d54d794d1d401 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 22:23:23 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 28 Dec 2017 22:23:23 +0000 Subject: osmo-bsc[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5605 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9492d8e988b464aa41f572611cbf2461bb8be3eb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Dec 28 23:44:57 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 23:44:57 +0000 Subject: [MERGED] osmo-pcu[master]: Add optional profiling support In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add optional profiling support ...................................................................... Add optional profiling support This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 5867cbe..8a8b93c 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,15 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) -- To view, visit https://gerrit.osmocom.org/5610 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu Dec 28 23:45:03 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 28 Dec 2017 23:45:03 +0000 Subject: [MERGED] osmo-bsc[master]: Add optional profiling support In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add optional profiling support ...................................................................... Add optional profiling support This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 97b2e2f..433e3bf 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,15 @@ AC_SUBST([COVERAGE_LDFLAGS]) fi +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + AC_ARG_ENABLE([vty_tests], AC_HELP_STRING([--enable-vty-tests], [Include the VTY/CTRL tests in make check (deprecated) -- To view, visit https://gerrit.osmocom.org/5613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 03:35:47 2017 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 29 Dec 2017 03:35:47 +0000 Subject: osmo-bsc[master]: Check and handle SMS encoding failure In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/5615/1/src/osmo-bsc_nat/bsc_nat_rewrite.c File src/osmo-bsc_nat/bsc_nat_rewrite.c: Line 424: LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); The imsi and/or tmsi would be nice. Also the field which is broken from/dest. -- To view, visit https://gerrit.osmocom.org/5615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From admin at opensuse.org Thu Dec 28 19:59:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 19:59:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a461a7962a18_350adaaf5c145314@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 50s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 50s] printf(line); [ 50s] ^~~~~~ [ 50s] cc1: some warnings being treated as errors [ 50s] Makefile:517: recipe for target 'abisip-find.o' failed [ 50s] make[4]: *** [abisip-find.o] Error 1 [ 50s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 50s] Makefile:408: recipe for target 'all-recursive' failed [ 50s] make[3]: *** [all-recursive] Error 1 [ 50s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 50s] Makefile:443: recipe for target 'all-recursive' failed [ 50s] make[2]: *** [all-recursive] Error 1 [ 50s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 50s] Makefile:375: recipe for target 'all' failed [ 50s] make[1]: *** [all] Error 2 [ 50s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 50s] dh_auto_build: make -j1 returned exit code 2 [ 50s] debian/rules:45: recipe for target 'build' failed [ 50s] make: *** [build] Error 2 [ 50s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 50s] [ 50s] build75 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 19:59:47 UTC 2017. [ 50s] [ 50s] ### VM INTERACTION START ### [ 53s] [ 48.307711] reboot: Power down [ 53s] ### VM INTERACTION END ### [ 53s] [ 53s] build75 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 19:59:51 UTC 2017. [ 53s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:01:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:01:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a461a7d69686_350adaaf5c14582c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 91s] printf(line); [ 91s] ^ [ 91s] cc1: some warnings being treated as errors [ 91s] Makefile:506: recipe for target 'abisip-find.o' failed [ 91s] make[4]: *** [abisip-find.o] Error 1 [ 91s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 91s] Makefile:396: recipe for target 'all-recursive' failed [ 91s] make[3]: *** [all-recursive] Error 1 [ 91s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 91s] Makefile:431: recipe for target 'all-recursive' failed [ 91s] make[2]: *** [all-recursive] Error 1 [ 91s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 91s] Makefile:362: recipe for target 'all' failed [ 91s] make[1]: *** [all] Error 2 [ 91s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 91s] dh_auto_build: make -j1 returned exit code 2 [ 91s] debian/rules:45: recipe for target 'build' failed [ 91s] make: *** [build] Error 2 [ 91s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 91s] [ 91s] wildcard2 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:01:44 UTC 2017. [ 91s] [ 91s] ### VM INTERACTION START ### [ 92s] Powering off. [ 92s] [ 83.949313] reboot: Power down [ 96s] ### VM INTERACTION END ### [ 97s] [ 97s] wildcard2 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:01:49 UTC 2017. [ 97s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:02:13 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:02:13 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a461a7f70ca3_350adaaf5c14601d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 93s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 93s] printf(line); [ 93s] ^~~~~~ [ 93s] cc1: some warnings being treated as errors [ 93s] Makefile:517: recipe for target 'abisip-find.o' failed [ 93s] make[4]: *** [abisip-find.o] Error 1 [ 93s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 93s] Makefile:408: recipe for target 'all-recursive' failed [ 93s] make[3]: *** [all-recursive] Error 1 [ 93s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 93s] Makefile:443: recipe for target 'all-recursive' failed [ 93s] make[2]: *** [all-recursive] Error 1 [ 93s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 93s] Makefile:375: recipe for target 'all' failed [ 93s] make[1]: *** [all] Error 2 [ 93s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 93s] dh_auto_build: make -j1 returned exit code 2 [ 93s] debian/rules:45: recipe for target 'build' failed [ 93s] make: *** [build] Error 2 [ 93s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 93s] [ 93s] lamb24 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:02:03 UTC 2017. [ 93s] [ 93s] ### VM INTERACTION START ### [ 96s] [ 88.268615] reboot: Power down [ 96s] ### VM INTERACTION END ### [ 96s] [ 96s] lamb24 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:02:05 UTC 2017. [ 96s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:03:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:03:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a461a9b6bdef_350adaaf5c146857@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 107s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 107s] printf(line); [ 107s] ^~~~~~ [ 107s] cc1: some warnings being treated as errors [ 107s] Makefile:517: recipe for target 'abisip-find.o' failed [ 107s] make[4]: *** [abisip-find.o] Error 1 [ 107s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 107s] Makefile:408: recipe for target 'all-recursive' failed [ 107s] make[3]: *** [all-recursive] Error 1 [ 107s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 107s] Makefile:443: recipe for target 'all-recursive' failed [ 107s] make[2]: *** [all-recursive] Error 1 [ 107s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 107s] Makefile:375: recipe for target 'all' failed [ 107s] make[1]: *** [all] Error 2 [ 107s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 107s] dh_auto_build: make -j1 returned exit code 2 [ 107s] debian/rules:45: recipe for target 'build' failed [ 107s] make: *** [build] Error 2 [ 107s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 107s] [ 107s] lamb28 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:39 UTC 2017. [ 107s] [ 107s] ### VM INTERACTION START ### [ 110s] [ 102.190539] reboot: Power down [ 110s] ### VM INTERACTION END ### [ 110s] [ 110s] lamb28 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:43 UTC 2017. [ 110s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:03:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:03:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a461a9bcf248_350adaaf5c146922@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 54s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 54s] printf(line); [ 54s] ^~~~~~ [ 54s] cc1: some warnings being treated as errors [ 54s] Makefile:517: recipe for target 'abisip-find.o' failed [ 54s] make[4]: *** [abisip-find.o] Error 1 [ 54s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 54s] Makefile:408: recipe for target 'all-recursive' failed [ 54s] make[3]: *** [all-recursive] Error 1 [ 54s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 54s] Makefile:443: recipe for target 'all-recursive' failed [ 54s] make[2]: *** [all-recursive] Error 1 [ 54s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 54s] Makefile:375: recipe for target 'all' failed [ 54s] make[1]: *** [all] Error 2 [ 54s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 54s] dh_auto_build: make -j1 returned exit code 2 [ 54s] debian/rules:45: recipe for target 'build' failed [ 54s] make: *** [build] Error 2 [ 54s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 54s] [ 54s] build73 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:43 UTC 2017. [ 54s] [ 54s] ### VM INTERACTION START ### [ 57s] [ 51.959356] reboot: Power down [ 57s] ### VM INTERACTION END ### [ 57s] [ 57s] build73 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:46 UTC 2017. [ 57s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:03:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:03:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a461a9c97647_350adaaf5c1470ec@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 107s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 107s] printf(line); [ 107s] ^~~~~~ [ 107s] cc1: some warnings being treated as errors [ 107s] Makefile:517: recipe for target 'abisip-find.o' failed [ 107s] make[4]: *** [abisip-find.o] Error 1 [ 107s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 107s] Makefile:408: recipe for target 'all-recursive' failed [ 107s] make[3]: *** [all-recursive] Error 1 [ 107s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 107s] Makefile:443: recipe for target 'all-recursive' failed [ 107s] make[2]: *** [all-recursive] Error 1 [ 107s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 107s] Makefile:375: recipe for target 'all' failed [ 107s] make[1]: *** [all] Error 2 [ 107s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 107s] dh_auto_build: make -j1 returned exit code 2 [ 107s] debian/rules:45: recipe for target 'build' failed [ 107s] make: *** [build] Error 2 [ 107s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 107s] [ 107s] lamb08 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:50 UTC 2017. [ 107s] [ 107s] ### VM INTERACTION START ### [ 110s] [ 102.181295] reboot: Power down [ 110s] ### VM INTERACTION END ### [ 110s] [ 110s] lamb08 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:03:54 UTC 2017. [ 110s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:04:47 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:04:47 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a461a9fa9a1f_350adaaf5c14722e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 157s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 157s] printf(line); [ 157s] ^~~~~~ [ 157s] cc1: some warnings being treated as errors [ 157s] Makefile:517: recipe for target 'abisip-find.o' failed [ 157s] make[4]: *** [abisip-find.o] Error 1 [ 157s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 157s] Makefile:408: recipe for target 'all-recursive' failed [ 157s] make[3]: *** [all-recursive] Error 1 [ 157s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 157s] Makefile:443: recipe for target 'all-recursive' failed [ 157s] make[2]: *** [all-recursive] Error 1 [ 157s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 157s] Makefile:375: recipe for target 'all' failed [ 157s] make[1]: *** [all] Error 2 [ 157s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 157s] dh_auto_build: make -j1 returned exit code 2 [ 157s] debian/rules:45: recipe for target 'build' failed [ 157s] make: *** [build] Error 2 [ 157s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 157s] [ 157s] cloud115 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:04:26 UTC 2017. [ 157s] [ 157s] ### VM INTERACTION START ### [ 160s] [ 130.857742] reboot: Power down [ 161s] ### VM INTERACTION END ### [ 161s] [ 161s] cloud115 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:04:30 UTC 2017. [ 161s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:05:22 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:05:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a461aa1514d9_350adaaf5c147310@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 127s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 127s] printf(line); [ 127s] ^ [ 127s] cc1: some warnings being treated as errors [ 127s] Makefile:517: recipe for target 'abisip-find.o' failed [ 127s] make[4]: *** [abisip-find.o] Error 1 [ 127s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 127s] Makefile:408: recipe for target 'all-recursive' failed [ 127s] make[3]: *** [all-recursive] Error 1 [ 127s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 127s] Makefile:443: recipe for target 'all-recursive' failed [ 127s] make[2]: *** [all-recursive] Error 1 [ 127s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 127s] Makefile:375: recipe for target 'all' failed [ 127s] make[1]: *** [all] Error 2 [ 127s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 127s] dh_auto_build: make -j1 returned exit code 2 [ 127s] debian/rules:45: recipe for target 'build' failed [ 127s] make: *** [build] Error 2 [ 127s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 127s] [ 127s] build33 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:05:05 UTC 2017. [ 127s] [ 127s] ### VM INTERACTION START ### [ 130s] [ 120.716207] reboot: Power down [ 131s] ### VM INTERACTION END ### [ 131s] [ 131s] build33 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:05:09 UTC 2017. [ 131s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:05:22 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:05:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a461aa1a655e_350adaaf5c14741e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 205s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 205s] printf(line); [ 205s] ^~~~~~ [ 205s] cc1: some warnings being treated as errors [ 205s] Makefile:517: recipe for target 'abisip-find.o' failed [ 205s] make[4]: *** [abisip-find.o] Error 1 [ 205s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 205s] Makefile:408: recipe for target 'all-recursive' failed [ 205s] make[3]: *** [all-recursive] Error 1 [ 205s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 205s] Makefile:443: recipe for target 'all-recursive' failed [ 205s] make[2]: *** [all-recursive] Error 1 [ 205s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 205s] Makefile:375: recipe for target 'all' failed [ 205s] make[1]: *** [all] Error 2 [ 205s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 205s] dh_auto_build: make -j1 returned exit code 2 [ 205s] debian/rules:45: recipe for target 'build' failed [ 205s] make: *** [build] Error 2 [ 205s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 206s] [ 206s] wildcard2 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:04:45 UTC 2017. [ 206s] [ 206s] ### VM INTERACTION START ### [ 209s] [ 182.761628] reboot: Power down [ 230s] ### VM INTERACTION END ### [ 230s] [ 230s] wildcard2 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:05:10 UTC 2017. [ 230s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:05:22 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:05:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a461aa222586_350adaaf5c147528@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 167s] printf(line); [ 167s] ^ [ 167s] cc1: some warnings being treated as errors [ 167s] Makefile:506: recipe for target 'abisip-find.o' failed [ 167s] make[4]: *** [abisip-find.o] Error 1 [ 167s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 167s] Makefile:396: recipe for target 'all-recursive' failed [ 167s] make[3]: *** [all-recursive] Error 1 [ 167s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 167s] Makefile:431: recipe for target 'all-recursive' failed [ 167s] make[2]: *** [all-recursive] Error 1 [ 167s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 167s] Makefile:362: recipe for target 'all' failed [ 167s] make[1]: *** [all] Error 2 [ 167s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 167s] dh_auto_build: make -j1 returned exit code 2 [ 167s] debian/rules:45: recipe for target 'build' failed [ 167s] make: *** [build] Error 2 [ 167s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 167s] [ 167s] cloud113 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:05:14 UTC 2017. [ 167s] [ 167s] ### VM INTERACTION START ### [ 168s] Powering off. [ 168s] [ 135.375548] reboot: Power down [ 169s] ### VM INTERACTION END ### [ 169s] [ 169s] cloud113 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:05:17 UTC 2017. [ 169s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:06:13 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:06:13 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a461aa3376ff_350adaaf5c1476cd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 110s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 110s] printf(line); [ 110s] ^ [ 110s] cc1: some warnings being treated as errors [ 110s] Makefile:517: recipe for target 'abisip-find.o' failed [ 110s] make[4]: *** [abisip-find.o] Error 1 [ 110s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 110s] Makefile:408: recipe for target 'all-recursive' failed [ 110s] make[3]: *** [all-recursive] Error 1 [ 110s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 110s] Makefile:443: recipe for target 'all-recursive' failed [ 110s] make[2]: *** [all-recursive] Error 1 [ 110s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 110s] Makefile:375: recipe for target 'all' failed [ 110s] make[1]: *** [all] Error 2 [ 110s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 110s] dh_auto_build: make -j1 returned exit code 2 [ 110s] debian/rules:45: recipe for target 'build' failed [ 110s] make: *** [build] Error 2 [ 110s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 110s] [ 110s] lamb61 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:06:00 UTC 2017. [ 110s] [ 110s] ### VM INTERACTION START ### [ 113s] [ 106.202092] reboot: Power down [ 113s] ### VM INTERACTION END ### [ 113s] [ 113s] lamb61 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:06:04 UTC 2017. [ 113s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:23:04 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:23:04 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a461ac2aed77_350adaaf5c148226@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 247s] printf(line); [ 247s] ^~~~~~ [ 247s] cc1: some warnings being treated as errors [ 247s] Makefile:517: recipe for target 'abisip-find.o' failed [ 247s] make[4]: *** [abisip-find.o] Error 1 [ 247s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 247s] Makefile:408: recipe for target 'all-recursive' failed [ 247s] make[3]: *** [all-recursive] Error 1 [ 247s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 247s] Makefile:443: recipe for target 'all-recursive' failed [ 247s] make[2]: *** [all-recursive] Error 1 [ 247s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 247s] Makefile:375: recipe for target 'all' failed [ 247s] make[1]: *** [all] Error 2 [ 247s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 247s] dh_auto_build: make -j1 returned exit code 2 [ 247s] debian/rules:45: recipe for target 'build' failed [ 247s] make: *** [build] Error 2 [ 247s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 247s] [ 247s] armbuild17 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:22:45 UTC 2017. [ 247s] [ 247s] ### VM INTERACTION START ### [ 250s] [ 199.977395] SysRq : Power Off [ 250s] [ 199.978867] reboot: Power down [ 251s] ### VM INTERACTION END ### [ 251s] [ 251s] armbuild17 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:22:48 UTC 2017. [ 251s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Dec 28 20:41:56 2017 From: admin at opensuse.org (OBS Notification) Date: Thu, 28 Dec 2017 20:41:56 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a461ae4796bd_350adaaf5c149039@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 194s] printf(line); [ 194s] ^~~~~~ [ 194s] cc1: some warnings being treated as errors [ 194s] Makefile:517: recipe for target 'abisip-find.o' failed [ 194s] make[4]: *** [abisip-find.o] Error 1 [ 194s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 194s] Makefile:408: recipe for target 'all-recursive' failed [ 194s] make[3]: *** [all-recursive] Error 1 [ 194s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 194s] Makefile:443: recipe for target 'all-recursive' failed [ 194s] make[2]: *** [all-recursive] Error 1 [ 194s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 194s] Makefile:375: recipe for target 'all' failed [ 194s] make[1]: *** [all] Error 2 [ 194s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 194s] dh_auto_build: make -j1 returned exit code 2 [ 194s] debian/rules:45: recipe for target 'build' failed [ 194s] make: *** [build] Error 2 [ 194s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 194s] [ 194s] obs-arm-1 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:41:41 UTC 2017. [ 194s] [ 194s] ### VM INTERACTION START ### [ 197s] [ 184.870449] sysrq: SysRq : Power Off [ 197s] [ 184.873328] reboot: Power down [ 197s] ### VM INTERACTION END ### [ 197s] [ 197s] obs-arm-1 failed "build osmo-bsc_1.1.2.20171228.dsc" at Thu Dec 28 20:41:44 UTC 2017. [ 197s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Dec 29 12:44:01 2017 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Fri, 29 Dec 2017 12:44:01 +0000 Subject: [PATCH] meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure Message-ID: Review at https://gerrit.osmocom.org/5618 libdbi: Add version 0.9.0 to fix osmo-msc build failure A patch is needed to fix compilation: * Link against sqlite3 instead of sqlite for sqlite3 * Disable tests Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b --- A recipes-misc/libdbi/files/fix-0.9.0-compile.patch A recipes-misc/libdbi/libdbi-drivers_0.9.0.bb A recipes-misc/libdbi/libdbi_0.9.0.bb 3 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/18/5618/1 diff --git a/recipes-misc/libdbi/files/fix-0.9.0-compile.patch b/recipes-misc/libdbi/files/fix-0.9.0-compile.patch new file mode 100644 index 0000000..98062b5 --- /dev/null +++ b/recipes-misc/libdbi/files/fix-0.9.0-compile.patch @@ -0,0 +1,22 @@ +--- a/acinclude.m4 2017-12-29 12:22:17.352698443 +0100 ++++ b/acinclude.m4 2017-12-29 12:21:48.996478186 +0100 +@@ -310,7 +310,7 @@ + AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS) + SQLITE3_LDFLAGS="" + else +- SQLITE3_LIBS=-lsqlite ++ SQLITE3_LIBS=-lsqlite3 + SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir + fi + +--- a/Makefile.am 2017-12-29 12:29:35.504078484 +0100 ++++ b/Makefile.am 2017-12-29 12:29:44.428146890 +0100 +@@ -4,7 +4,7 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = drivers tests @docs_subdirs@ ++SUBDIRS = drivers @docs_subdirs@ + + EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README.win32 README.osx README.encodings TODO libdbi-drivers.spec.in config.h.in Makefile.w32 autogen.sh fixlt.sh + diff --git a/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb b/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb new file mode 100644 index 0000000..85526a4 --- /dev/null +++ b/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb @@ -0,0 +1,8 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "9f47b960e225eede2cdeaabf7d22f59f" +SRC_URI[sha256sum] = "43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854" + +SRC_URI += "file://fix-0.9.0-compile.patch" diff --git a/recipes-misc/libdbi/libdbi_0.9.0.bb b/recipes-misc/libdbi/libdbi_0.9.0.bb new file mode 100644 index 0000000..e32ef03 --- /dev/null +++ b/recipes-misc/libdbi/libdbi_0.9.0.bb @@ -0,0 +1,7 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "05e2ceeac4bc85fbe40de8b4b22d9ab3" +SRC_URI[sha256sum] = "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" + -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel From gerrit-no-reply at lists.osmocom.org Fri Dec 29 13:13:28 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 13:13:28 +0000 Subject: [PATCH] osmo-bsc[master]: Fix .deb builds Message-ID: Review at https://gerrit.osmocom.org/5619 Fix .deb builds The code triggers following error: abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] The error was introduced in 5bf1e15c55340f236d84f70d3d04c871403d3503. Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d --- M src/ipaccess/abisip-find.c 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/5619/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index d94e18a..4e1d192 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -312,12 +312,8 @@ base_stations_bump(changed); printf("RX: %u \r", responses); fflush(stdout); - } else { - char *line = parse_response(ctx, buf, len); - printf(line); - printf("\n"); - talloc_free(line); - } + } else + printf("%s\n", parse_response(ctx, buf, len)); } static int read_response(int fd) -- To view, visit https://gerrit.osmocom.org/5619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 17:14:08 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 17:14:08 +0000 Subject: [PATCH] osmo-msc[master]: VLR: remove unused parameter Message-ID: Review at https://gerrit.osmocom.org/5620 VLR: remove unused parameter The expire_lu is never used but is printed for every subscriber. Let's remove it to avoid confusion. Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509 --- M include/osmocom/msc/vlr.h M src/libmsc/vty_interface_layer3.c 2 files changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/5620/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 1b365a9..d68b7be 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -136,7 +136,6 @@ bool la_allowed; int use_count; - time_t expire_lu; /* FIXME: overlap with periodic_lu_timer/age_indicator */ struct osmo_fsm_inst *lu_fsm; struct osmo_fsm_inst *auth_fsm; diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index 02a3600..65ba178 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -64,7 +64,6 @@ { int reqs; struct llist_head *entry; - char expire_time[200]; if (strlen(vsub->name)) vty_out(vty, " Name: '%s'%s", vsub->name, VTY_NEWLINE); @@ -109,12 +108,6 @@ osmo_hexdump(t->vec.kc, sizeof(t->vec.kc)), VTY_NEWLINE); } - - /* print the expiration time of a subscriber */ - strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", localtime(&vsub->expire_lu)); - expire_time[sizeof(expire_time) - 1] = '\0'; - vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); reqs = 0; llist_for_each(entry, &vsub->cs.requests) -- To view, visit https://gerrit.osmocom.org/5620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 18:35:34 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 18:35:34 +0000 Subject: meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 29 19:14:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 19:14:59 +0000 Subject: meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Patch Set 1: (4 comments) Please, provide another patch to remove older versions of libdbi recipes in the same directory, as we don't need them anymore. Make sure you build-tested the patch and add the Verfied+1 mark. If libdbi-drviers tests are disabled, we should look at the details and then check that osmo-msc still works after using the new libdbi. https://gerrit.osmocom.org/#/c/5618/1//COMMIT_MSG Commit Message: Line 7: libdbi: Add version 0.9.0 to fix osmo-msc build failure You can specify the commit since the build failure started: c22e54deabebd4c7ed45683b2db4c61afac7e1b9. https://gerrit.osmocom.org/#/c/5618/1/recipes-misc/libdbi/files/fix-0.9.0-compile.patch File recipes-misc/libdbi/files/fix-0.9.0-compile.patch: Line 8: + SQLITE3_LIBS=-lsqlite3 Please provide somewhere a reference explaining that this is a backport coming from libdbi-drviers 29ea4fd2c00a3c39ab4de08e3f333d5f4e219569, which should be available after a version newer than 0.9 is available, meaning we can drop this patch at that point. Even better, use format-patch for that commit and use it instead of this file. Line 19: +SUBDIRS = drivers @docs_subdirs@ Why is this needed? why are the tests failing? I see no reference to this in the commit description. Please provide one. https://gerrit.osmocom.org/#/c/5618/1/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb File recipes-misc/libdbi/libdbi-drivers_0.9.0.bb: Line 8: SRC_URI += "file://fix-0.9.0-compile.patch" If not available in the file output from format-patch, you may want to specify the origin of the patch here as a comment. -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Dec 29 19:44:36 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 19:44:36 +0000 Subject: meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Patch Set 1: BTW, I forgot to say this patch should be actually merged after laforge/nightly, not 201705, since the error is only present in nightly packages so far. But I guess it's fine to send it here for 201705 and then rebase laforge/nightly on top of it once it gets merged. -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 29 19:49:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 19:49:00 +0000 Subject: [PATCH] pysim[master]: utils.py: dec_imsi: Fix ValueError Message-ID: Review at https://gerrit.osmocom.org/5621 utils.py: dec_imsi: Fix ValueError Nowadays bin/python usually points to python3, and this script is written in python2, which means if run directly from terminal it will fail with some print syntax errors. Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e --- M pySim-prog.py M pySim-read.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/21/5621/1 diff --git a/pySim-prog.py b/pySim-prog.py index 14874cd..d3a29c7 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to deal with sim cards and program the 'magic' ones easily diff --git a/pySim-read.py b/pySim-read.py index 2c10866..5ca39ee 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to display some informations about a SIM card -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 29 19:49:00 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 19:49:00 +0000 Subject: [PATCH] pysim[master]: pySim-prog.py: Fix trailing whitespace Message-ID: Review at https://gerrit.osmocom.org/5622 pySim-prog.py: Fix trailing whitespace Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 --- M pySim-prog.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/22/5622/1 diff --git a/pySim-prog.py b/pySim-prog.py index d3a29c7..3df18ba 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -650,4 +650,3 @@ if not opts.batch_mode: done = True - -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 29 19:50:33 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 19:50:33 +0000 Subject: [PATCH] pysim[master]: utils.py: dec_imsi: Fix ValueError Message-ID: Review at https://gerrit.osmocom.org/5623 utils.py: dec_imsi: Fix ValueError It should fix the following observed error: ~/pysim$ ./pySim-read.py -p0 Reading ... ICCID: Traceback (most recent call last): File "./pySim-read.py", line 99, in print("IMSI: %s" % (dec_imsi(res),)) File "/home/lab434/pysim/pySim/utils.py", line 57, in dec_imsi l = int(ef[0:2]) * 2 # Length of the IMSI string ValueError: invalid literal for int() with base 10: 'ff' Change-Id: I7d3ecbf9edd190d1941816796cee60e3957d5943 --- M pySim/utils.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/5623/1 diff --git a/pySim/utils.py b/pySim/utils.py index 011bd05..84b613f 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -54,7 +54,7 @@ """Converts an EF value to the imsi string representation""" if len(ef) < 4: return None - l = int(ef[0:2]) * 2 # Length of the IMSI string + l = int(ef[0:2], 16) * 2 # Length of the IMSI string swapped = swap_nibbles(ef[2:]) oe = (int(swapped[0])>>3) & 1 # Odd (1) / Even (0) if oe: -- To view, visit https://gerrit.osmocom.org/5623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d3ecbf9edd190d1941816796cee60e3957d5943 Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 29 20:45:22 2017 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Fri, 29 Dec 2017 20:45:22 +0000 Subject: [PATCH] meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Hello Pau Espin Pedrol, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5618 to look at the new patch set (#2). libdbi: Add version 0.9.0 to fix osmo-msc build failure A patch is needed to fix compilation: * Link against sqlite3 instead of sqlite for sqlite3 * Disable tests Remove old libdbi versions and keep/apply the malloc patch Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b --- A recipes-misc/libdbi/files/fix-0.9.0-compile.patch D recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb A recipes-misc/libdbi/libdbi-drivers_0.9.0.bb D recipes-misc/libdbi/libdbi_0.7.2.bb D recipes-misc/libdbi/libdbi_0.8.3.bb A recipes-misc/libdbi/libdbi_0.9.0.bb 6 files changed, 38 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/18/5618/2 diff --git a/recipes-misc/libdbi/files/fix-0.9.0-compile.patch b/recipes-misc/libdbi/files/fix-0.9.0-compile.patch new file mode 100644 index 0000000..98062b5 --- /dev/null +++ b/recipes-misc/libdbi/files/fix-0.9.0-compile.patch @@ -0,0 +1,22 @@ +--- a/acinclude.m4 2017-12-29 12:22:17.352698443 +0100 ++++ b/acinclude.m4 2017-12-29 12:21:48.996478186 +0100 +@@ -310,7 +310,7 @@ + AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS) + SQLITE3_LDFLAGS="" + else +- SQLITE3_LIBS=-lsqlite ++ SQLITE3_LIBS=-lsqlite3 + SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir + fi + +--- a/Makefile.am 2017-12-29 12:29:35.504078484 +0100 ++++ b/Makefile.am 2017-12-29 12:29:44.428146890 +0100 +@@ -4,7 +4,7 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = drivers tests @docs_subdirs@ ++SUBDIRS = drivers @docs_subdirs@ + + EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README README.win32 README.osx README.encodings TODO libdbi-drivers.spec.in config.h.in Makefile.w32 autogen.sh fixlt.sh + diff --git a/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb b/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb deleted file mode 100644 index deeb56e..0000000 --- a/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb +++ /dev/null @@ -1,8 +0,0 @@ -require ${PN}.inc - -PR = "${INC_PR}.1" - -SRC_URI[md5sum] = "4de79b323162a5a7652b65b608eca6cd" -SRC_URI[sha256sum] = "4ab9944398ce769c0deeb64d2f73555c67bc25ccd2ade1ccf552226c7b2acf72" - -SRC_URI += "file://memory-corruption-fixes.patch" diff --git a/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb b/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb new file mode 100644 index 0000000..cff45a0 --- /dev/null +++ b/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb @@ -0,0 +1,9 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "9f47b960e225eede2cdeaabf7d22f59f" +SRC_URI[sha256sum] = "43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854" + +SRC_URI += "file://fix-0.9.0-compile.patch" +SRC_URI += "file://memory-corruption-fixes.patch" diff --git a/recipes-misc/libdbi/libdbi_0.7.2.bb b/recipes-misc/libdbi/libdbi_0.7.2.bb deleted file mode 100644 index d5803c0..0000000 --- a/recipes-misc/libdbi/libdbi_0.7.2.bb +++ /dev/null @@ -1,3 +0,0 @@ -require ${PN}.inc - -PR = "${INC_PR}.0" diff --git a/recipes-misc/libdbi/libdbi_0.8.3.bb b/recipes-misc/libdbi/libdbi_0.8.3.bb deleted file mode 100644 index ec16285..0000000 --- a/recipes-misc/libdbi/libdbi_0.8.3.bb +++ /dev/null @@ -1,7 +0,0 @@ -require ${PN}.inc - -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "ca66db78d479cbfa727cf3245b5864ae" -SRC_URI[sha256sum] = "72e41856bebb1da7b1fd1e6369358c294913f329c5e594e338b3983e6369a5e3" - diff --git a/recipes-misc/libdbi/libdbi_0.9.0.bb b/recipes-misc/libdbi/libdbi_0.9.0.bb new file mode 100644 index 0000000..e32ef03 --- /dev/null +++ b/recipes-misc/libdbi/libdbi_0.9.0.bb @@ -0,0 +1,7 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "05e2ceeac4bc85fbe40de8b4b22d9ab3" +SRC_URI[sha256sum] = "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" + -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Fri Dec 29 20:48:43 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 20:48:43 +0000 Subject: [PATCH] gapk[master]: Add git-review config Message-ID: Review at https://gerrit.osmocom.org/5624 Add git-review config Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/24/5624/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..1fbbca6 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=gapk -- To view, visit https://gerrit.osmocom.org/5624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 20:49:01 2017 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Fri, 29 Dec 2017 20:49:01 +0000 Subject: meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 I build-tested it with machine qemux86 using only pyro and meta-telephony. The tests that failed failed to even compile. Those were tests, that were not present in the old version. -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: daniel Gerrit-HasComments: No From admin at opensuse.org Fri Dec 29 20:51:06 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:51:06 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a46aac4f03bb_18ff474f503143df@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 107s] printf(line); [ 107s] ^ [ 108s] cc1: some warnings being treated as errors [ 108s] Makefile:506: recipe for target 'abisip-find.o' failed [ 108s] make[4]: *** [abisip-find.o] Error 1 [ 108s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 108s] Makefile:396: recipe for target 'all-recursive' failed [ 108s] make[3]: *** [all-recursive] Error 1 [ 108s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 108s] Makefile:431: recipe for target 'all-recursive' failed [ 108s] make[2]: *** [all-recursive] Error 1 [ 108s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 108s] Makefile:362: recipe for target 'all' failed [ 108s] make[1]: *** [all] Error 2 [ 108s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 108s] dh_auto_build: make -j1 returned exit code 2 [ 108s] debian/rules:45: recipe for target 'build' failed [ 108s] make: *** [build] Error 2 [ 108s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 108s] [ 108s] lamb62 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:50:59 UTC 2017. [ 108s] [ 108s] ### VM INTERACTION START ### [ 109s] Powering off. [ 109s] [ 102.392658] reboot: Power down [ 109s] ### VM INTERACTION END ### [ 109s] [ 109s] lamb62 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:51:01 UTC 2017. [ 109s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 20:52:15 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:52:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a46ab1f86ce6_18ff474f5031549@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 170s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 170s] printf(line); [ 170s] ^~~~~~ [ 170s] cc1: some warnings being treated as errors [ 170s] Makefile:517: recipe for target 'abisip-find.o' failed [ 170s] make[4]: *** [abisip-find.o] Error 1 [ 170s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 170s] Makefile:408: recipe for target 'all-recursive' failed [ 170s] make[3]: *** [all-recursive] Error 1 [ 170s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 170s] Makefile:443: recipe for target 'all-recursive' failed [ 170s] make[2]: *** [all-recursive] Error 1 [ 170s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 170s] Makefile:375: recipe for target 'all' failed [ 170s] make[1]: *** [all] Error 2 [ 170s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 170s] dh_auto_build: make -j1 returned exit code 2 [ 170s] debian/rules:45: recipe for target 'build' failed [ 170s] make: *** [build] Error 2 [ 170s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 170s] [ 170s] cloud101 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:52:08 UTC 2017. [ 170s] [ 170s] ### VM INTERACTION START ### [ 173s] [ 136.182408] reboot: Power down [ 173s] ### VM INTERACTION END ### [ 173s] [ 173s] cloud101 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:52:12 UTC 2017. [ 173s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 20:53:23 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:53:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a46ab5a9a6a9_18ff474f503161cf@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 122s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 122s] printf(line); [ 122s] ^ [ 122s] cc1: some warnings being treated as errors [ 122s] Makefile:517: recipe for target 'abisip-find.o' failed [ 122s] make[4]: *** [abisip-find.o] Error 1 [ 122s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 122s] Makefile:408: recipe for target 'all-recursive' failed [ 122s] make[3]: *** [all-recursive] Error 1 [ 122s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 122s] Makefile:443: recipe for target 'all-recursive' failed [ 122s] make[2]: *** [all-recursive] Error 1 [ 122s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 122s] Makefile:375: recipe for target 'all' failed [ 122s] make[1]: *** [all] Error 2 [ 122s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 122s] dh_auto_build: make -j1 returned exit code 2 [ 122s] debian/rules:45: recipe for target 'build' failed [ 122s] make: *** [build] Error 2 [ 122s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 122s] [ 122s] lamb59 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:53:19 UTC 2017. [ 122s] [ 122s] ### VM INTERACTION START ### [ 125s] [ 117.942898] reboot: Power down [ 125s] ### VM INTERACTION END ### [ 125s] [ 125s] lamb59 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:53:22 UTC 2017. [ 125s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 20:56:16 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:56:16 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a46ac0e7ae73_18ff474f50318624@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 188s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 188s] printf(line); [ 188s] ^~~~~~ [ 188s] cc1: some warnings being treated as errors [ 188s] Makefile:517: recipe for target 'abisip-find.o' failed [ 188s] make[4]: *** [abisip-find.o] Error 1 [ 188s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 188s] Makefile:408: recipe for target 'all-recursive' failed [ 188s] make[3]: *** [all-recursive] Error 1 [ 188s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 188s] Makefile:443: recipe for target 'all-recursive' failed [ 188s] make[2]: *** [all-recursive] Error 1 [ 188s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 188s] Makefile:375: recipe for target 'all' failed [ 188s] make[1]: *** [all] Error 2 [ 188s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 188s] dh_auto_build: make -j1 returned exit code 2 [ 188s] debian/rules:45: recipe for target 'build' failed [ 188s] make: *** [build] Error 2 [ 188s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 188s] [ 188s] lamb02 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:56:03 UTC 2017. [ 188s] [ 188s] ### VM INTERACTION START ### [ 192s] [ 181.945884] reboot: Power down [ 192s] ### VM INTERACTION END ### [ 192s] [ 192s] lamb02 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:56:07 UTC 2017. [ 192s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 20:57:07 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:57:07 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a46ac2d68eab_18ff474f5031914@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 133s] printf(line); [ 133s] ^ [ 133s] cc1: some warnings being treated as errors [ 133s] Makefile:506: recipe for target 'abisip-find.o' failed [ 133s] make[4]: *** [abisip-find.o] Error 1 [ 133s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 133s] Makefile:396: recipe for target 'all-recursive' failed [ 133s] make[3]: *** [all-recursive] Error 1 [ 133s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 133s] Makefile:431: recipe for target 'all-recursive' failed [ 133s] make[2]: *** [all-recursive] Error 1 [ 133s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 133s] Makefile:362: recipe for target 'all' failed [ 133s] make[1]: *** [all] Error 2 [ 133s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 133s] dh_auto_build: make -j1 returned exit code 2 [ 133s] debian/rules:45: recipe for target 'build' failed [ 133s] make: *** [build] Error 2 [ 133s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 133s] [ 133s] cloud101 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:56:58 UTC 2017. [ 133s] [ 133s] ### VM INTERACTION START ### [ 134s] Powering off. [ 134s] [ 116.826449] reboot: Power down [ 135s] ### VM INTERACTION END ### [ 135s] [ 135s] cloud101 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:57:00 UTC 2017. [ 135s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 20:59:06 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 20:59:06 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a46aca294d01_18ff474f50320384@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 63s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 63s] printf(line); [ 63s] ^~~~~~ [ 63s] cc1: some warnings being treated as errors [ 63s] Makefile:517: recipe for target 'abisip-find.o' failed [ 63s] make[4]: *** [abisip-find.o] Error 1 [ 63s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 63s] Makefile:408: recipe for target 'all-recursive' failed [ 63s] make[3]: *** [all-recursive] Error 1 [ 63s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 63s] Makefile:443: recipe for target 'all-recursive' failed [ 63s] make[2]: *** [all-recursive] Error 1 [ 63s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 63s] Makefile:375: recipe for target 'all' failed [ 63s] make[1]: *** [all] Error 2 [ 63s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 63s] dh_auto_build: make -j1 returned exit code 2 [ 63s] debian/rules:45: recipe for target 'build' failed [ 63s] make: *** [build] Error 2 [ 63s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 63s] [ 63s] build77 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:58:51 UTC 2017. [ 63s] [ 63s] ### VM INTERACTION START ### [ 66s] [ 61.003616] reboot: Power down [ 66s] ### VM INTERACTION END ### [ 66s] [ 66s] build77 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 20:58:54 UTC 2017. [ 66s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:00:32 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:00:32 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a46acfd42431_18ff474f50321514@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 116s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 116s] printf(line); [ 116s] ^~~~~~ [ 116s] cc1: some warnings being treated as errors [ 116s] Makefile:517: recipe for target 'abisip-find.o' failed [ 116s] make[4]: *** [abisip-find.o] Error 1 [ 116s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 116s] Makefile:408: recipe for target 'all-recursive' failed [ 116s] make[3]: *** [all-recursive] Error 1 [ 116s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 116s] Makefile:443: recipe for target 'all-recursive' failed [ 116s] make[2]: *** [all-recursive] Error 1 [ 116s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 116s] Makefile:375: recipe for target 'all' failed [ 116s] make[1]: *** [all] Error 2 [ 116s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 116s] dh_auto_build: make -j1 returned exit code 2 [ 116s] debian/rules:45: recipe for target 'build' failed [ 116s] make: *** [build] Error 2 [ 116s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 116s] [ 116s] cloud115 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:13 UTC 2017. [ 116s] [ 116s] ### VM INTERACTION START ### [ 119s] [ 104.254366] reboot: Power down [ 121s] ### VM INTERACTION END ### [ 121s] [ 121s] cloud115 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:18 UTC 2017. [ 121s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:00:32 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:00:32 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a46acfdc9cf3_18ff474f503216a6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 143s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 143s] printf(line); [ 143s] ^~~~~~ [ 143s] cc1: some warnings being treated as errors [ 143s] Makefile:517: recipe for target 'abisip-find.o' failed [ 143s] make[4]: *** [abisip-find.o] Error 1 [ 143s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 143s] Makefile:408: recipe for target 'all-recursive' failed [ 143s] make[3]: *** [all-recursive] Error 1 [ 143s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 144s] Makefile:443: recipe for target 'all-recursive' failed [ 144s] make[2]: *** [all-recursive] Error 1 [ 144s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 144s] Makefile:375: recipe for target 'all' failed [ 144s] make[1]: *** [all] Error 2 [ 144s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 144s] dh_auto_build: make -j1 returned exit code 2 [ 144s] debian/rules:45: recipe for target 'build' failed [ 144s] make: *** [build] Error 2 [ 144s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 144s] [ 144s] cloud121 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:17 UTC 2017. [ 144s] [ 144s] ### VM INTERACTION START ### [ 147s] [ 129.351272] reboot: Power down [ 147s] ### VM INTERACTION END ### [ 147s] [ 147s] cloud121 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:21 UTC 2017. [ 147s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:00:49 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:00:49 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a46ad19936c3_18ff474f503218a6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 90s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 90s] printf(line); [ 90s] ^~~~~~ [ 90s] cc1: some warnings being treated as errors [ 90s] Makefile:517: recipe for target 'abisip-find.o' failed [ 90s] make[4]: *** [abisip-find.o] Error 1 [ 90s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 90s] Makefile:408: recipe for target 'all-recursive' failed [ 90s] make[3]: *** [all-recursive] Error 1 [ 90s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 90s] Makefile:443: recipe for target 'all-recursive' failed [ 90s] make[2]: *** [all-recursive] Error 1 [ 90s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 90s] Makefile:375: recipe for target 'all' failed [ 90s] make[1]: *** [all] Error 2 [ 90s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 90s] dh_auto_build: make -j1 returned exit code 2 [ 90s] debian/rules:45: recipe for target 'build' failed [ 90s] make: *** [build] Error 2 [ 90s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 90s] [ 90s] lamb06 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:31 UTC 2017. [ 90s] [ 90s] ### VM INTERACTION START ### [ 93s] [ 85.446471] reboot: Power down [ 93s] ### VM INTERACTION END ### [ 93s] [ 93s] lamb06 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:00:33 UTC 2017. [ 93s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:05:24 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:05:24 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a46ae2b56fca_18ff474f5032533d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 135s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 135s] printf(line); [ 135s] ^ [ 136s] cc1: some warnings being treated as errors [ 136s] Makefile:517: recipe for target 'abisip-find.o' failed [ 136s] make[4]: *** [abisip-find.o] Error 1 [ 136s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 136s] Makefile:408: recipe for target 'all-recursive' failed [ 136s] make[3]: *** [all-recursive] Error 1 [ 136s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 136s] Makefile:443: recipe for target 'all-recursive' failed [ 136s] make[2]: *** [all-recursive] Error 1 [ 136s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 136s] Makefile:375: recipe for target 'all' failed [ 136s] make[1]: *** [all] Error 2 [ 136s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 136s] dh_auto_build: make -j1 returned exit code 2 [ 136s] debian/rules:45: recipe for target 'build' failed [ 136s] make: *** [build] Error 2 [ 136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 136s] [ 136s] lamb68 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:05:04 UTC 2017. [ 136s] [ 136s] ### VM INTERACTION START ### [ 139s] [ 131.599352] reboot: Power down [ 139s] ### VM INTERACTION END ### [ 139s] [ 139s] lamb68 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:05:07 UTC 2017. [ 139s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:05:42 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:05:42 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a46ae2fc5443_18ff474f503258c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 239s] printf(line); [ 239s] ^~~~~~ [ 240s] cc1: some warnings being treated as errors [ 240s] Makefile:517: recipe for target 'abisip-find.o' failed [ 240s] make[4]: *** [abisip-find.o] Error 1 [ 240s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 240s] Makefile:408: recipe for target 'all-recursive' failed [ 240s] make[3]: *** [all-recursive] Error 1 [ 240s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 240s] Makefile:443: recipe for target 'all-recursive' failed [ 240s] make[2]: *** [all-recursive] Error 1 [ 240s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 240s] Makefile:375: recipe for target 'all' failed [ 240s] make[1]: *** [all] Error 2 [ 240s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 240s] dh_auto_build: make -j1 returned exit code 2 [ 240s] debian/rules:45: recipe for target 'build' failed [ 240s] make: *** [build] Error 2 [ 240s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 240s] [ 240s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:05:31 UTC 2017. [ 240s] [ 240s] ### VM INTERACTION START ### [ 243s] [ 224.902041] sysrq: SysRq : Power Off [ 243s] [ 224.905126] reboot: Power down [ 243s] ### VM INTERACTION END ### [ 243s] [ 243s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:05:34 UTC 2017. [ 243s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Dec 29 21:07:23 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 21:07:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a46aea4d37c9_18ff474f50327135@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 101s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 101s] printf(line); [ 101s] ^~~~~~ [ 101s] cc1: some warnings being treated as errors [ 101s] Makefile:517: recipe for target 'abisip-find.o' failed [ 101s] make[4]: *** [abisip-find.o] Error 1 [ 101s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 101s] Makefile:408: recipe for target 'all-recursive' failed [ 101s] make[3]: *** [all-recursive] Error 1 [ 101s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 101s] Makefile:443: recipe for target 'all-recursive' failed [ 101s] make[2]: *** [all-recursive] Error 1 [ 101s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 101s] Makefile:375: recipe for target 'all' failed [ 101s] make[1]: *** [all] Error 2 [ 101s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 101s] dh_auto_build: make -j1 returned exit code 2 [ 101s] debian/rules:45: recipe for target 'build' failed [ 101s] make: *** [build] Error 2 [ 101s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 101s] [ 102s] lamb14 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:07:06 UTC 2017. [ 102s] [ 102s] ### VM INTERACTION START ### [ 105s] [ 95.767822] reboot: Power down [ 105s] ### VM INTERACTION END ### [ 105s] [ 105s] lamb14 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 21:07:10 UTC 2017. [ 105s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:23:40 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 22:23:40 +0000 Subject: pysim[master]: pySim-prog.py: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:25:00 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 22:25:00 +0000 Subject: pysim[master]: utils.py: dec_imsi: Fix ValueError In-Reply-To: References: Message-ID: Patch Set 1: The commit header is misleading: it doesn't fix ValueError. -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:25:04 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 29 Dec 2017 22:25:04 +0000 Subject: pysim[master]: utils.py: dec_imsi: Fix ValueError In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:35:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 22:35:49 +0000 Subject: [PATCH] pysim[master]: pySim-*.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Hello Max, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5621 to look at the new patch set (#2). pySim-*.py: Set shebang to use python v2 Nowadays bin/python usually points to python3, and this script is written in python2, which means if run directly from terminal it will fail with some print syntax errors. Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e --- M pySim-prog.py M pySim-read.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/21/5621/2 diff --git a/pySim-prog.py b/pySim-prog.py index 14874cd..d3a29c7 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to deal with sim cards and program the 'magic' ones easily diff --git a/pySim-read.py b/pySim-read.py index 2c10866..5ca39ee 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to display some informations about a SIM card -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:35:49 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 22:35:49 +0000 Subject: [PATCH] pysim[master]: pySim-prog.py: Fix trailing whitespace In-Reply-To: References: Message-ID: Hello Max, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/5622 to look at the new patch set (#2). pySim-prog.py: Fix trailing whitespace Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 --- M pySim-prog.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/22/5622/2 diff --git a/pySim-prog.py b/pySim-prog.py index d3a29c7..3df18ba 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -650,4 +650,3 @@ if not opts.batch_mode: done = True - -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri Dec 29 22:58:12 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Fri, 29 Dec 2017 22:58:12 +0000 Subject: meta-telephony[201705]: libdbi: Add version 0.9.0 to fix osmo-msc build failure In-Reply-To: References: Message-ID: Patch Set 2: (3 comments) https://gerrit.osmocom.org/#/c/5618/2//COMMIT_MSG Commit Message: Line 13: Remove old libdbi versions and keep/apply the malloc patch Thanks, I actually forgot to check if the malloc patch was still required or if you removed it (it still necessary, it's applied in master but not for 0.9). https://gerrit.osmocom.org/#/c/5618/2/recipes-misc/libdbi/files/fix-0.9.0-compile.patch File recipes-misc/libdbi/files/fix-0.9.0-compile.patch: Line 8: + SQLITE3_LIBS=-lsqlite3 As I stated in the previous patch version, I'd prefer having 2 separate patches for the 2 chunks in this patch file. This change in acinclude.m4 is already applied in current master of libdbi and the other one is some specific hack to allow compilation for now which should be properly in upstream (perhaps by someone else). https://gerrit.osmocom.org/#/c/5618/2/recipes-misc/libdbi/libdbi-drivers_0.9.0.bb File recipes-misc/libdbi/libdbi-drivers_0.9.0.bb: Line 9: SRC_URI += "file://memory-corruption-fixes.patch" Better use something like: SRC_URI += "file://fix-0.9.0-compile.patch \ file://memory-corruption-fixes.patch \ " -- To view, visit https://gerrit.osmocom.org/5618 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4319c595a1ccb20c87d86c1ab1e58e95da34d7b Gerrit-PatchSet: 2 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: daniel Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: daniel Gerrit-HasComments: Yes From admin at opensuse.org Fri Dec 29 23:09:17 2017 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Dec 2017 23:09:17 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a46cb3b61d36_18ff474f5041851@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 169s] printf(line); [ 169s] ^~~~~~ [ 169s] cc1: some warnings being treated as errors [ 169s] Makefile:517: recipe for target 'abisip-find.o' failed [ 169s] make[4]: *** [abisip-find.o] Error 1 [ 169s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 169s] Makefile:408: recipe for target 'all-recursive' failed [ 169s] make[3]: *** [all-recursive] Error 1 [ 169s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 169s] Makefile:443: recipe for target 'all-recursive' failed [ 169s] make[2]: *** [all-recursive] Error 1 [ 169s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 169s] Makefile:375: recipe for target 'all' failed [ 169s] make[1]: *** [all] Error 2 [ 169s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 169s] dh_auto_build: make -j1 returned exit code 2 [ 169s] debian/rules:45: recipe for target 'build' failed [ 169s] make: *** [build] Error 2 [ 169s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 169s] [ 169s] armbuild01 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 23:09:03 UTC 2017. [ 169s] [ 169s] ### VM INTERACTION START ### [ 172s] [ 158.971567] SysRq : Power Off [ 172s] [ 159.012712] reboot: Power down [ 172s] ### VM INTERACTION END ### [ 172s] [ 172s] armbuild01 failed "build osmo-bsc_1.1.2.20171229.dsc" at Fri Dec 29 23:09:06 UTC 2017. [ 172s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:43:00 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:43:00 +0000 Subject: pysim[master]: pySim-prog.py: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:43:31 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:43:31 +0000 Subject: pysim[master]: pySim-*.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:44:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:44:42 +0000 Subject: gapk[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:45:55 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:45:55 +0000 Subject: osmo-msc[master]: VLR: remove unused parameter In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:45:59 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:45:59 +0000 Subject: [MERGED] osmo-msc[master]: VLR: remove unused parameter In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: VLR: remove unused parameter ...................................................................... VLR: remove unused parameter The expire_lu is never used but is printed for every subscriber. Let's remove it to avoid confusion. Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509 --- M include/osmocom/msc/vlr.h M src/libmsc/vty_interface_layer3.c 2 files changed, 0 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 1b365a9..d68b7be 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -136,7 +136,6 @@ bool la_allowed; int use_count; - time_t expire_lu; /* FIXME: overlap with periodic_lu_timer/age_indicator */ struct osmo_fsm_inst *lu_fsm; struct osmo_fsm_inst *auth_fsm; diff --git a/src/libmsc/vty_interface_layer3.c b/src/libmsc/vty_interface_layer3.c index 02a3600..65ba178 100644 --- a/src/libmsc/vty_interface_layer3.c +++ b/src/libmsc/vty_interface_layer3.c @@ -64,7 +64,6 @@ { int reqs; struct llist_head *entry; - char expire_time[200]; if (strlen(vsub->name)) vty_out(vty, " Name: '%s'%s", vsub->name, VTY_NEWLINE); @@ -109,12 +108,6 @@ osmo_hexdump(t->vec.kc, sizeof(t->vec.kc)), VTY_NEWLINE); } - - /* print the expiration time of a subscriber */ - strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", localtime(&vsub->expire_lu)); - expire_time[sizeof(expire_time) - 1] = '\0'; - vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); reqs = 0; llist_for_each(entry, &vsub->cs.requests) -- To view, visit https://gerrit.osmocom.org/5620 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f7ad1670836384d1e6a58f47a13464fdbbf8509 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:48:56 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:48:56 +0000 Subject: osmo-bsc[master]: Check and handle SMS encoding failure In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:50:24 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:50:24 +0000 Subject: osmo-bsc[master]: Fix .deb builds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:50:28 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:50:28 +0000 Subject: [MERGED] osmo-bsc[master]: Fix .deb builds In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix .deb builds ...................................................................... Fix .deb builds The code triggers following error: abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] The error was introduced in 5bf1e15c55340f236d84f70d3d04c871403d3503. Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d --- M src/ipaccess/abisip-find.c 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index d94e18a..4e1d192 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -312,12 +312,8 @@ base_stations_bump(changed); printf("RX: %u \r", responses); fflush(stdout); - } else { - char *line = parse_response(ctx, buf, len); - printf(line); - printf("\n"); - talloc_free(line); - } + } else + printf("%s\n", parse_response(ctx, buf, len)); } static int read_response(int fd) -- To view, visit https://gerrit.osmocom.org/5619 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:51:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:51:08 +0000 Subject: pysim[master]: utils.py: dec_imsi: Fix ValueError In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5623 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d3ecbf9edd190d1941816796cee60e3957d5943 Gerrit-PatchSet: 1 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:53:12 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:53:12 +0000 Subject: osmo-sgsn[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6230cfcf10247b601e16e7b872305499815520a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:55:17 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:55:17 +0000 Subject: osmo-iuh[master]: Expand ctrl interface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:56:32 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:56:32 +0000 Subject: osmo-iuh[master]: Add control interface In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:58:25 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:58:25 +0000 Subject: osmocom-bb[master]: mobile: Add lua examples for basic functions that are available In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:59:08 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:59:08 +0000 Subject: osmocom-bb[master]: mobile: Properly close the primitive interface on reload In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 19:59:42 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 19:59:42 +0000 Subject: osmocom-bb[master]: mobile: Send SMS through the primitive interface In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 20:00:44 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 20:00:44 +0000 Subject: osmo-msc[master]: VLR: log subscriber update In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 20:01:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 20:01:20 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Send SMS through the primitive interface In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile: Send SMS through the primitive interface ...................................................................... mobile: Send SMS through the primitive interface Make this symmetric and send the SMS through the primitive interface. Construct and copy the sms into the prim, store the SCA in the prim as well. In 04.11 we see we can store 2*10 digits in the destination address and a NUL. Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 --- M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h M src/host/layer23/include/osmocom/bb/mobile/primitives.h M src/host/layer23/src/mobile/gsm411_sms.c M src/host/layer23/src/mobile/primitives.c M src/host/layer23/src/mobile/script_lua.c 5 files changed, 39 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h index d3074fb..3ed6710 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h @@ -35,5 +35,7 @@ int gsm411_rcv_sms(struct osmocom_ms *ms, struct msgb *msg); int sms_send(struct osmocom_ms *ms, const char *sms_sca, const char *number, const char *text, uint8_t msg_ref); +int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca, + struct gsm_sms *sms); #endif /* _GSM411_SMS_H */ diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h b/src/host/layer23/include/osmocom/bb/mobile/primitives.h index 39b4945..034b202 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h +++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h @@ -62,6 +62,8 @@ struct mobile_sms_param { struct gsm_sms sms; + char sca[20+1]; /*sms; + + /* Force a NUL at the end of the string */ + param->sca[sizeof(param->sca) - 1] = '\0'; + + return gsm411_tx_sms_submit(intf->ms, param->sca, sms); +} + int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim *prim) { int rc = 0; @@ -184,6 +197,9 @@ case OSMO_PRIM(PRIM_MOB_TIMER_CANCEL, PRIM_OP_REQUEST): rc = cancel_timer(intf, &prim->u.timer); break; + case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_REQUEST): + rc = send_sms(intf, &prim->u.sms); + break; default: LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", OSMO_PRIM_HDR(&prim->hdr)); break; diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 1b80c48..14ab58f 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -372,7 +372,9 @@ static int lua_ms_sms_send_simple(lua_State *L) { const char *sms_sca, *number, *text; - int msg_ref, rc; + struct mobile_prim *prim; + struct gsm_sms *sms; + int msg_ref; luaL_argcheck(L, lua_isnumber(L, -1), 4, "msg_ref needs to be a number"); luaL_argcheck(L, lua_isstring(L, -2), 3, "text must be a string"); @@ -384,8 +386,21 @@ number = lua_tostring(L, -3); sms_sca = lua_tostring(L, -4); - rc = sms_send(get_primitive(L)->ms, sms_sca, number, text, msg_ref); - lua_pushinteger(L, rc); + prim = mobile_prim_alloc(PRIM_MOB_SMS, PRIM_OP_REQUEST); + + sms = sms_from_text(number, 0, text); + if (!sms) { + lua_pushinteger(L, -ENOMEM); + msgb_free(prim->hdr.msg); + return 1; + } + + prim->u.sms.sms = *sms; + prim->u.sms.sms.msg_ref = msg_ref; + osmo_strlcpy(prim->u.sms.sca, sms_sca, sizeof(prim->u.sms.sca)); + mobile_prim_intf_req(get_primitive(L), prim); + + lua_pushinteger(L, 0); return 1; } -- To view, visit https://gerrit.osmocom.org/5594 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 30 20:01:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 20:01:20 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Properly close the primitive interface on reload In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile: Properly close the primitive interface on reload ...................................................................... mobile: Properly close the primitive interface on reload When reloading a script go through script_lua_close. Get the primitive first. Then destruct the lua environment which will lead to GC (e.g. cancellation of timers) and then delete the primitive code. Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a --- M src/host/layer23/src/mobile/script_lua.c 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c index 14ab58f..9b256d3 100644 --- a/src/host/layer23/src/mobile/script_lua.c +++ b/src/host/layer23/src/mobile/script_lua.c @@ -510,10 +510,14 @@ int script_lua_close(struct osmocom_ms *ms) { + struct mobile_prim_intf *intf; + if (!ms->lua_state) return 0; + intf = get_primitive(ms->lua_state); lua_close(ms->lua_state); + mobile_prim_intf_free(intf); ms->lua_state = NULL; return 0; } @@ -523,8 +527,7 @@ struct mobile_prim_intf *intf; int err; - if (ms->lua_state) - lua_close(ms->lua_state); + script_lua_close(ms); ms->lua_state = lua_newstate(talloc_lua_alloc, ms); if (!ms->lua_state) return -1; @@ -550,7 +553,7 @@ vty_out(vty, "%% LUA execute error: %s%s", lua_tostring(ms->lua_state, -1), VTY_NEWLINE); lua_pop(ms->lua_state, 1); - return 3; + return -3; } return 0; -- To view, visit https://gerrit.osmocom.org/5595 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bb4fa9e7c5010f3ad50b258dcb14956eea8822a Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat Dec 30 20:01:20 2017 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sat, 30 Dec 2017 20:01:20 +0000 Subject: [MERGED] osmocom-bb[master]: mobile: Add lua examples for basic functions that are available In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: mobile: Add lua examples for basic functions that are available ...................................................................... mobile: Add lua examples for basic functions that are available Link to Lua docs, link to our manual. Demo logging, timer, MS on/off, sms sending and sms receiving. For the MM state I will need to export constants/names to make this usable. Currently it is a bit of a hack (first time to MM_IDLE) to send a SMS. We would know when we attached though. Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff --- A doc/examples/mobile/lua_helloworld.lua A doc/examples/mobile/lua_ms_on_off.lua A doc/examples/mobile/lua_sms_on_attach.lua A doc/examples/mobile/lua_sms_receive.lua A doc/examples/mobile/lua_timer.lua 5 files changed, 91 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/mobile/lua_helloworld.lua b/doc/examples/mobile/lua_helloworld.lua new file mode 100644 index 0000000..fd5abcc --- /dev/null +++ b/doc/examples/mobile/lua_helloworld.lua @@ -0,0 +1,9 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Standard print and log_* are forwarded to the Osmocom logging framework +print("Hellp from Lua"); +log_notice("Notice from lua"); +log_debug("Debug from Lua"); +log_error("Error from Lua"); +log_fatal("Fatal from Lua"); diff --git a/doc/examples/mobile/lua_ms_on_off.lua b/doc/examples/mobile/lua_ms_on_off.lua new file mode 100644 index 0000000..57e492d --- /dev/null +++ b/doc/examples/mobile/lua_ms_on_off.lua @@ -0,0 +1,23 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- Switch the MS on/off but this can only be done if the MS +-- is in the right state. This assumes that the MS is fully +-- connected and doesn't stall. + +local start = false +osmo.ms().start() +function toggle_ms_state() + timer = osmo.timeout(20, function() + if start then + print("STARTING", osmo.ms().start()) + start = false + else + print("STOPPING", osmo.ms().stop(true)) + start = true + end + toggle_ms_state() + end) +end +toggle_ms_state() diff --git a/doc/examples/mobile/lua_sms_on_attach.lua b/doc/examples/mobile/lua_sms_on_attach.lua new file mode 100644 index 0000000..8d73f2f --- /dev/null +++ b/doc/examples/mobile/lua_sms_on_attach.lua @@ -0,0 +1,32 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + + +-- State change +local sent_sms = false +function mm_cb(new_state, new_substate, old_substate) + -- The system has attached and returned to idle. Send a SMS the first time + -- it happens. + if new_state == 19 and new_substate == 1 then + if not sent_sms then + sent_sms = true + osmo.ms():sms_send_simple("1234", "21321324", "fooooooo", 23) + end + end +end + +-- Called when a new SMS arrives or status for delivery +-- is updated. Check the msg_ref field. +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +-- We need to register a callback +local cbs = { + Sms=sms_cb, + Mm=mm_cb +} +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_sms_receive.lua b/doc/examples/mobile/lua_sms_receive.lua new file mode 100644 index 0000000..4be4e0a --- /dev/null +++ b/doc/examples/mobile/lua_sms_receive.lua @@ -0,0 +1,15 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +function sms_cb(sms, cause, valid) + print("SMS data cb", sms, cause, valid) + for i, v in pairs(sms) do + print(i, v) + end +end + +local cbs = { + Sms=sms_cb, +} + +osmo.ms():register(cbs) diff --git a/doc/examples/mobile/lua_timer.lua b/doc/examples/mobile/lua_timer.lua new file mode 100644 index 0000000..1119af8 --- /dev/null +++ b/doc/examples/mobile/lua_timer.lua @@ -0,0 +1,12 @@ +-- See https://www.lua.org/manual/5.3/ for Lua +-- See http://ftp.osmocom.org/docs/latest/osmocombb-usermanual.pdf -- Scripting with Lua + +-- Start and stop timer with callback. Schedule a timeout and +-- resume execution then. + +-- Timeout in 10 seconds +local timer = osmo.timeout(10, function() + print("Timeout occurred"); +end) +-- We can cancel it. The callback will not be called +timer:cancel() -- To view, visit https://gerrit.osmocom.org/5596 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10ac656330b65e3905d6cbbb7865aa0f969cd9ff Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From admin at opensuse.org Sat Dec 30 20:02:29 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:02:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586 In-Reply-To: References: Message-ID: <5a47f0ecefdee_18ff474f507121a5@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 100s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 100s] printf(line); [ 100s] ^~~~~~ [ 100s] cc1: some warnings being treated as errors [ 100s] Makefile:517: recipe for target 'abisip-find.o' failed [ 100s] make[4]: *** [abisip-find.o] Error 1 [ 100s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 100s] Makefile:408: recipe for target 'all-recursive' failed [ 100s] make[3]: *** [all-recursive] Error 1 [ 100s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 100s] Makefile:443: recipe for target 'all-recursive' failed [ 100s] make[2]: *** [all-recursive] Error 1 [ 100s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 100s] Makefile:375: recipe for target 'all' failed [ 100s] make[1]: *** [all] Error 2 [ 100s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 100s] dh_auto_build: make -j1 returned exit code 2 [ 100s] debian/rules:45: recipe for target 'build' failed [ 100s] make: *** [build] Error 2 [ 100s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 100s] [ 100s] lamb61 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:02:13 UTC 2017. [ 100s] [ 100s] ### VM INTERACTION START ### [ 103s] [ 95.867208] reboot: Power down [ 103s] ### VM INTERACTION END ### [ 103s] [ 103s] lamb61 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:02:16 UTC 2017. [ 103s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:04:12 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:04:12 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586 In-Reply-To: References: Message-ID: <5a47f142bcce_18ff474f50712333@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 212s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 212s] printf(line); [ 212s] ^~~~~~ [ 213s] cc1: some warnings being treated as errors [ 213s] Makefile:517: recipe for target 'abisip-find.o' failed [ 213s] make[4]: *** [abisip-find.o] Error 1 [ 213s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 213s] Makefile:408: recipe for target 'all-recursive' failed [ 213s] make[3]: *** [all-recursive] Error 1 [ 213s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 213s] Makefile:443: recipe for target 'all-recursive' failed [ 213s] make[2]: *** [all-recursive] Error 1 [ 213s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 213s] Makefile:375: recipe for target 'all' failed [ 213s] make[1]: *** [all] Error 2 [ 213s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 213s] dh_auto_build: make -j1 returned exit code 2 [ 213s] debian/rules:45: recipe for target 'build' failed [ 213s] make: *** [build] Error 2 [ 213s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 213s] [ 213s] cloud123 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:03:54 UTC 2017. [ 213s] [ 213s] ### VM INTERACTION START ### [ 216s] [ 180.058221] reboot: Power down [ 217s] ### VM INTERACTION END ### [ 217s] [ 217s] cloud123 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:03:59 UTC 2017. [ 217s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:04:12 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:04:12 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64 In-Reply-To: References: Message-ID: <5a47f142661af_18ff474f50712436@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 115s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 115s] printf(line); [ 115s] ^~~~~~ [ 115s] cc1: some warnings being treated as errors [ 115s] Makefile:517: recipe for target 'abisip-find.o' failed [ 115s] make[4]: *** [abisip-find.o] Error 1 [ 115s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 115s] Makefile:408: recipe for target 'all-recursive' failed [ 115s] make[3]: *** [all-recursive] Error 1 [ 115s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 115s] Makefile:443: recipe for target 'all-recursive' failed [ 115s] make[2]: *** [all-recursive] Error 1 [ 115s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 115s] Makefile:375: recipe for target 'all' failed [ 115s] make[1]: *** [all] Error 2 [ 115s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 115s] dh_auto_build: make -j1 returned exit code 2 [ 115s] debian/rules:45: recipe for target 'build' failed [ 115s] make: *** [build] Error 2 [ 115s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 115s] [ 115s] build31 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:00 UTC 2017. [ 115s] [ 116s] ### VM INTERACTION START ### [ 119s] [ 110.545900] reboot: Power down [ 119s] ### VM INTERACTION END ### [ 119s] [ 119s] build31 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:03 UTC 2017. [ 119s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:04:29 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:04:29 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64 In-Reply-To: References: Message-ID: <5a47f15e3e7f9_18ff474f507125de@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 97s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 97s] printf(line); [ 97s] ^~~~~~ [ 97s] cc1: some warnings being treated as errors [ 97s] Makefile:517: recipe for target 'abisip-find.o' failed [ 97s] make[4]: *** [abisip-find.o] Error 1 [ 97s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 97s] Makefile:408: recipe for target 'all-recursive' failed [ 97s] make[3]: *** [all-recursive] Error 1 [ 97s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 97s] Makefile:443: recipe for target 'all-recursive' failed [ 97s] make[2]: *** [all-recursive] Error 1 [ 97s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 97s] Makefile:375: recipe for target 'all' failed [ 97s] make[1]: *** [all] Error 2 [ 97s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 97s] dh_auto_build: make -j1 returned exit code 2 [ 97s] debian/rules:45: recipe for target 'build' failed [ 97s] make: *** [build] Error 2 [ 97s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 97s] [ 97s] lamb71 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:25 UTC 2017. [ 97s] [ 97s] ### VM INTERACTION START ### [ 100s] [ 92.350446] reboot: Power down [ 100s] ### VM INTERACTION END ### [ 100s] [ 100s] lamb71 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:28 UTC 2017. [ 100s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:04:46 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:04:46 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5a47f17e26bcb_18ff474f507126af@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 106s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 106s] printf(line); [ 106s] ^ [ 106s] cc1: some warnings being treated as errors [ 106s] Makefile:517: recipe for target 'abisip-find.o' failed [ 106s] make[4]: *** [abisip-find.o] Error 1 [ 106s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 106s] Makefile:408: recipe for target 'all-recursive' failed [ 106s] make[3]: *** [all-recursive] Error 1 [ 106s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 106s] Makefile:443: recipe for target 'all-recursive' failed [ 106s] make[2]: *** [all-recursive] Error 1 [ 106s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 106s] Makefile:375: recipe for target 'all' failed [ 106s] make[1]: *** [all] Error 2 [ 106s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 106s] dh_auto_build: make -j1 returned exit code 2 [ 106s] debian/rules:45: recipe for target 'build' failed [ 106s] make: *** [build] Error 2 [ 106s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 106s] [ 106s] build75 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:27 UTC 2017. [ 106s] [ 106s] ### VM INTERACTION START ### [ 109s] [ 103.073332] reboot: Power down [ 109s] ### VM INTERACTION END ### [ 109s] [ 109s] build75 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:04:31 UTC 2017. [ 109s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:05:20 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:05:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5a47f19be9a5b_18ff474f5071285f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 168s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 168s] printf(line); [ 168s] ^~~~~~ [ 168s] cc1: some warnings being treated as errors [ 168s] Makefile:517: recipe for target 'abisip-find.o' failed [ 168s] make[4]: *** [abisip-find.o] Error 1 [ 168s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 168s] Makefile:408: recipe for target 'all-recursive' failed [ 168s] make[3]: *** [all-recursive] Error 1 [ 168s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 168s] Makefile:443: recipe for target 'all-recursive' failed [ 168s] make[2]: *** [all-recursive] Error 1 [ 168s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 168s] Makefile:375: recipe for target 'all' failed [ 168s] make[1]: *** [all] Error 2 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] dh_auto_build: make -j1 returned exit code 2 [ 168s] debian/rules:45: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] lamb22 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:07 UTC 2017. [ 168s] [ 168s] ### VM INTERACTION START ### [ 171s] [ 160.632510] reboot: Power down [ 171s] ### VM INTERACTION END ### [ 171s] [ 171s] lamb22 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:10 UTC 2017. [ 171s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:05:20 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:05:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5a47f19d3cd55_18ff474f50712952@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 105s] printf(line); [ 105s] ^ [ 106s] cc1: some warnings being treated as errors [ 106s] Makefile:506: recipe for target 'abisip-find.o' failed [ 106s] make[4]: *** [abisip-find.o] Error 1 [ 106s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 106s] Makefile:396: recipe for target 'all-recursive' failed [ 106s] make[3]: *** [all-recursive] Error 1 [ 106s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 106s] Makefile:431: recipe for target 'all-recursive' failed [ 106s] make[2]: *** [all-recursive] Error 1 [ 106s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 106s] Makefile:362: recipe for target 'all' failed [ 106s] make[1]: *** [all] Error 2 [ 106s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 106s] dh_auto_build: make -j1 returned exit code 2 [ 106s] debian/rules:45: recipe for target 'build' failed [ 106s] make: *** [build] Error 2 [ 106s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 106s] [ 106s] lamb74 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:10 UTC 2017. [ 106s] [ 106s] ### VM INTERACTION START ### [ 107s] Powering off. [ 107s] [ 100.130792] reboot: Power down [ 107s] ### VM INTERACTION END ### [ 107s] [ 107s] lamb74 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:12 UTC 2017. [ 107s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:05:20 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:05:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5a47f1a022c41_18ff474f50713012@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 108s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 108s] printf(line); [ 108s] ^ [ 109s] cc1: some warnings being treated as errors [ 109s] Makefile:517: recipe for target 'abisip-find.o' failed [ 109s] make[4]: *** [abisip-find.o] Error 1 [ 109s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 109s] Makefile:408: recipe for target 'all-recursive' failed [ 109s] make[3]: *** [all-recursive] Error 1 [ 109s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 109s] Makefile:443: recipe for target 'all-recursive' failed [ 109s] make[2]: *** [all-recursive] Error 1 [ 109s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 109s] Makefile:375: recipe for target 'all' failed [ 109s] make[1]: *** [all] Error 2 [ 109s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 109s] dh_auto_build: make -j1 returned exit code 2 [ 109s] debian/rules:45: recipe for target 'build' failed [ 109s] make: *** [build] Error 2 [ 109s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 109s] [ 109s] lamb67 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:13 UTC 2017. [ 109s] [ 109s] ### VM INTERACTION START ### [ 112s] [ 105.154204] reboot: Power down [ 112s] ### VM INTERACTION END ### [ 112s] [ 112s] lamb67 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:17 UTC 2017. [ 112s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:05:20 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:05:20 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64 In-Reply-To: References: Message-ID: <5a47f1a07303b_18ff474f507131d2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 149s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 149s] printf(line); [ 149s] ^~~~~~ [ 149s] cc1: some warnings being treated as errors [ 149s] Makefile:517: recipe for target 'abisip-find.o' failed [ 149s] make[4]: *** [abisip-find.o] Error 1 [ 149s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 149s] Makefile:408: recipe for target 'all-recursive' failed [ 149s] make[3]: *** [all-recursive] Error 1 [ 149s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 149s] Makefile:443: recipe for target 'all-recursive' failed [ 149s] make[2]: *** [all-recursive] Error 1 [ 149s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 149s] Makefile:375: recipe for target 'all' failed [ 149s] make[1]: *** [all] Error 2 [ 149s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 149s] dh_auto_build: make -j1 returned exit code 2 [ 149s] debian/rules:45: recipe for target 'build' failed [ 149s] make: *** [build] Error 2 [ 149s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 150s] [ 150s] cloud115 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:11 UTC 2017. [ 150s] [ 150s] ### VM INTERACTION START ### [ 153s] [ 120.671954] reboot: Power down [ 155s] ### VM INTERACTION END ### [ 156s] [ 156s] cloud115 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:18 UTC 2017. [ 156s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:05:54 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:05:54 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5a47f1b7b628d_18ff474f50713247@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 131s] abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] [ 131s] printf(line); [ 131s] ^~~~~~ [ 131s] cc1: some warnings being treated as errors [ 131s] Makefile:517: recipe for target 'abisip-find.o' failed [ 131s] make[4]: *** [abisip-find.o] Error 1 [ 131s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 131s] Makefile:408: recipe for target 'all-recursive' failed [ 131s] make[3]: *** [all-recursive] Error 1 [ 131s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 131s] Makefile:443: recipe for target 'all-recursive' failed [ 131s] make[2]: *** [all-recursive] Error 1 [ 131s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 131s] Makefile:375: recipe for target 'all' failed [ 131s] make[1]: *** [all] Error 2 [ 131s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 131s] dh_auto_build: make -j1 returned exit code 2 [ 131s] debian/rules:45: recipe for target 'build' failed [ 131s] make: *** [build] Error 2 [ 131s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 131s] [ 131s] lamb05 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:43 UTC 2017. [ 131s] [ 131s] ### VM INTERACTION START ### [ 134s] [ 125.820549] reboot: Power down [ 134s] ### VM INTERACTION END ### [ 134s] [ 134s] lamb05 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:05:47 UTC 2017. [ 134s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:07:37 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:07:37 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5a47f2115d09d_18ff474f507135cc@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 108s] printf(line); [ 108s] ^ [ 108s] cc1: some warnings being treated as errors [ 108s] Makefile:506: recipe for target 'abisip-find.o' failed [ 108s] make[4]: *** [abisip-find.o] Error 1 [ 108s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 108s] Makefile:396: recipe for target 'all-recursive' failed [ 108s] make[3]: *** [all-recursive] Error 1 [ 108s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 108s] Makefile:431: recipe for target 'all-recursive' failed [ 108s] make[2]: *** [all-recursive] Error 1 [ 108s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 108s] Makefile:362: recipe for target 'all' failed [ 108s] make[1]: *** [all] Error 2 [ 108s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 108s] dh_auto_build: make -j1 returned exit code 2 [ 108s] debian/rules:45: recipe for target 'build' failed [ 108s] make: *** [build] Error 2 [ 108s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 108s] [ 108s] build79 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:07:20 UTC 2017. [ 108s] [ 108s] ### VM INTERACTION START ### [ 109s] Powering off. [ 109s] [ 101.848645] reboot: Power down [ 109s] ### VM INTERACTION END ### [ 109s] [ 109s] build79 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:07:21 UTC 2017. [ 109s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 20:56:30 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 20:56:30 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5a47fd8dba959_18ff474f50718863@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 611s] printf(line); [ 611s] ^~~~~~ [ 612s] cc1: some warnings being treated as errors [ 612s] Makefile:517: recipe for target 'abisip-find.o' failed [ 612s] make[4]: *** [abisip-find.o] Error 1 [ 612s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 612s] Makefile:408: recipe for target 'all-recursive' failed [ 612s] make[3]: *** [all-recursive] Error 1 [ 612s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 612s] Makefile:443: recipe for target 'all-recursive' failed [ 612s] make[2]: *** [all-recursive] Error 1 [ 612s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 612s] Makefile:375: recipe for target 'all' failed [ 612s] make[1]: *** [all] Error 2 [ 612s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 612s] dh_auto_build: make -j1 returned exit code 2 [ 612s] debian/rules:45: recipe for target 'build' failed [ 612s] make: *** [build] Error 2 [ 612s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 612s] [ 612s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:56:12 UTC 2017. [ 612s] [ 612s] ### VM INTERACTION START ### [ 615s] [ 558.134223] sysrq: SysRq : Power Off [ 615s] [ 558.162853] reboot: Power down [ 616s] ### VM INTERACTION END ### [ 616s] [ 616s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 20:56:16 UTC 2017. [ 616s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Dec 30 21:41:04 2017 From: admin at opensuse.org (OBS Notification) Date: Sat, 30 Dec 2017 21:41:04 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5a4807feb9844_18ff474f5072295a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 177s] printf(line); [ 177s] ^~~~~~ [ 177s] cc1: some warnings being treated as errors [ 177s] Makefile:517: recipe for target 'abisip-find.o' failed [ 177s] make[4]: *** [abisip-find.o] Error 1 [ 177s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/ipaccess' [ 177s] Makefile:408: recipe for target 'all-recursive' failed [ 177s] make[3]: *** [all-recursive] Error 1 [ 177s] make[3]: Leaving directory '/usr/src/packages/BUILD/src' [ 177s] Makefile:443: recipe for target 'all-recursive' failed [ 177s] make[2]: *** [all-recursive] Error 1 [ 177s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 177s] Makefile:375: recipe for target 'all' failed [ 177s] make[1]: *** [all] Error 2 [ 177s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 177s] dh_auto_build: make -j1 returned exit code 2 [ 177s] debian/rules:45: recipe for target 'build' failed [ 177s] make: *** [build] Error 2 [ 177s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 177s] [ 177s] armbuild02 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 21:40:49 UTC 2017. [ 177s] [ 177s] ### VM INTERACTION START ### [ 180s] [ 163.908256] SysRq : Power Off [ 180s] [ 163.927807] reboot: Power down [ 180s] ### VM INTERACTION END ### [ 180s] [ 180s] armbuild02 failed "build osmo-bsc_1.1.2.20171230.dsc" at Sat Dec 30 21:40:52 UTC 2017. [ 180s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Dec 30 23:19:56 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 30 Dec 2017 23:19:56 +0000 Subject: pysim[master]: pySim-*.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 23:19:59 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 30 Dec 2017 23:19:59 +0000 Subject: pysim[master]: pySim-prog.py: Fix trailing whitespace In-Reply-To: References: Message-ID: Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Dec 30 23:20:04 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 30 Dec 2017 23:20:04 +0000 Subject: [MERGED] pysim[master]: pySim-prog.py: Fix trailing whitespace In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: pySim-prog.py: Fix trailing whitespace ...................................................................... pySim-prog.py: Fix trailing whitespace Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 --- M pySim-prog.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Pau Espin Pedrol: Verified Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index d3a29c7..3df18ba 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -650,4 +650,3 @@ if not opts.batch_mode: done = True - -- To view, visit https://gerrit.osmocom.org/5622 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I735dc7bb774d77d3b60b1712b0f0afcbb81dc726 Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sat Dec 30 23:20:05 2017 From: gerrit-no-reply at lists.osmocom.org (Pau Espin Pedrol) Date: Sat, 30 Dec 2017 23:20:05 +0000 Subject: [MERGED] pysim[master]: pySim-*.py: Set shebang to use python v2 In-Reply-To: References: Message-ID: Pau Espin Pedrol has submitted this change and it was merged. Change subject: pySim-*.py: Set shebang to use python v2 ...................................................................... pySim-*.py: Set shebang to use python v2 Nowadays bin/python usually points to python3, and this script is written in python2, which means if run directly from terminal it will fail with some print syntax errors. Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e --- M pySim-prog.py M pySim-read.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Verified Harald Welte: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index 14874cd..d3a29c7 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to deal with sim cards and program the 'magic' ones easily diff --git a/pySim-read.py b/pySim-read.py index 2c10866..5ca39ee 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Utility to display some informations about a SIM card -- To view, visit https://gerrit.osmocom.org/5621 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ab4e9edc44a8045915d4828c6de2fa98027fb7e Gerrit-PatchSet: 2 Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:01:47 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:01:47 +0000 Subject: [MERGED] osmo-msc[master]: VLR: log subscriber update In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: VLR: log subscriber update ...................................................................... VLR: log subscriber update * move log helpers to generic header * log subscriber update It's handy for troubleshooting issues with subscriber update via GSUP from HLR. Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr.c M src/libvlr/vlr_core.h M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.err 15 files changed, 62 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index d68b7be..b4bb27f 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -12,6 +12,12 @@ // for GSM_NAME_LENGTH #include +#define LOGGSUPP(level, gsup, fmt, args...) \ + LOGP(DVLR, level, "GSUP(%s) " fmt, (gsup)->imsi, ## args) + +#define LOGVSUBP(level, vsub, fmt, args...) \ + LOGP(DVLR, level, "SUBSCR(%s) " fmt, vlr_subscr_name(vsub), ## args) + struct log_target; /* from 3s to 10s */ diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 88472e0..3045f71 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3476,7 +3476,8 @@ /* VLR informs us that the subscriber data has somehow been modified */ static void msc_vlr_subscr_update(struct vlr_subscr *subscr) { - /* FIXME */ + LOGVSUBP(LOGL_NOTICE, subscr, "VLR: update for IMSI=%s (MSISDN=%s, used=%d)\n", + subscr->imsi, subscr->msisdn, subscr->use_count); } /* VLR informs us that the subscriber has been associated with a conn */ diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 8c6911a..73c3f13 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -651,7 +651,7 @@ unsigned idx; int rc; - if (gsup_msg->msisdn_enc) { + if (gsup_msg->msisdn_enc) {//FIXME: vlr_subscr_set_msisdn()? decode_bcd_number_safe(vsub->msisdn, sizeof(vsub->msisdn), gsup_msg->msisdn_enc, gsup_msg->msisdn_enc_len, 0); diff --git a/src/libvlr/vlr_core.h b/src/libvlr/vlr_core.h index 310cd97..bf6314d 100644 --- a/src/libvlr/vlr_core.h +++ b/src/libvlr/vlr_core.h @@ -4,16 +4,6 @@ struct osmo_gsup_message; -#define LOGGSUPP(level, gsup, fmt, args...) \ - LOGP(DVLR, level, "GSUP(%s) " fmt, \ - (gsup)->imsi, \ - ## args) - -#define LOGVSUBP(level, vsub, fmt, args...) \ - LOGP(DVLR, level, "SUBSCR(%s) " fmt, \ - vlr_subscr_name(vsub), ## args) - - const char *vlr_subscr_name(struct vlr_subscr *vsub); int vlr_subscr_req_lu(struct vlr_subscr *vsub, bool is_ps); int vlr_subscr_req_sai(struct vlr_subscr *vsub, const uint8_t *auts, diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index 662074d..fac9623 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -80,6 +80,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -517,6 +518,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -960,6 +962,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1490,6 +1493,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -2034,6 +2038,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -2364,6 +2369,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index c7c7d8d..d17d44b 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -91,6 +91,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -439,6 +440,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.err b/tests/msc_vlr/msc_vlr_test_gsm_authen.err index e6d64a2..bee4646 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.err @@ -97,6 +97,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -544,6 +545,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -972,6 +974,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -1194,6 +1197,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1413,6 +1417,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1644,6 +1649,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index 711ca48..d17f5ea 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -98,6 +98,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -583,6 +584,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1103,6 +1105,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1344,6 +1347,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1532,6 +1536,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.err b/tests/msc_vlr/msc_vlr_test_hlr_reject.err index 50c1c73..812eb3b 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.err @@ -232,6 +232,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -381,6 +382,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -533,6 +535,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -760,6 +763,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err index 4a30c91..439dc72 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err @@ -123,6 +123,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err index f0c4116..4abcc18 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err @@ -183,6 +183,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -378,6 +379,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index e902065..0132461 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -38,6 +38,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -361,6 +362,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -695,6 +697,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -870,6 +873,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1042,6 +1046,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1256,6 +1261,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1413,6 +1419,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1602,6 +1609,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1764,6 +1772,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -1956,6 +1965,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err index ea256bc..229cabe 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.err +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.err @@ -82,6 +82,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -206,6 +207,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -336,6 +338,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -461,6 +464,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -575,6 +579,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -767,6 +772,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -961,6 +967,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1161,6 +1168,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1387,6 +1395,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -1630,6 +1639,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index ce27bf1..f4e5f0e 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -125,6 +125,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 @@ -241,6 +242,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr MSISDN:46071 usage increases to: 3 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=3) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 2 @@ -405,6 +407,7 @@ DVLR GSUP rx 17: 10010809710000004026f00804036470f1 DREF VLR subscr IMSI:901700000004620 usage increases to: 2 DVLR IMSI:901700000004620 has MSISDN:46071 +DVLR SUBSCR(MSISDN:46071) VLR: update for IMSI=901700000004620 (MSISDN=46071, used=2) DVLR GSUP tx: 12010809710000004026f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0 DREF VLR subscr MSISDN:46071 usage decreases to: 1 diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.err b/tests/msc_vlr/msc_vlr_test_umts_authen.err index 41bdf49..2c1741d 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.err +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.err @@ -80,6 +80,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -551,6 +552,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1058,6 +1060,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 @@ -1280,6 +1283,7 @@ DVLR GSUP rx 17: 10010809710000000156f00804032443f2 DREF VLR subscr IMSI:901700000010650 usage increases to: 2 DVLR IMSI:901700000010650 has MSISDN:42342 +DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000010650 (MSISDN=42342, used=2) DVLR GSUP tx: 12010809710000000156f0 GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000156f0 DREF VLR subscr MSISDN:42342 usage decreases to: 1 -- To view, visit https://gerrit.osmocom.org/5597 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1958aeeb3ea99831c7e2c5ee9a6b59834baf4520 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:02:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:02:07 +0000 Subject: [MERGED] osmo-iuh[master]: Add control interface In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add control interface ...................................................................... Add control interface * add libosmoctrl dependency * bind control interface Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba --- M configure.ac M include/osmocom/iuh/hnbgw.h M src/Makefile.am M src/hnbgw.c 4 files changed, 15 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 4c5f47f..2b8974f 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.10.0) PKG_CHECK_MODULES(OSMOVTY, libosmovty >= 0.10.0) +PKG_CHECK_MODULES(OSMOCTRL, libosmoctrl) PKG_CHECK_MODULES(OSMONETIF, libosmo-netif >= 0.1.0) PKG_CHECK_MODULES(OSMOSIGTRAN, libosmo-sigtran >= 0.8.0) PKG_CHECK_MODULES(ASN1C, libasn1c >= 0.9.28) diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 58bdab4..971ede4 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -129,7 +129,7 @@ struct llist_head ue_list; /* next availble UE Context ID */ uint32_t next_ue_ctx_id; - + struct ctrl_handle *ctrl; /* currently active CN links for CS and PS */ struct { struct osmo_sccp_instance *client; diff --git a/src/Makefile.am b/src/Makefile.am index 85bfad6..2e57a8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,7 @@ ranap_decoder.c ranap_encoder.c: gen_ranap.stamp AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ - $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) \ + $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOCTRL_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) # build the shared RANAP library @@ -67,7 +67,7 @@ hnbgw_vty.c \ context_map.c hnbgw_cn.c -osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) \ +osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(OSMONETIF_LIBS) \ hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \ diff --git a/src/hnbgw.c b/src/hnbgw.c index 5f5c311..a66f14a 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -41,7 +41,10 @@ #include #include #include - +#include +#include +#include +#include #include #include #include @@ -477,6 +480,13 @@ exit(1); } + g_hnb_gw->ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + if (!g_hnb_gw->ctrl) { + LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", + ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); + exit(1); + } + ranap_set_log_area(DRANAP); rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL); -- To view, visit https://gerrit.osmocom.org/5591 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:02:07 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:02:07 +0000 Subject: [MERGED] osmo-iuh[master]: Expand ctrl interface In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Expand ctrl interface ...................................................................... Expand ctrl interface Add commands to get number of connected HNBs and identity string of connected HNB based on Cell ID. Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9 --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c 2 files changed, 97 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 971ede4..094f31f 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -6,7 +6,7 @@ #include #include #include - +#include #define DEBUG #include @@ -18,6 +18,10 @@ DRANAP, }; +enum hnb_ctrl_node { + CTRL_NODE_HNB = _LAST_CTRL_NODE, + _LAST_CTRL_NODE_HNB +}; #define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" /* TODO: CS and PS now both connect to OsmoSTP, i.e. that's always going to be the same address. Drop the @@ -142,6 +146,9 @@ extern void *talloc_asn1_ctx; +struct hnb_context *hnb_context_by_id(struct hnb_gw *gw, uint32_t cid); +unsigned hnb_contexts(const struct hnb_gw *gw); + struct ue_context *ue_context_by_id(struct hnb_gw *gw, uint32_t id); struct ue_context *ue_context_by_imsi(struct hnb_gw *gw, const char *imsi); struct ue_context *ue_context_by_tmsi(struct hnb_gw *gw, uint32_t tmsi); diff --git a/src/hnbgw.c b/src/hnbgw.c index a66f14a..cd492bb 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -93,6 +93,30 @@ return gw; } +struct hnb_context *hnb_context_by_id(struct hnb_gw *gw, uint32_t cid) +{ + struct hnb_context *hnb; + + llist_for_each_entry(hnb, &gw->hnb_list, list) { + if (hnb->id.cid == cid) + return hnb; + } + + return NULL; +} + +unsigned hnb_contexts(const struct hnb_gw *gw) +{ + unsigned num_ctx = 0; + struct hnb_context *hnb; + + llist_for_each_entry(hnb, &gw->hnb_list, list) { + num_ctx++; + } + + return num_ctx; +} + struct ue_context *ue_context_by_id(struct hnb_gw *gw, uint32_t id) { struct ue_context *ue; @@ -423,6 +447,63 @@ } } +CTRL_CMD_DEFINE_RO(hnb_info, "info"); +static int get_hnb_info(struct ctrl_cmd *cmd, void *data) +{ + struct hnb_context *hnb = data; + + cmd->reply = talloc_strdup(cmd, hnb->identity_info); + + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_RO(hnbs, "num-hnb"); +static int get_hnbs(struct ctrl_cmd *cmd, void *data) +{ + cmd->reply = talloc_asprintf(cmd, "%u", hnb_contexts(data)); + + return CTRL_CMD_REPLY; +} + +int hnb_ctrl_cmds_install() +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_hnbs); + rc |= ctrl_cmd_install(CTRL_NODE_HNB, &cmd_hnb_info); + + return rc; +} + +static int hnb_ctrl_node_lookup(void *data, vector vline, int *node_type, void **node_data, int *i) +{ + const char *token = vector_slot(vline, *i); + struct hnb_context *hnb; + long num; + + switch (*node_type) { + case CTRL_NODE_ROOT: + if (strcmp(token, "hnb") != 0) + return 0; + + (*i)++; + + if (!ctrl_parse_get_num(vline, *i, &num)) + return -ERANGE; + + hnb = hnb_context_by_id(data, num); + if (!hnb) + return -ENODEV; + + *node_data = hnb; + *node_type = CTRL_NODE_HNB; + break; + default: + return 0; + } + + return 1; +} int main(int argc, char **argv) { @@ -480,11 +561,18 @@ exit(1); } - g_hnb_gw->ctrl = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, NULL); + g_hnb_gw->ctrl = ctrl_interface_setup_dynip2(g_hnb_gw, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW, + hnb_ctrl_node_lookup, _LAST_CTRL_NODE_HNB); if (!g_hnb_gw->ctrl) { LOGP(DMAIN, LOGL_ERROR, "Failed to create CTRL interface on %s:%u\n", ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_HNBGW); exit(1); + } else { + rc = hnb_ctrl_cmds_install(); + if (rc) { + LOGP(DMAIN, LOGL_ERROR, "Failed to install CTRL interface commands\n"); + return 2; + } } ranap_set_log_area(DRANAP); -- To view, visit https://gerrit.osmocom.org/5599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:02:19 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:02:19 +0000 Subject: [MERGED] osmo-sgsn[master]: Remove obsolete ./configure option In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Remove obsolete ./configure option ...................................................................... Remove obsolete ./configure option The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I6230cfcf10247b601e16e7b872305499815520a9 --- M README.vty-tests M configure.ac M contrib/jenkins.sh 3 files changed, 3 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/README.vty-tests b/README.vty-tests index ba1b87c..0669ea8 100644 --- a/README.vty-tests +++ b/README.vty-tests @@ -4,7 +4,7 @@ and pass the following configure options here: - ./configure --enable-vty-tests --enable-external-tests + ./configure --enable-external-tests The VTY tests are then included in the standard check target: diff --git a/configure.ac b/configure.ac index e886fa5..b89c046 100644 --- a/configure.ac +++ b/configure.ac @@ -150,11 +150,6 @@ CHECK_TM_INCLUDES_TM_GMTOFF -AC_ARG_ENABLE([vty_tests], - AC_HELP_STRING([--enable-vty-tests], - [Include the VTY/CTRL tests in make check (deprecated) - [default=no]]), - [enable_ext_tests="$enableval"],[enable_ext_tests="no"]) AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d2db0c9..a32be1e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -46,12 +46,12 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests +./configure --enable-sanitize $SMPP $MGCP $IU --enable-external-tests $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-external-tests" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/5606 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6230cfcf10247b601e16e7b872305499815520a9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:02:42 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:02:42 +0000 Subject: [MERGED] osmo-bsc[master]: Check and handle SMS encoding failure In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Check and handle SMS encoding failure ...................................................................... Check and handle SMS encoding failure The SMS address encoding can fail due to gsm48_encode_bcd_number() which was not checked for because wrong type was used. Fix this by using correct type, checking for error and propagating it to the caller. Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Fixes: CID57882 --- M src/osmo-bsc_nat/bsc_nat_rewrite.c 1 file changed, 22 insertions(+), 8 deletions(-) Approvals: daniel: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc_nat/bsc_nat_rewrite.c b/src/osmo-bsc_nat/bsc_nat_rewrite.c index 75ed4ec..7db9234 100644 --- a/src/osmo-bsc_nat/bsc_nat_rewrite.c +++ b/src/osmo-bsc_nat/bsc_nat_rewrite.c @@ -340,10 +340,10 @@ /** * This is a helper for GSM 04.11 8.2.5.2 Destination address element */ -void sms_encode_addr_element(struct msgb *out, const char *new_number, +static bool sms_encode_addr_element(struct msgb *out, const char *new_number, int format, int tp_data) { - uint8_t new_addr_len; + int new_addr_len; uint8_t new_addr[26]; /* @@ -355,6 +355,9 @@ */ new_addr_len = gsm48_encode_bcd_number(new_addr, ARRAY_SIZE(new_addr), 1, new_number); + if (new_addr_len < 0) + return false; + new_addr[1] = format; if (tp_data) { uint8_t *data = msgb_put(out, new_addr_len); @@ -363,6 +366,8 @@ } else { msgb_lv_put(out, new_addr_len - 1, new_addr + 1); } + + return true; } static struct msgb *sms_create_new(uint8_t type, uint8_t ref, @@ -391,7 +396,10 @@ msgb_v_put(out, ref); msgb_lv_put(out, orig_addr_len, orig_addr_ptr); - sms_encode_addr_element(out, new_number, 0x91, 0); + if (!sms_encode_addr_element(out, new_number, 0x91, 0)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } /* Patch the TPDU from here on */ @@ -411,11 +419,17 @@ msgb_v_put(out, data_ptr[1]); /* encode the new number and put it */ - if (strncmp(new_dest_nr, "00", 2) == 0) - sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1); - else - sms_encode_addr_element(out, new_dest_nr, 0x81, 1); - + if (strncmp(new_dest_nr, "00", 2) == 0) { + if (!sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } + } else { + if (!sms_encode_addr_element(out, new_dest_nr, 0x81, 1)) { + LOGP(DNAT, LOGL_ERROR, "Failed to encode SMS address.\n"); + return NULL; + } + } /* Copy the rest after the TP-DS */ data = msgb_put(out, data_len - 2 - 1 - old_dest_len); memcpy(data, &data_ptr[2 + 1 + old_dest_len], data_len - 2 - 1 - old_dest_len); -- To view, visit https://gerrit.osmocom.org/5615 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: daniel Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:06:06 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:06:06 +0000 Subject: gapk[master]: Add git-review config In-Reply-To: References: Message-ID: Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/5624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Dec 31 11:06:12 2017 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Sun, 31 Dec 2017 11:06:12 +0000 Subject: [MERGED] gapk[master]: Add git-review config In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add git-review config ...................................................................... Add git-review config Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Max: Verified Harald Welte: Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..1fbbca6 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=gapk -- To view, visit https://gerrit.osmocom.org/5624 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4304dc8248087c23aaf3a5d205cd341ed6a758a Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: tnt